vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - WOL - Threads (https://vborg.vbsupport.ru/showthread.php?t=214286)

harmor19 05-21-2009 10:00 PM

WOL - Threads
 
1 Attachment(s)
This add-on will show you what threads users are looking at in a specific forum rather than every user on your site when you visit the 'Who's Online' page.
Once install go to a forum, scroll down and if enabled via the vBulletin Options will be text that reads "Currently Active Users". Click on the text I have quoted on your forum to take you to the "Who's Online" list.


How to Install
Download the product XML. Go into to your ACP --> Plugins & Products --> Manage Products click "[Add/Import Product]". Browse to the product you have just downloaded and click "Import".


Template Edits
Open: FORUMDISPLAY
Find:
PHP Code:

$vbphrase[currently_active_users


Replace With
PHP Code:

<a href="online.php?f=$foruminfo[forumid]">$vbphrase[currently_active_users]</a



Open: WHOSONLINE
Find:
PHP Code:

window.location="online.php?$session[sessionurl_js]order=$sortorder&sort=$sortfield&pp=$perpage&page=$pagenumber$refreshargs_js"

Replace With:
PHP Code:

window.location="online.php?$session[sessionurl_js]order=$sortorder&sort=$sortfield&pp=$perpage&page=$pagenumber$refreshargs_js&$forumid"


Updates
1.0.0 - First Release
1.0.1 - optimized query, fixed reloading, fixed reload link.

harmor19 05-22-2009 01:47 PM

I'm sorry if you do not understand how this mod works. I only work on a development forum and cannot link you to it so you can see how it works.

If someone could be kind enough to supply a demo I would appreciate it.

thincom2000 05-22-2009 04:09 PM

Don't use ' around the number (it implies a string). This could result in a slow query because MySQL has to do a type conversion on the inforum column (SMALLINT to VARCHAR). If this weren't a full table scan already (which it is), the conversion would cause one, so make it a little easier on the server.

Also recommend having the product add inforum as a session table index to avoid the full scan.

harmor19 05-22-2009 04:16 PM

Quote:

Originally Posted by thincom2000 (Post 1815284)
Don't use ' around the number (it implies a string). This could result in a slow query because MySQL has to do a type conversion on the inforum column (SMALLINT to VARCHAR). If this weren't a full table scan already (which it is), the conversion would cause one, so make it a little easier on the server.

Also recommend having the product add inforum as a session table index to avoid the full scan.

Like this?
PHP Code:

$currentforumid $vbulletin->input->clean_gpc('r''f'TYPE_UINT);
$hook_query_fields 'session.inforum';

$hook_query_where = empty($currentforumid) ? "" "AND session.inforum = $currentforumid"


Stoebi 05-22-2009 04:46 PM

PHP Code:

$vbulletin->input->clean_gpc('p''f'TYPE_UINT);

$hook_query_fields .= ", session.inforum";
$hook_query_where .= empty($vbulletin->GPC['f']) ? '' " AND session.inforum = " $vbulletin->GPC['f']; 

But IMHO the plugin is not needed. I see no difference with and without this plugin.

harmor19 05-22-2009 05:20 PM

Quote:

Originally Posted by Stoebi (Post 1815312)
But IMHO the plugin is not needed. I see no difference with and without this plugin.

Go into a forum and scroll to the bottom. Click on "Currently Active Users".

Stoebi 05-22-2009 05:26 PM

Yes, same result with and without plugin. IMHO the template-edit is enough ;)

Thanks *installed* :)

harmor19 05-22-2009 06:45 PM

Updated the add-on.

Feanor_87 07-26-2009 06:09 AM

Great, thanks! :)

mgurain 07-17-2010 12:12 PM

Any screen shots ?


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