1
mugzy
AgendaX "Submitted Events" for the Waiting Contents block
  • 2004/7/1 4:56

  • mugzy

  • Just popping in

  • Posts: 2

  • Since: 2004/7/1 4


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

Login

Who's Online

397 user(s) are online (301 user(s) are browsing Support Forums)


Members: 0


Guests: 397


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits