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
Deluxe vB User login and access control on non vB pages Details »»
Deluxe vB User login and access control on non vB pages
Version: 2.20, by Billspaintball Billspaintball is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Version: 3.5.8 Rating:
Released: 02-14-2006 Last Update: 04-23-2007 Installs: 223
Additional Files  
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 look here.

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.

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 is a work in progress and currently a beta version. It was a little rushed as a few people were pushing for it Its missing a couple of planned things like newest member etc, but they will be added in a later version.

This script has been confirmed as working on
  • vB 3.5.x - All Versions
  • vB 3.6.x - All Versions

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

Changelog

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

Version 2.10 (4th June 2006)
  • Fixed - "MySQL Error : Invalid SQL " when using Database thread/forum marking.
  • Fixed - Javascrip error in some versions of IE.

Version 2.00 (16th April 2006)
  • Fixed - "MySQL Error : Unknown column 'newposts' in 'field list' "
  • Fixed - Number of PM's not displaying in all installs.
  • Added - Displays date and time of last login.
  • Added - Total number of saved PM's.
To upgrade just overwrite the existing login_inc.php file with the new one.
You will need to re-edit the path on line 3 and also redo any formatting changes you may have done for the last version.

Version 1.0 (15th Feb 2006)
  • Initial 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

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
  #72  
Old 05-09-2006, 10:59 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spinball
I have posted a problem on the simple version of this hack but without any resolution.
Maybe someone here can help.
I've installed as instructed.
I have two websites on the same server. I want the forums login to be working on pages from a different website.
I have the other domain set in my forums to be allowed to post. And I have set the cookie domain to be blank.
When people log in, the action succeeds and the 'thanks for logging in' message pops up, but then I'm returned to the login screen. Not logged in.
It's possibly a cookie issue. But I don't have a clue how to fix this.
Can anyone help, please?
Further to this, there is no solution. Cookies can not be used by different domains. My solution was to change avplay.com to avplay.avforums.com. I.e. made the second website a subdomain of the first and it now all works.

However, I'm getting reports that people are being asked to log in every 15 minutes. Is this simply because they didn't click the 'remember me' button? Or is there something else going on?
Thanks folks
Reply With Quote
  #73  
Old 05-09-2006, 01:25 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 Spinball
Further to this, there is no solution. Cookies can not be used by different domains. My solution was to change avplay.com to avplay.avforums.com. I.e. made the second website a subdomain of the first and it now all works.

However, I'm getting reports that people are being asked to log in every 15 minutes. Is this simply because they didn't click the 'remember me' button? Or is there something else going on?
Thanks folks
Is everyone having that problem or just a few people?

You could try adjusting your cookie timeout settings (they are set at 15min by default)
AdminCP -> vBulletin options -> Cookies and HTTP header options -> Time-out for cookie
I know this setting effects AdminCP timeout, it might do the same for users across a subdomain???
Reply With Quote
  #74  
Old 05-12-2006, 09:10 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by erinys
Nopes, no profixes at all are being used and i just checked in phpmyadmin and the table "post" is there, with offcourse all the records/posts in it :S

About the javascript error.. i only get it @ work..
windowsxp
ie 6.0.2900.xxxx
dont know if my users are reporting the same.. never heard about it, and i only get this error at my work pc.. not at home
webserver is a linux one, but i dont know much more specs.

this is the error:
line 104
expected '('

weird thing is.. if i check the source, and line 104.. its an empty line..

====
<input name=vb_login_username type=text id=navbar_username onfocus=if (this.value == 'Gebruikersnaam') this.value = ''; size=10 />
line 104 is here
<br>Wachtwoord:<br>
<input name=vb_login_password type=password size=10 />

====
I'm getting the same error for when you're not logged in. When logged in it's fine. Just happens with IE, not Firefox. It's a minor but annoying issue.

EDIT: This is the line in login_inc.php that causes it:

PHP Code:
<input name=vb_login_username type=text id=navbar_username onfocus=if (this.value == '$vbphrase[username]'this.value ''size=10 /> 
Replace with:

PHP Code:
<input name=vb_login_username type=text id=navbar_username size=10 /> 
No more error.
Reply With Quote
  #75  
Old 05-15-2006, 05:51 AM
erinys erinys is offline
 
Join Date: Mar 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does that line do? is it safe to replace that?
Reply With Quote
  #76  
Old 05-21-2006, 01:01 PM
Luigi^ Luigi^ is offline
 
Join Date: May 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Blank, excused for my English but are Italian, I have a problem with this mod, practically once made login filler me to the page of login same and me new extension of the form to complilare to the place of the welcome message, where mistake?

my login page: http://pronostici.chorse.it/include/login_inc.php
my forum http://forum.chorse.it/forum/

the page test gives error to me to line 17 http://pronostici.chorse.it/include/test.php

line 17 is:
PHP Code:
 require_once(D:\Inetpub\vhosts\chorse.it\subdomains/pronostici/httpdocs/include/login_inc.php'); 
the formulations of the cookie are made your guide second

thanks
Reply With Quote
  #77  
Old 05-21-2006, 05:13 PM
Luigi^ Luigi^ is offline
 
Join Date: May 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry i have misses a ' at line 17
Reply With Quote
  #78  
Old 05-23-2006, 08:36 AM
pokerie pokerie is offline
 
Join Date: Apr 2006
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting this error too:

Fatal error: Call to a member function on a non-object in /path/to/my/forums/login_inc.php on line 150

(I've changed the path to the forum in this message)

Thanks

EDIT: Nevermind, managed to fix it. I finally learned exactly what I was doing when using chdir and used this instead of using absolute paths. This seems to have fixed it.

Best mod I've found so far by the way!!!
Thanks again!!!
Reply With Quote
  #79  
Old 05-24-2006, 01:08 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 pokerie
Best mod I've found so far by the way!!!
Thanks again!!!
Thanks!!
Reply With Quote
  #80  
Old 05-24-2006, 06:02 AM
Yukino_AE Yukino_AE is offline
 
Join Date: Jul 2005
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pokerie
I'm getting this error too:

Fatal error: Call to a member function on a non-object in /path/to/my/forums/login_inc.php on line 150

(I've changed the path to the forum in this message)

Thanks

EDIT: Nevermind, managed to fix it. I finally learned exactly what I was doing when using chdir and used this instead of using absolute paths. This seems to have fixed it.

Best mod I've found so far by the way!!!
Thanks again!!!
can someone explain how to fix this... cuz i have the same problem. thanks. ^_^
Reply With Quote
  #81  
Old 05-27-2006, 11:54 AM
C.Birch C.Birch is offline
 
Join Date: Apr 2002
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a few errors,

First i get the following database error.

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT COUNT(*) AS count FROM post AS postLEFT JOIN threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = 1) WHERE dateline >= 1148732430 AND dateline > IF(threadread.readtime IS NULL, 1148301836, threadread.readtime);

MySQL Error : Unknown table 'post' in on clause
Error Number : 1109
Date : Saturday, May 27th 2006 @ 12:43:56 PM
Script : http://www.lisascottlee.com/test.php
Referrer :
IP Address :
Username : LSL Webmaster
Classname : vb_database



The next error is the avatar dont show it outputs the following what is surely not right.

<img src="http://forums.lisascottlee.com/image.php?u=1.1" align="middle" border="0">
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 10:46 AM.


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.12931 seconds
  • Memory Usage 2,327KB
  • 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_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
  • (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