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
  #222  
Old 10-16-2006, 07:02 PM
Hakaslak's Avatar
Hakaslak Hakaslak is offline
 
Join Date: Jul 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick thing. Any particular reason you used the "+=" operand? I am a newbie so I am guessing, but on my home page, it doubles the value of all my statistics. So instead of 95 posts and 95 threads, the stats say 190 theads and posts. However, when the stat is reporting from a thread in the forums dir, then everything is fine. This is true for the member count stat as well.

Also, I had to change your "+=" operand to "=", and modified your mySQL query in order to get the correct values. Here is what I am using now:

Code:
// get total number of posts
$getstats = $db->query_read('SELECT SUM(replycount) AS sumreply FROM ' . TABLE_PREFIX . 'forum');
while ($forum = $db->fetch_array($getstats))
{
	$totposts = $forum['sumreply'];
}
$totposts = vb_number_format($totposts);
In order to get the SUM() working, I had to seperate the threadcount and postcount queries, but I have it all working and reporting the right values now.
Reply With Quote
  #223  
Old 10-16-2006, 10:17 PM
Rated Rated is offline
 
Join Date: Apr 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the best hack i've ever installed on any vB forum. And trust me ive installed lots ^^

Great work bill!, It took me a while to set it up (major issues with file paths, cookies) but the fixes are in this thread.

And example: http://www.snesclassics.com - up top right.

Thanks again mate!
Reply With Quote
  #224  
Old 10-19-2006, 10:07 PM
lsatblu's Avatar
lsatblu lsatblu is offline
 
Join Date: Sep 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea why this isn't working? I installed it on a test page.

http://talesotaku.com/test.php

Code:
<?php

   chdir('http://talesotaku.com/forums'); 

   require_once('http://talesotaku.com/forums/global.php');  

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>

<body>

<?php

   require_once('http://talesotaku.com/login_inc.php');

?>   

</body>
</html>
I have everything on that one page and on my login_inc.php I set the values like I was directed.
Reply With Quote
  #225  
Old 10-20-2006, 09:06 AM
N-0p3rz's Avatar
N-0p3rz N-0p3rz is offline
 
Join Date: Aug 2003
Location: San Antonio, TX
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

=/ I'm having problems with getting it to show the users info once logged in

Test login page = http://www.hiphopfame.com/test.php
Test login = test
Test password = 1Test1

I changed the Suggested Settings for Path to Save Cookies to / btw. And still this problem =(

I was also getting this error

Quote:
Fatal error: Call to a member function on a non-object in /home/sdot0ne/public_html/hiphopfame/community/login_inc.php on line 150
But I just deleted that little bit of code.
Reply With Quote
  #226  
Old 10-20-2006, 11:24 AM
tandalier tandalier is offline
 
Join Date: Nov 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

also can't get it working.
on www.xboxbase.at everything is okay

on the same server there ist a second page, nintendobase, but there I can't get it working:
just see www.nintendobase.at

i'm always getting the message that I'm logged in, but when it get's back to the main-site I'm logged off.

Can anyone help?
Reply With Quote
  #227  
Old 10-24-2006, 09:51 AM
Rated Rated is offline
 
Join Date: Apr 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm some tips..

Make sure ALL the file paths are absolute.. I.e /home/public_html/website/login_inc.php etc.

If logging into a subdomain.. u need to change the cookie info in vbulletin option to /sitename, not /
Reply With Quote
  #228  
Old 11-08-2006, 08:10 PM
pewp pewp is offline
 
Join Date: Aug 2005
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now i'm getting this error... anyone got any ideas?

Fatal error: Call to a member function on a non-object in /home/decimato/public_html/login_inc.php on line 150
Reply With Quote
  #229  
Old 11-08-2006, 09:52 PM
Rated Rated is offline
 
Join Date: Apr 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whats on line 150?
Reply With Quote
  #230  
Old 11-13-2006, 07:07 AM
N-0p3rz's Avatar
N-0p3rz N-0p3rz is offline
 
Join Date: Aug 2003
Location: San Antonio, TX
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by N-0p3rz View Post
=/ I'm having problems with getting it to show the users info once logged in

Test login page = http://www.hiphopfame.com/test.php
Test login = test
Test password = 1Test1

I changed the Suggested Settings for Path to Save Cookies to / btw. And still this problem =(

I was also getting this error



But I just deleted that little bit of code.
still having this error.

..

the paths are absolute.

My only conclusion is that.. the fact that the domain is an addon domain to my host.. is what's causing the problem..

like the forum can be accessed from http://www.sdotproductions.com/hiphopfame/

Would that be why I'm experiencing what I'm experiencing?
Reply With Quote
  #231  
Old 11-13-2006, 02:07 PM
myplacidcasual myplacidcasual is offline
 
Join Date: Sep 2006
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like it to show that you have unread pms

Shouldn't be hard right bill?
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 06:45 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.05881 seconds
  • Memory Usage 2,316KB
  • 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
  • (2)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