vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - AJAX: Show Users Browsing Threads & Replying (https://vborg.vbsupport.ru/showthread.php?t=164369)

Jafo232 12-04-2007 10:00 PM

AJAX: Show Users Browsing Threads & Replying
 
This mod will replace the current "Currently Active Users Viewing This Thread" box in threads to an identical one that uses AJAX.. With this method, you can see users viewing the thread in real time (without refreshing) and also see when a user is replying.

By default, it updates every 10 seconds, but you can change that by editing the template code.

Enjoy!


Brought To You By WorldWideCreations.com.

soulface 12-05-2007 04:41 AM

nice hack!

ShawneyJ 12-05-2007 04:45 AM

very good :) thx

projectego 12-05-2007 11:11 AM

[high]* projectego clicks install :)[/high]

SuperTaz 12-05-2007 11:46 AM

Installed. Thank you.

yahoooh 12-05-2007 03:33 PM

how many query?

Jafo232 12-05-2007 03:41 PM

Quote:

Originally Posted by yahoooh (Post 1395545)
how many query?

There is one query per instance, well, on top of whatever queries go into global.php and fetching templates (if they are not cached)..

Jafo232 12-05-2007 06:03 PM

For those of you who said thanks.. Your welcome! :)

FreshFroot 12-05-2007 06:09 PM

Quote:

Originally Posted by Jafo232 (Post 1395551)
There is one query per instance, well, on top of whatever queries go into global.php and fetching templates (if they are not cached)..

I like the hack idea, but for shared hosting it maybe a lot of queries and cause a large server load.

Jafo232 12-05-2007 06:12 PM

Quote:

Originally Posted by FreshFroot (Post 1395633)
I like the hack idea, but for shared hosting it maybe a lot of queries and cause a large server load.

I have been following it on a couple busy sites and haven't noticed too much of a hit. Restricting "Show Users Browsing Threads" to members only is probably a prudent thing to do. You can also up the timeout in the javascript for fewer calls.

danward 12-05-2007 06:59 PM

How do I make it work with 3.6.4? :)

osousous 12-05-2007 07:07 PM

I really like this - thank you.

If I might suggest a decent extension to this, something In saw in a blog comment section the other day (a paticuarly busy blog comment page).

It basically showed at the bottom in real time - the number of replys that had been made to the comment page since I have started reading it (i.e. in real time).

Jafo232 12-05-2007 07:23 PM

Quote:

Originally Posted by danward (Post 1395672)
How do I make it work with 3.6.4? :)

Well, I don't currently have any 3.6.4 versions running, but I would imagine it should work with little to no editing.

Chachacha 12-06-2007 04:41 AM

Quote:

Originally Posted by Jafo232 (Post 1395680)
Well, I don't currently have any 3.6.4 versions running, but I would imagine it should work with little to no editing.

I've just installed this on my 3.6.4 board and it is working. Great add-on. Thanks.

Lizard King 12-06-2007 10:59 AM

Did you made tests regarding server load about this mod ? Even the original version had bad effects on server load and i can't imagine it with Ajax. It may totally kill your server.

asj 12-06-2007 12:33 PM

PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle]</title>
</
head>
<
body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
<
td class="tcat" colspan="2">
<
phrase 1="$totalonline2="$numberregistered3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
</
td>
</
tr>
<
tr>
<
td class="alt1" colspan="2">
<
span class="smallfont">$activeusers</span>
</
td>
</
tr>
</
table>
$footer
</body>
</
html

replaced
:rolleyes:

Jafo232 12-06-2007 03:15 PM

Quote:

Originally Posted by Lizard King (Post 1396096)
Did you made tests regarding server load about this mod ? Even the original version had bad effects on server load and i can't imagine it with Ajax. It may totally kill your server.

Yes..

Quote:

Originally Posted by Jafo232 (Post 1395638)
I have been following it on a couple busy sites and haven't noticed too much of a hit. Restricting "Show Users Browsing Threads" to members only is probably a prudent thing to do. You can also up the timeout in the javascript for fewer calls.


Jafo232 12-06-2007 03:25 PM

Quote:

Originally Posted by asj (Post 1396148)
PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle]</title>
</
head>
<
body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
<
td class="tcat" colspan="2">
<
phrase 1="$totalonline2="$numberregistered3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
</
td>
</
tr>
<
tr>
<
td class="alt1" colspan="2">
<
span class="smallfont">$activeusers</span>
</
td>
</
tr>
</
table>
$footer
</body>
</
html

replaced
:rolleyes:

Ok and this is what exactly?

Jafo232 12-06-2007 03:37 PM

Quote:

Originally Posted by Lizard King (Post 1396096)
Did you made tests regarding server load about this mod ? Even the original version had bad effects on server load and i can't imagine it with Ajax. It may totally kill your server.

Actually I just checked my APC control panel on one server to look at cached hits of scripts to get an idea on how much this file gets called on a moderate site:

forum/includes/init.php: 157227

forum/inlineonline.php: 12643

So basically, the amount of times VB has been activated so far today (APC was reset early this morning) 157,227, out of all of those executions, only 12,643 were member calls to the product script. Considering the non-ajax version would have also made some calls (no way with APC to figure out the difference) I see the load as negligible compared to the benefit. It should be noted that the forum in question restricts this feature to members only.

Hornstar 12-09-2007 04:08 AM

If my server was not lagging, I would love to install this :/ guess i'll have to wait until I can get my server correctly optimized or upgraded again. Thanks for sharing.

UltraFanatics 12-09-2007 12:48 PM

I've done this mod but I accidently done all the copying before I put the .php file on my server (eeeek doh!)

Will this still work as im not sure its working or not? can anyone help?

site is http://www.ultrafanatics.com

UltraFanatics 12-09-2007 01:10 PM

Cant seem to see it working on my site :(

Can anyone help as Ive re-done it again!

BigDog56 12-09-2007 01:16 PM

Thank you very much!

UltraFanatics 12-09-2007 01:38 PM

Ive got it working for forum display but not thread display!

Any ideas anyone?

Jafo232 12-10-2007 02:05 AM

Well, if you followed the instructions to the letter, it should NOT work on the forum display. Not sure what kind of editing would even make that a possibility.

Sounds like you missed something in the readme.

Newfarm 12-10-2007 03:19 PM

Is it possible, in any shape or form, to poll the contents of a quick editor (ie. reply or edit) and if it's changing set a user as "replying" ?

I do see how that could cause some serious server strains though, but most people tend to use the quick reply when replying to threads :)

Great hack either way.

Jafo232 12-10-2007 04:05 PM

Quote:

Originally Posted by Newfarm (Post 1398615)
Is it possible, in any shape or form, to poll the contents of a quick editor (ie. reply or edit) and if it's changing set a user as "replying" ?

I am sure there probably is a way, however I am just as sure your second thought would be true too, that it would create a little burden on the server to do that..

UltraFanatics 12-10-2007 04:32 PM

PM sent Jafo

Jafo232 12-10-2007 05:35 PM

Not really accepting IM's at this time..

UltraFanatics 12-10-2007 05:40 PM

Oh ok mate, I just wondered if you could check this mod on my server for me.

Seems really strange as its working for each forums not threads.

Take a look http://www.ultrafanatics.com

Jafo232 12-10-2007 06:05 PM

Did you follow the directions in the Readme where it says:

Quote:

AdminCP > vBulletin Options > Thread Display Options (showthread) > Show Users Browsing Threads

Make sure this is NOT set to no.

UltraFanatics 12-11-2007 05:30 PM

Yep I made sure of that mate, which was why I thought "Ill try it for forum display options" too.

When I done that it worked for that! (but not threads)

Jafo232 12-11-2007 06:35 PM

Ok, this hack has NOTHING to do with forum display.. That feature is built in to vbulletin.

I can only assume you have either incorrectly edited the templates, or have edited templates for a style you are not using..

skariko 12-12-2007 02:57 PM

Hello,
just for the record i'd like to notice everyone this mod will cause a huge load on your server. On my dedicated box (VBulletin forum with average 500 users online) it has increased the server load by roughly a 200% factor (from 0.5 to over 1.5 ...) causing 1.500.000 hits in just 2 days. If you care about performances that's just crazy, especially if you're on a shared account and/or your server is near their performance limits.

So be careful. No offence meant to the coder, but i felt right to warn about the huge resource usage of this mod.

Greetings.

Jafo232 12-12-2007 03:36 PM

If you leave the mod open to the public, surely it could have a negative impact, which is why this feature should be restricted to MEMBERS ONLY as stated earlier.

Alfa1 12-12-2007 09:35 PM

That's too bad. This is a very nice hack, but performance is important to me.

Jafo232 12-12-2007 11:49 PM

Quote:

Originally Posted by Alfa1 (Post 1400126)
That's too bad. This is a very nice hack, but performance is important to me.

As I stated before, under most circumstances, performance isn't an issue.

I have an old PC that has less than 300mb RAM, running on a very old pentium chip with two sites on it that get moderate traffic. There has been no substantial hit on performance.

Alfa1 12-13-2007 04:53 PM

I just moved servers, since my site was running 300% continuously.
Can I activate this hack for certain member groups only?

Jafo232 12-13-2007 05:24 PM

Yes, just like you do with the non-ajax version..

UltraFanatics 12-13-2007 05:37 PM

I think ill delete this mod now, can't seem to get it working.

Thanks though, looks a great mod!


All times are GMT. The time now is 05:49 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.01430 seconds
  • Memory Usage 1,842KB
  • 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
  • (12)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
  • (40)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