question about external page

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

question about external page

Post by John Rambo » Mon Mar 27, 2017 9:09 pm

Hi guys, I searched on the forum before asking but could not find answer
in practice I have a page external in the home folder/ directory
I would like header only without the navbar above and footer
I would the same result that here

This is the PHP page that I found here home.php

Code: Select all

<?php
/*
* home.php 
* Description: example file for displaying latest posts and topics
* by battye (for phpBB.com MOD Team)
* September 29, 2009
*/

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../phpBB-3.2.0/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

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

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

page_footer();
and this is the HTML page home.html

Code: Select all

<!-- INCLUDE overall_header.html -->
Here I entered the code
<!-- INCLUDE overall_footer.html -->
for not to see the navbar at the bottom and the top?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66817
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: question about external page

Post by Lumpy Burgertushie » Mon Mar 27, 2017 10:54 pm

link to your board and to that home.php file so we can see what is going on.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

Re: question about external page

Post by John Rambo » Mon Mar 27, 2017 11:12 pm

I have a test board installed locally
I want the same result here https://www.phpbb.com/about/

see image
About phpBB.png

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2378
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: question about external page

Post by kinerity » Mon Mar 27, 2017 11:25 pm

That navbar is included in the overall_header and overall_footer HTML files. If you want to remove it for your home.php file, you will need to create a new header and footer file (label them something different!) and exclude the <!-- INCLUDE navbar_header.html --> and <!-- INCLUDE navbar_footer.html -->.
Kailey Truscott - Community Team

User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

Re: question about external page

Post by John Rambo » Mon Mar 27, 2017 11:58 pm

Thank you for your response
but in the new header and footer file what I should insert, to preserve the layout equal to the forum and display only header?

I can copy everything from overall_header.html and overall_footer.html
and remove the string <! - INCLUDE navbar_header.html -> and <! - INCLUDE navbar_footer.html -> :?:

Thank you

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2378
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: question about external page

Post by kinerity » Tue Mar 28, 2017 12:13 am

Yes, but you must name the files something other than overall_header and overall_footer so you don't overwrite the forum's header.
Kailey Truscott - Community Team

User avatar
Lumpy Burgertushie
Registered User
Posts: 66817
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: question about external page

Post by Lumpy Burgertushie » Tue Mar 28, 2017 12:17 am

one you have the files the way you want them, rename them to something other than overall_header.html and overall_footer.html. something like new_header.html etc.

then, in your custom page html file, you would put

Code: Select all

<!-- INCLUDE new_header.html -->
Here I entered the code
<!-- INCLUDE new_footer.html -->
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

Re: question about external page

Post by John Rambo » Tue Mar 28, 2017 12:31 am

ok solved thanks to you both
I have another question if you please
I entered the same menu that is here
how can I have the same result equal here, when I click on the external page and remains button on?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66817
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: question about external page

Post by Lumpy Burgertushie » Tue Mar 28, 2017 2:27 am

sorry, can you try again. what menu? what button? what are you wanting to do?

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

Re: question about external page

Post by John Rambo » Tue Mar 28, 2017 5:38 pm

Here is lit
want to have the same result, what should I do?
see picture, I want the same result
about.png

User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: question about external page

Post by Neculai Anisor » Tue Mar 28, 2017 7:30 pm

You don't need a new header & footer for that gosh ...

Code: Select all

<!-- IF not SCRIPT_NAME eq 'home' -->
<!-- INCLUDE navbar_header.html -->
<!-- ENDIF -->
That's only an example of a page named "home.php".
Do that on your overall_header.html.

Same thing used by phpbb.com but in a different way.

Code: Select all

<!-- IF not S_IS_WEBSITE -->
	<!-- INCLUDE navbar_header.html -->
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator

User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

Re: question about external page

Post by John Rambo » Tue Mar 28, 2017 8:34 pm

wayuu thank you it's much better :mrgreen:

you may also help me on this question
John Rambo wrote:
Tue Mar 28, 2017 5:38 pm
Here is lit
want to have the same result, what should I do?
see picture, I want the same result
about.png

User avatar
Lumpy Burgertushie
Registered User
Posts: 66817
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: question about external page

Post by Lumpy Burgertushie » Tue Mar 28, 2017 8:43 pm

so, when on the about page you want the about button to be lit up like that one.

if you copied the navigation.css file from here then it would be on line 50 of that file.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: question about external page

Post by Neculai Anisor » Tue Mar 28, 2017 8:46 pm

That "active" is given by the script name too.
We are using the same thing on phpbb.ro.

<body id="phpbb" class="nojs notouch <!-- IF FORUM_ID eq 79 -->support kb<!-- ELSEIF FORUM_ID eq 80 -->downloads<!-- ELSE -->community<!-- ENDIF --> section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator

User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

Re: question about external page

Post by John Rambo » Tue Mar 28, 2017 9:25 pm

Lumpy Burgertushie wrote:
Tue Mar 28, 2017 8:43 pm
so, when on the about page you want the about button to be lit up like that one.

if you copied the navigation.css file from here then it would be on line 50 of that file.


robert
Yes robert
Neculai Anisor wrote:
Tue Mar 28, 2017 8:46 pm
That "active" is given by the script name too.
We are using the same thing on phpbb.ro.

<body id="phpbb" class="nojs notouch <!-- IF FORUM_ID eq 79 -->support kb<!-- ELSEIF FORUM_ID eq 80 -->downloads<!-- ELSE -->community<!-- ENDIF --> section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
OK you can give an example also practical with external page

php file is called home, and the html file also home

Now if I click on home to make turned on
what I have to put in the file overall_header.html

Post Reply

Return to “[3.2.x] Support Forum”