Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 09-07-2004, 11:48 AM
Cyphrix Cyphrix is offline
 
Join Date: Jun 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for newest member add this to phpinclude_start:
PHP Code:
// get newest member name and userid start
        
$getnewestmember=$DB_site->query_first("SELECT userid, username FROM user WHERE userid=$numbersmembers[max]");
        
$newusername $getnewestmember['username'];
        
$newuserid $getnewestmember['userid'];
// get newest member name and userid end 
then in the header use:
HTML Code:
<a href="member.php?u=$newuserid">$newusername</a>
Reply With Quote
  #22  
Old 04-18-2005, 09:36 AM
Almotmaiz.Net Almotmaiz.Net is offline
 
Join Date: Jan 2005
Location: U.A.E, Sharjah
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #23  
Old 04-18-2005, 09:55 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Originally Posted by Almotmaiz.Net
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
Reply With Quote
  #24  
Old 04-18-2005, 11:37 AM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL ...
Reply With Quote
  #25  
Old 05-08-2007, 09:25 AM
Sjakie Sjakie is offline
 
Join Date: Oct 2006
Location: Holland, The Hague
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this still work for 3.6.4? I can't seem to find the template: phpinclude_start
Reply With Quote
  #26  
Old 05-08-2007, 05:39 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will not work for 3.6 versions. Instead, you need to use the global_start plugin.
Reply With Quote
  #27  
Old 05-12-2007, 08:20 AM
Sjakie Sjakie is offline
 
Join Date: Oct 2006
Location: Holland, The Hague
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do I have to create the "golbal_start" plugin? I can't find it?
Reply With Quote
  #28  
Old 05-16-2008, 10:55 AM
CycoreFredde CycoreFredde is offline
 
Join Date: Dec 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want to do this aswell!

I'm using 3.7, would appreciate som help here :-)
Reply With Quote
  #29  
Old 05-16-2008, 12:45 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #30  
Old 05-17-2008, 08:13 AM
GameWizard's Avatar
GameWizard GameWizard is offline
 
Join Date: Apr 2004
Location: Vancouver, BC
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"; 
    } 
}
Then place $header_avatar where you'd like the users avatar to appear. Mind you the /images/misc/unknown.gif is the location of the image if the user does not have an avatar.
---------
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
Use the following variables:
$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.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 10:38 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04428 seconds
  • Memory Usage 2,267KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete