![]() |
Simple vB User login and access control on non vB pages
Hack Description
This is a cutdown version of the user authentication and access control system I use on the non vB pages on my website. This uses the vB 3.6 login system to log you in and out. It allows you to move between your forums and other pages on your site while remaining logged in. It allows you to do things such as restrict pages by usergroup, display different content depending on a user being logged in or not. For example, you can have banner Adds displying to non members only, and/or let members access to specific content. Ive cut it down to the bare minimum that it needs to work, no fancy stuff such as avatars, PM's, or even formating. I will try and offer support, but work and family commitments mean I dont have much free time. This code is a mix of my own, and pieces I have used from other hacks that are floating around. This script has been confirmed as working on
Changelog Version 1.10 (24th April 2007)
Version 1.0 (2nd December 2006)
Click on Install If you have this script installed then please click on the install link because;
Donations First of all, to be clear. This script is 100% free. However if you feel an urge to donate I'm not going to say no. :) Donations can be made at http://www.billspaintball.com/vb3/bd_donate.php |
Edit: This usage and trouble shooting guide has been updated as of 24th of April 2007
Usage The hack is pretty useless without some usage instructions so here they are. We can use conditionals to hide or display depending on a number of things such as Logged in or out status, or restrict to members of a specific usergroup. We do this by using conditionals in php tags where the normal content of a webpage would go. If you want something only accessable to a certain usergroup, use this code in your webpage. This example is only visible to members of usergroup 6. PHP Code:
For example, PHP Code:
For example: PHP Code:
Another use is to display different content to users depending on if they are logged in or not. For example PHP Code:
For example PHP Code:
Troubleshooting If your reading this chances are you are having problems. Here are some common causes and fixes.
|
thanks!
|
Great work. Thanks!
|
Any chance of seeing a demo of some kind, I am wanting a login page for my homepage in which users can see there info on the homepage like PM's new posts, etc....
|
Quote:
See my sig for link to it. |
But if I am using 3.6 why do I need to use 3.5 if the hack is pretty much the same, if not the same?
Also I want the hack for HTML pages, if thats possible |
Quote:
It also works fine with all versions of vB 3.6 Quote:
|
Awesome work!, thanks so much.
|
i've got it working, but only when i remove my other script that i have to call which is require_once('./vBExternal.php'); for another add-on....how do i stop the top part of the login code
Code:
<?php Code:
<?php |
All times are GMT. The time now is 12:58 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|