1
JackJ
wfsection submission to waiting contents block hack
  • 2004/1/25 23:22

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


I rustled up something that works on my site for wfsections. New submissions are passed to the waiting contents block.

Go to modules/system/blocks

and open system_blocks.php

Look for a line like this aound line 263 i.e.

$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_status=1");
if ( $result ) {
$block['modules'][7]['adminlink'] = XOOPS_URL."/modules/system/admin.php?module=0&status=1&fct=comments";
list($block['modules'][7]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][7]['lang_linkname'] =_MB_SYSTEM_COMPEND;
}

Add this code below it:

if ($module_handler->getCount(new Criteria('dirname', 'wfsection'))) {
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix ("wfs_article") ." WHERE published=0");
if ( $result ) {
$block['modules'][8]['adminlink'] = XOOPS_URL."/modules/wfsection/admin/allarticles.php?action=submitted";
list($block['modules'][8]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][8]['lang_linkname'] = _MB_SYSTEM_SUBWF;
}
}

then go to modules/system/language/english

open blocks.php and add this define:

define("_MB_SYSTEM_SUBWF","Submitted Articles");


when you look at the structure you can position this in some sort of order. see the numbers in the code i.e. "8"


Login

Who's Online

175 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 175


more...

Donat-O-Meter

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

Latest GitHub Commits