phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

how do I add a custom page


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
dxzz
Board Member



Joined: 04 May 2010

Posts: 3



PostPosted: Tue May 04, 2010 9:42 am 
Post subject: how do I add a custom page

I have no idea oO I put
Code:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
?>

It gave me a blank page help help plox
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 549
Location: North West UK


flag
PostPosted: Tue May 04, 2010 2:55 pm 
Post subject: Re: how do I add a custom page

The blank page mod is attached.

Jim



blank_page_template.zip
 Description:

Download
 Filename:  blank_page_template.zip
 Filesize:  2.99 KB
 Downloaded:  750 Time(s)

Back to top
dxzz
Board Member



Joined: 04 May 2010

Posts: 3



PostPosted: Fri May 07, 2010 5:14 am 
Post subject: Re: how do I add a custom page

same result icon_sad.gif still blank
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Fri May 07, 2010 5:26 am 
Post subject: Re: how do I add a custom page

...do you have anything that would actually show in those files? Nothing in the code you posted would be visible.
Back to top
dxzz
Board Member



Joined: 04 May 2010

Posts: 3



PostPosted: Fri May 07, 2010 10:51 am 
Post subject: Re: how do I add a custom page

I used the blank page template mod and made a page with some content inside somehow it doesn't show only shows the content not the footer and header
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 549
Location: North West UK


flag
PostPosted: Fri May 07, 2010 2:30 pm 
Post subject: Re: how do I add a custom page

So it is not blank then!!!!! It shows the content that you inserted into the page.
Presumably you had inserted html as that is what the .tpl files are.
If your header and footer are missing then it is as a result of you doing something incorrectly as I and others have used it without problems.
My son's site has literally 100's of pages produced using the blank page template mod.

You did replace the file template.php that is in the root of your board with the one from the download did you?


Jim
Back to top
Citrix
Board Member



Joined: 19 Feb 2012

Posts: 42



PostPosted: Sun Feb 19, 2012 5:18 pm 
Post subject: Re: how do I add a custom page

Code:

<?php
   define('IN_PHPBB', true);
   $phpbb_root_path = './';
   include($phpbb_root_path . 'extension.inc');
   include($phpbb_root_path . 'common.'.$phpEx);


// Start session management
//
   $userdata = session_pagestart($user_ip, PAGE_ABIDTALKMOT);
   init_userprefs($userdata);

//
// End session management
//
// Start output of page
//

$page_title = $lang['Abidtalkmot'];

// standard page header
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

//CREATE A FILE CALLED blanktpl.tpl and add an horizontal line <hr> , just so it contains something.
// ASSIGN the blanktpl to your new file. NOTE: blanktpl.tpl should be added to your templage folder where all *.tpl files are.
// assign template...
$template->set_filenames(array(
        'body' => 'blanktpl.tpl')
);

//put your code here ***********
$mybestbuddy = 'puppy cute';
print "this is my new code and my dog's name is $mybestbuddy ";
// end code ************************

// insert template info
$template->pparse('body');


// standard page footer
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>


create a php file called myblank.php. Add the above code, upload and view the page.
thanks
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 549
Location: North West UK


flag
PostPosted: Sun Feb 19, 2012 5:41 pm 
Post subject: Re: how do I add a custom page

Topic is nearly 2 years old. I would have hoped they would have sorted it by now. icon_lol.gif

Jim
Back to top
Citrix
Board Member



Joined: 19 Feb 2012

Posts: 42



PostPosted: Thu Feb 23, 2012 4:36 pm 
Post subject: Re: how do I add a custom page

Maybe he gave up thinking no one is interested. icon_smile.gif
Someone else is probably looking for help with a blank page. I've created them countless time so I feel like helping someone out.
If he still own a phpbb2 site, he'll be back...icon_smile.gif and realize the site is active.
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0292 seconds using 17 queries. (SQL 0.0027 Parse 0.0024 Other 0.0241)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo