miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /  
 

Who's Online

 
 
Page  Page 3 of 5:  « Previous  1  2  3  4  5  Next »

Author Paul
Lead Developer 
#31 | Posted: 5 Feb 2008 04:33 
to teva: If it works overall, there is no danger to comment this line: it just tries to set up the proper permissions for further writing, 'cause on few servers they are not set by default.

Author Sergeusz
Partaker
#32 | Posted: 17 May 2008 12:38 
Can be names of admins and moderators written in another way from members? For example, colour of admins is red and colour of moderators is green.

Author Paul
Lead Developer 
#33 | Posted: 19 May 2008 03:22 
It's very possible. For example if you modify this block of code of addon_whosonline.php

foreach($w_logged_users as $key=>$val){
$registeredList.=" <a href=\"https://www.minibb.com/forums/{$indexphp}action=userinfo&amp;user={$key}\">{$val[0]}</a>, ";
}
you can change it to that (I haven't tested it):

$modsList=array();
foreach($mods as $key=>$val) if(!in_array($key, $modsList)) $modsList[]=$key;

foreach($w_logged_users as $key=>$val){
if($key==1) $clr='red';
elseif(in_array($key, $modsList)) $clr='green';
else $clr='black';
$registeredList.=" <a href=\"https://www.minibb.com/forums/{$indexphp}action=userinfo&amp;user={$key}\"><span style=\"color:{$clr}\">{$val[0]}</span></a>, ";
}

Author Sergeusz
Partaker
#34 | Posted: 19 May 2008 11:56 
Thanks a lot!
It's working!!!

I modified this line of your code
if($key==1) $clr='red';

to

if($key==1 or $key==6) $clr='red';

So admins are members with id 1 and 6. Have I done this code right?

All in all, it's very good feature. If you are running a small site, where everybody knows who is an admin or a moderator, there is no need for such a feature. But if your forum is rather big community, it's very useful.

Thanks

Author Paul
Lead Developer 
#35 | Posted: 20 May 2008 03:28 
Honestly I don't understand how you can have multiple admins, it's impossible in miniBB.

However the condition regarding user IDs is right - or it is possible to specify even more IDs putting them into array:

if(in_array($key, $adminsArray) $clr='red';
when $adminsArray needs to be specified right after $modsList in the code above.

Author Sergeusz
Partaker
#36 | Posted: 20 May 2008 11:09 
Paul:
Honestly I don't understand how you can have multiple admins, it's impossible in miniBB.
:-D Of course he isn't an admin for minibb, but for my forum's members he is a real admin: bb_specials and admin's password - nothing more to have one more admin.

Author woodscooter
Partaker
#37 | Posted: 26 Feb 2009 17:38 
I have installed who's online (not the new version 2.3, the one before that), and I'm finding the Most Users Ever Online count keeps resetting to zero and to today's date.

Looking inside the addon, I found
if($user_id==1 and isset($_GET['resetwonline']
)) {
$w_record[1]=0; $w_record[2]=0;
}
Please tell me how is 'resetwonline' supposed to be used? I can't find any other reference to it in the whole of Minibb.

Also, is it maybe not initialised and causing the resetting every time the site administrator signs on?

Author woodscooter
Partaker
#38 | Posted: 26 Feb 2009 17:55 
Before posting my question, I did a search for whos online and got only two results. So I thought OK to ask this question because it's not been asked before.

But after posting I couldn't find my post by searching for whos online. I had to search for who's online and that came up with a lot of results.

So I'm off topic here, but wouldn't it be good for the search feature to ignore punctuation in the search string?

Back on topic, I'm going to remove the lines of code I quoted in my post #1, because that worked for someone else.

Author Paul
Lead Developer 
#39 | Posted: 27 Feb 2009 03:43 
woodscooter:
I'm finding the Most Users Ever Online count keeps resetting to zero and to today's date
It could be related to your server or some specific issue, nobody will tell you precisely what is the reason. As you see on our board or somewhere else, "Most Users Ever Online" keeps in place all the time with no problem. It could be related to something which removes the add-on's file, but without deep debugging I have no ideas.

The code you have mentioned may be useful for admin only. It is not documented anywhere, because it's kind of a hidden feature which allows to reset "Most Users Ever Online" directly from the browser. But it will work only if you as an Admin are logged in, i.e. your $user_id is 1. Then you could manually type /addon_whosonline.php?resetwonline=1 and the data will be reset.

I didn't understand the issues about search, if I type "who's online" it merely works.

Author woodscooter
Partaker
#40 | Posted: 28 Feb 2009 06:17 
Thanks, Paul. I'm going to keep a watch on my Most Users Ever count for a few days to see if there could be some server-created problem.

I think if line 60 "include(woDir.'/addon_whosonline_data.php');" is not successful, then the arrays are not initialised and the Most Users Ever figure will be re-written with today's date.

If I have repeated trouble with my Most Users Ever display, I will test the return value of line 60 and "return" out of "addon_whosonline.php" if I get a Null or zero value back.

Just to clear up the search question: I searched for "whos online" not "who's online" and I got only two search results. I was saying how cool it would be if Search could ignore punctuation.

Author Guest
~
#41 | Posted: 20 Jun 2009 08:41 
I have been getting these error messages, even when I set the shared_files folder and the file within to 777. But I also noticed with I go back and check the permissions on addon_whosonline_data.php, it is set back to 644. Looking for some help, thanks.

Warning: include(/home/ads4virg/public_html/forum/forum/shared_files/addon_whosonline_data.php) [function.include]: failed to open stream: No such file or directory in /home/ads4virg/public_html/forum/addon_whosonline.php on line 45

Warning: include() [function.include]: Failed opening '/home/ads4virg/public_html/forum/forum/shared_files/addon_whosonline_data.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ads4virg/public_html/forum/addon_whosonline.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at /home/ads4virg/public_html/forum/addon_whosonline.php:45) in /home/ads4virg/public_html/forum/addon_whosonline.php on line 54

Warning: unlink(/home/ads4virg/public_html/forum/forum/shared_files/addon_whosonline_data.php) [function.unlink]: No such file or directory in /home/ads4virg/public_html/forum/addon_whosonline.php on line 35

Warning: rename(/tmp/O0Jc80,/home/ads4virg/public_html/forum/forum/shared_files/addon_whosonline_data.php) [function.rename]: No such file or directory in /home/ads4virg/public_html/forum/addon_whosonline.php on line 36

Warning: chmod() [function.chmod]: No such file or directory in /home/ads4virg/public_html/forum/addon_whosonline.php on line 39

Author Guest
~
#42 | Posted: 20 Jun 2009 08:49 
Well, I have everything set to 777, but I'm still getting these errors.

Author woodscooter
Partaker
#43 | Posted: 20 Jun 2009 09:32 
Guest:
Warning: include(/home/ads4virg/public_html/forum/forum/shared_files/addon_whosonline_data.php)
Quoting the first error line (the fisrt of a group of errors is always more significant, the subsequent lines arise because of the first error), I see after public_html, you have 'forum' twice. Is this a typo? Is this the root of the problem?

Author Guest
~
#44 | Posted: 20 Jun 2009 09:38 
I've gotten it all straight now.

thanks

Author drjones
Guest
#45 | Posted: 20 Jun 2009 10:46 
Will the offline icon show if the user is offline? Mine does not. Not sure if this is the way its setup.

thanks

Page  Page 3 of 5:  « Previous  1  2  3  4  5  Next » 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /
 Who's Online
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