The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Simple vB User login and access control on non vB pages Details »» | |||||||||||||||||||||||||||
Simple vB User login and access control on non vB pages
Developer Last Online: Nov 2011
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 Show Your Support
|
Comments |
#52
|
|||
|
|||
HoG - this always redirects me back to the page from which our members log in.
QUESTION: How do I manipulate the size of the "Log In" button? I'd like to be able to streamline this hack so it fits neatly in a small area, and the button is quite large right now - can I adjust the size of it? |
#53
|
|||
|
|||
Quote:
PHP Code:
|
#54
|
||||
|
||||
It should do that automaticly.
|
#55
|
||||
|
||||
Quote:
login_inc.php find the line with // You can style this with html or CSS as normal if desired. and you will see the login form code. You can make the boxes smaller by editing size=10 and/or you can add css or html tags to format the text size/colour/font etc as desired. |
#56
|
||||
|
||||
Quote:
Try changing that bit above to <?php $curdir = getcwd (); chdir('/home/gamesoga/public_html/forums'); require_once('/home/gamesoga/public_html/forums'/global.php'); chdir ($curdir); ?> If that does not work I suspect that your trying to use a variable named the same as a reserved vB one. |
#57
|
|||
|
|||
Does this mod allow me to use the vB headers and footers?
|
#58
|
||||
|
||||
I dont know.
I havent looked into whats involved in calling the vB header and footer templates. |
#59
|
|||
|
|||
Many thanks. This snippet allowed me to do something that I've been begging for support on vb.org for the past several months. Plus, it is super-easy to modify and customize.
My only question, is if you have a complete list of $vbulletin->userinfo[] variables that I can use in conjunction with this mod. |
#60
|
|||
|
|||
This is probably a common request/hack so that is why I am describing what I have done.
I took Billspaintball's script for use as a single point login for my site, with the objective of not letting anyone into my entire site without the correct credentials/authorization. I want to permit access only to user groups 2,5,6,or 7 (registered users, moderators, and admins). www.mysite.com www.mysite.com/forums A page with Bill's script code sits at the root (index.php) and my forum is under /forums. If a non-authorized user comes along I want to bounce him/her back to the ROOT with a message. First I set the permissions of the usergroups to what I think they should be to stop them from getting nto my site at all, then I also use the following alteration of Bill's code on the root index page: Code:
if($isAdmin){ //show welcome message //show logout link //show link to forum }elseif($isAuthorized){ //javascript that sends authorized user to the forum homepage /forums echo " <script> document.onload = redir(); function redir(){ window.location.replace(\"forums\"); } </script> "; }else{ //USER IS NOT AUTHORIZED //show a specific message regarding why they do not have access //show login boxes //show registration request link ONLY if user is usergroup 1 (Unregistered / Not Logged In) } If I change the permissions and allow my defined set of unauthorized usergroups access to view forums the problem goes away. However, this defeats my goal in preventing these unauthorized users from seeing the forum in the first place and by typing in /forum they can view the forum homepage! Can anyone can shed light on this and help me achieve what I would like to do? Thanks! Jonathan |
#61
|
|||
|
|||
Quote:
Any chance for a fix on this though? It would make templating much easier. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|