Previous Thread
Next Thread
Print Thread
Rate Thread
Alternate Nav Bar by Group...
#283272 01/26/2005 1:19 PM
Joined: Apr 2002
Posts: 474
Enthusiast
OP Offline
Enthusiast
Joined: Apr 2002
Posts: 474
I altered this in my ubb.inc.php but it isn't working...

Code
<br /> if (($user['U_Groups'] == '-6-') ||  ($user['U_Groups'] == '-10-') || ($user['U_Groups'] == '-11-') || ($user['U_Groups'] == '-12-')) {<br /><br /><br />				// -------------------------------------------<br />				// Now require the registerednav.php template<br />				$html = new html;<br />				list($tbopen,$tbclose) = $this -> table_wrapper();<br />				if (!$debug) {<br />					include("$thispath/templates/$tempstyle/ubbt_registerednav2.tmpl");<br />				}<br />				<br />				}<br /><br />else{<br />			// -------------------------------------------<br />				// Now require the registerednav.php template<br />				$html = new html;<br />				list($tbopen,$tbclose) = $this -> table_wrapper();<br />				if (!$debug) {<br />					include("$thispath/templates/$tempstyle/ubbt_registerednav.tmpl");<br />				}<br />				}<br />

Sponsored Links
Re: Alternate Nav Bar by Group...
sdf123 #283273 01/26/2005 1:30 PM
Joined: Apr 2002
Posts: 474
Enthusiast
OP Offline
Enthusiast
Joined: Apr 2002
Posts: 474
Changed it to this still no workie

Code
<br />				// -------------------------------------------<br />				// Now require the registerednav.php template<br />				$html = new html;<br />				list($tbopen,$tbclose) = $this -> table_wrapper();<br />				if (!$debug) {<br />				<br />				 if (($user['U_Groups'] == '-6-') ||  ($user['U_Groups'] == '-10-') || ($user['U_Groups'] == '-11-') || ($user['U_Groups'] == '-12-')) {<br />				<br />					include("$thispath/templates/$tempstyle/ubbt_registerednav2.tmpl");<br />					<br />				}<br />				else {<br />					include("$thispath/templates/$tempstyle/ubbt_registerednav.tmpl");<br />					<br />				}<br />					<br />					<br />				}

Re: Alternate Nav Bar by Group...
sdf123 #283274 01/26/2005 5:25 PM
Joined: Mar 2001
Posts: 644
Member
Offline
Member
Joined: Mar 2001
Posts: 644
Try this, I do something similar to make sure certain group members have access to addon pages on my site:

Code
 if (preg_match("-6-", $user[U_Groups]) ) 


Should look through the U_Groups variable and match for 6.

For example with your code:

Code
 if ((preg_match("-6-", $user[U_Groups]))  ||  (preg_match("-10-", $user[U_Groups])) || (preg_match("-11-", $user[U_Groups])) || (preg_match("-12-", $user[U_Groups]))) { 


Hope that helps.

Re: Alternate Nav Bar by Group...
#283275 01/29/2005 4:09 AM
Joined: Apr 2002
Posts: 474
Enthusiast
OP Offline
Enthusiast
Joined: Apr 2002
Posts: 474
it worked.

Re: Alternate Nav Bar by Group...
sdf123 #283276 01/29/2005 5:36 AM
Joined: May 2001
Posts: 550
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 550
You should better use
if (strchr($user['U_Groups'],"-6-"))

instead of
if (preg_match("-6-", $user['U_Groups']))

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,805
Joined: January 2000
Forum Statistics
Forums63
Topics37,543
Posts293,775
Members13,837
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 321
Topics Created 0
Posts Made 1
Users Online 1
Birthdays 14
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,805
Greg Hard 4,625
Top Posters(30 Days)
isaac 2
Top Likes Received
isaac 39
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 1
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Snapshot build 20200618.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.041s Queries: 25 (0.017s) Memory: 3.2722 MB (Peak: 3.6275 MB) Data Comp: Zlib Server Time: 2020-07-14 13:57:37 UTC
Valid HTML 5 and Valid CSS