6
For those of us who do not know where this code should be applied or how; here the following info:
if ($module_handler->getCount(new Criteria('dirname', 'agendax')))
{
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("agendax_events")." WHERE approved=0");
if ($result)
{
$block['modules'][8]['adminlink'] = XOOPS_URL."/modules/agendax/admin/index.php?op=listNewLinks";
list($block['modules'][8]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][8]['lang_linkname'] = _MB_SYSTEM_WADRESS;
}
}
if ($module_handler->getCount(new Criteria('dirname', 'xdirectory')))
{
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xdir_links")." WHERE status=0");
if ($result)
{
$block['modules'][9]['adminlink'] = XOOPS_URL."/modules/xdirectory/admin/index.php?op=listNewLinks";
list($block['modules'][9]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][9]['lang_linkname'] = _MB_SYSTEM_WADRESS;
}
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xdir_broken"));
if ($result)
{
$block['modules'][10]['adminlink'] = XOOPS_URL."/modules/xdirectory/admin/index.php?op=listBrokenLinks";
list($block['modules'][10]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][10]['lang_linkname'] = _MB_SYSTEM_BADRESS;
}
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xdir_mod"));
if ($result)
{
$block['modules'][11]['adminlink'] = XOOPS_URL."/modules/xdirectory/admin/index.php?op=listModReq";
list($block['modules'][11]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][11]['lang_linkname'] = _MB_SYSTEM_MADRESS;
}
}
insert this code in the file: /modules/system/blocks/system_blocks.php (in the function "b_system_waiting_show" -- I know it is deprecated, but this is still used in XOOPS version 2.0.5). Add it just above the last line in the function: "return $block;" (if you're not sure, check how the code in that function is build and simply duplicate how that is done).
PS: Note the numbers (8 through 11) they need to be consequtive with the numbers already there.