The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||
Deluxe vB User login and access control on non vB pages
![]() Developer Last Online: Nov 2011 ![]() ![]()
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 ![]() This script has been confirmed as working on
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)
Version 2.10 (4th June 2006)
Version 2.00 (16th April 2006)
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)
Click on Install If you have this script installed then please click on the install link because;
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
|
Comments |
#352
|
|||
|
|||
![]()
I would like to thank you for this hack Bill. I am using it as the heart of a custom CMS I am building for one of my clients and it works great. I just need to do some more digging into the vB core to see how they access certain info so I can use it. Thanks again...this rocks.
|
#353
|
|||
|
|||
![]()
Did anybody get this to work (check for membergroupids)?
Looking at the below example, I noticed that you are using 'usergroupid' and I think this needs to be 'membergroupids' like: PHP Code:
Quote:
|
#354
|
|||
|
|||
![]()
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? |
#355
|
|||
|
|||
![]()
Ok i am having some problems, i set the login script up to how i needed it and i ran this script:
Code:
<?php $curdir = getcwd (); chdir('../../vbulletin'); require_once('global.php'); chdir ($curdir); ?> <html> <body> This is a heading<br /> This is some more stuff <br /> And another line<br /> You get the idea<br /> Just place stuff as you normally would with HTML<br /> I use CSS to style and position on my site fwiw<br /> <br /> How about we put the login box right under here?<br /> <br /> <?php require_once('login_inc.php'); ?> </body> </html> ![]() This seems to occur when i include global.php and i am completely lost, can anyone help? ---- UPDATE: Ok i forgot to include some pertinent information, this only occurs when i am not logged in, if i am logged in then it all works fine: URL=http://img505.imageshack.us/my.php?image=icasdo1.jpg] ![]() But if i am not logged in, or click log out, then when i attempt to access the login page, (the one i designed using the login_inc) it simple embeds the proper login page attempting to use my style aswell, but failing because the images paths are not correct, (because the script remains the same, it does NOT redirect to a new script) I cant login using this page because the paths are all wrong. |
#356
|
|||
|
|||
![]()
Ok i have worked out what is wrong, i dont know if this is something that can be fixed or not but perhaps it should be added as a notice.
If you set your forums up so unregistered/ not logged in users can NOT see any forums, then you will get the same problem i have done, if the user tries to access any page in which global.php is included then it will embed a vb login box, but all the paths will be relative, so it wont work. Took me several hours of reading global.php and then trying some things but yeah, so i am going to bed now. The way around this is simply to enable unregistered users to see SOMETHING, but if someone finds another way around this then i look forward to reading it. |
#357
|
|||
|
|||
![]()
This code will check BOTH the primary and secondary usergroups for access...
PHP Code:
If you only want to check for one value, just use one groupid...multiple values use multiple groupids. You can check for as many as you would like. Hope it helps, Steve |
#358
|
|||
|
|||
![]()
I'm having a problem using this mod which I see other people have had before - but I couldn't find a solution on this thread.
I'm using the login box in the header all pages on the site, and for consistency, it's in the same place on the forum pages. All is working fins apart from the variables: $pmbox[lastvisitdate] $pmbox[lastvisittime] $vbphrase[unread_x_nav_compiled] $vbphrase[total_x_nav_compiled] Which won't show on the forum (fine on all other pages). Sorry if this has been resolved before - but I'd really appreciate some help! THanks. |
#359
|
|||
|
|||
![]()
Hello,
I was just wondering if any one knows how to edit the global.php file so when forum is closed it dosn't close the site as well? Cheers |
#360
|
|||
|
|||
![]()
my avatar and the other stuff shows up but above all that there is an error that shows up:
Quote:
EDIT: Well I fixed that problem....all I did was delete line 34. But one problem I can't seem to figure out is why I have to press the refresh button on my browser to update the online/offline status if I login/logout in the forum and then go to my home page from there. I already cleared my cache and it still does it. Can someone please help me w/this? |
#361
|
|||
|
|||
![]()
Is there any way of forcing the page to automatically refresh or something???
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|