I need bit of help to code this page..

Status
Not open for further replies.

2008paul

Paragon
Joined
Mar 10, 2009
Messages
1,039
Reaction score
0
FP$
6
Well, I am coding a page what will be called something like "Info.php"

I need help with two things.

(one)
How can I add the over all heder to the new page?

(2)
How can I center text on the page?
 
1. Where is it located in regards to your forum root

2. Depends if you want everything centered.
 
(1) I don't know where it's located in though.

(2) Yes I want every thing centered.
 
1. In <?php ?> brackets, do include("./styles/STYLENAME/template/overall_header.html")

2. Enclose everything in <center> </center> tags
 
Add this to the top of your info.html

Code:
<!-- INCLUDE overall_header.html -->
 
Just did and did not work :S

Here is what I have.

Code:
<!-- INCLUDE overall_header.html -->

<style type="text/css">
<!--
body,td,th {
	color: #FFFFFF;
}
body {
	background-image: url("http://www.macwallpapers.eu/bulkupload/Fun//Funny/Crazy%20Animals%20Funny%20Mac%20Background.jpg");
}
-->
</style><br>
<br>
<br>
<center>Test page</center>
 
That would be your best bet, yes.

But where is this info.php file in conjunction with your phpBB root path?

And also, did you enclose the include function in php tags, and also I missed a ; at the end of the include function.
 
2008paul said:
Just did and did not work :S

Here is what I have.

Code:
<!-- INCLUDE overall_header.html -->

<style type="text/css">
<!--
body,td,th {
	color: #FFFFFF;
}
body {
	background-image: url("http://www.macwallpapers.eu/bulkupload/Fun//Funny/Crazy%20Animals%20Funny%20Mac%20Background.jpg");
}
-->
</style><br>
<br>
<br>
<center>Test page</center>

have you add the info.html to your theme's template directory?
 
Tutorial made easier:

Info.php:
Code:
<?php
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();

page_header('Info');

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

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>

info.html (found in current themes template folder)
Code:
<!-- INCLUDE overall_header.html -->

<h2>Info</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      CONTENT GOES HERE!
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->

And just put content in the content div
 
The Pimped Papaya said:
Tutorial made easier:

Info.php:
Code:
<?php
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();

page_header('Info');

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

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>

info.html (found in current themes template folder)
Code:
<!-- INCLUDE overall_header.html -->

<h2>Info</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      CONTENT GOES HERE!
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->

And just put content in the content div
lol you got it form here: http://www.phpbb.com/kb/article/add-a-n ... -to-phpbb/

That's how you create a custom page
 
The Pimped Papaya said:
Tutorial made easier:

Info.php:
Code:
<?php
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();

page_header('Info');

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

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>

info.html (found in current themes template folder)
Code:
<!-- INCLUDE overall_header.html -->

<h2>Info</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      CONTENT GOES HERE!
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->

And just put content in the content div

I just did that now nothing show up at all on the page > http://www.yourhelpinlife.com/info.php
 
Did you refresh your style?




Try renaming "info.html" to "info_body.html" then find:

Code:
'body' => 'info.html',

And replace with:

Code:
'body' => 'info_body.html',

I dunno if it'll make a difference but phpBB uses _body for the templates.
 
Nathan said:
Did you refresh your style?




Try renaming "info.html" to "info_body.html" then find:

Code:
'body' => 'info.html',

And replace with:

Code:
'body' => 'info_body.html',

I dunno if it'll make a difference but phpBB uses _body for the templates.

Thank you that worked.
Thanks all.
 
Status
Not open for further replies.
Back
Top Bottom