Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

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: 4.00, by Billspaintball Billspaintball is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 4.0.0 Beta 3 Rating:
Released: 11-15-2009 Last Update: Never Installs: 99
Re-useable Code Additional Files Translations  
No support by the author.

Hack Description

This is a cut down version of the user authentication and access control system I use on the non vB pages on my website.

This uses the vB 4.0 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 displaying to non members only, and/or let members access to specific content.

I've cut it down to the bare minimum that it needs to work, no fancy stuff such as avatars, PM's, or even formating. (That is in the Deluxe version - not yet released)

This is not supported, but if any questions / issues are posted here (not PM'ed or emailed) I will try and answer them if I have 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 4.0 beta3


Change log

Version 4.00 (15th November 2009)
  • Initial vB 4.0.x release



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

Download Now

File Type: zip Login simple vb4.0 v4.00.zip (3.9 KB, 1408 views)

Screenshots

File Type: jpg cep-loggedin.jpg (7.2 KB, 0 views)
File Type: jpg cwp-loggedout.jpg (7.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
mightyudis

Comments
  #12  
Old 11-22-2009, 05:43 AM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i ll try it

thanxxx
________
Lamborghini Jalpa
Reply With Quote
  #13  
Old 11-29-2009, 11:40 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hiya Bill,

Do you think this could work as a wrapper in WordPress, where we use your authentication system to require people to authenticate against vB before they're allowed to post comments?

I can easily extend WordPress' comment section and would like to do something like (pseudo code obviously):
Code:
<?php
if (!not_vb_authenticated) {
echo 'Please login with your forum username and password first';
} else {
comments_template('', true);
?>
Would it display the forum's username (if echoed correctly) or do we need the deluxe version for that? (which sounds like a better solution anyway, since I'd like to use the avatars as well). I don't care so much about all the other vB stuff, but would love to have this as a simple vB powered authentication system inside WordPress.
Reply With Quote
  #14  
Old 11-30-2009, 12:49 AM
bluerob bluerob is offline
 
Join Date: Dec 2003
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works on a standalone file, but won't work properly on my wordpress site.

The login boxes and what not appear, but after I am directed to the login.php file I am sent back to my wordpress page with the login boxes still showing.

I tried all the steps with the cookie settings and login.php file.

Moviecrematorium.com is my site. Any help would be appreciated.


Great plugin btw
Reply With Quote
  #15  
Old 12-05-2009, 02:50 AM
BlackJacket's Avatar
BlackJacket BlackJacket is offline
 
Join Date: Nov 2008
Location: 070108111114105100100
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NittoMOD View Post
Im getting this error -

Code:
Unable to add cookies, header already sent.
File: /home/content/v/e/n/mydir/html/mywebsite.com/staging/index.php
Line: 2
 Community
My file paths are correct and there is no white space. Any idea's?
Any help with this?
Reply With Quote
  #16  
Old 12-06-2009, 11:49 PM
David Regimbal David Regimbal is offline
 
Join Date: May 2009
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NittoMOD View Post
Any help with this?
I too have the same issue as you =[

My Fix:

well, I'm using this in the root of the site for a custom html page. I feel like a dumbass because i looked at the source and it had "<html>" twice. So my "custom.php" file that I made all I included in it was:

PHP Code:
<?php
$curdir 
getcwd ();
chdir('/home/bstackn/public_html/vbtest');
require_once(
'global.php');
chdir ($curdir);
?>
<?php
   
require_once('login_inc.php');
?>
That seemed to work for me and fixed my issue. Hope this helps someone else.
Reply With Quote
  #17  
Old 01-03-2010, 08:07 PM
Breakpoint Breakpoint is offline
 
Join Date: Dec 2005
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should make yur file XHTML compliant, it causes over 100 errors when trying to validate at W3C Schools
Reply With Quote
  #18  
Old 01-04-2010, 07:15 AM
MOGmartin MOGmartin is offline
 
Join Date: Feb 2008
Location: London
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djr View Post
Hiya Bill,

Do you think this could work as a wrapper in WordPress, where we use your authentication system to require people to authenticate against vB before they're allowed to post comments?

I can easily extend WordPress' comment section and would like to do something like (pseudo code obviously):
Code:
<?php
if (!not_vb_authenticated) {
echo 'Please login with your forum username and password first';
} else {
comments_template('', true);
?>
Would it display the forum's username (if echoed correctly) or do we need the deluxe version for that? (which sounds like a better solution anyway, since I'd like to use the avatars as well). I don't care so much about all the other vB stuff, but would love to have this as a simple vB powered authentication system inside WordPress.
Im interested in incorporating this on WP as well, comments would be handy but not totally needed, but what I am looking to do is use the wordpress usergroup permission settings to restrict access to certain articles, has anyone tried this yet?

thanks!

MOGmartin
Reply With Quote
  #19  
Old 01-05-2010, 01:48 PM
TheJordan TheJordan is offline
 
Join Date: Dec 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NittoMOD View Post
Im getting this error -

Code:
Unable to add cookies, header already sent.
File: /home/content/v/e/n/mydir/html/mywebsite.com/staging/index.php
Line: 2
 Community
My file paths are correct and there is no white space. Any idea's?
Quote:
Originally Posted by NittoMOD View Post
Any help with this?
Quote:
Originally Posted by David Regimbal View Post
I too have the same issue as you =[

My Fix:

well, I'm using this in the root of the site for a custom html page. I feel like a dumbass because i looked at the source and it had "<html>" twice. So my "custom.php" file that I made all I included in it was:

PHP Code:
<?php
$curdir 
getcwd ();
chdir('/home/bstackn/public_html/vbtest');
require_once(
'global.php');
chdir ($curdir);
?>
<?php
   
require_once('login_inc.php');
?>
That seemed to work for me and fixed my issue. Hope this helps someone else.
From the included instructions file:
If you get a message saying headers already sent or cookies already sent, chances are that there is something, even just a space before the 4 lines of code in part 1. Edit this and ensure that there are no spaces before it.
Reply With Quote
  #20  
Old 01-07-2010, 06:44 AM
Cface Cface is offline
 
Join Date: Dec 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is pretty damn useful. Tagged for later.
I'm guessing once the Deluxe version comes out we gotta pay? :P
It'd be nice if it had option to show newest threads, users postcount, etc.
Reply With Quote
  #21  
Old 01-08-2010, 12:28 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 Cface View Post
I'm guessing once the Deluxe version comes out we gotta pay? :P
No it will be free, because otherwise that would mean that I whould have to provide an acceptable level of support, and currently I dont have time to do that.
Reply With Quote
Reply

Thread Tools

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:53 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.09641 seconds
  • Memory Usage 2,351KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (2)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete