Topic: Custom page

Hello every one. I'm trying to make a custom page. But i don't get it how to. I want create .php file, but i don't know how to integrate header, announce, statistics and footer.

I mean:

1. Header
2. Announce
3. My Text
4. Statistics
5. Footer


Sorry for bad english.

Re: Custom page

Is this an integrated PHP script???

Re: Custom page

Is this part of a planned program or just a one off page?  Meaning will this be tied into other pages?

Hi,
Stop by my blog to review articles I wrote; Bags Under Eyes
No More Wrinkles Under Eyes
Dark Circles Under Eyes

Re: Custom page

I need it for single page. For example: Donate.php

It should be like this:

1.Header
2.Announce
3.Info about donate
4.Statistics
5.Footer.

I think i need to include these to that file, but i dont know how.

5 (edited by Audiofeeline 2010-06-29 17:20)

Re: Custom page

I started with that :

<?php
if (!defined('FORUM_ROOT'))
define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';

require FORUM_ROOT.'header.php';
// START SUBST - <!-- forum_main -->
ob_start();
?>
    
MY CONTENT
    
<?php
$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_main -->
require FORUM_ROOT.'footer.php';
?>

The probleme is that i can't define page title and there's no stats...

Re: Custom page

Anyone knows how to add TITLE ?

7 (edited by HADI 2010-07-14 12:23)

Re: Custom page

This would add a title

if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';

($hook = get_hook('ul_start')) ? eval($hook) : null;

/*if ($forum_user['g_read_board'] == '0')
    message($lang_common['No view']);
else if ($forum_user['g_view_users'] == '0')
    message($lang_common['No permission']);*/ /* For permission i copied this code from another page of punbb */
    
$link = 'useronline.php';

$forum_page['crumbs'] = array(
    array($forum_config['o_board_title'], forum_link($forum_url['index'])),
    array($lang_common['User online'], $link)
);


require FORUM_ROOT.'header.php';
?>

    <div class="main-head">
        <h2 class="hn"><span>User Online</span></h2>
    </div>
    
    <div class="main-content main-frm">
        
        <?php
        echo $forum_user['id'];
        
        ?>
    </div>
    
    
    <div class="main-foot">
<?php

    if (!empty($forum_page['main_foot_options']))
        echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>';

?>
        <h2 class="hn"><span>User Online</span></h2>
    </div>
<?php

($hook = get_hook('ul_end')) ? eval($hook) : null;

$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_main -->

require FORUM_ROOT.'footer.php';

This might help you!

I also newbie with this punBB....asked them for a simple tutorial let see whats happen

8 (edited by Audiofeeline 2010-08-02 10:45)

Re: Custom page

I was talking about <title> in <head>.
I also tried to execute some PHP script and it doesn't work, I don't know why...