External page

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
zoobie
Registered User
Posts: 297
Joined: Wed Dec 01, 2004 1:02 am

External page

Post 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?
User avatar
GanstaZ
Registered User
Posts: 804
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: External page

Post 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.
"When answer lies in the question,.. question becomes redundant!"
zoobie
Registered User
Posts: 297
Joined: Wed Dec 01, 2004 1:02 am

Re: External page

Post 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.
zoobie
Registered User
Posts: 297
Joined: Wed Dec 01, 2004 1:02 am

Re: External page

Post 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
phpbb 3.0.2, Users Blog, phpbb gallery, Who Was Here, Anti-bot Question
User avatar
GanstaZ
Registered User
Posts: 804
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: External page

Post 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.
"When answer lies in the question,.. question becomes redundant!"
zoobie
Registered User
Posts: 297
Joined: Wed Dec 01, 2004 1:02 am

Re: External page

Post by zoobie »

eh?
The server is probably misconfigured which caused the problems in the first place.
Post Reply

Return to “phpBB Custom Coding”