Previous Thread
Next Thread
Print Thread
Rate Thread
Alternate Nav Bar by Group... #283272 01/26/2005 12:19 PM
Joined: Apr 2002
Posts: 474
oceanwest Offline OP
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... [Re: sdf123] #283273 01/26/2005 12:30 PM
Joined: Apr 2002
Posts: 474
oceanwest Offline OP
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... [Re: sdf123] #283274 01/26/2005 4:25 PM
Joined: Mar 2001
Posts: 644
Zackary Offline
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... [Re: ] #283275 01/29/2005 3:09 AM
Joined: Apr 2002
Posts: 474
oceanwest Offline OP
Enthusiast
OP Offline
Enthusiast
Joined: Apr 2002
Posts: 474
it worked.

Re: Alternate Nav Bar by Group... [Re: sdf123] #283276 01/29/2005 4:36 AM
Joined: May 2001
Posts: 550
Anno Offline
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

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
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,524
Posts293,716
Members13,832
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 87
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,790
Greg Hard 4,625
Top Posters(30 Days)
isaac 13
Gizmo 3
Top Likes Received
isaac 27
Brett 7
Morgan 2
Slaz 1
Top Likes Received (30 Days)
isaac 27
Brett 7
Morgan 2
Slaz 1
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

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

PHP: 5.4.45 Page Time: 0.039s Queries: 25 (0.012s) Memory: 3.2578 MB (Peak: 3.4441 MB) Data Comp: Zlib Server Time: 2019-12-15 03:26:35 UTC
Valid HTML 5 and Valid CSS