link on log out

Support for PhpBB3.
Post here to get help with any phpBB3 related issue
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
If not your topic may be ignored or locked!

link on log out

Post by dragoth »

well alright i made my own custom page and when your loged-in to the forum and click a link like domain.com/rules.php and it logs you out for no reason its my own custom page that i added

Re: link on log out

Post by cisco007 »

what does the rules.php file look like?

Re: link on log out

Post by dragoth »

Code: Select all

<?php
/**
*
* @package phpBB3
* @version $Id: template.php Raimon $
* @copyright (c) 2008 Raimon ( http://www.phpBBservice.nl )
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('mods/rules');

// Output page
page_header($user->lang['rules']);

$template->set_filenames(array(
	'body' => 'rules_body.html')
);

page_footer();

?>

Re: link on log out

Post by Stoker »

Just a quickie you could try

Open includes/functions.php
Find:

Code: Select all

'U_FAQ'
add before:

Code: Select all

'U_RULESPAGE'			=> append_sid("{$phpbb_root_path}rules.$phpEx"),
and when you need to create a link use this code:

Code: Select all

<a href="{U_RULESPAGE}">Rules</a>

Re: link on log out

Post by dragoth »

i try that and it take me to the home http://postfactory.co.cc/index.php?sid= ... b023488354 never mind found the problem i thought it was missing something
Last edited by dragoth on 27 Apr 2010, 18:28, edited 1 time in total.

Re: link on log out

Post by Steve »

Stoker missed a line try this:

Code: Select all

    <a href="{U_RULESPAGE}">Rules</a>

Re: link on log out

Post by dragoth »

after i posted that i seen the problem