Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Simple vB User login and access control on non vB pages Details »»
Simple vB User login and access control on non vB pages
Version: 1.30, by Billspaintball Billspaintball is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Version: 3.5.8 Rating:
Released: 11-16-2005 Last Update: 04-23-2007 Installs: 138
Additional Files  
No support by the author.

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.5 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
  • vB 3.5.x - All Versions


Changelog

Version 1.30 (24th April 2007)
  • Fixed - // in paths bug
  • Fixed - Javascript warning in some browsers
  • Fixed - Tidied up some code

Version 1.20 (2nd December 2006)
  • Fixed Logout incorrect path bug
  • Made change to reduce compatibility problems with foreign scripts

Version 1.10 (4th Feb 2006)
  • Changed login_inc.php so you only need to edit path in one place now.
  • Added more commenting to login_inc.php
  • Added usage instructions to instructions file
  • Added troubleshooting guide with all common problems and fixes to instructions file.
Note: It is NOT necessary to update from 1.0 to 1.10.
There is no functionality changes or bug fixes between these 2 releases.

Version 1.0 (17th November 2005)
  • Initial Release


Deluxe Version of this hack is now available
Has Avatars, PM's, Number of Posts etc.

Click Here


Click on Install
If you have this script installed then please click on the install link because;
  • You will get notified if any security issues are reported.
  • You will get notified when there are any upgrades to this script
  • It gives me a warm fuzzy feeling and motivates me to develop more

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

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

Comments
  #242  
Old 07-28-2007, 10:28 AM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by beejeebers View Post
How would I pull the password value out before it gets encrypted?
You cant see the actual vB password from vB, it is encrypted.

Spose you could use vb_login_password but if you start using that all over your site it will be a security weakness.
Reply With Quote
  #243  
Old 09-16-2007, 04:28 AM
ViperCC ViperCC is offline
 
Join Date: Jan 2002
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ApplePro View Post
Hello guys,

When I run sample script (test.php), I'm getting an error about headers:



I've checked script and there are no spaces before first 4 lines of code.

By the way, I see this only when I logged out. When I logged in (through vBulletin), I see this:



How can I fix this?

PS: I have lastest vBulletin version installed. And the installation is fresh (just one thread).
You need to either disable error output (which should be done on all Production level machines), or you need to reduce the errors that PHP reports (Notices aren't really errors, and don't really need to be logged on a production system. They're good for development.)

You'll either need to edit your php.ini file (requires root access to the machine), set a flag in your .htaccess file, or even set the config option in your PHP somewhere with ini_set().

Reference PHP's error logging manual for more info: http://us2.php.net/manual/en/ref.errorfunc.php
Reply With Quote
  #244  
Old 09-16-2007, 04:32 AM
ViperCC ViperCC is offline
 
Join Date: Jan 2002
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having some issues using this, wondering if anyone else is seeing the same.

When global.php is included, I get the following fatal error:

Fatal error: Call to a member function query_first_slave() on a non-object in /home/jay/web/web/forum/includes/functions.php on line 1178

The line of code it's trying to run starts as follows:

$user = $vbulletin->db->query_first_slave("

This is in the "fetch_userinfo" function. It seems that the db object isn't being instantiated properly. I'll dig around some and see if I can't figure out what's wrong, just wanted to post a message first. This is in VB 3.6.7 PL1.
Reply With Quote
  #245  
Old 09-16-2007, 04:52 AM
ViperCC ViperCC is offline
 
Join Date: Jan 2002
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe I found my issue. I was putting the initialization code inside a class in my script. This was causing the "global $vbulletin;" bit inside VB's functions to lose the $vbulletin object's context. Would certainly be nice to see VB goto more OO based code, that functions.php file is crazy! 5261 lines!
Reply With Quote
  #246  
Old 09-24-2007, 03:08 AM
brandondrury brandondrury is offline
 
Join Date: Oct 2005
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a new update to my problems with the hack redirecting to the forum/index.php every single time in Firefox.

I started programming a new site back in May in which I used this mod for well over 50 external php pages. It worked great with both IE and Firefox. Then just today (just days before the site launch) it begins the problems with Firefox again.

I had (stupidly) changed my URL in admincp from domain.com/forum to domain.com/forum/ (I didn't notice the message that said "do not use a /").

Because I had made several changes in the admin, I didn't realize what I had done. I noticed my links pointing to the forum with the system had two slashes // in them. I just went in and removed one of the slashes.

So now I've figured out what I have done and have tried changing them back to the way they originally worked and Firefox has decided to start it's old antics again. It now redirects to the forum/index.php every single time.

Brandon
Reply With Quote
  #247  
Old 12-03-2007, 07:01 PM
thegabriel thegabriel is offline
 
Join Date: May 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want to integrate my CMS written in smarty coding with VBulletin. I implemented the above code and it was working fine with the sample script. But when I try to integrate it with my CMS, I am not able to access the session variable value when I am return back to CMS. The session is still active in VBulletin and I am able to browse through the forum.

I tried the settings suggested in this thread about how I should change the cookie path settings. Wondering if anyone could help me figure out where I am going wrong.
Reply With Quote
  #248  
Old 12-16-2007, 04:29 PM
HaCaoChien HaCaoChien is offline
 
Join Date: Jun 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got this message:

Quote:
Warning: array_keys() [function.array-keys]: The first argument should be an array in /includes/functions.php on line 4840

Warning: preg_replace() [function.preg-replace]: Empty regular expression in /includes/functions.php on line 4840
How can I fix it?
Reply With Quote
  #249  
Old 12-16-2007, 04:32 PM
HaCaoChien HaCaoChien is offline
 
Join Date: Jun 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That warning alway show if user do not loged in. When loged in (from board or sth like that), every thing is ok
Reply With Quote
  #250  
Old 01-23-2008, 01:58 PM
F4Flake F4Flake is offline
 
Join Date: Jan 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, after messing around with this for ages wondering why it appeared to work and not work I realised that .....

If you're running your forum on a localhost test server... apache doesn't handle the cookies correctly....

anyone any ideas how I can force my localhost to do the cookies?

sorted... don;t worry.
Reply With Quote
  #251  
Old 05-04-2008, 10:22 PM
Ezo Ezo is offline
 
Join Date: Sep 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$_GET
doesn't seem to stack with this mod..
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 02:39 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.09997 seconds
  • Memory Usage 2,316KB
  • 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
  • (3)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
  • (1)pagenav_pagelinkrel
  • (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