|
|
Joined: Apr 2002
Posts: 474
Enthusiast
|
Enthusiast
Joined: Apr 2002
Posts: 474 |
I altered this in my ubb.inc.php but it isn't working... <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 />
|
|
|
|
Joined: Apr 2002
Posts: 474
Enthusiast
|
Enthusiast
Joined: Apr 2002
Posts: 474 |
Changed it to this still no workie  <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
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: if (preg_match("-6-", $user[U_Groups]) ) Should look through the U_Groups variable and match for 6. For example with your 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
Joined: Apr 2002
Posts: 474 |
 it worked.
|
|
|
|
Joined: May 2001
Posts: 550
Code Monkey
|
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']))
|
|
|
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.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|