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
  #62  
Old 05-05-2006, 08:01 AM
erinys erinys is offline
 
Join Date: Mar 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, cause i really wanna switch to database handling of read posts etc

btw im also getting the javascript error, with the old and new version when someone is logged out.

if you wanna check it yourself;
http://www.bunnybunch.nl
Reply With Quote
  #63  
Old 05-05-2006, 11:41 AM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a project that this may work with... Thanks for sharing this and I hope to try using it this weekend... :knockedout:
Reply With Quote
  #64  
Old 05-05-2006, 08:16 PM
Paprika Paprika is offline
 
Join Date: Jul 2003
Location: Ohio
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edited:
Bah Nevermind!
Reply With Quote
  #65  
Old 05-06-2006, 11:17 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 erinys

MySQL Error : Unknown table 'post' in on clause
Error Number : 1109
Now that is just a weird error.
'post' is a standard vB table so it should be there.

umm... just a thought, are you using a table prefix for your forums?
It should still work for that, but I dont have a prefixed forum to test it on.
Reply With Quote
  #66  
Old 05-06-2006, 11:24 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 erinys
btw im also getting the javascript error, with the old and new version when someone is logged out.

if you wanna check it yourself;
http://www.bunnybunch.nl
This javascript error that is appearing for a couple of people is driving be :banana: as I cant replicate it on my live or test forums in Firefox, IE6, Opera 8.54 or Avant.

What OS are you using?
What browser (and what version) are you using?
What webserver are you using?
Are your users reporting the same error or just you?
Reply With Quote
  #67  
Old 05-08-2006, 08:56 AM
erinys erinys is offline
 
Join Date: Mar 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 />

====
Reply With Quote
  #68  
Old 05-08-2006, 11:12 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 erinys
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
At a guess its probably a firewall or javascript restriction that your work has implemented. Which would explain why this problem is only reported by a couple of people.
Reply With Quote
  #69  
Old 05-09-2006, 01:40 AM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am just starting to play with the code but I got this error...

Fatal error: Call to a member function on a non-object in /home/SERVER/public_html/DOMAINFOLDER/forums/login_inc.php on line 150

I called the file from inside another script using the following line:

include("../forums/login_inc.php");

Now, when I enter my forums username and password I am getting signed into my forums but when it returns to the script I never see the rest of the file where I tried to use the include from...

I am still trying to figure it out though...

The line of code that is causing the error is this:

Code:
$getstats = $db->query_read('SELECT threadcount, replycount FROM ' . TABLE_PREFIX . 'forum');
EDIT:

OK, I removed all the code after:

Code:
// +++++++++++++++++++++++++++++++++++++++++++++++++++
// we want do display stats either way so they go here
// +++++++++++++++++++++++++++++++++++++++++++++++++++
Now I can see if I can get my usergroups to cover the permissions needed for the other script... What I am trying to do is integrate the following program with vBulletin using your hack as a starting point:

http://lythgoes.net/genealogy/software.php
Reply With Quote
  #70  
Old 05-09-2006, 04:07 AM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quarterbore,
Combining two scripts can at times be very problematic.
I suggest that you try the simple version of this script https://vborg.vbsupport.ru/showthread.php?t=100992 and see if you can get that working first.

Also, I recommend trying just the test login listed in part five of troubleshooting (post 2), to rule out any thing besides a clash between this script and the other one.

If we can get the basic one working, then we can work on finding out where the problem is here.
Reply With Quote
  #71  
Old 05-09-2006, 05:48 AM
erinys erinys is offline
 
Join Date: Mar 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aye billspainball, i think so too, its a weird problem

Do you get an error btw if you switch the way your forum handles "read" posts?
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 05:55 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.09017 seconds
  • Memory Usage 2,320KB
  • 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
  • (2)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