Previous Thread
Next Thread
Print Thread
Rate Thread
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
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 />				}

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.

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

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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,545
Posts293,796
Members13,838
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 253
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 19
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,806
Greg Hard 4,625
Top Posters(30 Days)
isaac 20
Top Likes Received
isaac 44
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 4
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 20200916.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.048s Queries: 25 (0.016s) Memory: 3.2800 MB (Peak: 3.6279 MB) Data Comp: Zlib Server Time: 2020-09-21 03:21:48 UTC
Valid HTML 5 and Valid CSS