Page 1 of 1

link on log out

Posted: 27 Apr 2010, 19:51
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

Posted: 27 Apr 2010, 19:57
by cisco007
what does the rules.php file look like?

Re: link on log out

Posted: 27 Apr 2010, 20:00
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

Posted: 27 Apr 2010, 20:09
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

Posted: 27 Apr 2010, 20:18
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

Re: link on log out

Posted: 27 Apr 2010, 20:21
by Steve
Stoker missed a line try this:

Code: Select all

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

Re: link on log out

Posted: 27 Apr 2010, 20:29
by dragoth
after i posted that i seen the problem