The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Simple vB User login and access control on non vB pages Details »» | |||||||||||||||||||||||||||
Simple vB User login and access control on non vB pages
Developer Last Online: Nov 2011
Hack Description
This is a cutdown version of the user authentication and access control system I use on the non vB pages on my website. This uses the vB 3.6 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. Ive cut it down to the bare minimum that it needs to work, no fancy stuff such as avatars, PM's, or even formating. 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 script has been confirmed as working on
Changelog Version 1.10 (24th April 2007)
Version 1.0 (2nd December 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 |
#122
|
||||
|
||||
Quote:
As you guessed the way around that is to hack the vB code. Quote:
|
#123
|
|||
|
|||
Warning: chdir(): No such file or directory (errno 2) in xxxxxx/xxxx/index49.php on line 59
Warning: main(/forums/global.php): failed to open stream: No such file or directory in xxx/xxx/xxx//index49.php on line 60 Fatal error: main(): Failed opening required '/forums/global.php' (include_path='.:/usr/local/lib/php') in /xxx/xxx/xxx/xxx/index49.php on line 60 |
#124
|
||||
|
||||
Quote:
See step two in the troubleshooting guide. https://vborg.vbsupport.ru/showpost....79&postcount=2 From those errors it appears that your path is entered wrong. |
#125
|
|||
|
|||
I have been trying to use this hack on my site, but I dont know where to place the code...
This is the code for my site, so please help me! Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Designed by ShadyB! --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>ShadyB.co.uk | Members Area</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="../shadybauth.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <div id="logo"> <h1>Welcome to the members area </h1> <h2>SHADYB.CO.UK</h2> </div> <div id="menu"> <ul> <li><a href="http://www.shadyb.co.uk/members/home.php" title="">Home</a></li> <li><a href="http://www.shadyb.co.uk/members/forum.php" title="">Forums</a></li> <li class="active"><a href="http://www.shadyb.co.uk/members/" title="">Members</a></li> <li><a href="http://www.shadyb.co.uk/members/downloads/" title="">Downloads</a></li> <li><a href="http://www.shadyb.co.uk/members/arcade/" title="">Arcade</a></li> <li><a href="http://www.shadyb.co.uk/members/servers.php" title="">Servers</a></li> <li><a href="#" title="">Server Sales </a></li> </ul> </div> </div> <div id="wrapper"> <div id="content"> <div id="sidebar"> <div id="support"> <h2>Status:</h2> <h3> You are logged in! </div> <div id="login" class="boxed"> <h2 class="title">Links</h2> <p class="title"><a href="userdetail.php">My Details</a><br /> My Files<br /> <a href="../chgpwd.php">Change Password </a><br /> </p> <div class="content"></div> </div> <div id="updates" class="boxed"> <h2 class="title">Recent Updates</h2> <div class="content"> <ul> <li> <h3>Updates</h3> <p><a href="http://www.shadyb.co.uk/members/home.php">Update details are currently available on the home page! </a></p> </li> <li></li> </ul> </div> </div> </div> <div id="main"> <div id="welcome" class="post"> <h2 class="title">Welcome To The Members Area!</h2> <h3 class="date"><span class="month">Updated May 20th 2007 </span><span class="year"></span></h3> <div class="meta"> <p>ShadyB<a href="#"></a></p> </div> <div class="story"> <p><strong>Welcome to the ShadyB.co.uk members area. Here there will soon be private chat rooms, a music player, and games room, and a few more cool features! </strong><em></em></p> </div> </div> <div id="example" class="post"> <h2 class="title">Information</h2> <h3 class="date"><span class="month">Updated May 20th 2007 </span><span class="year"></span></h3> <div class="meta"> <p>ShadyB<a href="#"></a></p> </div> <div class="story"> <p>This section will be expanded on soon!</p> <h3>Coming Soon! </h3> <p>Some features coming soon to the members area!</p> <ul> <li>Private Games Room </li> <li>Private Chat Rooms</li> <li>Music Player</li> <li>Some More Things When I Think Lol <br /> </li> </ul> </div> </div> </div> </div> <div style="clear: both;"> </div> </div> <div id="footer"> <p id="legal">Copyright © 2007 ShadyB.co.uk </p> </div> </body> </html> |
#126
|
||||
|
||||
Quote:
PHP Code:
Fill in your info where there is RED. |
#127
|
|||
|
|||
Ok I knew where to put that, but its the restricting bit I cant do...
PHP Code:
I want it so that the page is viewable to people that are logged in, but not to people that arent.. |
#128
|
||||
|
||||
|
#129
|
|||
|
|||
Thats not what I'm trying to do... I have a different design for the site, and just want to use the login system, so users dont have to register on two different sites..
This hack does that, but I just dont know how to use the php code in my last post.. |
#130
|
||||
|
||||
Quote:
For example this bit here Code:
<div id="welcome" class="post"> <h2 class="title">Welcome To The Members Area!</h2> <h3 class="date"><span class="month">Updated May 20th 2007 </span><span class="year"></span></h3> <div class="meta"> <p>ShadyB<a href="#"></a></p> </div> Code:
<?php if ($vbulletin->userinfo['userid'] >0) { echo" <div id=\"welcome\" class=\"post\"> <h2 class=\"title\">Welcome To The Members Area!</h2> <h3 class=\"date\"><span class=\"month\">Updated May 20th 2007 </span><span class=\"year\"></span></h3> <div class=\"meta\"> <p>ShadyB<a href=\"#\"></a></p> </div> "; } ?> If you have not used PHP/HTML togeather before you really should do a couple of online tutorials on it. Its a little confusing at first, but not hard to pick up the basics (which is all you need for this) |
#131
|
|||
|
|||
Thankyou SO MUCH BILL!!!
Adding the \'s in the right places made it work!! I cannot thankyou enough.. I might make a donation =] |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|