Topic: ...
...
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → ...
...
Have a look at basically any of the scripts from PunBB. At the top you will find the include code for common.php and then a permission check that displays a message if the page can only be viewed by logged in users. You could modify that code slightly to always display that message. Something like this:
<?php
$pun_root = './';
require $pun_root.'include/common.php';
if ($cookie['is_guest'])
message($lang_common['Login required']);
// Your code here
?>
exit;
?
hi
when i include my home page
include/common.php'
is must add in end the of page ?
$db->close();
to close database as like in footer.php of forum ?
Well, you can. It isn't vital, but it's not a bad idea.
How to change the $pun_root value when the php file is not in the same directory as the forum?
I tried both absolute path and relative path, neither of them work. The error information is "There is no valid language pack 'en' installed. Plese check $language setting in config.php."
Update: the problem is solved. It was due to config.php for punbb, where I set $pun_root to './'. After removing this line from config.php, the authentication process works.
PunBB Forums → PunBB 1.2 discussion → ...
Powered by PunBB, supported by Informer Technologies, Inc.