Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Add security to non VB pages and block user groups Details »»
Add security to non VB pages and block user groups
Version: 1.00, by mt_100 mt_100 is offline
Developer Last Online: Aug 2003 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-01-2002 Last Update: Never Installs: 22
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-03-2003, 11:36 PM
WouterW WouterW is offline
 
Join Date: Jan 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #23  
Old 02-04-2003, 03:56 AM
WouterW WouterW is offline
 
Join Date: Jan 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!                                     //
Also, he wrote a short installation instruction.

Bytheway: It works great now!
Reply With Quote
  #24  
Old 02-04-2003, 11:28 AM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The database is selected in line 41 of the file, so that shouldn't be the issue.
Reply With Quote
  #25  
Old 03-12-2003, 08:58 PM
papa papa is offline
 
Join Date: Jan 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #26  
Old 03-13-2003, 02:55 PM
papa papa is offline
 
Join Date: Jan 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #27  
Old 03-13-2003, 10:28 PM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #28  
Old 04-24-2003, 05:41 AM
Jujimufu's Avatar
Jujimufu Jujimufu is offline
 
Join Date: Apr 2003
Location: Magicant
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #29  
Old 08-09-2003, 04:00 AM
Matrixgl Matrixgl is offline
 
Join Date: Sep 2002
Location: Canada
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
04-24-03 at 07:41 AM Jujimufu said this in Post #27
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?
Change this:
PHP Code:
        if ($usergroupid!=and $usergroupid!=and $usergroupid!=and $usergroupid!=and $usergroupid!=11
to this:
PHP Code:
        if ($usergroupid!=1
Assuming 1 is the admin group id.

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.
Reply With Quote
  #30  
Old 08-11-2003, 12:14 PM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is my logout file.
Reply With Quote
  #31  
Old 08-12-2003, 12:04 AM
Matrixgl Matrixgl is offline
 
Join Date: Sep 2002
Location: Canada
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07424 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete