PDA

View Full Version : using VBulletin Account for hidden html-Page


Tobias Honscha
12-03-2001, 03:16 PM
Hi !

I dont know if there is a hack already or this is a feature of the vbulletin system :

We are running a coin-database system also for guests. The server load is getting higher an higher. Is there a possibility that I limit the access of a PHP or HTML - page only to registered VBulletin users ?

Thanks in advance and greetings from germany,
Tobias Honscha

amykhar
12-03-2001, 03:51 PM
Yes. You can include global.php and then check their userid. If they are not logged in, you could redirect them to the standard no permission template.

Amy

Tobias Honscha
12-03-2001, 05:18 PM
as I am new to php-programming - can anyone describe how to do so ?

amykhar
12-03-2001, 05:27 PM
I believe you want this


require "global.php";
if ($bbuserinfo[userid] == 0)
show_nopermission();





Amy

Tobias Honscha
12-03-2001, 07:16 PM
Thank you very much - I think this is the code I need.
Although I inserted your PHP-code users can access the file without loggin in . What am I doing wrong ?
This is the script I am currently using :

<?php
error_reporting(7);
require("./global.php");

if ($bbuserinfo[userid] == 0)
{ show_nopermission();}
?>

.. and here comes the html - code which has to be hidden for unregistered users.

amykhar
12-03-2001, 07:51 PM
I believe the rest of it needs to be in an else clause.

Amy

Tobias Honscha
12-04-2001, 04:54 AM
... ok thanks. It was my fault - I disabled the cookies.