The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
Displaying Avatar in Header Plugin:
Hook Location: global_start Code: Code:
if ($vbulletin->userinfo['userid']) { require_once('./includes/functions_user.php'); //make sure we have the function we need $header_avatar = fetch_avatar_url($vbulletin->userinfo['userid']); if (!is_array($header_avatar)) { $header_avatar[] = $vbulletin->options['bburl'] . "/images/misc/unknown.gif"; } } --------- Showing user stats in the header Plugin: Hook Location: global_start Code: Code:
// forum stats start $numbersmembers = $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " . TABLE_PREFIX . "user"); $numbermembers = number_format($numbersmembers['users']); $counter = $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post"); $totalposts=number_format($counter['posts']); $countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread"); $totalthreads=number_format($countthreads['threads']); // forum stats end // total online start $datecut = TIMENOW - $vbulletin->options['cookietimeout']; $headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut"); $headerusers=$db->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " . TABLE_PREFIX . "session WHERE " . TABLE_PREFIX . "session.userid>0 AND " . TABLE_PREFIX . "session.lastactivity>$datecut"); $headerguests=$headerguests[count]; $headerusers=$headerusers[count]; $totalonline=$headerguests+$headerusers; // total online end // get newest member name and userid start $getnewestmember=$db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid=$numbersmembers[max]"); $newusername = $getnewestmember['username']; $newuserid = $getnewestmember['userid']; // get newest member name and userid end $totalonline = Total Users Online $numbermembers = Total Members Registered Unfortunately I don't have any other variables, so you'll need to find code for the other ones you'd like to display. |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|