vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Request: Sort Users in the What's Going on Box by Last Activity. (https://vborg.vbsupport.ru/showthread.php?t=222769)

neo1211 09-09-2009 02:58 AM

Request: Sort Users in the What's Going on Box by Last Activity.
 
Title says it all, I need a simple modification that will sort the users on the home page in the what's going on box by their last activity instead of by username or random. Anyone who can help me out would be much appreciated. I've dug around these forums for quite some time and found nothing that can do this, even though I know it should require nothing more than a small FORUMHOME edit.

Thanks in advance.

Lynne 09-09-2009 03:47 AM

Have you tried just replacing the order part of the query in index.php?
PHP Code:

" . iif($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 3, "ORDER BY username ASC") . " 

PHP Code:

ORDER BY session.lastactivity 

I haven't tried it, but that sounds like what you are asking for.

neo1211 09-09-2009 04:30 AM

I haven't given that a try yet. I'm actually not the root admin on the forums I am trying to do this for, so I guess I'll have him give this a try once he logs on.

Edit- Worked perfectly. Recommended for anyone else trying to do this.

Thanks again.

Marco van Herwaarden 09-09-2009 07:37 AM

Actually i think this can be done without any edits at all. If sorting is disabled (vBulletin Options!) it will probably show in the order the sessions where written, thus giving the same result.

(Without sorting is better for performance)


All times are GMT. The time now is 09:00 PM.

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.01071 seconds
  • Memory Usage 1,715KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete