is this also the reason why I cannot enable this plugin after upgrading to vanilla 1.1? Its listed in the extensions list and I can check it but it does not enable.
Yes I have. It was kinda hard, not knowing this system, but i figured it out. Don know if u consider this method a "hack", but it works.
1. Open the "extentions/WhosOnline/default.php" file 2. On line 150 (just before the line that says $Panel->AddList($ListName); add the following line : $Panel->AddString("<div id='onlinenow'>",500); 3. On the next line change it to:$Panel->AddList($ListName,501); 4. 30 lines down (before the last curly bracket) add this line: $Panel->AddString("</div>",502); 5. Save and close this file. 6. Create a "style.css" file in this extion folder and open it. Put this code there:
#onlinenow ul li ul {
overflow:hidden;
}
#onlinenow ul li ul li {
width:auto;
margin-right:4px;
float:left;
}
7. Save the file.
Update! I found out how to add style in an extention (been reading through other ppls extentions alot to try to learn.. )
$Head->AddStyleSheet('extensions/WhosOnline/style.css');
is the way. Just add it on the start of extentions/WhosOnline/default.php and put the style on point 6 in a style.css file and put it the same folder..
To the original poster / creater of this. Maybe you could incorporate this feature in the original with a setting in a config.php file. For instance a constant that says true or false; use same line format. If the original creater is inactive, I could clean up my code and make a newer version of this, but I dont wanna replace or add to with out permission..
When I click the download link above, the file that is downloaded still says it's version 1.1 of WhosOnline in the code. When I upload it to the server, the updates page still shows it's an old version, not 1.2.
LOL OK. Why an update with no...er...update?
Anyway, I changed the version number in the default file and now my extensions all show to be the current version. Thanks. :)
It would be nice to have the capacity to see Who's Online connected to a certain permission level - ie., I would like to allow my users to see Who's Online, but not the anonymous guests.
It might also be nice to be able to place the list of users at the middle/bottom of the sidepanel, rather than at the top!
If you look in the default.php file for this:
if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "post.php", "search.php", "settings.php"))
&& $Context->Session->UserID > 0 && !$Context->Session->User->Preference("HideWhosOnline")) {
You could change it to
if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "post.php", "search.php", "settings.php"))
&& $Context->Session->UserID > 0 && $Context->Session->RoleID == 4 && !$Context->Session->User->Preference("HideWhosOnline")) {
and it'l only display for users whose role ID is 4 (default admin role, you might need to change it)
important update on my hack .. I edited the original text. so look there.. the point is to use positioning on both addstring and addpanel..
btw.. Is anyone using it?
Can I ask a question here related to this add-on?
I just upgraded my forum to 1.1.2
Now, for some reason, it always says I have tons of guests. It may say 54 guests one minute, then 84 guests the next minute. I know I don't have that many people there. Is there some sort of error going on? Thanks.
Comments
Who's Online 1.1
CheckingForUpdates
Error: Who'sOnline|[UNKNOWN]ExtensionStatusUnknown
Posted: Monday, 5 March 2007 at 8:26PM (AEDT)
Hope this is what u wanted
Posted: Wednesday, 14 March 2007 at 6:56PM (AEDT)