Page 1 of 1

External page

Posted: Tue Jan 29, 2019 2:10 am
by zoobie
The external page I made is in the site's root directory while my board is one level deep.
The overall_footer's button has {U_ACROBATS} in it and the functions.php goes to the external page OK.
I've got the code below in the external page but I think something's wrong with it.

Code: Select all

<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './buskers/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
if $user->data['is_registered'] {
?>
Html here
<?php
}
?>
The external page has an <a href="buskers/gallery/album.php?album_id=1"> link at the bottom that goes back into the board's gallery mod.
I still get logged out.
What am I doing wrong?

Re: External page

Posted: Tue Jan 29, 2019 2:35 am
by GanstaZ
You already got an answer in your previous topic. Links should use append_sid() function to keep the session alive. I gave you an example how to handle links, you should apply append_sid() to that bottom link or any other link as well.

Re: External page

Posted: Tue Jan 29, 2019 2:55 am
by zoobie
There's something wrong.
In my external page, the link at the bottom is:
<a href="{U_ACROBATS_LINK}" class="button">Acrobats Gallery</a>
but I'm getting "the page isn't working" error when clicked.

I can see the appended sid when hovering over the overall_footer's menu button so that's working OK...but that's as far as it goes.

Re: External page

Posted: Tue Jan 29, 2019 4:35 am
by zoobie
I hover over the link in the external page and I see:
www.site.com/%BU_ACROBATS_LINK%7D
which throws a 404 not found page

Re: External page

Posted: Tue Jan 29, 2019 4:44 am
by GanstaZ
You should post php side of that link variable + for the future, share all the info that is required/connected because we can't get far with guessing.

Re: External page

Posted: Tue Jan 29, 2019 5:55 am
by zoobie
eh?
The server is probably misconfigured which caused the problems in the first place.