Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

I am fairly certain this has come up before, but I am afraid I could not find it (likely used the wrong search terms )

Anyway, I was wondering if it is possible to use UBBT to control access to non-UBBT pages. In other words, I would like to allow members of the board access to different pages on my website depending on their Group.

I assume this should be possible by adding some code to the top of every page on my site that checks for Group, right?

Sanuk!

Sponsored Links
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Yes this is possible. I've done it for my gaming roster add on.

Here's an example, I place this near the top of my file, right after the require statements. There's probably a better way... but it works great for me.

Code
 <br />//Snag Authentication stuff <br />$userob = new user; <br />$user = $userob -> authenticate("U_Groups"); <br />$Username = $user['U_Username']; <br />$UserID = $user['U_Number']; <br /> <br />// Let's authenticate the user to see if they have proper group permissions to add characters <br />$html = new html; <br />if (!preg_match("/$config[Roster_Group]/", $user[U_Groups]) ) <br />{ <br />	$html -> not_right ("I'm sorry, you do not have permissions to access this form. If you feel this is in error, please contact the administrator."); <br />} <br />


The $config[Roster_Group] is defined in the admin -> config settings -> "other variables" section. For my use, it's group number 5, that way I can use it quickly on any page I need to authenticate against groups.

Hope this helps.

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Was just heading off to dream land when I remembered I forgot to mention that all my roster page addon files are stored in their own directory under the addons directory in the Threads directory.

I found it was just easier to grab threads paths and includes this way.


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:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 531
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 23
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)