1
Tired of having to go to the AgendaX module to see if there are events to approve? Here is a hack that will add a Submitted Events count to the Waiting Contents block.
Open modules\system\language\english\blocks.php and add:
define("_MB_SYSTEM_NEVENTS","Submitted Events");
to the end of the "// RMV-NOTIFY" section.
Now open modules\system\blocks\system_blocks.php find
return $block;
}
function b_system_info_show($options)
insert the code below above "return $block;"
if ($module_handler->getCount(new Criteria('dirname', 'agendax'))) {
$result = $xoopsDB->query("SELECT COUNT(*) as cs FROM ".$xoopsDB->prefix("agendax_events")." WHERE approved=0");
if ( $result ) {
$block['modules'][8]['adminlink'] = XOOPS_URL."/modules/agendax/index.php?op=pending";
list($block['modules'][8]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][8]['lang_linkname'] =_MB_SYSTEM_NEVENTS;
}
}
Make sure to change the three 8s (EX: $block['modules'][8]) to follow the sequence of the block above.
My first hack :) so be nice to me? ;)
Mugzy