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 Details »» | |||||||||||||||||||||||||||
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 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
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 |
#312
|
|||
|
|||
It's me again lol
Thanks for that I did that and worked fine til I tried it on a menu... When I tried it on menu I got these errors; Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/---/public_html/homepage.php on line 928 Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/---/public_html/homepage.php on line 928 This is the code which I tried: PHP Code:
Carl |
#313
|
||||
|
||||
Hi Carl.
Looks like you have missed using \ in a few places. For example near the top you have PHP Code:
PHP Code:
PHP Code:
PHP Code:
If you dont escape every " that is in your HTML inside the echo statement with \ it will cause a premature end to the echo statement and wont work. |
#314
|
|||
|
|||
Ok well I have looked and replaced all the " with \" but I still seem to get errors for example:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/----/public_html/homepage.php on line 1039 Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/----/public_html/homepage.php on line 1039 PHP Code:
I take it this is right? PHP Code:
Carl |
#315
|
||||
|
||||
Hi Carl,
I should have been a little clearer. You need to escape the " that are part of the HTML code, not the " that are part of the PHP code. Quote:
Should be Code:
<?php If ($vbulletin->userinfo["userid"]!=0) { echo ”<td style=\”background-image:url(\”http://www.battlestationextreme.com/images/homepage09.jpg\”); height:40px\”> ............................................................ </table>”; } else { echo ”Your not logged in so we display this”; } ?> Quote:
Hope that all makes sense |
#316
|
|||
|
|||
Wow, I love it! Thank you very much for making this.
|
#317
|
|||
|
|||
ok......I have saved the following in a test.php file located in my website root (local machine)
Code:
<?php $curdir = getcwd (); chdir('c:\inetpub\wwwroot\tradinglab\forums'); require_once('c:\inetpub\wwwroot\tradinglab\forums\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('c:\inetpub\wwwroot\tradinglab\login_inc.php'); ?> </body> </html> Code:
Notice: Undefined index: REQUEST_URI in c:\inetpub\wwwroot\tradinglab\forums\includes\class_core.php on line 1952 Notice: Undefined index: REQUEST_URI in c:\inetpub\wwwroot\tradinglab\forums\includes\class_core.php on line 1952 Notice: Undefined index: QUERY_STRING in c:\inetpub\wwwroot\tradinglab\forums\includes\class_core.php on line 1971 Notice: Undefined index: QUERY_STRING in c:\inetpub\wwwroot\tradinglab\forums\includes\class_core.php on line 1971 Notice: Undefined index: HTTP_REFERER in c:\inetpub\wwwroot\tradinglab\forums\includes\class_core.php on line 1602 Unable to add cookies, header already sent. File: c:\inetpub\wwwroot\tradinglab\forums\includes\class_core.php Line: 1952 |
#318
|
||||
|
||||
Quote:
I would hazard a guess that its something to do with a server setting, or possibly your cookie path setting in your vB control panel. Quote:
PHP Code:
|
#319
|
|||
|
|||
you are definetly right. I installed Vb on a live server, uploaded your hack and it works like a charm. thank you very much!!!!
|
#320
|
|||
|
|||
First of all, great hack.
I am having one issue though. Code:
Warning: getimagesize() [function.getimagesize]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/ulancom/public_html/modules/login_vB36.php on line 34 Warning: getimagesize(http://www.unreallan.com/forums/image.php?u=1) [function.getimagesize]: failed to open stream: Success in /home/ulancom/public_html/modules/login_vB36.php on line 34 |
#321
|
|||
|
|||
Hey,
I'm still having a problem I've fixed other but... Code: Code: Code:
<?php If ($vbulletin->userinfo['userid']!=0) { echo "<td style=\"background-image:url(\'http://www.battlestationextreme.com/images/homepage09.jpg\'); height:40px\"> <table width=\"181\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"table28\"> <tr> <td width=\"15\"><img src=\"http://www.battlestationextreme.com/images/spacer.gif\" alt=\"\" width=\"15\" height=\"40\"></td> <td width=\"166\" class=\"text2\"> My BSE</td> </tr> </table></td> </tr> <tr> <td style=\"background-image:url(\'http://www.battlestationextreme.com/images/homepage10.jpg\'); height:29px\"> <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"table29\"> <tr> <td width=\"8%\"><img src=\"http://www.battlestationextreme.com/images/spacer.gif\" alt=\"\" width=\"15\" height=\"29\"></td> <td width=\"92%\"> <a class=\"link1\" href=\"http://www.battlestationextreme.com/forums/usercp.php\"> Register!</a></td> </tr> </table></td> </tr> <tr> <td style=\"background-image:url(\'http://www.battlestationextreme.com/images/homepage10.jpg\'); height:29px\"> <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"table30\"> <tr> <td width=\"8%\"><img src=\"http://www.battlestationextreme.com/images/spacer.gif\" alt=\"\" width=\"15\" height=\"29\"></td> <td width=\"92%\"> <a class=\"link1\" href=\"http://www.battlestationextreme.com/forums/private.php\"> Login</a></td> </tr> </table></td>\"; } else { echo "Your not logged in so we display this"; } ?> Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/-----/public_html/homepage.php on line 1016 And line 1016 is: Code: Code:
echo "Your not logged in so we display this"; If some one could help me out this would be great. Regards, Carl |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|