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
  #232  
Old 04-24-2007, 02:54 PM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated
  • Fixed - // in paths bug
  • Fixed - Javascript warning in some browsers
  • Fixed - Tidied up some code
  • Fixed - Avatar display code bug

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.
Reply With Quote
  #233  
Old 05-02-2007, 09:25 PM
Emma Emma is offline
 
Join Date: Mar 2002
Location: Atlanta, GA
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is exactly what I was looking for! One question though, what if I want the user to be redirected to the main page (the non-vb page where the login is) after the login instead of the forums homepage. What would I need to change?
Reply With Quote
  #234  
Old 05-02-2007, 11:02 PM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Emma View Post
what if I want the user to be redirected to the main page (the non-vb page where the login is) after the login instead of the forums homepage. What would I need to change?
They are redirected back to the page they logged in from.
Reply With Quote
  #235  
Old 05-02-2007, 11:14 PM
Emma Emma is offline
 
Join Date: Mar 2002
Location: Atlanta, GA
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's taking me to the forum home page though instead of back to the site's index page. :\ Any thoughts?
Reply With Quote
  #236  
Old 05-03-2007, 08:56 PM
powerbook's Avatar
powerbook powerbook is offline
 
Join Date: Jul 2006
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get logged on when I hit the"logon" button on the custom site page. It temporarily redirect me to the VB login.php page and recognizes me and says welcome in the VB splash screen.

It then redirects me back to the page I logged in from with the same login box as if I haven't logged on. If I run the code below on it's own it works properly and takes me back to the page I used for logon and welcomes me without the login text boxes.

1) Any idea what might be causing this,
2) Can you specify where it should redirect to if you don't want to be redirected to the logon page again?

Thanks

Quote:
<?php
$curdir = getcwd ();
chdir('/home/XXX/public_html');
require_once('/home/XXX/public_html/global.php');
chdir ($curdir);
?>
<html>
<body>
This is a heading<br />
This is some more stuff <br />
And another line<br />
You get the idea<br />
Just place stuff as you normally would with HTML<br />
I use CSS to style and position on my site fwiw<br />
<br />
How about we put the login box right under here?<br />
<br />
<?php
require_once('/home/XXX/public_html/test/login_inc.php');
?>
</body>
</html>
Reply With Quote
  #237  
Old 05-29-2007, 03:59 AM
Emma Emma is offline
 
Join Date: Mar 2002
Location: Atlanta, GA
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still need some help with this myself. Also, I'm placing this code on all of my external forum pages, and while it shows me logged in on the main one, if I go to another page, it shows up saying I need to login again. Is there something I need to do with the cookies that I'm not aware of?
Reply With Quote
  #238  
Old 06-26-2007, 04:47 AM
ZomgStuff ZomgStuff is offline
 
Join Date: Feb 2007
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having problems with 3.6.7 PL1

I'm seeing this at the very top of my external page, but everything else works.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /global.php(237) : eval()'d code on line 2
Reply With Quote
  #239  
Old 07-05-2007, 05:48 PM
CP, CP, is offline
 
Join Date: Aug 2005
Location: UK London
Posts: 276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack ive installed it.. i just have a small query.. i would like my users to login and be redirected to a custom php file ive made, a page for members at the same time i would like the forum and user login session to be still active...

Cheers!
Reply With Quote
  #240  
Old 07-09-2007, 12:03 PM
ApplePro's Avatar
ApplePro ApplePro is offline
 
Join Date: Mar 2006
Location: Europe
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #241  
Old 07-21-2007, 05:32 PM
beejeebers beejeebers is offline
 
Join Date: Jul 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works wonderfully, but one question. How would I pull the password value out before it gets encrypted? I need that value for my main site's login script which I'm calling from login.php for the forums.

Any ideas?
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 08:35 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.04839 seconds
  • Memory Usage 2,311KB
  • 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
  • (2)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
  • (4)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