دوستان سلام
من مشکلم رو تو سایت اصلی زوپس مطرح کردم و به جوابم رسیدم. گفتم اینجا هم قرار بردمش تا اگه کسی با مشکل من مواجه شد منتظر نمونه.
برای ارور:
Fatal error: Call to a member function mid() on a non-object in /home/sova/domains/sova.ir/public_html/modules/xnews/include/functions.php on line 501
برید به مسیر زیر:
modules/xnews/include/functions.php
و کد زیر رو در جای مورد نظر جایگزین کنید:
/**
* Verify that the current user is a member of the Admin group
*/
function nw_is_admin_group()
{
global $xoopsUser, $xoopsModule;
if(is_object($xoopsUser)) {
if(in_array('1',$xoopsUser->getGroups())) {
return true;
} else {
$mod_handler =& xoops_gethandler('module');
$xnewsModule = $mod_handler->getByDirname(NW_MODULE_DIR_NAME);
if($xoopsUser->isAdmin($xnewsModule->mid())) {
return true;
} else {
return false;
}
}
} else {
return false;
}
}
و بعد به مسیر زیر برید:
modules/xnews/blocks/news_latestnews.php
کد زیر رو در خط 124:
$enddiv = 'alt="'.$thisstory->title.'" width="'.$imgwidth.'" '.$height.' /></a></div>';
به کد زیر تغییر بدید:
$enddiv = 'alt="'.$thisstory->title.'" width="'.$imgwidth.'" '.$imgheight.' /></a></div>';
و کد زیر رو در خط 120:
if($options[4] != 0) { $height = 'height="'.$imgheight.'"'; } // set height = 0 in block option for auto height
به کد زیر تغییر بدید:
if($options[4] != 0) { $imgheight = 'height="'.$options[4].'"'; } // set height = 0 in block option for auto height
مشکل من که برطرف شد
راستی یکی از مدیران که دسترسی داره و میتونه, بره اسم این تاپیک رو به " مشکل عجیب در ماژول xnews " و یا هر چیز دیگهای که پیدا کردنش راحت باشه, تغییر بده.