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
  #172  
Old 03-10-2008, 11:32 AM
MaSs ZeRo MaSs ZeRo is offline
 
Join Date: Mar 2004
Location: Amsterdam, NL
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey,

The script seems to be working just fine, although I am having a problem with it. Apperantly a session string is needed in the URL and if you remove that, you're not logged in anymore. Problem is, whenever someone clicks an internal link on my site, the session string has to go, since the links lead to index.php?example=example and I can't change that into anything else, since my site wouldn't function properly anymore if I did. Is there any solution to this?

Thanks.
Reply With Quote
  #173  
Old 03-30-2008, 07:05 AM
Kalina's Avatar
Kalina Kalina is offline
 
Join Date: Mar 2005
Location: Canada
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just finished reading this whole thread but don't see a solution to my problem, so I'll describe it.

I am using this add-on to put a login form on a Wordpress powered page. I can't get it to show properly when a person is logged in, it just shows the form and treats me as if I am still logged out.

I made a test page and it works, so it's not a subdomain issue. http://blogfeeds.webtalkforums.com/test.php

I've tried placing the following code at the top of wp-blog-header.php but it causes the blog to not work, it simply displays a "not found" error:
Code:
$curdir = getcwd ();
chdir('/home/myname/public_html');
require_once('/home/myname/public_html/global.php');
chdir ($curdir);
It appears to clash with the code already in wp-blog-header.php, here's the code in it's entirety.

Code:
<?php
$curdir = getcwd ();
chdir('/home/myname/public_html');
require_once('/home/myname/public_html/global.php');
chdir ($curdir);
if (! isset($wp_did_header)):
if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) {
	if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = '';
	else $path = 'wp-admin/';
	require_once( dirname(__FILE__) . '/wp-includes/classes.php');
	require_once( dirname(__FILE__) . '/wp-includes/functions.php');
	require_once( dirname(__FILE__) . '/wp-includes/plugin.php');
	wp_die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. You can <a href='{$path}setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress &rsaquo; Error");
}

$wp_did_header = true;

require_once( dirname(__FILE__) . '/wp-config.php');

wp();
gzip_compression();

require_once(ABSPATH . WPINC . '/template-loader.php');

endif;
?>
Reply With Quote
  #174  
Old 03-30-2008, 12:51 PM
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Location: PA
Posts: 841
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So does anyone successfully have this running on 3.6.8? Seems like a lot of people are having problems with this.

SVT
Reply With Quote
  #175  
Old 04-04-2008, 11:36 AM
Triky's Avatar
Triky Triky is offline
 
Join Date: Mar 2007
Location: [Italy]
Posts: 728
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to use this, but it has a lot of problems.
Reply With Quote
  #176  
Old 04-11-2008, 09:38 PM
maitaijim maitaijim is offline
 
Join Date: Mar 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kalina View Post
I just finished reading this whole thread but don't see a solution to my problem, so I'll describe it.

I am using this add-on to put a login form on a Wordpress powered page. I can't get it to show properly when a person is logged in, it just shows the form and treats me as if I am still logged out.

I made a test page and it works, so it's not a subdomain issue. http://blogfeeds.webtalkforums.com/test.php

I've tried placing the following code at the top of wp-blog-header.php but it causes the blog to not work, it simply displays a "not found" error:

It appears to clash with the code already in wp-blog-header.php, here's the code in it's entirety.
I would love to know how you solved this.
Thanks,
Jim
Reply With Quote
  #177  
Old 04-14-2008, 08:43 PM
lawina lawina is offline
 
Join Date: Jun 2005
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone knows if its possible to show a POLL outside the forum using this mod ?
Reply With Quote
  #178  
Old 04-24-2008, 07:04 AM
Medina Medina is offline
 
Join Date: Oct 2006
Location: the Netherlands
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it working with vb 3.6.8?
Reply With Quote
  #179  
Old 04-27-2008, 06:04 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 HKothari View Post
Hi, I used this hack, and I'm having a lot of trouble, I set it up, just like the instructions said to, my code for including the global.php was:
PHP Code:
<?php    
$curdir 
getcwd();
chdir('/usr/local/pem/vhosts/133519/webspace/httpdocs/forums/');
require_once(
'/usr/local/pem/vhosts/133519/webspace/httpdocs/forums/global.php');
chdir($curdir);
?>
The first problem is that when you go to the page, you get this error:
Code:
Unable to add cookies, header already sent.
Is there a way to fix this? Thanks.
That would be because you have whitespace or something before the code.
It MUST be the first thing on the page.
Even a single space will cause this error.
See item one in the troubleshooting guide.


Quote:
Originally Posted by Cajun View Post
Anyone know if this mod works with vb 3.7
It did when I tested it on beta 1.
There is s dedicated version for 3.7 in the 3.7 mods section.

Quote:
Originally Posted by Kalina View Post
I just finished reading this whole thread but don't see a solution to my problem, so I'll describe it.

I am using this add-on to put a login form on a Wordpress powered page. I can't get it to show properly when a person is logged in, it just shows the form and treats me as if I am still logged out.
This mod code and a couple of others such as vB External and Wordpress have conflicts.
Perhaps they user the same variable names or something similar.
As I don't use word press I have not been able to check on a cause or solution.

Quote:
Originally Posted by SVTCobraLTD View Post
So does anyone successfully have this running on 3.6.8? Seems like a lot of people are having problems with this.

SVT
It should run on 3.6.8 (it still works with 3.7) but I haven't tested it.
Reply With Quote
  #180  
Old 04-28-2008, 09:49 AM
Medina Medina is offline
 
Join Date: Oct 2006
Location: the Netherlands
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you also let member who`re logged in, posting on a non vb page?
Reply With Quote
  #181  
Old 06-02-2008, 02:00 PM
DocOf Dan DocOf Dan is offline
 
Join Date: Jul 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a version of this working succesfully on my site. However, I recently had to move hosting company and now I'm having some problems with this mod. Even when I'm logged in at the forum, the page on my site doesn't recognise that, and treats me as being unregistered/not logged in.

I haven't changed the code in any way so I presume I need to tweak it (the code) or the vbulletin settings to get it to work with whatever settings on this new server (could it be a problem related to the move from PHP4 to PHP5?), but I don't know where to begin!
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 06:09 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.04755 seconds
  • Memory Usage 2,324KB
  • 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_code
  • (1)bbcode_php
  • (5)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