PhPbb Homepage ?

Venom

Seasoned Veteran
Joined
Sep 12, 2012
Messages
3,798
Reaction score
0
FP$
0
I want to add a homepage to phpbb that matches the theme, Like the homepage on fp. That i can edit and add html code to it.

I Tried modifying a copy of the index.php and renaming it, but kinda got stuck.

Please help.
 
Thanks Again. 🙂

EDIT; Is there any way to making it the index page?.

I want it to say index.php for the custom home page though and forum.php for the board index.

Thanks.
 
Dennis said:
Thanks Again. 🙂

EDIT; Is there any way to making it the index page?.

I want it to say index.php for the custom home page though and forum.php for the board index.

Thanks.
Why does it matter? Also, having a homepage as index.php wouldnt be correct anyway, as an index is a forum list 😛
 
The Reverend said:
Dennis said:
Thanks Again. 🙂

EDIT; Is there any way to making it the index page?.

I want it to say index.php for the custom home page though and forum.php for the board index.

Thanks.
Why does it matter? Also, having a homepage as index.php wouldnt be correct anyway, as an index is a forum list 😛

I know, I moved all the forum Files to a flder called "forum" and am trying to point the php code to look in the forum folder. How do it? i failed.

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('About Us');

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

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
 
In order for it to copy the forum theme and styling it has to be in phpBB folder (where config.php is located). It will not work outside the phpBB folder. You can name the file home.php and use your .htaccess to make it the home page.
 
Oh ok thanks.

What do I put In .htaccess to make It the landing Page?.
 
If your new homepage is suppose home.php
then you will have to put:

Code:
DirectoryIndex home.php

in .htaccess file to make it landing page.
 
Patrick W. said:
In order for it to copy the forum theme and styling it has to be in phpBB folder (where config.php is located). It will not work outside the phpBB folder. You can name the file home.php and use your .htaccess to make it the home page.
Incorrect.
If you modify this line:
Code:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
to:
Code:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
you can have the forum in /forum/, and your own index.php in the root, still adopting the phpBB style.
 
Thanks Kiiu!. I knew It was possible, Just wasnt sure what Lines to edit.
 
Kiiu said:
Patrick W. said:
In order for it to copy the forum theme and styling it has to be in phpBB folder (where config.php is located). It will not work outside the phpBB folder. You can name the file home.php and use your .htaccess to make it the home page.
Incorrect.
If you modify this line:
Code:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
to:
Code:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
you can have the forum in /forum/, and your own index.php in the root, still adopting the phpBB style.

I have tried that before and it didn't work. Maybe I typed something wrong, I don't know. 😉
 
Kiiu said:
Patrick W. said:
In order for it to copy the forum theme and styling it has to be in phpBB folder (where config.php is located). It will not work outside the phpBB folder. You can name the file home.php and use your .htaccess to make it the home page.
Incorrect.
If you modify this line:
Code:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
to:
Code:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
you can have the forum in /forum/, and your own index.php in the root, still adopting the phpBB style.


Thanks that worked. 😀



One more thing, When I disable the board, It also disables the custom page. Can i make it so when the board is disabled the Home page is still working?.
 
Um, you could try this replace your home template with:
Code:
<!-- IF S_BOARD_DISABLED == 1 --><!-- INCLUDE overall_header.html -->

<h2>Title Here</h2>

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

   <div class="content">
      <p>
         Content in here.
      </p>
   </div>

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

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

Please try that
 
ItsBrad said:
Um, you could try this replace your home template with:
Code:
<!-- IF S_BOARD_DISABLED == 1 --><!-- INCLUDE overall_header.html -->

<h2>Title Here</h2>

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

   <div class="content">
      <p>
         Content in here.
      </p>
   </div>

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

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

Please try that

Thats only basic stuff to create a new page with text, for rules or FAQ, something really simple, creating a home page like the one on here is bit more complicated than that, and will need some knowledge of php, CSS and HTML
 
Jack~Rouse said:
ItsBrad said:
Um, you could try this replace your home template with:
Code:
<!-- IF S_BOARD_DISABLED == 1 --><!-- INCLUDE overall_header.html -->

<h2>Title Here</h2>

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

   <div class="content">
      <p>
         Content in here.
      </p>
   </div>

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

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

Please try that

Thats only basic stuff to create a new page with text, for rules or FAQ, something really simple, creating a home page like the one on here is bit more complicated than that, and will need some knowledge of php, CSS and HTML
Um, read the code it's saying if the forum is disabled then show the page.
 
ItsBrad said:
Um, you could try this replace your home template with:
Code:
<!-- IF S_BOARD_DISABLED == 1 --><!-- INCLUDE overall_header.html -->

<h2>Title Here</h2>

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

   <div class="content">
      <p>
         Content in here.
      </p>
   </div>

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

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

Please try that

Thanks, But that just shows a Blank page with the 'content'.

Is there a way to get the original code working when the board is offline?.
 
Dennis said:
Thanks, But that just shows a Blank page with the 'content'.

Is there a way to get the original code working when the board is offline?.

Can you send me the link to the forum? via PM or something?

EDIT: I have been trying on my localhost, and nothing seems to be working...
An Idea would be to include your forums stylesheet to a .html file and recreate the template.
 
Back
Top Bottom