Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 10-04-2002, 02:58 PM
glo's Avatar
glo glo is offline
 
Join Date: Aug 2002
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by mt_100
I saw a great hack for Apache on Unix/Linux with .htaccess that did the same thing and loved it, use it on one of my servers.

I just wanted one that would work the same on IIS, so I made it and wanted to share it.
Hi mt_100

This may not be a good question but i have to ask!
Will this hack work on Apache or is it strictly IIS???

If not, can you point me into the the other hack that inspired you to create this one!
Reply With Quote
  #13  
Old 10-04-2002, 03:19 PM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack is server independant, I use it on my IIS and Apache servers and it works fine.
Reply With Quote
  #14  
Old 10-04-2002, 03:32 PM
glo's Avatar
glo glo is offline
 
Join Date: Aug 2002
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks mt_100, i will give it a go soon!

looking forward to it! will click install when i get around to it!

Also, will it work on 2.2.8???
Reply With Quote
  #15  
Old 12-21-2002, 07:49 PM
LOD-squa's Avatar
LOD-squa LOD-squa is offline
 
Join Date: Aug 2002
Location: Orlando, Florida
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This doesn't work for me =\
Reply With Quote
  #16  
Old 01-02-2003, 06:01 PM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes there is a problem for some. The solution is to change all the lines that read ECHO that are HTML to just HTML and put the stop PHP and Start PHP parkers before and after them. I will send the new file as well.
Reply With Quote
  #17  
Old 01-02-2003, 06:02 PM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the new version, should work for you.
Reply With Quote
  #18  
Old 01-25-2003, 02:51 PM
papa papa is offline
 
Join Date: Jan 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where should an include to membercheck.php go and is the the correct code we are adding to our html pages:

<? php include('membercheck.php'); ?>

We are not having any luck getting this hack to work and you please advise.
Reply With Quote
  #19  
Old 01-27-2003, 11:43 AM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is the correct code to work, so no problem there.

What version oh PHP are you using?

Also, is the register_globals setting turned on in the php.ini file?

Try to rename the file you are including it into .php instead of .html.

Also, make sure you have a file called connect.php in the same folder as the membercheck.php file defining the $DBSERVER, $DBUSER, and $DBPASS variables or change them in the membercheck file.

Also be sure you have the second version of the file listed in the post, the first didn't work for everyone. Let me know if this works.

Thanks.
Reply With Quote
  #20  
Old 02-02-2003, 11:44 PM
WouterW WouterW is offline
 
Join Date: Jan 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After logging in, I get this message:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/wwwroot/websites/www/admin/memchk/membercheck.php on line 47

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/wwwroot/websites/www/admin/memchk/membercheck.php on line 52

The rows:
47: $row = mysql_fetch_array($result);
52: if (mysql_num_rows($result) > 0)

Need some serious help here, because off php/mysql n00bnes
Reply With Quote
  #21  
Old 02-03-2003, 11:24 AM
mt_100 mt_100 is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Take a look at my post just before yours and make sure those items are satisfied. It looks like you don't have a connection to the DB so be sure to check your connect.php.
Reply With Quote
Reply


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 01:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05737 seconds
  • Memory Usage 2,298KB
  • 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_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