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
  #152  
Old 07-31-2006, 01:33 PM
A17roolz's Avatar
A17roolz A17roolz is offline
 
Join Date: Jan 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by A17roolz
Anyone know how to get this working on the same page as vBExternal (using the news fetch).
Anyone?
Reply With Quote
  #153  
Old 08-05-2006, 04:04 PM
PitPunks PitPunks is offline
 
Join Date: May 2006
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When i am logged in it says im not, and when i login it jsut redirects me to my vbulletin forum.
Reply With Quote
  #154  
Old 08-07-2006, 12:40 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 A17roolz
Anyone?
No.
They are not really compatible.

Easiest thing is to is add a login functionaly to vB external.
Reply With Quote
  #155  
Old 08-07-2006, 12:45 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 PitPunks
When i am logged in it says im not, and when i login it jsut redirects me to my vbulletin forum.
Check the cookies and path settings in the troubleshooting guide (post 2)
Also flush your browser cache and make sure you force a page refresh (CTRL+F5)
Reply With Quote
  #156  
Old 08-07-2006, 02:21 AM
PitPunks PitPunks is offline
 
Join Date: May 2006
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

many thank you, it was the chache.

Now.. i must edit it to suit my needs

Thanks bill
Reply With Quote
  #157  
Old 08-08-2006, 02:55 AM
fredtp fredtp is offline
 
Join Date: Aug 2006
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great script! having a problem though. when browsing to the external site containing the login box while not logged in (cookies cleared) instead of showing the normal site, i get the forum login page. when i log in i get a 404 error because its looking for login.php in the root directory (not the forum directory). What i'd like is for a non-logged-in user navigates into the page, they see the normal page plus the login box. i've tried the simple page as suggested in the instructions and same thing happens. if i am logged in prior to going to the page, it works fine.
your help is appreciated, thanks
Reply With Quote
  #158  
Old 08-08-2006, 10:56 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 fredtp
when browsing to the external site containing the login box while not logged in (cookies cleared) instead of showing the normal site, i get the forum login page. when i log in i get a 404 error because its looking for login.php in the root directory (not the forum directory).
Sounds like somthing has gone wrong with your paths.
Do step two of troubleshooting to confirm the path, then make sure that it matches
PHP Code:
<?php
// Edit the lines below to show path to your forums
$forumpath "http://www.yoursite.com/forums/";
in your login_inc.php file and also
PHP Code:
<?php  
chdir
('/path/to/your/forums');  
require_once(
'/path/to/your/forums/global.php');  
?>
On the page with the login box.

Quote:
What i'd like is for a non-logged-in user navigates into the page, they see the normal page plus the login box.
Thats how it usually works.
Quote:
i've tried the simple page as suggested in the instructions and same thing happens. if i am logged in prior to going to the page, it works fine.
your help is appreciated, thanks
Reply With Quote
  #159  
Old 08-09-2006, 02:09 PM
erinys erinys is offline
 
Join Date: Mar 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey bill! you should port this to 3.6, since it allready works with it without a problem
Reply With Quote
  #160  
Old 08-09-2006, 02:14 PM
delive delive is offline
 
Join Date: May 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, I'm still getting problems with the logging in, then it doesn't show me logged in. Sometimes, if I clear my cookies it will work. Then the next time I turn on my computer, or anyone elses for that matter, it won't work. The cookies setting in vb is set to /. I really dont understand why this keeps happening.

Another question, is there a way to decrease the loading times? I've gotten a couple comments that it takes a while for the page to load and it gets stuck when grabbing the users information after they logged in. Am I the only one that gets that?
Reply With Quote
  #161  
Old 08-09-2006, 06:51 PM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Aotw
I alos having a problem with our cutenews installation on the same page, wich started direct after i added the login addon. Been trying to get some support at their site but no luck, maybe someone here could help?

Getting following error.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/kreativi/public_html/portal/news/inc/functions.inc.php on line 43[/CODE]
I found a solution for this!

Well, it's not really a solution, but it will get rid of the error. I've just started using Cutenews, and found that this error really does not effect Cutenews....at all. It's simply very annoying and makes your website look unprofesional. So, I found that the best thing to do is simply turn off error reporting in the Cutenew's shownews.php file. If you are unsure how to do that, browser into your shownews.php file and at the very top you'll see
PHP Code:
error_reporting (E_ALL E_NOTICE); 
Just change that to
PHP Code:
error_reporting (0); 
See, if you can't beat it, cover it up. Loads of government officials have done it, now we can too .

While I'm posting, any progress on the avatar issues yet . When I "succeeded' in this I tried to tackle that again...still not finding a good solution.
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:03 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.06826 seconds
  • Memory Usage 2,329KB
  • 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
  • (7)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
  • (2)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