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 Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-03-2001 Last Update: Never Installs: 25
 
No support by the author.

A hack which shows if the user is online or not within a column on the memberlist. Pretty simple.

Hack suggested by Ifrani.

Last updated on 05th of November 2001 08:20 GMT

I had hoped to just add to the original SQL query to make this hack work, obviously this didn't seem possible with the errors that people have been having with sessions.

Redocumented adding an extra query.

Show Your Support

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

Comments
  #12  
Old 11-05-2001, 03:37 AM
Ifrani's Avatar
Ifrani Ifrani is offline
 
Join Date: Oct 2001
Location: Berlin
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #13  
Old 11-05-2001, 06:19 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

updated documentation, it doesn't look like i could do it with one query.
Reply With Quote
  #14  
Old 11-05-2001, 06:28 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does the updated documentation fix the problem mentioned by myself, Syphin, and Ifrani?
Reply With Quote
  #15  
Old 11-05-2001, 06:36 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #16  
Old 11-05-2001, 06:48 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #17  
Old 11-05-2001, 07:02 AM
Syphin Syphin is offline
 
Join Date: Oct 2001
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #18  
Old 11-05-2001, 01:54 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"); 
Reply With Quote
  #19  
Old 11-05-2001, 02:34 PM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 11-05-2001, 02:36 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #21  
Old 11-05-2001, 02:38 PM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 01:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05749 seconds
  • Memory Usage 2,311KB
  • 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
  • (3)bbcode_php
  • (2)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
  • (3)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