Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 30 May 2011, 23:04
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Adding quick moderation to header template

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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This plugin doesn't seem to push the $modlinks variable through to the header template. I'm using this code in the header template:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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!
Reply With Quote
  #2  
Old 30 May 2011, 23:43
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
When I try this plugin code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And your template code in the header template, I see "Test" appear in my header. So that would seem to indicate that the query is failing. I don't have any adv_links table in my database, so maybe that's changed? (Although I don't have it in my vb3.8.3 database either).
Reply With Quote
  #3  
Old 31 May 2011, 21:49
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
adv_links is an addon vBadvanced Links Directory.

I'm trying to do the same thing with everything else... you could also try with this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The query should work as it works in other places, but for some reason it's not.

Thanks for your help!
Reply With Quote
  #4  
Old 01 Jun 2011, 00:28
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Hmm...I may be wrong. I'm not sure if there is any condition where $db->query_first returns something that would cause the conditional to be false. I put a different query in there like you suggested and it worked.

So could you problem be that something else is changing the value of $modthreads before you get to the header template render()?
Reply With Quote
  #5  
Old 01 Jun 2011, 03:11
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Hmm... well, I'm glad you said that, however there isn't anything else changing the value of it. It seems to have been the execution order for some reason. Anything 5+ doesn't work, less than 5, it works just fine.

Thank you!

--------------- Added 01 Jun 2011 at 03:27 ---------------

Err... looks like I actually spoke too soon. When changing to execution order to 4 or below, all of the variables have a value of "Array" instead of the actual number.

Last edited by Pitman; 01 Jun 2011 at 03:27. Reason: Auto-Merged DoublePost
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:19.

Layout Options | Width: Wide Color: