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
  #162  
Old 06-22-2006, 05:11 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 Majava
Do i need to put that still in everypage? or just the index page?
.
If everything is just included into the index page thats the only spot you would need to put it.

You can post the index page code if you like and I will have a look for anything obvious.
Reply With Quote
  #163  
Old 06-22-2006, 08:58 AM
Majava Majava is offline
 
Join Date: Jun 2006
Location: East Sussex, England
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is at the top
PHP Code:
<?php
   chdir
('/path/to/forum'); 
   require_once(
'/path/to/forum/global.php');  

    
// Do not edit anything below this line
    // Do not edit anything below this line
    
session_start();

    
// You can now edit below this line
    // You can now edit below this line
?>
PHP Code:
            <?php
            $page 
$_GET['page'];
            
            if ((
$page == "news") || ($page == "status") || ($page == "armour") || 
                (
$page == "protector") || ($page == "garment") || ($page == "swords") || 
                (
$page == "blades") || ($page == "spears") || ($page == "glaives") || 
                (
$page == "bow") || ($page == "jewlery") || ($page == "accesories") || 
                (
$page == "skills") || ($page == "guides") || ($page == "guilds") || 
                (
$page == "quests") || ($page == "maps") || ($page == "faq") || 
                (
$page == "movies") || ($page == "screenshots") || ($page == "pictures") || 
                (
$page == "wallpapers") || ($page == "art") || ($page == "downloads") || 
                (
$page == "links") || ($page == "contact") || ($page == "jobs") || 
                (
$page == "irc") || ($page == "main") || ($page == "potions") ||
                (
$page == "scrolls") || ($page == "thanks") || ($page == "error_job") ||
                (
$page == "explist") || ($page == "mailthanks") || ($page == "register") ||
                (
$page == "lostpw")) {
    
                include(
"includes/".$page.".php");     
            } else if (
$page == "") {
                include(
"includes/main.php");
            } else {        
//                include("includes/broken.php"); 
            
}     
            
?>
This is my main code
Reply With Quote
  #164  
Old 06-23-2006, 03:14 AM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE=Majava]This is at the top
PHP Code:
<?php
   chdir
('/path/to/forum'); 
   require_once(
'/path/to/forum/global.php');  

    
// Do not edit anything below this line
    // Do not edit anything below this line
    
session_start();

    
// You can now edit below this line
    // You can now edit below this line
?>
Try something like

PHP Code:
<?php  
session_start
();
$curdir getcwd (); 
chdir('/path/to/your/forums');     
require_once(
'/path/to/your/forums/global.php');  
chdir ($curdir); 
?>
If that fails to work then it looks like both scripts are just incompatible
Reply With Quote
  #165  
Old 06-24-2006, 09:07 AM
Dark s.s. Trunk's Avatar
Dark s.s. Trunk Dark s.s. Trunk is offline
 
Join Date: Apr 2004
Location: Good Guestion its dark
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a strange problem lol i seem to be permittly logged in. Now on my forums when i log off and go to main forum page it shows me as logged in, and on the page i put the code i hit log out goes to forums cookies cleared aand all but when it goes back to page still logged in,, even cleared IE cashe and still does it
----------------
Edit: that problem was bad cashe in IE but now ran into another problem, i have 2 php files i use one has a bit different b/c of the way i display some pages but works perfect on mainpage.php but any file that seems to use my mainpage2.php it goes to log in but keeps telling me to log in but still logged in on mainpage.php.. all ode for login exact same.

Note seems pages dun work on anything linked to in the address bar like thsi http://twistedeffects.com/mainpage.p...iles/tutorials
Reply With Quote
  #166  
Old 06-25-2006, 10:28 AM
hurry hurry is offline
 
Join Date: Feb 2006
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AutoXer
I fixed it. Here's how:

AdminCP -> vBulletin Options -> Cookies and HTTP Header Options -> Path to Save Cookies

I changed the 'Suggested Settings' dropdown from '/forums/' to '/'
I did this but it still does not work for me and gives me the forum logged in screen and then again returns back to the page without being logged in. Please help.
Reply With Quote
  #167  
Old 06-27-2006, 10:59 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 Dark s.s. Trunk
Note seems pages dun work on anything linked to in the address bar like thsi http://twistedeffects.com/mainpage.p...iles/tutorials
I dont quite understand what you mean here.
What part of the login does not work exactly?
Reply With Quote
  #168  
Old 06-27-2006, 11:04 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 hurry
I did this but it still does not work for me and gives me the forum logged in screen and then again returns back to the page without being logged in. Please help.
I need a bit more detail than this please.
Reply With Quote
  #169  
Old 07-14-2006, 05:02 AM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated instructions with a change that may allow cross domain login to work.
Reply With Quote
  #170  
Old 07-14-2006, 12:29 PM
lightnb lightnb is offline
 
Join Date: Dec 2005
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having an issue where including global.php causes my main script to stop functioning.

I've commented out your code, line by line to locate the problem, and my script works until I allow global.php to be called.

At that point, all of the links on the page stop working (the login box works fine).

It is a search results page, and the links are in this format:

PHP Code:
<a href="<?=$PHP_SELF?>?query=<?=$query?>&page=<?=$page?>&limit=5">5</a>
Any idea why global.php interferes with the functionality of these links?

Thanks,

Nick
Reply With Quote
  #171  
Old 07-20-2006, 03:48 PM
Paris Holley Paris Holley is offline
 
Join Date: Jun 2003
Location: Iowa
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does not work in 3.6 rc2, including global.php causes scripts to become unresponsive

*nvm*

was a cookie conflict
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 09:11 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.05055 seconds
  • Memory Usage 2,350KB
  • 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
  • (5)bbcode_php
  • (4)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