Results 1 to 8 of 8

Thread: Adding quick moderation to header template...

  1. #1
    Join Date
    Mar 2004
    Posts
    137

    Default Adding quick moderation to header template...

    Hi Brian,

    I'm trying to add everything back to a few of my sites since I've upgraded everything to vBulletin 4+...

    I had all of my moderation links display in the header template if I had anything that needed to be moderated.

    Basically, the idea is pretty much: Moderation link replaces logo if there are items to be moderated.

    I'm currently using the following code in the global_start hook:

    Code:
    $modlinks = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "adv_links WHERE valid = 0");
    
    vB_Template::preRegister('header',array('modlinks' => $modlinks));
    This plugin doesn't seem to push the $modlinks variable through to the header template. I'm using this code in the header template:
    Code:
    <vb:if condition="$modlinks">Test</vb:if>
    It doesn't work though, and I definitely have links that are in need of being moderated.

    I have also tried the parse_templates hook, which works for some things, however, when using that hook instead of global_start... I get a blank page.

    Any help would be appreciated!

    Thank you for your continuous support!

  2. #2
    Join Date
    Mar 2004
    Posts
    137

    Default

    I thought that I had it figured out... I changed the plugin execution order to 4 instead of 5 and "Test" displays. However, once checking the value of the variable, the value is always "Array" whether there are links awaiting moderation or not.

  3. #3
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Try using $modlinks['count'] in your condition, and {modlinks.count} to display the number instead.
    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

  4. #4
    Join Date
    Mar 2004
    Posts
    137

    Default

    For some reason, the moderation notification and link in the header no longer work anywhere other than when viewing vBa products (currently just Links Directory and Dynamics). It doesn't work on any forum page anymore.

    I'm not sure if it was a forum upgrade that caused it or something else, but I've went through and disabled any plugin\product that I would think could possible conflict with it, but nothing seems to make any difference.

    The following is the plugin I'm using (which, again, only works in vBa products):
    PHP Code:
    $modlinks "";

    if (
    is_member_of($vbulletin->userinfo6))
    {
    $modlinks $db->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "adv_links WHERE valid = 0");
    }

    vB_Template::preRegister
        
    'header', array('modlinks' => $modlinks
    ); 
    and the template code:
    Code:
    <vb:if condition="$modlinks['count']" />
    	<a href="/links/moderate.php">Links Awaiting Moderation: {vb:raw modlinks.count}</a>
    </vb:if>
    Again, the codes above work flawlessly when viewing either the Links Directory or Dynamics, but when viewing any forum page, it does not work.

    Any ideas on how I could possibly get this to work within the forum pages again?

    Thank you!

  5. #5
    Join Date
    Mar 2004
    Posts
    137

    Default

    Any input on this Brian?

  6. #6
    Join Date
    Mar 2004
    Posts
    137

    Default

    Bump... ?

  7. #7
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Weird, maybe try changing the "Hook Location" setting for that plugin to "parse_templates" instead?
    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

  8. #8
    Join Date
    Mar 2004
    Posts
    137

    Default

    I did not realize anything had been posted to this thread, I don't believe I got a subscription email for it.

    However, I've tried changing it to the parse_templates hook in the past, but I just tried it again and for some reason, when I change it from global_start to parse_templates, I get a blank page when trying to view any part of the site.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 27
    Last Post: 10-09-2010, 02:21 PM
  2. Adding photopost and LDM to Quick moderation?
    By Alfa1 in forum Module & Modification Discussion & Requests
    Replies: 0
    Last Post: 11-19-2006, 01:52 PM
  3. Adding Links Awaiting Moderation to vBa CMPS Quick Mod Module
    By adwade in forum Modifications (version 3.x & 2.x)
    Replies: 2
    Last Post: 09-21-2006, 12:25 AM
  4. Adding Link Validation To The Quick Moderation Module
    By gyankow in forum "How Do I..." Questions
    Replies: 2
    Last Post: 09-19-2006, 06:59 PM
  5. Replies: 6
    Last Post: 08-05-2004, 09:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •