سلام در مورد این ارور سرچ کردم چیزی نبود
لطفا بگيد اين ارور چی میگه و مشکل از کجاست؟
نمایش نسخه قابل چاپ
سلام در مورد این ارور سرچ کردم چیزی نبود
لطفا بگيد اين ارور چی میگه و مشکل از کجاست؟
تابع زیر موجود نیست.
باید این تابع ایجاد بشهکد:initmodules()
در خط 21 که ارور داده بعد از کد زیر
foreach ($modules as $module) {
بايد وارد کنم؟
اين تابع رو پيدا كن (حالا نميدونم از كجا.... شايد گوگل) بعد بنداز تو فايلي كه اين ارور رو ميده
ترجيحا بالاهاش بنداز؛ بالاشم يه كامنت بنويس كه خودت اضافه كردي، كه بعدا گيج نشي
موفق باشي يا علي
کدهایی که در خط 21 هست را در زیر آوردهام لطفا راهنمایی کنید ببینید اشکالی داره.
$allModules =& initModules();
if (isset( $GLOBALS['_MOS_MODULES'][$position] )) {
$modules = $GLOBALS['_MOS_MODULES'][$position];
} else {
$modules = array();
}
قالبتون رو بزارید تا بررسی بشه
سلام
کل کدها به شکل زیر است
defined( '_VALID_MOS' ) or die( 'Restricted access' );
function rtActiveColumn($position='left') {
return mosCountModules($position) > 0 ? 1 : 0;
}
function rtLoadModules( $position='left', $style=0 ) {
global $mosConfig_gzip, $mosConfig_absolute_path, $database, $my, $Itemid, $mosConfig_caching;
$style = intval( $style );
$cache =& mosCache::getCache( 'com_content' );
$allModules =& initModules();
if (isset( $GLOBALS['_MOS_MODULES'][$position] )) {
$modules = $GLOBALS['_MOS_MODULES'][$position];
} else {
$modules = array();
}
$count = 1;
foreach ($modules as $module) {
$params = new mosParameters( $module->params );
echo $prepend;
if ((substr("$module->module",0,4))=="mod_") {
if ($params->get('cache') == 1 && $mosConfig_caching == 1) {
$cache->call('rtmodules_html::module2', $module, $params, $Itemid, $style );
} else {
rtmodules_html::module2( $module, $params, $Itemid, $style, $count );
}
} else {
if ($params->get('cache') == 1 && $mosConfig_caching == 1) {
$cache->call('rtmodules_html::module', $module, $params, $Itemid, $style );
} else {
rtmodules_html::module( $module, $params, $Itemid, $style );
}
}
$count++;
}
}
class rtmodules_html {
function module( &$module, &$params, $Itemid, $style=0 ) {
// custom module params
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
$rssurl = $params->get( 'rssurl' );
if ( $rssurl ) {
// feed output
rtmodules_html::modoutput_feed( $module, $params, $moduleclass_sfx );
}
switch ( $style ) {
default:
// custom output
rtmodules_html::custom( $module, $params, $Itemid, $moduleclass_sfx, 1 );
break;
}
}
/**
* @param object
* @param object
* @param int The menu item ID
* @param int -1=show without wrapper and title, -2=xhtml style
*/
function module2( &$module, &$params, $Itemid, $style=0, $count=0 ) {
global $mosConfig_lang, $mosConfig_absolute_path;
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
// check for custom language file
$path = $mosConfig_absolute_path . '/modules/' . $module->module . $mosConfig_lang .'.php';
if (file_exists( $path )) {
include( $path );
} else {
$path = $mosConfig_absolute_path .'/modules/'. $module->module .'.eng.php';
if (file_exists( $path )) {
include( $path );
}
}
$number = '';
if ($count > 0) {
$number = '<span>' . $count . '</span> ';
}
switch ( $style ) {
default:
// custom output
rtmodules_html::custom( $module, $params, $Itemid, $moduleclass_sfx );
break;
}
}
function custom( $module, $params, $Itemid, $moduleclass_sfx, $type=0 ) {
global $mosConfig_live_site, $mosConfig_sitename, $mosConfig_lang, $mosConfig_absolute_path;
global $mainframe, $database, $my;
?>
<div class="module">
<a class="toggle"><?php echo $module->title; ?></a>
<div class="stretcher"><div class="padding">
<?php
if ( $type ) {
echo $module->content;
} else {
include( $mosConfig_absolute_path . '/modules/' . $module->module . '.php' );
if (isset( $content)) {
echo $content;
}
}
?>
</div></div>
</div>
<?php
}
}
?>
سلام
شما مطمئنید این تمام کدهاست ؟
شما از چه قالبی استفاده میکنید ؟
کل قالب رو آپلود کنید و لینک اون رو بذارید تا بررسی بشه
یا علی
سلام
این تمام کدهای قالب من نیست منتها اروری که در متن سایت پدیدار میشه به همین فایلی که کدهاشو در بالا وارد کردم اشاره داره
Fatal error: Call to undefined function: initmodules() in mydomain.com/...../madules.php on line 21
[quote author=رادمهر link=topic=5914.msg37858#msg37858 date=1179170890]
قالبتون رو بزارید تا بررسی بشه
[/quote]
لطفا!