The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
for newest member add this to phpinclude_start:
PHP Code:
HTML Code:
<a href="member.php?u=$newuserid">$newusername</a> |
#22
|
|||
|
|||
heloo FREIND ,
Step 1 : open : global.php Step 2 : Find line 491) Code:
eval('$header = "' . fetch_template('header') . '";');
Step 3 :Repalce with : Code:
$mem=$DB_site->query_first("SELECT COUNT(*) AS users FROM " . TABLE_PREFIX . "user");
$thr=$DB_site->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread");
$post=$DB_site->query_first("SELECT COUNT(*) AS posts FROM " . TABLE_PREFIX . "post");
$line=$DB_site->query_first("SELECT COUNT(*) AS ond FROM " . TABLE_PREFIX . "session");
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM " . TABLE_PREFIX . "user order by userid DESC limit 1");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
eval('$header = "' . fetch_template('header') . '";');
Step 4: threads : $thr[threads] Posts : $post[posts] members : $mem[users] new member : $newusername finish |
#23
|
|||
|
|||
Was this a reply to someones question? This is a very old thread, and the changes you suggest add more queries then needed to the page.
Quote:
|
#24
|
||||
|
||||
LOL ...
|
#25
|
|||
|
|||
Does this still work for 3.6.4? I can't seem to find the template: phpinclude_start
|
#26
|
|||
|
|||
This will not work for 3.6 versions. Instead, you need to use the global_start plugin.
|
#27
|
|||
|
|||
Do I have to create the "golbal_start" plugin? I can't find it?
|
#28
|
|||
|
|||
I want to do this aswell!
I'm using 3.7, would appreciate som help here :-) |
#29
|
|||
|
|||
This thread is 4 years old, and contains mostly outdated information.
I suggest you search for a more recent thread or create a new one. |
#30
|
||||
|
||||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|