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)
-   -   Show useronline on memberlist (https://vborg.vbsupport.ru/showthread.php?t=32109)

Ifrani 11-05-2001 03:37 AM

Quote:

Originally posted by Syphin
er... uuh... its showing multiple sessions for me... O.o i have the updated one installed too... O.o

Yep, I have the same problem...

@PPN
Can u help us, please ? :)

Scott MacVicar 11-05-2001 06:19 AM

updated documentation, it doesn't look like i could do it with one query.

JJR512 11-05-2001 06:28 AM

Does the updated documentation fix the problem mentioned by myself, Syphin, and Ifrani?

JJR512 11-05-2001 06:36 AM

There is a problem with the new directions.

In the "memberlist.php" section, the stuff you say to look for in the second part of that step (starts with if ($userinfo[receivepm]) {) is actually in the file online.php file.

JJR512 11-05-2001 06:48 AM

OK, I installed the new version. There were only a few other people online at the time. I still show up twice, but everybody else online only showed up once. I talked to another person who was online by ICQ and he confirmed that to him, I showed up twice, and everybody else online only showed up once. So there's still something not quite right here.

Syphin 11-05-2001 07:02 AM

Quote:

Originally posted by JJR512
OK, I installed the new version. There were only a few other people online at the time. I still show up twice, but everybody else online only showed up once. I talked to another person who was online by ICQ and he confirmed that to him, I showed up twice, and everybody else online only showed up once. So there's still something not quite right here.

same thing here... >_<


-Syphin

Scott MacVicar 11-05-2001 01:54 PM

did you return the Query to,

PHP Code:

  $users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE 
$condition AND user.userid = userfield.userid
                                "
.iif($memberAllGood" AND usergroupid NOT IN (1,3,4) """)."
                          ORDER BY 
$orderby $direction
                          LIMIT "
.($limitlower-1).",$perpage"); 


Freddie Bingham 11-05-2001 02:34 PM

Don't add that select query as this will achieve the same thing and will not add any queries or overhead, just add this to the code and make the html changes to the templates as described above:

find:
PHP Code:

if ($userinfo[receivepm]) {
      eval(
"\$userinfo[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
    } else {
      
$userinfo[pmlink] = "&nbsp;";
    } 

below it add:
PHP Code:

if($userinfo['lastactivity'] > $datecut and !$userinfo['invisible'] and $userinfo['lastvisit'] != $userinfo['lastactivity']) {
      eval(
"\$userinfo[online] = \"".gettemplate("postbit_online")."\";");
    }
    else {
      eval(
"\$userinfo[online] = \"".gettemplate("postbit_offline")."\";");
    } 

You can apply this to any page to show whether a user is online or offline without touching the session table.

Scott MacVicar 11-05-2001 02:36 PM

But i've noticed that sometimes the user profile doesn't update and the session query slows a different time from the one within the userprofile.

Freddie Bingham 11-05-2001 02:38 PM

If the last* times in the user table aren't updating than there is a problem with the doshutdown() function not activating. If this was the case than you would notice that users would not be showing up on the "Browsing this forum" feature as that information is set in the same query that updates the lastvisit & lastactivity times in the user table.


All times are GMT. The time now is 01:46 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.01026 seconds
  • Memory Usage 1,747KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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