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
  #362  
Old 09-15-2007, 06:36 PM
JimmDaBimm JimmDaBimm is offline
 
Join Date: Jan 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey, works fine on a 3.6.8 vB too, thanks a lot !
Reply With Quote
  #363  
Old 10-29-2007, 11:18 PM
llskipper llskipper is offline
 
Join Date: Apr 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, fantastic script. But I'm having a few problems. First off, I'd just like to note that my forums is located in a directory called "forums". The script will show me logged in for about 3 minutes or less, and then will show me as logged off; but still logged in on the actual forums. My site is coded like so:

Code:
<?php include("header.php"); ?>CONTENT GOES HERE<?php include("footer.php"); ?>
The only difference is the main page where I also have another include placed in for CuteNews. Nothing special.

Naturally, I put the (with my directory settings, obviously)

PHP Code:
<?php
$curdir 
getcwd ();
chdir('/path/to/your/forums');
require_once(
'/path/to/your/forums/global.php');
chdir ($curdir);
?>
in my header.php file seeing as that is the beginning of all my html. With this said, I've went through all of the trouble shooting advice in the txt file with no improvement as of yet.

Please help, thanks.
Reply With Quote
  #364  
Old 11-14-2007, 03:54 AM
troykristoffer troykristoffer is offline
 
Join Date: Jul 2005
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Thorlax402 View Post
Hello,

I have been having a lot of trouble with getting this modification to work. I have read of numerous people having the same problem as well. I read to about page 13 before I gave up and decided to post (sorry if this was fixed between here and there).

Anyway, my login box appears to work fine in all aspects accept actually logging in. After typing in my username and password, I am sent to the page saying I have successfully logged in. However, I am then redirected back to the page with the login only to find that I am in fact not logged in. The same thing happens when I try to log out using this script as well. Everything appears fine, but I don't log out.

On the other hand, the login box reflects perfectly whether I am actually logged in or not. It can tell if I have logged in on the forum's login page and reacts accordingly. It just can't perform any of the operations itself.

I have also read through the troubleshooting and the changing the cookie information didn't change anything.
Any suggestions?
I also have this problem in 3.6.8. Changing the cookie path didn't work and I just locked myself out of my forums and had to use the tools. I tried mydoman.com, mydomain.com/, www.mydomain.com, and www.mydomain.com/ but nothing worked. (It's already defaulted to "/"

Also, I can't style anything in the login form even when it says "you can style this with CSS or HTML" It breaks the form and throws back a bunch of errors about
Quote:
unexpected "." or ";" on line ###
even though there ARENT any of those anywhere. I suspect that it means unexpected " since those are around all the styles, and its just a poor error message, but still, I can't style it It would also be helpful if I could move the login components around in a table to make them line up attractively

Finally, Unless I COMPLETELY remove most of the new posts stats code at the bottom of the login_inc.php file, I get this error:

Quote:
Fatal error: Call to a member function on a non-object in /home/content/p/r/u/pruytadmin/html/forum/login_inc.php on line 150
The login form still works (other than not displaying you as logged in, as described above.) but its just got this error message under it. I basically have to remove EVERYTHING from the bottom up to the end of the login form.

[Edit: I notice you told another user with this error:
Quote:
Originally Posted by Billspaintball View Post
Login_inc.php should not be in the /forums directory.
Or, you have the path entered wrong.
Thats where the instructions say to put it?
Quote:
Originally Posted by From the TXT Instruction file:
<?php
require_once('forum/login_inc.php');
?>
Other than that, it just says "Upload it to your site."

If thats not where it goes, then where? Also it's obvious by the error message that it is accessing the file successfully, theres just a problem with the line 150.




Thank you for all the hard work, and I'm sure these are simple fixes. I just need some help to get it working I thinks.

-Troy
Reply With Quote
  #365  
Old 12-11-2007, 12:36 AM
Bradley_Wint Bradley_Wint is offline
 
Join Date: Jul 2007
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those who are running vBExternal and this mod or the Simple Login Mod, and are running any version of vb 3.6.x, well I came up with a simpler solution to have both run simultaneously.

To prevent a conflict:

1) You need to create a separate blank page just to display the news feed from the vBExternal source. Make a blank page (e.g. newsfeed.php)

Set it up for vbexternal by inserting the pull code at the very top of your HTML code before the header and all that...

Code:
<?php
chdir('./forum');
require_once('./vBExternal.php');
?><HTML>
adjust to suit the path of your forum

2) Insert within the <HTML></HTML> tags, whatever you would like to display, whether it be news, last ten posters, etc.

e.g.
Code:
<?php
output_News4(10,56);
?>
3) Go to your home page now or wherever you are displaying the news for the public to see (where the login script also exists and put:
Code:
<? include("http://www.yoursite.com/path/to/newsfeed.php"); ?>
Note that you will be setting up the page (with the login script) with the regular code included in the Deluxe Login Mod instructions.

4) Enjoy News and Login without complications. I will be posting a demo within the next day or so when I reorganize my site.


Live Demo at http://www.grandtheftcentral.com/
Reply With Quote
  #366  
Old 12-18-2007, 08:19 PM
rwoscott rwoscott is offline
 
Join Date: Jan 2007
Location: Melbourne
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Thorlax402 View Post
Anyway, my login box appears to work fine in all aspects accept actually logging in. After typing in my username and password, I am sent to the page saying I have successfully logged in. However, I am then redirected back to the page with the login only to find that I am in fact not logged in. The same thing happens when I try to log out using this script as well. Everything appears fine, but I don't log out.

On the other hand, the login box reflects perfectly whether I am actually logged in or not. It can tell if I have logged in on the forum's login page and reacts accordingly. It just can't perform any of the operations itself.

I have also read through the troubleshooting and the changing the cookie information didn't change anything.
Any suggestions?
I'm in the same boat, the login, doesn't actually appear to log you in. But if I log in via the forum login it works fine.

EDIT It now works, I simply moved the login_inc.php to the root directory, where my test page is and I now log in (and out) successfully. Yeh me!!

PS: Thanks for the mod.
Reply With Quote
  #367  
Old 12-19-2007, 02:14 AM
C.ooder C.ooder is offline
 
Join Date: Dec 2007
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
Reply With Quote
  #368  
Old 12-20-2007, 07:13 PM
jcrogel jcrogel is offline
 
Join Date: Dec 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry I am using 3.6.8 and I only uploaded this page hoping that it would display an empty page but looks like somewhere the main object is becoming null

This is my page:
Quote:
<?php
$curdir = getcwd ();
chdir('/var/www/vhosts/mysite.com/httpdocs/forum');
require_once('/var/www/vhosts/mysite.com/httpdocs/forum/global.php');
chdir ($curdir);
?>
And I am getting this error:
Quote:
Notice: Undefined index: HTTPS in /var/www/vhosts/mymentalray.com/httpdocs/forum/includes/class_core.php on line 1591

Notice: Undefined index: HTTPS in /var/www/vhosts/mymentalray.com/httpdocs/forum/includes/class_core.php on line 1591

Notice: Undefined index: HTTP_REFERER in /var/www/vhosts/mymentalray.com/httpdocs/forum/includes/class_core.php on line 1618

Fatal error: Call to a member function query_first_slave() on a non-object in /var/www/vhosts/mymentalray.com/httpdocs/forum/includes/functions.php on line 1194
Reply With Quote
  #369  
Old 12-30-2007, 10:59 PM
crippon crippon is offline
 
Join Date: Dec 2007
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This code no work on my joomla page =[ any solution?
Reply With Quote
  #370  
Old 01-05-2008, 01:21 AM
d2sector d2sector is offline
 
Join Date: Feb 2003
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this login script on my website e.g. http://www.site1.com/ and my forums are at http://www.site2.com/ when i login in the script it goes to site2.com and says successfully logged in, then redirects back to site1 but isn't logged in. (it still displays the login script)

Is there a fix for this? Thanks.
Reply With Quote
  #371  
Old 01-23-2008, 05:19 AM
tandalier tandalier is offline
 
Join Date: Nov 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Get this great hack and can't figure out my fault.

The login works correctly but the logout don't work and I don't know why.
Do anybody know a 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 02:43 PM.


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.04960 seconds
  • Memory Usage 2,333KB
  • 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_code
  • (1)bbcode_php
  • (8)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