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)
-   -   "Users browsing this thread" (https://vborg.vbsupport.ru/showthread.php?t=36841)

Twin-x 05-14-2002 09:44 AM

Quote:

Originally posted by tweak
Help i installed this Hack but it wont work. I checked all the code over and over its all there in the right spots But it wont show up on my forum??

The Code is in the templates and the created template is there.
the query is there.

I have the same problem. Nothing is showed.

tweak 05-14-2002 10:28 PM

Quote:

Originally posted by FireFly
Is that not a screen shot of forumhome?
Ahhh Ya? Isn't that where it should be? Like this board?

FWC 05-15-2002 04:26 AM

Quote:

Originally posted by tweak


Ahhh Ya? Isn't that where it should be? Like this board?

That's a different hack:

https://vborg.vbsupport.ru/showthrea...threadid=38012

tweak 05-15-2002 05:01 AM

OH SH*T Sorry guys ................. Thanx.

Admin 05-15-2002 09:36 AM

LOL. :)

tweak 05-15-2002 10:06 PM

Quote:

Originally posted by FireFly
LOL. :)
LOL You would not believe how much this stressed me. Spent hour checking everything over and over .LOL I was like WTF am i missing. But hey this hack is install and working great now that i really know what it does. :surprised:

FleaBag 05-21-2002 11:56 AM

Working well on 2.2.5, thanks FireFly! :)

TECK 05-23-2002 12:28 PM

firefly, i installed your hack today. i was thinking of an interesting mod... to show the actual numbers of users viewing the thread in forumdisplay. here it is what i did...
in forumdisplay.php find:
Code:

updateuserforum($forumid);
replace it with:
Code:

updateuserforum($forumid,$threadid);
find:
Code:

    ORDER BY sticky DESC, $sortfield $sqlsortorder
    ");

BELOW this add::
Code:

// users browsing each thread
$getthreadbrowsers = $DB_site->query("SELECT COUNT(*) AS count,inthread
                                      FROM user
                                      WHERE lastactivity>".($ourtimenow - $cookietimeout)."
                                        AND lastvisit<>lastactivity
                                      GROUP BY inthread");
$threadbrowsers = array();
while ($threadbrowser = $DB_site->fetch_array($getthreadbrowsers)) {
        $threadbrowsers[$threadbrowser['inthread']] = $threadbrowser['count'];
}

find:
Code:

      $thread[votenum] = '0';
    } else {

BELOW this, add:
Code:

      global $threadbrowsers;
      $activebrowsers = $threadbrowsers[$forum['forumid']];
      if (intval($activebrowsers)<1) {
        $activebrowsers = 0;
      }

now.. there is something i miss, because it will not update the number of users viewing the thread. i also tried this...
find:
Code:

getforumrules($foruminfo,$getperms);
BELOW this, add:
Code:

updateuserforum($thread['forumid'], $thread['threadid']);
i think there is an unset somewhere that stop it from counting. can you let me know if the basic idea is ok and what steps i missed? thanks.

Scott MacVicar 05-23-2002 01:07 PM

Just copying Chen's code from the forum viewers hack won't get you anywhere...

You can follow the same principle but theres an easier way :)

TECK 05-23-2002 08:14 PM

what do you mean wont get me anywhhere? firefly knows is his code, i dont understand what do you reffer to it.
what's the best way PPN? should i do a count in the $browsers query?


All times are GMT. The time now is 11:59 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.02235 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
  • (8)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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