Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 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.10, by Billspaintball Billspaintball is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.6.5 Rating:
Released: 12-01-2006 Last Update: 04-23-2007 Installs: 197
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.6 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.6
  • vB 3.6.1
  • vB 3.6.2
  • vB 3.6.3
  • vB 3.6.4
  • vB 3.6.5


Changelog

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

Version 1.0 (2nd December 2006)
  • Very similar to my vB 3.5 version, however logout bug fixed and should be more compatible with other scripts on your page.



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
  #152  
Old 08-20-2007, 02:44 AM
imtwoods imtwoods is offline
 
Join Date: Jul 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack looks like it will work for my site, but before I try it, will it work with version 3.6.8?
Reply With Quote
  #153  
Old 08-23-2007, 07:29 PM
Topuk Topuk is offline
 
Join Date: Aug 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok we have a version that will allow someone of a certain primary group to see the page like this:

<?php
if ($vbulletin->userinfo['usergroupid'] == '6' )
{
echo "This is only visible to people in usergroup 6";}
?>

has anyone worked out how to do it with a secondary group? i.e. if they are members of 3 or 4 groups and the page is available to them as a secondary member??
Reply With Quote
  #154  
Old 09-04-2007, 05:15 PM
txsbmw txsbmw is offline
 
Join Date: May 2006
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Billspaintball View Post
There is a guide on using this script with vBexternal right here
https://vborg.vbsupport.ru/showpost....&postcount=399

I have vbexternal, tried this fix but it still just redirects me back to the page after logging in and instead of it showing I am logged in, it shows the log in box. I have also checked my cookie settings as well. Running 3.6.8

Anyone know how to get it to work correctly?
Reply With Quote
  #155  
Old 09-20-2007, 10:39 AM
wsdeluxe wsdeluxe is offline
 
Join Date: Mar 2006
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having problems with this.

I have my forums at domain1.com/forums/ and a site at site1.com

I've followed all the instructions and everything and its not working correctly. If I clear my cookies, I login and it redirects me to site1.com and shows me as logged in however in the address bar there is ?s= then the long session ID string. If I navigate to another page, this goes and I'm logged out.

Any idea whats going on here? I'm pulling my hair out over this!

The connection to the vB files is working, the redirect is working, but it is not setting the cookies correctly. I've tried the cookie domain as blank, .site1.com, .domain1.com and its just not working. It keeps me logged in on the forums, just not the site.

I've got root access so can modify any settings if needed (however I don't think its server-side related).

Thanks for your time & hard work.
Reply With Quote
  #156  
Old 09-22-2007, 07:09 PM
imtwoods imtwoods is offline
 
Join Date: Jul 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know if this hack will work with iframes? Specifically, it I have the login box and login detection code within an iframe (say login.php), and this iframe is part of index.html, if I enter my username/password in the login box, it seems to recognize that I've logged in, but it won't redirect me back to the main page, which is index.html. It seems to redirect back to my iframe page, login.php, which is not the behavior I want. Does anyone know how to make it redirect to the main page, index.html, which includes my login.php in an iframe? This is my first time using this hack.
Reply With Quote
  #157  
Old 10-16-2007, 10:49 AM
Triky's Avatar
Triky Triky is offline
 
Join Date: Mar 2007
Location: [Italy]
Posts: 728
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this errors:

Code:
Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTP_REFERER in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1618
               


        
                                                                                              Unable to add cookies, header already sent.
File: c:\programmi\easyphp1-8\www\webcity\includes\class_core.php
Line: 1591
I've my forum located at (in EasyPHP) www/webcity/. I have my page file in www, and this is its code:

Code:
<?php
$curdir = getcwd ();
chdir('webcity');
require_once('webcity/global.php');
chdir ($curdir);
?>
<html>
<head>
<title>Web City</title>
</head>
<body>


<?php
   require_once('login_inc.php');
?>   

</body>

</html>
Reply With Quote
  #158  
Old 10-18-2007, 12:41 PM
jags2ooo jags2ooo is offline
 
Join Date: Jan 2002
Location: New York
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, been using this for a while its great, wondering if its possible to allow additional user group members to access a certain page? Not only primary.
Reply With Quote
  #159  
Old 10-18-2007, 02:00 PM
Snatch Snatch is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Triky View Post
I get this errors:

Code:
Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTP_REFERER in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1618
               


        
                                                                                              Unable to add cookies, header already sent.
File: c:\programmi\easyphp1-8\www\webcity\includes\class_core.php
Line: 1591
I've my forum located at (in EasyPHP) www/webcity/. I have my page file in www, and this is its code:

Code:
<?php
$curdir = getcwd ();
chdir('webcity');
require_once('webcity/global.php');
chdir ($curdir);
?>
<html>
<head>
<title>Web City</title>
</head>
<body>


<?php
   require_once('login_inc.php');
?>   

</body>

</html>

The same Problems by me since I have upgrade to MySQL 5

Have you fixed it?
Reply With Quote
  #160  
Old 10-19-2007, 07:04 AM
Triky's Avatar
Triky Triky is offline
 
Join Date: Mar 2007
Location: [Italy]
Posts: 728
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No man, I'm still waiting for a reply.
Reply With Quote
  #161  
Old 10-22-2007, 11:21 AM
adonfun adonfun is offline
 
Join Date: Jul 2006
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Triky View Post
I get this errors:

Code:
Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTP_REFERER in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1618
               


        
                                                                                              Unable to add cookies, header already sent.
File: c:\programmi\easyphp1-8\www\webcity\includes\class_core.php
Line: 1591
I've my forum located at (in EasyPHP) www/webcity/. I have my page file in www, and this is its code:

Code:
<?php
$curdir = getcwd ();
chdir('webcity');
require_once('webcity/global.php');
chdir ($curdir);
?>
<html>
<head>
<title>Web City</title>
</head>
<body>


<?php
   require_once('login_inc.php');
?>   

</body>

</html>
ETA: never mind, don't think this is the issue:
chdir('webcity');
require_once('webcity/global.php');

should be something in the format of:

chdir('/home/webc/public_html/webcity');
require_once('/home/webc/public_html/webcity/global.php');


Code:
Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTPS in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1591

Notice:  Undefined index:  HTTP_REFERER in c:\programmi\easyphp1-8\www\webcity\includes\class_core.php on line 1618
I had this problem before. After moving the code to the very top of any codeblock should solve it.
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 11:53 PM.


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.06518 seconds
  • Memory Usage 2,321KB
  • 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
  • (7)bbcode_code
  • (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
  • (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