The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Add security to non VB pages and block user groups Details »» | |||||||||||||||||||||||||||
Add security to non VB pages and block user groups
Developer Last Online: Aug 2003
OK, my first "hack"!
I created this because I want to have security and logins for my sites non VB pages but don't want two logins, one for the site and one for the forums. There are other hacks that do the same thing, but this one is different. 1. It creates a PHP session, which means when the user closes the browser they will have to login to the site again later. It doesn't access the VBulletin cookie at all. 2. The user is prompted to login on any page you include this on, once logged in they are taken to that page minus the security. 3. No modification to the VBulletin code. 4. Uses the VBulletin user table so any information in there can be used, like welcoming them on all pages with their login name or telling the user who they are loggin in as. 5. You can block poeple based on their VBulletin user group! That way only certain user groups can see the rest of your site. 6. RUNS ON WINDOWS 2000 AND IIS!!!!!! Let me know how you like it! Show Your Support
|
Comments |
#22
|
|||
|
|||
Yeah, I checked it all, and I do have a connection to the data base, because if I enter wrong information I get an 'Access Denied'.
One thing I'm wondering about is that you don't use $DBNAME in membercheck.php. Why is that? I need it, I guess because I have more then 1 database running on the server... Could you please give me the code that uses $DBNAME? Or is that not the problem?? EDIT: I found mysql_select_db("vbulletin", $db_conn); Replacing "vbulletin" with my databasename does the trick! Yeah! |
#23
|
|||
|
|||
Hey buddy,
A friend edited your version for me and I think you might like this, so I post it for you; Code:
// Additions: // // - Allow only users from specific groups // // - Return to the wanted page after successfull logon (redirect) // // - Set the databasename using $DBNAME // // - connect.php is no longer needed! // Bytheway: It works great now! |
#24
|
|||
|
|||
The database is selected in line 41 of the file, so that shouldn't be the issue.
|
#25
|
|||
|
|||
This is the error I get
Warning: Cannot send session cookie - headers already sent by (output started at /home2/mmdclab/mmdclab-www/phptests/index5.php:4) in /home2/mmdclab/mmdclab-www/phptests/membercheck2.php on line 58 Warning: Cannot send session cache limiter - headers already sent (output started at /home2/mmdclab/mmdclab-www/phptests/index5.php:4) in /home2/mmdclab/mmdclab-www/phptests/membercheck2.php on line 58 I am not sure what to fix to get this going? |
#26
|
|||
|
|||
we got the script working now we just have one little problem to overcome. The script takes them to the wrong page. Here is the senario:
Page A > Page B We have a link on page a to go to page b which we want to protect. So of course the form comes up and says login- (works great so far) Then when you log in it takes you to Page A in stead of showing you Page B. The think is when you click back on the link to go to page B it all works great. So for some reason it isn't taking us to the right place. Any ideas? |
#27
|
|||
|
|||
That is odd that is is going to the wrong page. Let me run through a few things and see what I can come up with.
Hey, thatnks for the additions, glad to know my code is liked and I appreciate the additions to it. Let me know if anyone is still having problems. I have been on the road a lot like a traveling fool and have lost track of a few things and do not want to leave anyone hanging. Thanks everyone. |
#28
|
||||
|
||||
I have a question about this. You state certain user groups can be allowed to view it only. I'd like admins to be the only people able to enter through this membercheck portal thingy password thingmajigger How can I do that? I see a code line in it that is obvious but.. could you toss an example please? Say only allowing admins to enter?
|
#29
|
|||
|
|||
Quote:
PHP Code:
PHP Code:
Great hack MT_100 and great mod WouterW (using yours ). This is a great hack, and I am gonna make a non vb (just using the user table) members area login page with this By the way, anyone interested adding a logout? I know it could be done, and I am trying to come up with something. |
#30
|
|||
|
|||
Here is my logout file.
|
#31
|
|||
|
|||
awesome man! Thanks a ton!
and I am running into some problems here, I cant display any info about the logged in user, like their name or anything. I tried in some method ut none of them worked....any help? thanks. Edit: After logging in, when I click on the logout link, the logout page says it couldnt log me out because I am not logged in |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|