Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
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
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
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 />				}

Joined: Mar 2001
Posts: 644
Member
Member
Offline
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.

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
it worked.

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
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
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,575
Posts293,927
Members13,822
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
cgregg 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)