Previous Thread
Next Thread
Print Thread
Hop To
#241906 02/23/2011 11:07 AM
Joined: Feb 2011
Posts: 36
T
newbie
newbie
T Offline
Joined: Feb 2011
Posts: 36
Is there a way to hide the whos online box from members and bee seen by Admin and Mods?


I need all the help I can get.
Teal #241939 02/26/2011 12:33 AM
Joined: Jun 2010
Posts: 58
R
journeyman
journeyman
R Offline
Joined: Jun 2010
Posts: 58
yes, bookmark the who's online page (click on the title "who's online" to find it), then edit header.tpl in control panel to delete the display of the who's online link in the header. Also set who's online to hidden, in Portal Layout in control panel. most members dont know the URL of the page

Teal #241941 02/26/2011 3:53 AM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I believe they want to have the portal box only show for admin/mod's; if they wanted that system itself admin/mod only there is a tick in the online.inc.php file (scripts folder) that sets it to that.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Teal #241975 02/28/2011 2:25 PM
Joined: Feb 2011
Posts: 36
T
newbie
newbie
T Offline
Joined: Feb 2011
Posts: 36
Gizmo, Im not finding it in the php file?


I need all the help I can get.
Teal #241976 02/28/2011 2:31 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
File: scripts/online.inc.php

Find:
PHP Code
function page_online_gpc () {
	return array(
		"input" => array(
		),
		"wordlets" => array("online"),
		"user_fields" => "t2.USER_TIME_FORMAT, t2.USER_TOPIC_VIEW_TYPE",
		"regonly" => 0,
		"admin_only" => 0,
		"admin_or_mod" => 0,
	);
} // end page_online_gpc 

change to:
PHP Code
function page_online_gpc () {
	return array(
		"input" => array(
		),
		"wordlets" => array("online"),
		"user_fields" => "t2.USER_TIME_FORMAT, t2.USER_TOPIC_VIEW_TYPE",
		"regonly" => 0,
		"admin_only" => 0,
		"admin_or_mod" => 1,
	);
} // end page_online_gpc 

2c

SD #241977 02/28/2011 2:44 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
I knew the answer to this already. But in my mind I have always questioned the format of the operator.

=> does not appear in the php manual at least I can't find it.
But
>= does appear as a greater than equal to operator.

Why is it => in the ubb scripts?


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Teal #241978 02/28/2011 3:30 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
it's not a comparison operator.

it's an array / key assignment

eg:

PHP Code

$p = array();
$p['foo'] = 'bar';
 

can be written the same as:

PHP Code
$p = array (
"foo" => "bar"
); 

2c

SD #241979 02/28/2011 3:50 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Grasshopper says I see now master!

I always assumed the format was a operator. And could never find the value in the scripts.

But now that makes since. Also because I never looked a couple lines above. To see it was an array not a value statement.

Thank you for the enlightenment.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Teal #241980 02/28/2011 4:22 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Ruben, check your PT's, I'll teach you all about arrays/multi dimensional arrays tongue...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Teal #241981 02/28/2011 6:31 PM
Joined: Jun 2010
Posts: 58
R
journeyman
journeyman
R Offline
Joined: Jun 2010
Posts: 58
When I do the above, regular members can still see the portal box, but cannot get access to the who's online page. Is there something in this setting that needs to be changed?

Code
$Private = 0;
		if ($user['USER_MEMBERSHIP_LEVEL'] != "Administrator") {
			$Private = 1;
		}

Ruben #241982 02/28/2011 8:23 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
Originally Posted by Ruben
Grasshopper says I see now master!


i see you snatched the pebbles outta my hand now.. you may walk on the rice paper, pick up the burning hot iron and wander out into the snow laugh

Teal #242029 03/02/2011 10:38 PM
Joined: Jun 2010
Posts: 58
R
journeyman
journeyman
R Offline
Joined: Jun 2010
Posts: 58
When I do what was mentioned here, regular members can still see the portal box, but cannot get access to the who's online page, if they happen to have it bookmarked. Is there something in this setting that needs to be changed?

Code
$Private = 0;
		if ($user['USER_MEMBERSHIP_LEVEL'] != "Administrator") {
			$Private = 1;
		}

Teal #242030 03/03/2011 1:43 AM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
The Who's Online page really has nothing to do with the island... We where recommending turning the island off and just using the page.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Teal #242050 03/03/2011 7:51 PM
Joined: Jun 2010
Posts: 58
R
journeyman
journeyman
R Offline
Joined: Jun 2010
Posts: 58
Ah ok thanks for the clarification


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (ahmed047), 892 guests, and 151 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)