vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   # of users in forum on forumhome (https://vborg.vbsupport.ru/showthread.php?t=38012)

Sho 08-22-2002 05:05 AM

Hmm ... maybe it doesn't look for the user, but for unique hosts or something?

scottct1 08-22-2002 04:02 PM

Does this hack show only the regsitered members browsing or does it include guests as well?

If it includes guests I will click install. :)

NTLDR 08-22-2002 04:05 PM

Only registered members, you have to wait till vB3 for guests ;)

ExcErr 08-27-2002 05:49 PM

yeah, GUEST ADDON will be very nice...
because i have more guests, than users online........

Tim Wheatley 08-31-2002 02:26 PM

Is it possible that I could install this so only admins/mods can view the counts?

cka 08-31-2002 03:26 PM

Hmm, maybe a good idea for a 'x members, y guests viewing forum' style on this hack would be to add a new column to the sessions table and modify admin/sessions.php... In fact, I think I'll mess around with it and try to get it set up like that.

But all in all, this is a pretty dope hack. Looking forward to getting it working later today.

Barret 09-01-2002 01:49 AM

Clicks install and tries it.
Thanks for the great hack :)

Gohan 09-10-2002 11:23 AM

Quote:

Originally posted by Orlandu
Well Neo, if you don't mind I have a addition to that hack. It will say "1 users" how it is, but I added a little bit and now it will say "1 user" and then "2 users" respectively.

I'll post if, but if you won't allow it then I will remove it.

Instead of add this:
PHP Code:

        global $forumbrowsers;
        
$count $forumbrowsers[$forum['forumid']];
        if (
intval($count) < 1) {
            
$count 0;
        } 

Add this for the correct term for 1 user:
PHP Code:

        global $forumbrowsers;
        
$count $forumbrowsers[$forum['forumid']];
                
$s 's';
        if (
intval($count) < 1) {
            
$count 0;
        }
        if (
intval($count) == 1) {
            
$s '';
        } 

That's in both forumdisplay.php and index.php
Then you have to change the counter to something like this:
Code:

($count user$s browsing)
in the right template.
Hope you like ;)

Better change code ;)
PHP Code:

        if (intval($count) == 1) { 

to:
PHP Code:

if (intval($count) == OR intval($count) == 1) { 

btw Great hack! also does working on vb 2.2.7

Dan Flynn 09-27-2002 03:32 AM

This seems like a very easy install. How ever I can't find this
<td bgcolor="#006633"><smallfont color="#FFCC00"><b>Threads</b></smallfont></td> in the forumhome template. You said look there or where it might be find.

Where else could it be. Please Help

Kedmyster 10-05-2002 05:02 PM

maybe it's a little late but can someone please post the whole code for the ($browsing the forum) - or something like that.
everything is screwed. I did it once but it screwed the forum so I don't want to try it again without having the right instructions.

Thanks.

KaiN6993 11-30-2002 10:23 PM

works for 2.2.8, is there a way to make it show user id instread of number of users?

MetroSports82 01-07-2003 03:11 AM

Anyone know how I could set this up, where it would show # of users in thread on forum display? that would be real cool IMO. :) Thanks,

Metro.

Snapperhaed 03-23-2003 05:14 PM

A great hack, thanks! Got it working on v2.3 #3

Suggestion: There is so much good information in this thread, that it outdates the actual initial posting. Because of that, a newbie (such as myself) can pretty much get lost. (I did but managed to survive, lol) - Maybe someone can update it with what the actual best hack is (and complete (most efficent) hack).

SavgeDusk 03-23-2003 08:44 PM

I hope Neo doesn't mind me adding a revised version of this hack here. All credit to him, FireFly, & Orlandu for the coding in the revised version. I just take credit for the template edits, because I didn't use the ones posted or in the original file. ^^; I'll add a demo of what it looks like in another post.

Here's the file, I installed it on the vB 2.3.0 Candidate 3 btw. :]

SavgeDusk 03-23-2003 08:45 PM

And this is what it looks like.

Lethal 03-24-2003 08:38 PM

I thought firefly said that you only have to edit index.php not both index.php and forumdisplay.php?

SavgeDusk 03-25-2003 10:29 PM

I had to edit both. I just put all the code from the original hack into the .txt file. I only did it to make things easier since codes were here and there. ^^;

Snapperhaed 03-26-2003 09:48 PM

SavgeDusk: A fine job, and I thank you for condensing it all into an easily installable format. I was running v2.3.3 under the original hack, but I since used your 'updated file' and made the changes to keep up to date with the latest. Many thanks for making a newbies life worth living!

beardbuster 04-05-2003 09:06 PM

SavgeDusk..
Fine job THANKS!!!!

mvigod 04-12-2003 05:54 PM

firefly,

any way to adjust the query so it includes all subforums under the parent forum? In other words if there is a forum on the homepage which containts 5 popular forums and the parent forum is a no posting forum then it shows 0 users browsing that forum leading to the appearance nobody is browsing the 5 forums inside of it when in reality it could be 100's of users.

Kriek 07-19-2003 06:04 PM

/me hits install

Flawless on 2.3.0 including sub-forums.

(vBulletin.org style)

K33nny 08-17-2003 08:16 AM

This is a modified version of Neo and FireFly's "# of users on forumhome". This hack uses templates to control certain aspects of it. It likely resembles the version Jelsoft used with vBulletin 3 but seeing as how I haven't even downloaded it yet I decided to accomplish the same with vBulletin 2.

. If there is 1 user browsing, you can have it say "1 user" instead of "1 users"
. If there are 0 users browsing, nothing will show up at all.


Note: It does not currently work for sub-forums as far as I can tell, I am looking into that to see if I can figure out to do that.

Example: http://www.ewplanet.org/e/index.php?s=

NOTE: If you find this hack useful and plan on using it, click install.

[v 1.1 fixes]
+ Added templates to $templatesused to save 1 query.
++ Thanks to Mist & Alien for the suggestion.

+ Added forumdisplay_nobrowsers template just incase people want to display something for 0 users browsing.
++ Thanks to MadCat75 for the suggestion.

[v 1.2 fixes]
+ Changed $browsers variable to $numbrowsers variable in template forumdisplay_nobrowsers
++ Thanks to MadCat75 for the alert.

[v 1.3 fixes]
+ Changed $numbrowsers variable back to $browsers in template forumdisplay_nobrowser.
++ Got confused with one users question and made the wrong choice.

[v 1.4 fixes]
+ Assigned 0 to the variable $browsers if there were no users browsing.

K33nny 08-17-2003 08:20 AM

If you do not wish to follow one of the above links in order to view this hack in action, a screenshot has been provided.

Cal Poly Forum 08-17-2003 08:34 AM

Keep up with the good work man. :cool:

Floris 08-17-2003 08:34 AM

Nice work my friend :)

K33nny 08-17-2003 08:34 AM

Barely work, thanks for the comments. I'm learning, slowly and this is just fun for me. I figure if I do something neat with my forums, that I should release it to this community because my community's features are great due to this place, without it it would be just forums... my small way of giving back.

Mephisteus 08-17-2003 09:28 AM

I'm quite sure this has been done before (I know almost every hack in this damn db :p). I'll look for it to be sure.

assassingod 08-17-2003 09:42 AM

Quote:

Today at 11:28 AM DarkSSJ3 said this in Post #6
I'm quite sure this has been done before (I know almost every hack in this damn db :p). I'll look for it to be sure.
He mentions it has been done before (twice). His looks nicer though.
Good work

K33nny 08-17-2003 12:04 PM

I said it twice, said it once in the hack file, and gave a link to the original hack. I'm quite well aware of the fact that it's been done before. :)

