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 |
#112
|
|||
|
|||
Quote:
PHP Code:
Even before i changed that, I wasn't getting any errors in IE, it just wasn't working. I do have my cookies set to / and not forum/, so I don't know what the IE issue is. :P |
#113
|
|||
|
|||
Post Removed Because I jumped the gun. Seems to be working perfectly. Will be donating to Bill on Friday for his great work
|
#114
|
|||
|
|||
Quote:
Even with a security/cookie issue, I'd like to see how it was done. Thanks! |
#115
|
|||
|
|||
The problem you may be having is when you go into vBulletin options-> Cookies and Setting your site may be (blank) you should have a drop down that allows you to select yourdomain.com. Once I changed that it worked. That is the only thing I did different. The table code I posted above is the same... well here is the entire code:
Code:
<?php $curdir = getcwd (); chdir('/home/superman/public_html/forums'); require_once('/home/superman/public_html/forums/global.php'); chdir ($curdir); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <?php require_once('../forums/login_inc.php'); ?> <?php if ($vbulletin->userinfo['usergroupid'] == '6' ) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td>NEWS</td> <td>COMICS</td> <td>REVIEWS</td> <td>CHARACTERS</td> <td>CREATORS</td> <td>ARTICLES</td> </tr> <tr> <td><a href='submit_news.php'>Submit News </a></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><a href='view_edit_news.php'>Edit News </a></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table>"; } else { echo "You do not have permission for this page"; } ?> </body> </html> |
#116
|
|||
|
|||
Quote:
Quote:
I clicked "Return to the page you were previously viewing", and I was logged out. I also tried it just typing in the URL after logging out; I was still logged out properly. But I don't use IE, so I don't know how to check the cookies to make sure the one from my site was removed or not. But it appears to be logging me out properly. |
#117
|
||||
|
||||
Quote:
|
#118
|
|||
|
|||
it is possible to use the template system vb in non vb page with this mod ?
|
#119
|
|||
|
|||
Quote:
|
#120
|
|||
|
|||
Firstly, suttercain, it appears you could be very helpful to others...but you need to relax dude...seriously.
1. I tried to see if this was posted before, but was unable to find. Everything works great, but when "Log Out" is clicked, the "cleared cookies" vb page is shown and stays. Is this the normal behavior? Is there a known workaround to get it to return the initiating page? (other than hacking the vb code). 2. On the subdomain issue, I have the typical: xxx.org and forums.xxx.org. By doing a "cwd()" in both the domain and subdomain, I confirmed that the physical locations are both under the main domain. However, the require_once of the global.php simply prohibits the page from displaying. Bypassing this with a technologically-superior "//" (commenting out), the page loads fine but displays the following after clicking login: "In order to accept POST request originating from this domain, the admin must add this domain to the whitelist" Dunno if this will help at all, but figured I'd post it. |
#121
|
||||
|
||||
Updated
Download the update from the first post, and see the 2nd post for additional workarounds for the 404 on Expired passwords and cross domain login issues. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|