Author |
Message |
dxzz Board Member
Joined: 04 May 2010
Posts: 3
|
Posted: Tue May 04, 2010 5: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: 656 Location: North West UK
|
Posted: Tue May 04, 2010 10:55 am Post subject: Re: how do I add a custom page |
|
|
The blank page mod is attached.
Jim
Description: |
|
Download |
Filename: |
blank_page_template.zip |
Filesize: |
2.99 KB |
Downloaded: |
1558 Time(s) |
|
|
Back to top |
|
|
dxzz Board Member
Joined: 04 May 2010
Posts: 3
|
Posted: Fri May 07, 2010 1:14 am Post subject: Re: how do I add a custom page |
|
|
same result still blank
|
|
Back to top |
|
|
Acaria Board Member
Joined: 20 Feb 2009
Posts: 238
|
Posted: Fri May 07, 2010 1: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
|
Posted: Fri May 07, 2010 6: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: 656 Location: North West UK
|
Posted: Fri May 07, 2010 10:30 am 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
|
Posted: Sun Feb 19, 2012 1: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: 656 Location: North West UK
|
Posted: Sun Feb 19, 2012 1: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.
Jim
|
|
Back to top |
|
|
Citrix Board Member
Joined: 19 Feb 2012
Posts: 42
|
Posted: Thu Feb 23, 2012 12:36 pm Post subject: Re: how do I add a custom page |
|
|
Maybe he gave up thinking no one is interested.
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... and realize the site is active.
|
|
Back to top |
|
|
|