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 |
#272
|
|||
|
|||
![]()
ok disregard the message above, i took the test.php and the basic code, that worked fine.
so i copied only the php lines into my template on the spot where it was, and voila, it started working again aswell. :S very weird, but at least it works again yay ![]() |
#273
|
||||
|
||||
![]() Quote:
Ive done stuff similar to that before too. ![]() |
#274
|
|||
|
|||
![]()
How do you allow multiple groups access? I tried separating group IDs by commas but that doesn't seem to work.
Also, I'm assuming that only primary groups are looked at? What if I want to assign a special group permission to certain pages without changing their primary group ID? |
#275
|
||||
|
||||
![]() Quote:
Code:
if ($vbulletin->userinfo['usergroupid'] == '25' or $vbulletin->userinfo['usergroupid'] == '26' or $vbulletin->userinfo['usergroupid'] == '27' ) Quote:
It should just be a matter of checking their secondary group membership like in the above manner. I think that may be $vbulletin->userinfo['membergroupids'] but Im not sure (havent tried it) |
#276
|
|||
|
|||
![]()
Cool - thanks!
How about if I want to control files from being accessed by members who are currently logged in - is there a way to set this up? If the URL of the file is known the method in this thread won't protect those files from being accessed by "non-members", since it only controls what is displayed (like URL/links). Is there a way to have the log-in checked before the file is accessed? I'm guessing a dynamic URL/link would be required which needs to be generated based on whether the user is logged-in or not. Is this possible? |
#277
|
||||
|
||||
![]() Quote:
You can do this by playing with your httaccess file. Ive seen it done on several sites before. This hack here https://vborg.vbsupport.ru/showthread.php?t=61507 is for vB 3.0 but should give you an idea oh now it all works. Hope this helps. |
#278
|
|||
|
|||
![]()
I figured as much. I'm looking at the rewrite mod that comes with Apache (?). I'll have to do a little more research to figure out what will work for me.
Thanks for the great hack/mod Bill, it works great on my site. |
#279
|
||||
|
||||
![]()
Hey just posting this here incase others were always interested in using this login script and vbexternal together. =)
https://vborg.vbsupport.ru/showpost....&postcount=399 |
#280
|
|||
|
|||
![]()
Bill.. i had a big problem this morning.
When i entered my site i thought it was down, it was 100% 404 page (page not found) so i was freaking out and allready submitting a ticket to my host when my GF went behind the pc and could enter the site and started movign onto the forum So i went to domain.nl/community (my forum url) and saw the following message: (your password is more then 180 days old, set a new pasword here) After i did that, my frontpage went normal again, but before i did that, i checked and deleted the code from from this plugin the template to see of it was this plugin wich made the entire page it was loaded to a 404, and it was. ![]() could you check into this please? cause it can ultimately make your site down for everyone a member longer then 180 days :s Edwin |
#281
|
||||
|
||||
![]() Quote:
Anyhow, I will have a look at it when I get home. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|