vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=230428

Widget - Users Online
by Lynne
18 Dec 2009 01:21

5 Attachment(s)
This is a widget for your CMS pages to show the Current Users Online.

http://www.vbulletin.org/forum/attac...1&d=1275253720

You will need to Create a new Template (vbcms_widget_execphp_activeusers), Cache the template, Create a new Widget (Users Online), Configure the Widget, and then finally add the Widget to your Layout (I am not including instructions for that, you should know how to add Widgets to Layouts).

1.0 2009-12-17: initial release by Lynne at vbulletin.org (pre 4.0)
1.- 2010-01-07 - French translation included thanks to albibak (version 1.0)
1.1 2010-05-30: Added in Most users ever online.
1.2 2010-10-22: Fixed template to use new classes and widget code to use new online users query/method. (4.0.8)
1.3 2011-11-17: Fixed template and widget code for use in 4.1.8.
1.4 2011-11-27: Quick fix in template to show link to online.php page. (4.1.8)

Installation instructions for 4.1.8 and pre-4.1.8 are included in the 1.4 download. Please make sure you use the correct Installation Instructions as both the widget code and the template code are different depending on the version you are running. Read them carefully!!!

Trek 18 Dec 2009 01:22

Very cool, thanks Lynne!

Charlie98902 18 Dec 2009 01:31

Thanks!

milsirhc 18 Dec 2009 01:50

Can this be used in the forum block too?

Lynne 18 Dec 2009 01:56

Since users online are already on the Forum Home page, I'm not sure why you would want to redo the query to get all the names again and put it on the same page. But, I really don't know if it would work there since I haven't tried it.

nightbloom 18 Dec 2009 02:03

WOW great idea!

yilmaz 18 Dec 2009 03:49

Cool idea! *Installed* - great mods you make

fourat 18 Dec 2009 03:58

Thank you Lynne
Nice work

blake247 18 Dec 2009 04:34

Prefect! Thank you!

shiqah 18 Dec 2009 05:51

thanks alot

Traiman 18 Dec 2009 07:50

thank you,nice

gator777 18 Dec 2009 08:22

Thanks Lynne, Great work! :D

ragtek 18 Dec 2009 08:59

hach, i thought you made "a real" widget, which just need to be uploaded and installed:( :P

bart6767 18 Dec 2009 10:01

Thanks

Good to see you got it done and thanks for all your hard work .

kevin2008 18 Dec 2009 10:42

thank, work perfectly in rc4

Vaupell 18 Dec 2009 10:55

sexy.. :D downloaded... installed..

Stromba 18 Dec 2009 11:39

mm i have try the steps and it dont works for me.

M3xital 18 Dec 2009 11:47

Thanks for sharing! :D

kisanjong 18 Dec 2009 11:54

Works Great in RC4 - Thanks

zbahadir 18 Dec 2009 13:12

Thanks Lynne :)

sebaldus 18 Dec 2009 13:54

THANKS LYNNE...:)
Sebaldus..

mondiuk 18 Dec 2009 14:09

Nice work than'x

Bitti 18 Dec 2009 14:48

uncached template forumhome_loggedinuser on cms

Lynne 18 Dec 2009 15:45

Quote:

Originally Posted by Bitti (Post 1932898)
uncached template forumhome_loggedinuser on cms

I've added instructions to the first post on how to cache it.

Quote:

Originally Posted by ragtek (Post 1932743)
hach, i thought you made "a real" widget, which just need to be uploaded and installed:( :P

As far as I know, there is no way to upload/download widgets - or at least not in my admin panel. That sure would be handy though. I suppose I could have just written the query to do it in the install instructions for a product - is that what you are suggesting?

Charlie98902 18 Dec 2009 16:11

Thanks Lynne painless as usual :D

Bitti 18 Dec 2009 16:27

Thanks

es-league.com 18 Dec 2009 18:37

great work again Lynne .. thank you :)

RadioErewan 18 Dec 2009 23:59

Just a stupid question. Is it possible to install widget from XML or it is not provided in vBulletin 4 engine? Have no problems with code modifications, but installing mods in vB was so easy compared to phpBB...

Vaupell 19 Dec 2009 00:05

Quote:

Originally Posted by RadioErewan (Post 1933139)
Just a stupid question. Is it possible to install widget from XML or it is not provided in vBulletin 4 engine? Have no problems with code modifications, but installing mods in vB was so easy compared to phpBB...

its in the suggestion box allready over on vbulletin.com suggestions forums
to make it possible to install widgets via product system.
but currently it is not possible.

Go and keep the topic alive..
http://www.vbulletin.com/forum/showt...export-widgets

Marka Ragnos 19 Dec 2009 00:41

Awesome! Works perfect thx.

Dr.osamA 19 Dec 2009 10:41

thank you,nice

installed
________
Anime lesbian

Naxon 19 Dec 2009 20:03

It doesn't work for me... The widget is simply empty.

Charlie98902 19 Dec 2009 20:06

You didn't follow the directions then. I had this issue too till I redid it and followed the directions one by one.

Naxon 19 Dec 2009 20:55

Quote:

Originally Posted by Charlie98902 (Post 1933642)
You didn't follow the directions then. I had this issue too till I redid it and followed the directions one by one.

Ok, my bad, I forgot to change the template name for the widget...

Charlie98902 19 Dec 2009 21:14

LOL I did that too.

Jamieinnh 19 Dec 2009 21:34

Outstanding! Thanks for putting this together for us!

Forum Block
by starman™
20 Dec 2009 15:24

Quote:

Originally Posted by Lynne (Post 1932585)
Since users online are already on the Forum Home page, I'm not sure why you would want to redo the query to get all the names again and put it on the same page. But, I really don't know if it would work there since I haven't tried it.

I see your point Lynne but as a previous user of vBA it was great seeing the widget to the right without having to scroll to the bottom. If you disabled the Display Logged on Users? option from Forums Home Page Options in the AdminCP would this also disable your widget?

Lynne 20 Dec 2009 18:36

Quote:

Originally Posted by starman™ (Post 1934040)
I see your point Lynne but as a previous user of vBA it was great seeing the widget to the right without having to scroll to the bottom. If you disabled the Display Logged on Users? option from Forums Home Page Options in the AdminCP would this also disable your widget?

Yes, it uses the same permissions that are used on the forum home page. If you have the user listing disabled for the forum home, then it won't show up on the cms either. You can simply change the plugin and template to not have that condition around them (or just set them at the top of the plugin to what you want them to be).

starman™ 20 Dec 2009 19:25

Thanks very much.

syrus.xl 21 Dec 2009 00:55

Thanks Lynne - perfect and easy instructions! Nice one.. :)

Derekclarke 22 Dec 2009 03:02

Thanks.. I so wanted this

*Click's Install*

When I Input the Code for Wigit, I receive an Internal Server Error. This is on VB4.0.0 Gold

XXXT0 22 Dec 2009 07:19

Nice!! Thank You!

hendri 22 Dec 2009 12:08

thanks bro !

wacodep 22 Dec 2009 13:50

Nice. Should have been a standard widget.

Lynne 22 Dec 2009 16:31

Quote:

Originally Posted by Derekclarke (Post 1935061)
Thanks.. I so wanted this

*Click's Install*

When I Input the Code for Wigit, I receive an Internal Server Error. This is on VB4.0.0 Gold

Double-check that you did everything correctly and only copy/pasted exactly what I have posted (no extra stuff got in).

iguano 22 Dec 2009 18:41

Installed
Thanks :)

bullet07 22 Dec 2009 19:13

Nice job installed.

Derekclarke 22 Dec 2009 22:17

I have found what i was Doing Wrong, and am no longer getting this Error.

However when i try to configure the Wigit, I Paste the code
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Into the Top Section of the Popup Box, and change the template name to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

as Instructed and Save.

However it does NOT change the code in the main box, and all i get displayed it the Time.

Lynne 22 Dec 2009 22:45

What do you mean all you get displayed is the time? There is no time in this widget. Also, ask discussed previously, you must have this turned on for your forums page or you will not see it in your cms. You must also add it to your layout, as I stated in the instructions.

teamshultz 23 Dec 2009 06:10

1 Attachment(s)
Thanks so much for this great widget!

Is there a way to remove the comma after the last user? See attachment.

Attachment 107976

Lynne 23 Dec 2009 06:15

Quote:

Originally Posted by teamshultz (Post 1936054)
Thanks so much for this great widget!

Is there a way to remove the comma after the last user? See attachment.

Attachment 107976

You must have changed some css on your page because it doesn't do that using the default css.

Derekclarke 23 Dec 2009 13:57

The time is the Default code in the configure Box.

I am not sure why but it is Not Saving when i Click save. And it's not just this Mod. Found the same with another.

However if i clear the existing code and save it saves Blank.

So i am totally Confused

Forum Lover 23 Dec 2009 15:27

Installed
Thanks

Lynne 23 Dec 2009 17:53

Quote:

Originally Posted by Derekclarke (Post 1936287)
The time is the Default code in the configure Box.

I am not sure why but it is Not Saving when i Click save. And it's not just this Mod. Found the same with another.

However if i clear the existing code and save it saves Blank.

So i am totally Confused

I would go post on vb.com for help. It sounds like an issue with your widgets. Perhaps you didn't upload all the files correctly? You can look in your error_logs (if you don't know where they are, ask your host) and see if anything shows up there.

Gleedo 23 Dec 2009 17:58

Very nice little widget - thanks very much :)

JamesGunner 24 Dec 2009 10:15

Im having abit trouble with this widget. I already re-did everything but it wont show on my front page. It shows fine on every other layout and page other than the front page. So if I add it to the News Layout it displays it but as soon as I add it to the main page layout it doesnt display on the main page.

I also checked the permissions like you messed on page 3. I have that enabled as well.

//edit:

The new CMS seems to be very tricky. I didnt notice that the front page was running on the vb4 default theme. Im using a custom theme that is set too default so I assumed that the CMS is automatically set to the default theme. I edited the Section to my custom theme and now its showing up.

kendo 25 Dec 2009 04:17

Is it possible to show the number of search spiders on as well as the number of guests and users? I'm sure I've seen this on a board somewhere, should have saved the link.

Lynne 25 Dec 2009 05:10

That is a modification. I'm not sure if the developer updated it for vB4. You may take the code and apply it to this mod, but I cannot go take the code to put it in this mod since it isn't code I wrote.

kendo 25 Dec 2009 06:16

OK, thanks!

Sophocles 25 Dec 2009 11:52

Thanks! Plugin worked perfectly and even those of us who are code/PhP challenged could understand it. I just finished my forum update and I learned a lot from this single experience.

rbc 25 Dec 2009 12:42

works very well , Thanks

and merry x-mas

4thstar 26 Dec 2009 11:43

Hello everyone, i hope christmas went well.

I have a question please, is it possible to remove admin and mods from the active users list?

i.e. can we set it so unregistered members only see standard users?
and registered logged in members can see all but not the admin?

Kind Regards
Carl

Weetabix 26 Dec 2009 12:47

Damn, that's excellent. Clear instructions too :)

Thankyou.

ChronosX 26 Dec 2009 13:23

thx - nice work and intruction

ngcoders 26 Dec 2009 19:58

Works greats , thanks a lot.

Lynne 26 Dec 2009 20:16

Quote:

Originally Posted by 4thstar (Post 1938499)
Hello everyone, i hope christmas went well.

I have a question please, is it possible to remove admin and mods from the active users list?

i.e. can we set it so unregistered members only see standard users?
and registered logged in members can see all but not the admin?

Kind Regards
Carl

There is no option in this basic widget to do that - you'd have to modify the query to not show admins or mods. I don't know what you mean by only have unregistered users see 'standard' members - I have no idea what standard members are.

TheSupportForum 26 Dec 2009 22:10

fantastic mod - please can you request this to be implented into the next version of vBulletin Please

tazattitude 26 Dec 2009 23:00

Very Cool Lynne!
Thanks!
Voted and marked installed

Doctor Death 27 Dec 2009 02:51

I followed instructions (several times) exactly.... Am having an issue I hope you can identify.

When I get to step of configuring widget and pasting all that code in there... the widget will always contain "$output = date(vB::$vbulletin->options['dateformat']) . "<br />\n";
"

Even after I paste the correct code in and save it, if I go back it revers to the above almost as if it is read only. The widget (and any others that I create) only output the date!!! (Because they dont retain their code).

Any ideas why the widgets wouldnt retain the configuration that are assigned?

Thanks much

Lynne 27 Dec 2009 04:04

Quote:

Originally Posted by Doctor Death (Post 1939053)
I followed instructions (several times) exactly.... Am having an issue I hope you can identify.

When I get to step of configuring widget and pasting all that code in there... the widget will always contain "$output = date(vB::$vbulletin->options['dateformat']) . "<br />\n";
"

Even after I paste the correct code in and save it, if I go back it revers to the above almost as if it is read only. The widget (and any others that I create) only output the date!!! (Because they dont retain their code).

Any ideas why the widgets wouldnt retain the configuration that are assigned?

Thanks much

If you can't save anything in your widgets configuration, then you should post for help over on vbulletin.com. First try a search over there and see if the issue has come up before.

bennzy 27 Dec 2009 07:00

1 Attachment(s)
Ok i added the widget to my site and it came up with no style and just a date inside, ive removed it all and tried it again yet still get the same thing.

Please tell me what i am doing wrong or is there something wrong with the coding?

im using vb 4.0 'gold'

Doctor Death 27 Dec 2009 15:54

Quote:

Originally Posted by Lynne (Post 1939090)
If you can't save anything in your widgets configuration, then you should post for help over on vbulletin.com. First try a search over there and see if the issue has come up before.

Lynne;

Thanks for suggesstion, I did exactly that and have received no help.

To be quite honest, I saw you were the pro from dover on widgets and was hoping you would be able to identify this issue in Gold 4.0... Notice I am not the only one with this challenge.

Thanks much anyway... Any suggestions would be appreciated.

Lynne 27 Dec 2009 16:25

Quote:

Originally Posted by bennzy (Post 1939163)
Ok i added the widget to my site and it came up with no style and just a date inside, ive removed it all and tried it again yet still get the same thing.

Please tell me what i am doing wrong or is there something wrong with the coding?

im using vb 4.0 'gold'

Did you click on the Configure link next to the widget and then add the code in there? Oh, and did you change the name of the template in the Configure panel? My widget won't output a date because it doesn't use $output for the output like a normal widget template does.

Quote:

Originally Posted by Doctor Death (Post 1939415)
Lynne;

Thanks for suggesstion, I did exactly that and have received no help.

To be quite honest, I saw you were the pro from dover on widgets and was hoping you would be able to identify this issue in Gold 4.0... Notice I am not the only one with this challenge.

Thanks much anyway... Any suggestions would be appreciated.

The only time something like this happened to me, I had not uploaded all the files correctly. Once I reuploaded all the files, it worked fine. So, try that. Or, you may want to put in a Support Ticket cuz I really don't know what else to suggest. Also, as I mentioned above, did you change the name of the template in the Configure panel? My widget won't output a date because it doesn't use $output for the output like a normal widget template does.

UrGonnaDie 28 Dec 2009 14:31

great job works perfect.

steve1966 28 Dec 2009 17:45

thanks

Hasanudin 31 Dec 2009 11:27

running well..... thx u :)

Doctor Death 01 Jan 2010 18:51

Quote:

Originally Posted by Derekclarke (Post 1935753)
I have found what i was Doing Wrong, and am no longer getting this Error.

However when i try to configure the Wigit, I Paste the code
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Into the Top Section of the Popup Box, and change the template name to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

as Instructed and Save.

However it does NOT change the code in the main box, and all i get displayed it the Time.

I get this exact error that you are getting.

When originally configuring this widget it contains

Quote:

$output = date(vB::$vbulletin->options['dateformat']) . "<br />\n";
I have implemented other widgets (Direct HTML exeuction), however when I edit this widet's configuration to put in the code, it never saves it.

When I try to put in the proper code and click SAVE, it always defaults back to this contents

Quote:

$output = date(vB::$vbulletin->options['dateformat']) . "<br />\n";
Would be happy to let Lynne (or anyone else) examine it if she cares to. Message me if so.

THE__DRIFTER 02 Jan 2010 04:04

I did everything stated in this post but it will not show on the frontpage. Suggestions?
:confused:

Lynne 02 Jan 2010 05:10

Quote:

Originally Posted by THE__DRIFTER (Post 1944571)
I did everything stated in this post but it will not show on the frontpage. Suggestions?
:confused:

Did you add it to the layout you use on the front page?

gator777 02 Jan 2010 08:49

Lynne, the block displays empty when the user does not have access to the content. Can you make it so the block will not display if the user is not allowed to see the content?

jaffaman 02 Jan 2010 09:40

Installed working fine thanks :)

kefallon 02 Jan 2010 10:22

Works fine on my site :)

THE__DRIFTER 02 Jan 2010 15:34

Quote:

Originally Posted by Lynne (Post 1944613)
Did you add it to the layout you use on the front page?

I thought so; went through it all again but still nothing. I think it is more the CMS not wanting to display it. Have tried various things but nothing widget wise will show other than the ones indigenous to vB.

Lynne 02 Jan 2010 16:50

Quote:

Originally Posted by gator777 (Post 1944712)
Lynne, the block displays empty when the user does not have access to the content. Can you make it so the block will not display if the user is not allowed to see the content?

On my test site, if I set the option for Display Logged in Users to "Yes, alphabetical to members only" and then I view the page as a Guest, I don't see the block at all. And I shouldn't since the condition is wrapped around the entire template. Perhaps you are playing with the wrong option?

Quote:

Originally Posted by THE__DRIFTER (Post 1944933)
I thought so; went through it all again but still nothing. I think it is more the CMS not wanting to display it. Have tried various things but nothing widget wise will show other than the ones indigenous to vB.

It doesn't sound like you are going to Layout Manager and *finding the correct layout* and adding this widget to it. Maybe you are adding widgets to the wrong layouts and that is why they aren't showing up. If you really think it is the software and not user error, then you should put in a support ticket to have support see what is wrong.

CFodder 02 Jan 2010 23:36

Another great mod, thanks lynne :).

dangerin 03 Jan 2010 09:41

really nice job.
But i ask something about a modify if possibile :
It is possible to have more informations about users on line how for example from where they connect or how much in this day or the total of users etc ..
i've seen widget with these infromations in other cms and i ask if there is also in VB4.
i've actually installed the PL1 but as soon i think that release the 4.0.1 and after the 4.0.2

Lynne 03 Jan 2010 16:56

It is not an option to show that information in this widget. Paul wrote the code for how many in a day, so you could take his code and add it to this, but I'm not planning on changing this widget at all to add that.

dangerin 03 Jan 2010 17:56

thank you everywhere lynne.. i've thought this because i've seen more options in the widget for forum and so.. ..
ever great job .
thanks

arauf 04 Jan 2010 09:46

i Added this on my Forum, Working Fine ;)

LuckyNeo 04 Jan 2010 12:13

Good work! Thank you very much!

Marv 04 Jan 2010 17:01

Good Job! A suggestion, Lynne:
Wouldn´t it look cleaner if u put each info in a seperate line ? Like that

Quote:

Total Users Online: X.XXX
Members: XXX, Guests: X.XXX

User1, User2, User3, User4,
User5, User6,...

Any chance you could add this to ur widget ?

Lynne 04 Jan 2010 18:45

Quote:

Originally Posted by Marv (Post 1946966)
Good Job! A suggestion, Lynne:
Wouldn´t it look cleaner if u put each info in a seperate line ? Like that



Any chance you could add this to ur widget ?

That is nicer. I was just copying what the current style was on the index/forum page. You can just modify the template if you want it to be like what you posted. The template name is vbcms_widget_execphp_activeusers.

MustangLisa 06 Jan 2010 18:12

Great mod, thanks!

meissenation 06 Jan 2010 18:35

Thanks! One of the few vb4 mods that actually works right off the bat.

albibak 07 Jan 2010 06:53

1 Attachment(s)
Lynne,

Thanks for the widget
Please, find in attachment the french translation
You can find the french topic for this widget here: http://forum.vbulletin-fr.org/modifi...ement-connects

Birute 09 Jan 2010 01:13

Lynne, the widget is not displaying but a error is showing on the top of the Home Page.

Quote:

Parse error: syntax error, unexpected '}' in /hermes/bosweb/web111/b1116/sl.bannerearth/public_html/*****/packages/vbcms/widget/execphp.php(171) : eval()'d code on line 10
Do you have any suggestions on how I can fix this?

SemperFideles 09 Jan 2010 03:22

What, precisely got updated in the past few days? Should I be changing the template or the code on my site?

Charlie98902 09 Jan 2010 04:58

How to update or is that info in the .txt got the details on just how to update?

Lynne 09 Jan 2010 06:01

Quote:

Originally Posted by Birute (Post 1950755)
Do you have any suggestions on how I can fix this?

Double-check what you did. It looks like something extra got into the code somewhere.



As for the update.... For some reason, it sent out an update when all I did was add the french translation for the modification. So, no need to do anything unless you want the french translation for this.

Birute 09 Jan 2010 13:26

Lynne, in the code window in the first post there is a slide bar for the long statements of code but in the vbulleting window to paste the code into there is no slide bar, it is a very small window. It looks like the pasted code wraps the longer statements. Your very neat indented code does not look neat when it is pasted. Could this cause an error?


All times are GMT. The time now is 05:35.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.