1
setaside
wf-section & agenda-x in waiting content block
  • 2003/9/30 2:25

  • setaside

  • Just popping in

  • Posts: 28

  • Since: 2002/9/24


can anyone help me modify the waiting content block so i can include in it articles that have been submitted to wf-section and events that have been submitted to agenda-x that are waiting for validation?

2
setaside
Re: wf-section & agenda-x in waiting content block
  • 2003/9/30 16:15

  • setaside

  • Just popping in

  • Posts: 28

  • Since: 2002/9/24


bump

3
Catzwolf
Re: wf-section & agenda-x in waiting content block
  • 2003/9/30 17:25

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


This is the code that will allow you to have wf-sections in the waiting content block


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_SUBWFS;
}
}
if ($module_handler->getCount(new Criteria('dirname', 'wfsection'))) {
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("wfs_files")." WHERE submit=0");
if ( $result ) {
$block['modules'][9]['adminlink'] = XOOPS_URL."/modules/wfsection/admin/allarticles.php?action=submitted";
list($block['modules'][9]['pendingnum']) = $xoopsDB->fetchRow($result);
$block['modules'][9]['lang_linkname'] = _MB_SYSTEM_WFDLS;
}
}

ATB

Catz

4
setaside
Re: wf-section & agenda-x in waiting content block
  • 2003/10/1 6:41

  • setaside

  • Just popping in

  • Posts: 28

  • Since: 2002/9/24


thanks for that.. works like a charm!

now, can anyone help me with the agenda-x one?

5
wjue
Re: wf-section & agenda-x in waiting content block
  • 2003/10/1 12:21

  • wjue

  • Quite a regular

  • Posts: 315

  • Since: 2002/8/3 7


The same way with table 'agendax_events' where approved=0

6
OnePay
Re: wf-section & agenda-x in waiting content block
  • 2003/10/29 11:52

  • OnePay

  • Just popping in

  • Posts: 9

  • Since: 2003/3/27


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.

7
chapi
Re: wf-section & agenda-x in waiting content block
  • 2003/10/29 12:05

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


I think it should be the following file. You have to search for system_waiting_show() in it.

modules/system/blocks/system_blocks.php

8
bwirum
Re: wf-section & agenda-x in waiting content block
  • 2004/1/20 10:21

  • bwirum

  • Just popping in

  • Posts: 49

  • Since: 2004/1/16


I'm at a loss here..

I inserted the code, like so:

$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;
        }

[
color=0000CC]<!-- start mod -->
    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_SUBWFS;
        }
    }
    if (
$module_handler->getCount(new Criteria('dirname''wfsection'))) {
        
$result $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("wfs_files")." WHERE submit=0");
        if ( 
$result ) {
            
$block['modules'][9]['adminlink'] = XOOPS_URL."/modules/wfsection/admin/allarticles.php?action=submitted";
            list(
$block['modules'][9]['pendingnum']) = $xoopsDB->fetchRow($result);
            
$block['modules'][9]['lang_linkname'] = _MB_SYSTEM_WFDLS;
        }
    }
<!-- 
end mod -->[/color]

    return 
$block;
}

function 
b_system_info_show($options)
{
    global 
$xoopsConfig$xoopsUser;
    
$xoopsDB =& Database::getInstance();


Between the <!-- start mod --> and <!-- end mod -->, but not only does my waiting contents block disappear, also my top posters and new members block is gone ??

Obviously need help here...

Thanks.

9
svaha
Re: wf-section & agenda-x in waiting content block
  • 2004/1/20 11:43

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


You could also look here
Aloha

10
bwirum
Re: wf-section & agenda-x in waiting content block
  • 2004/1/20 14:35

  • bwirum

  • Just popping in

  • Posts: 49

  • Since: 2004/1/16


Excellent. Thank you. Easier is always better :)!

Login

Who's Online

212 user(s) are online (125 user(s) are browsing Support Forums)


Members: 0


Guests: 212


more...

Donat-O-Meter

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

Latest GitHub Commits