Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2015, 02:46 PM
Iris_Ford Iris_Ford is offline
 
Join Date: Dec 2014
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Who's online by last activity

Hello everyone!

Is there a way of sorting the "who's online" by last active and not in alphabetical order?
I found a template modification, but unfortunately it's for vB 3.x


I'd appreciate if someone could help with a suggestion.
Thank you.
Reply With Quote
  #2  
Old 01-11-2015, 02:50 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you just have to click on the "Last Activity" heading. If you click it again it will sort in the opposite order.
Reply With Quote
  #3  
Old 01-11-2015, 02:54 PM
Iris_Ford Iris_Ford is offline
 
Join Date: Dec 2014
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I think you just have to click on the "Last Activity" heading. If you click it again it will sort in the opposite order.
Thank you for the quick reply.
I knew that, but what i meant ...is there any way to display in that order by default?

Also, on the main page of the forum @

<<WHAT'S GOING ON?
Currently Active UsersCURRENTLY ACTIVE USERS
There are currently 20 users online. 7 members and 13 guests
Most users ever online was 66, 01-06-2015 at 11:21 PM.>>

I'd like the members to be displayed by last activity rather than alphabetic.

Reply With Quote
  #4  
Old 01-11-2015, 03:12 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can create a new plugin using hook location online_start and this code:
PHP Code:
if ($sortfield == '') {
   
$sortfield 'time';


If you don't know how to create a plugin, you do it from the admincp under "Plugins & Products > Add New Plugin, and you can use the online manual here: http://www.vbulletin.com/docs/html/main/add_plugin

That should handle the Who's Online page. I'll take a look at the main page, but I don't think that's going to be as easy.
Reply With Quote
  #5  
Old 01-11-2015, 03:15 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, it looks like someone's done this already: https://vborg.vbsupport.ru/showthread.php?t=233369

but I haven't used it myself.
Reply With Quote
  #6  
Old 01-11-2015, 03:16 PM
Iris_Ford Iris_Ford is offline
 
Join Date: Dec 2014
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
You can create a new plugin using hook location online_start and this code:
PHP Code:
if ($sortfield == '') {
   
$sortfield 'time';


If you don't know how to create a plugin, you do it from the admincp under "Plugins & Products > Add New Plugin, and you can use the online manual here: http://www.vbulletin.com/docs/html/main/add_plugin

That should handle the Who's Online page. I'll take a look at the main page, but I don't think that's going to be as easy.
Thank you very much, i'll try to add that plugin.
And that would be great. I'd really prefer the members in the main page to be displayed by "last activity".

:up:
Reply With Quote
  #7  
Old 01-11-2015, 03:21 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I double-posted above, but after looking that up I searched and found a mod that supposedly handles both, so you might want to try that instead.
Reply With Quote
  #8  
Old 01-11-2015, 04:06 PM
Iris_Ford Iris_Ford is offline
 
Join Date: Dec 2014
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I double-posted above, but after looking that up I searched and found a mod that supposedly handles both, so you might want to try that instead.
Just installed and tested it, unfortunately only helps with the "who's online display", it doesn't sort the active members from the main page.
Reply With Quote
  #9  
Old 01-11-2015, 04:19 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Iris_Ford View Post
Just installed and tested it, unfortunately only helps with the "who's online display", it doesn't sort the active members from the main page.
Yeah, I looked at the code and did see how it was going to do that, but there was a screen shot of that section so I assumed it did somehow. I'll look at it a little later, unless someone else comes up with something.
Reply With Quote
  #10  
Old 01-11-2015, 04:37 PM
Iris_Ford Iris_Ford is offline
 
Join Date: Dec 2014
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Yeah, I looked at the code and did see how it was going to do that, but there was a screen shot of that section so I assumed it did somehow. I'll look at it a little later, unless someone else comes up with something.
That's very kind of you, kh99.
Thanks for the support.
Reply With Quote
Reply


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:56 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.03940 seconds
  • Memory Usage 2,253KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete