Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-07-2001 Last Update: Never Installs: 18
 
No support by the author.

I already posted this hack here, but not fully:
https://vborg.vbsupport.ru/showthrea...threadid=32610

Anyway, you can use this hack to show the number of online:
  • guests
  • members
  • all users (guests + members)
in either your header or footer templates.

Very easy to install, only to edit one file - global.php (in the forums folder, not admin nor mod folders!).
Instructions attached to this post.

For a demo... look at the header of this.

Have fun!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 02-09-2002, 03:20 PM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So did you get it going.

Still no over here.
Reply With Quote
  #33  
Old 02-09-2002, 03:40 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Lucky
Firefly,
If I may, I would ask what you did on this board here so that the online #'s show up. The link works, but the variable to show the amount of users is not....
Reply With Quote
  #34  
Old 02-09-2002, 04:02 PM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As an addition to this hack...

If you add this into the php_include code
PHP Code:
$headertotal=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM user WHERE lastactivity > " mktime(0,0,0,date("m"),date("d"),date("Y")) . " ORDER BY username");
$headertotal=$headertotal[count]; 
...you now have a total for how many users you've had so far today.

Use it in your header template like:
Quote:
$headeronline users online now
$headertotal so far today
Idea from https://vborg.vbsupport.ru/showthrea...threadid=34014 which is rather OTT for what I wanted.
Reply With Quote
  #35  
Old 02-10-2002, 08:04 PM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still don't work.

I add the php include and then add the headeronline to the p_themeheader and it still doesn't work.

I am at a standstill with this and this is just about my favorite hack. Any help would be great.
Thanks.
Reply With Quote
  #36  
Old 02-11-2002, 08:55 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where is the p_themeheader template eval()ed? It must be called after the phpinclude template so it can use the info from there.
Reply With Quote
  #37  
Old 02-11-2002, 09:43 PM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for taking the time buddy,

I have attached what both of my templates (p_themeheader, php include) look like.

I am not sure where it is eval()ed.

I believe it would be called upon by my root/index.php (not forums/index.php or forums/admin/index.php either)

I would really love to include this to my site.

If you need anything else, just let me know.

Thanks.
Reply With Quote
  #38  
Old 02-12-2002, 09:58 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And is the code in the phpinclude you showed me before or after my code for this hack? Also what's with vbp_includes.php?
Reply With Quote
  #39  
Old 02-12-2002, 11:50 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just like to say that if you use a script like PluhNews, that works a bit like vBPortal but is far less complex and more easy to use, you can simply add $headeronline on such pages as well, without any additional hacking.

www.kurafire.com - look below the second line of buttons. :up:
Reply With Quote
  #40  
Old 02-12-2002, 06:21 PM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I added your phpinclude stuff before instead of after this:
--------------------------------------------------------
if (!isset($mainfile)){
include("../vbp_includes.php");
}
--------------------------------------------------------
then I added $headeronlineusers in my p_themeheader.

Now it works in my forum perfectly. Thanks.

Now I just need it to work on my non vb index.php page.
Any ideas?
Reply With Quote
  #41  
Old 02-26-2002, 06:44 PM
Destee's Avatar
Destee Destee is offline
 
Join Date: Oct 2001
Location: destee.com
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

another nice one FireFly ... thanks
Reply With Quote
Reply

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

Forum Jump


All times are GMT. The time now is 11:47 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.09290 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
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)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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