Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Deluxe vB User login and access control on non vB pages Details »»
Deluxe vB User login and access control on non vB pages
Version: 3.00, by Billspaintball Billspaintball is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.7.0 RC 1 Rating:
Released: 03-20-2008 Last Update: Never Installs: 115
Re-useable Code Additional Files Translations  
No support by the author.

Hack Description

This is the deluxe version of the user authentication and access control system I use on the non vB pages on my website.
For the simple no frills version [URL=https://vborg.vbsupport.ru/showthread.php?t=173693look here.[/URL]

This uses the vB 3.7 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.

It also displays the logged in users Avatar, number of unread PM's, New posts since last visit, total posts and total threads.
It also allows you to specify a maximum Avatar size, and resize any avatars larger than that, while keeping their height/width ratios in proportion!
Its very handy if you allow large avatars, but want a small format display on your non forum pages.

If the user is not logged in, a login box is displayed, along with total posts and total threads in the forums.

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.7 RC1

Known Bugs
Will not display Avatars correctly if they are kept in the file system (database avatars are fine)

Change log

Version 3.00 (21st March 2008)
  • Initial release for vB 3.7.x


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
  #52  
Old 09-13-2008, 05:16 PM
arakasi arakasi is offline
 
Join Date: Sep 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm why "if ($vbulletin->userinfo['usergroupid'] == '6,2' )" doesn't work?
Reply With Quote
  #53  
Old 09-24-2008, 12:38 PM
jonah1892 jonah1892 is offline
 
Join Date: Jul 2008
Location: Newcastle, UK
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

was wondering is it possible to get this to automatically redirect the user to the forums once they have logged in on this page

been trying alsorts but can not figure it out at all
Reply With Quote
  #54  
Old 10-16-2008, 08:45 PM
lsatblu's Avatar
lsatblu lsatblu is offline
 
Join Date: Sep 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is anyone able to tell me if they are using with script with a cms? I wanted to use it with Expression Engine but this script and that script don't get along.

Can anyone point me in the direction of a good cms that works with this login script?

Thanks.
Reply With Quote
  #55  
Old 10-17-2008, 01:46 PM
steveneff steveneff is offline
 
Join Date: Sep 2007
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod, my fav so far.

I have this almost working with wordpress, the only problem being when it redirects back to wordpress it doesn't seem to check login status. Works great on my other pages.

Quote:
Originally Posted by davide101 View Post
I would be a ecstatic if I can find a way to show users browsing non-vb pages in Who's Online. I don't care if it says "Unknown Location", although ideally I will write a plugin that says "Browsing the rest of the site" or something generic. Then I can add a blurb to my universal header that says "x people browsing the site, x chatting live" (updated via cron to reduce load, of course).
Try this, It works but shows all pages that are named index.php as "Viewing Index" in the forum root. This may be a vb thing, if anyone has a fix it would be perfect.

PHP Code:
<?php
$curdir 
getcwd ();
chdir('/path/to/forums');
$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();
require_once(
'/path/to/forums/global.php');
chdir ($curdir);
exec_shut_down();
?>
Reply With Quote
  #56  
Old 10-28-2008, 04:40 AM
psychotica psychotica is offline
 
Join Date: Dec 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For some reason, after trying the troubleshooting steps, the mod still shows that I'm logged in even if I'm not and it won't log me in through the php page on the website even after I've logged out on the forums.
Reply With Quote
  #57  
Old 11-05-2008, 01:27 AM
coinwash coinwash is offline
 
Join Date: Nov 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed
Reply With Quote
  #58  
Old 11-12-2008, 06:14 PM
steveneff steveneff is offline
 
Join Date: Sep 2007
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't fully tested this and I'm no vbulletin expert but so far it works.

In the login box code find
PHP Code:
if ($vbulletin->userinfo['userid']!=0) { 
change to
PHP Code:
global $vbulletin;
if (
$vbulletin->userinfo['userid']!=0) { 

It works the same for the other code snippets like no ads for members below.

PHP Code:
<?php
global $vbulletin;
if (
$vbulletin->userinfo['userid'] <1) {
?>
your ad code here
<?php
}
?>
note: I have Wordpress/Vbulletin Bridge installed so global.php is already called. if you dont and this doesn't work for you try adding the requre once code to the top of the wordpress index.php
Reply With Quote
  #59  
Old 11-22-2008, 10:56 AM
AzzX's Avatar
AzzX AzzX is offline
 
Join Date: Sep 2007
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for that steveneff.

I might try making a widget for this.
Reply With Quote
  #60  
Old 11-27-2008, 07:40 PM
MadsK MadsK is offline
 
Join Date: Apr 2008
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This might be a stupid question, but where do i put all this code in this file?
Reply With Quote
  #61  
Old 11-27-2008, 08:36 PM
FanJournal FanJournal is offline
 
Join Date: Nov 2008
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great mod I've been looking for a while now. I'll be sure to tell you how smoothly I configure 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 08:47 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.05677 seconds
  • Memory Usage 2,310KB
  • 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
  • (4)bbcode_php
  • (1)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
  • (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