How do I hide "Who is online" box to guests /people who are not logged in?
2 posters
Page 1 of 1
How do I hide "Who is online" box to guests /people who are not logged in?
I have looked around and tried to do it myself to no avail.
I want to hide the box with "Who is online" from guests. If I need to get rid of it altogether that is fine too.
Thank you in advance.
I want to hide the box with "Who is online" from guests. If I need to get rid of it altogether that is fine too.
Thank you in advance.
johns- New Member
- Posts : 1
Reputation : 0
Language : English
Re: How do I hide "Who is online" box to guests /people who are not logged in?
Hi,
This is my own code, and it works fine for me.
Go to: Administrator Panel > Forum Widgets Management > Create new Widget > Copy the code below into the text area, save it and drag it into the widgets table to make it appear on the page (Use table type > No):
It works for me, tell me if it works for you, too.
Besides, after running the code (without the last entry), if you know about javascript and can also do various stuffs since the user_name will return the member's username for member and return null for guest!
Enjoy,
Credit by xx3004,
This is my own code, and it works fine for me.
Go to: Administrator Panel > Forum Widgets Management > Create new Widget > Copy the code below into the text area, save it and drag it into the widgets table to make it appear on the page (Use table type > No):
- Code:
<script language="javascript" type="text/javascript">
if(jQuery("#logout").html()!=null)
{//Return username if member is logging in
user_name=jQuery("#logout").html().split("[ ")[1].split(" ]")[0];
}
else
{//Return null for guest
user_name=null;
}
//If user_name=null (guest) => hide the table "Who is online"
if(user_name==null){jQuery("table .forumline").css("display", "none");}
</script>
It works for me, tell me if it works for you, too.
Besides, after running the code (without the last entry), if you know about javascript and can also do various stuffs since the user_name will return the member's username for member and return null for guest!
Enjoy,
Credit by xx3004,
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum