The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Okay, can you all give me a hand possibly?
I am using vb 2.0.3 what I am trying to do is this, I want the $pminfo variable to be in the Header template...and therefore display on all the pages in the site...I have found the code that is used in index.php and I tried to copy it over to global.php, but it doesn't work that way, what am I missing, please help! James |
#2
|
|||
|
|||
You just have to insert $pminfo into the header template. Nothing else is needed.
|
#3
|
||||
|
||||
Quote:
jamesdasher, I don't understand why you can't put the code from index.php in global.php. Maybe you're doing something wrong? |
#4
|
||||
|
||||
I added this to global.php:
Code:
$permissions=getpermissions(); if ($enablepms==1 and $permissions['canusepm'] and $bbuserinfo['receivepm']) { $ignoreusers=""; if (trim($bbuserinfo['ignorelist'])!="") { $ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ',$bbuserinfo[ignorelist])); } $allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers"); $newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers"); $unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers"); if ($newpm['messages']==0) { $lightbulb='off'; } else { $lightbulb='on'; } eval("\$pminfo = \"".gettemplate('forumhome_pmloggedin')."\";"); } else { $pminfo=''; } Code:
if (!$header) { |
#5
|
|||
|
|||
Thanks! It worked...
|
#6
|
|||
|
|||
nothings happend m8
|
#7
|
|||
|
|||
I added the code posted above to Global.php on my (under development) board but could not get it to work. I would like the PM info to display on all pages on the board in the "My Toolbox" area. You can see the board here:
http://64.78.63.86/forums/index.php Any help would be appreciated. Best, Lee |
#8
|
|||
|
|||
I'm also wondering how this could work in 2.2.6.
Anyone? |
#9
|
||||
|
||||
I think its already implimented
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|