Alien 08-17-2003 07:37 PM

How many additional queries does this add to the forumhome?

Also, anyone know if it would be helpful to add the template calls added from this hack into the templatesused line?

Thanks. :)

Dean C 08-17-2003 08:44 PM

1query I believe and yes it will add two if you don't add the template to templates used ;)

- miSt

MaDCaT75 08-17-2003 11:24 PM

But what about like here at vb.org? What if I want it to say ( 0 users browsing ) if there are no users browsing? :ermm:

WEForums 08-17-2003 11:44 PM

Quote:

Today at 01:24 AM MaDCaT75 said this in Post #11
But what about like here at vb.org? What if I want it to say ( 0 users browsing ) if there are no users browsing? :ermm:
You'll probably want to use the original hack. It's in the installation file.

K33nny 08-18-2003 12:10 AM

I will rework the hack so there is another template for no browsers browsing. So you can either leave it blank or fill it with content. But WEForums is right, you can do what he said and use the original hack by Neo & Firefly.

K33nny 08-18-2003 12:15 AM

Alright, the attachment has been updated to do what MadCat75 wanted. You can either leave the nobrowsers template blank or put in code.

Good question MadCat75. ;)

psico 08-18-2003 01:11 AM

Excelent hack dude!

MaDCaT75 08-18-2003 02:33 AM

Quote:

Today at 02:15 AM K33nny said this in Post #14
Alright, the attachment has been updated to do what MadCat75 wanted. You can either leave the nobrowsers template blank or put in code.

Good question MadCat75. ;)


Thank you!

MaDCaT75 08-18-2003 02:44 AM

Oh one more thing.... I made the new changes but it says ( users browsing ) when theres nobody on but I want it to say ( 0 users browsing ) what changes to I need to make?

K33nny 08-18-2003 02:52 AM

In template forumdisplay_nobrowsers change $browsers to $numbrowsers.

The file attachment has been updated to reflect this.

MaDCaT75 08-18-2003 02:56 AM

Thanks :)

Edit: I did as you said now the whole thing is screwed up..... any help here? www.sims2forums.com everything got all screwed and so I just put it back to ( users browsing ) :cry:


All times are GMT. The time now is 05:12 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.01382 seconds
  • Memory Usage 1,824KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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