vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Number of users browsing current forum (https://vborg.vbsupport.ru/showthread.php?t=38005)

Renegade 07-25-2002 10:16 AM

I am looking for the hack that vbulletin.org uses. It offers the number of users browsing the forum on the main index page. Anybody know how to do this?

Renegade 07-25-2002 10:17 AM

I am trying to find the hack that vbulletin.org uses in the main forum index page. It displays the number of users browsing the forum in the forum name field??

Barret 09-01-2002 03:48 AM

Quote:

Originally posted by Renegade
I am trying to find the hack that vbulletin.org uses in the main forum index page. It displays the number of users browsing the forum in the forum name field??
I`m looking for the same hack! ;)

Chris M 09-01-2002 08:23 AM

Cool:)

If you could get it for "Users browsing this Thread", that would be cool:)

Satan

Boofo 09-01-2002 08:36 AM

Just do the same coding in showthread.php and you did the forumdisplay and it will be the same. :) I even went one step further and have it saying:

(1 User Browsing this Thread: Boofo) and
(2 Users Browsing this Thread: Boofo, hellsatan)

Quote:

Originally posted by hellsatan
Cool:)

If you could get it for "Users browsing this Thread", that would be cool:)

Satan


Chris M 09-01-2002 08:45 AM

Ok so it would work:)

Cool:)

Thanks:D

Satan

Boofo 09-01-2002 08:47 AM

I have the code if it would help you. ;)

Chris M 09-01-2002 09:01 AM

Yes please:)

Satan

Boofo 09-01-2002 09:37 AM

Here you go. :)

NOTE: You need to have Firefdly's Users browsing this thread hack installed.

Code:

-----------------------
In showthread.php:
-----------------------
After this:
-----------------------

if ($showforumusers) {
        $datecut = $ourtimenow - $cookietimeout;
        $browsers = '';
        $comma = '';

-----------------------
Add this:
-----------------------

$usercount = 0;

-----------------------
After this:
-----------------------

} else {
                                $invisibleuser = '';
                    }
                        eval("\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");
                        $comma = ', ';

-----------------------
Add this:
-----------------------

$usercount++;

-----------------------
Before this:
-----------------------

eval("\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");

-----------------------
Add this
-----------------------

$usercount++;

-----------------------
After this:
-----------------------

if ($browsers) {

-----------------------
Add this:
-----------------------

                $s = 's';
    if (intval($usercount) < 1) {
            $usercount = 0;
        }
        if (intval($usercount) == 1) {
            $s = '';
        }

-----------------------
In the "showthread_browsing" template:
-----------------------
Replace the contents with this:
-----------------------

<br>(<b>$usercount</b> User$s Browsing this Thread: $browsers)


Chris M 09-01-2002 09:45 AM

Thanks:)

Satan


All times are GMT. The time now is 06:16 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.01168 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete