Thread: Integration with vBulletin - Simple vB User login and access control on non vB pages
View Single Post
  #126  
Old 05-21-2007, 01:43 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ShadyB View Post
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;">&nbsp;</div>
</div>
<div id="footer">
	<p id="legal">Copyright &copy; 2007 ShadyB.co.uk </p>
</div>
</body>
</html>
Please could you say where I need to place the code to restrtct the whole page to a certain usergroup? Thankyou in advance!


PHP Code:


<?php
$curdir 
getcwd ();
chdir('/path/to/your/forums');
require_once(
'/path/to/your/forums/global.php');
chdir ($curdir);
?>

<!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!     
                      </h3>

                <p>
<!-- begin login code -->
<?php
   
require_once('/path/to/your/login_inc2.php');
?>          
<!-- end login code -->
          </p>
          
            </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;">&nbsp;</div>
</div>
<div id="footer">
    <p id="legal">Copyright &copy; 2007 ShadyB.co.uk </p>
</div>
</body>
</html>

Fill in your info where there is RED.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01079 seconds
  • Memory Usage 1,830KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete