phpbb custom page not using header info?

Discussion forum for MOD Writers regarding MOD Development.
demalii
Registered User
Posts: 6
Joined: Sat Apr 25, 2015 10:13 pm

phpbb custom page not using header info?

Post by demalii »

Hello. I am trying to make just the body of the page custom. Here is what I have from both files so far along problem is the css isn't working or something. The background should be black, and the test looks wretched. So I sense something about the css not working heh. It's like plain black font, not formatted or anything. Any ideas, please and thanks =)

Edit: Also the link in my header for logging and out shows {LOGIN_LOGOUT}

here look!: http://www.riftco.net/community/raffleinfo.php

Then you will see the problems..



*.php

Code: Select all

<?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);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');

$template->set_filenames(array(
	'body' => 'testpage.html')
);
page_footer();
?>

*.html

Code: Select all

<!-- INCLUDE overall_header.html -->

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

   <div class="content">
      <p>
         Fake paragraph about nonsense.
         
         While you're here please eat these objects:
         <ul>
            <li>Car Horn</li>
            <li>20lb weight</li>
            <li>A new toilet seat.</li>
         </ul>
      </p>
   </div>

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


<!-- INCLUDE overall_footer.html -->
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: phpbb custom page not using header info?

Post by 5hocK »

Try this

Code: Select all

<?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);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

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

page_header('test');

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

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>]
Result
Image
demalii
Registered User
Posts: 6
Joined: Sat Apr 25, 2015 10:13 pm

Re: phpbb custom page not using header info?

Post by demalii »

Until we meet again my very kind friend. Thank you very much for your righteousness in life! :D

Return to “[3.0.x] MOD Writers Discussion”