How To Add New Pages To phpBB XS
Subject: Re: How To Add New Pages To PhpBB XS
search here in the forum about and how to do this
Quote:
search here in the forum about and how to do this
Subject: Re: How To Add New Pages To phpBB XS
Great... the Search Function is always the best supporter... :wink:
Subject: Re: How To Add New Pages To PhpBB XS
Another question about new pages creation...
I make 3 new pages using the empty_page addon that MG has inserted in 058 version. Now I would that this pages are inserted in viewonline.php when users are in them.
I have tried to do it in this way: for example I call the new page new.php.
I add this in viewonline.php
this in languages/lang_english/lang_main.php
and this in includes/constants.php
But it doesn't works and in viewonline.php when an user is in this page appear "Home Page" and not "New Page". Where I wrong? I have to add anything in new.php?
I make 3 new pages using the empty_page addon that MG has inserted in 058 version. Now I would that this pages are inserted in viewonline.php when users are in them.
I have tried to do it in this way: for example I call the new page new.php.
I add this in viewonline.php
- case PAGE_NEW:
- $location = $lang['new'];
- $location_url = "new.$phpEx";
- break;
this in languages/lang_english/lang_main.php
and this in includes/constants.php
But it doesn't works and in viewonline.php when an user is in this page appear "Home Page" and not "New Page". Where I wrong? I have to add anything in new.php?
Subject: Re: How To Add New Pages To phpBB XS
I'm not sure if this is the cause, but in new.php, you have to change $page_title = $lang['Home']; to $page_title = $lang['new'];
(to avoid dependencies on other scripts when upgrading XS, I tend not to bother with lang arrays and just use direct assignments like $page_title = 'New'; )
(to avoid dependencies on other scripts when upgrading XS, I tend not to bother with lang arrays and just use direct assignments like $page_title = 'New'; )
Subject: Re: How To Add New Pages To PhpBB XS
In new.php I have $page_title = $lang['new']
Is not this the problem............
moreteavicar wrote: [View Post]
In new.php I have $page_title = $lang['new']
Is not this the problem............
Subject: Re: How To Add New Pages To phpBB XS
some ideas
your new page must contain this code at the beggining
and yours
nothing more ! :wink:
your new page must contain this code at the beggining
// Set up for phpBB integration.
define('IN_PHPBB', true);
$phpbb_root_path = './';
// phpBB related files
include_once($phpbb_root_path . 'extension.inc');
include_once($phpbb_root_path . 'common.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_color_groups.' . $phpEx);
// Start session management
$userdata = session_pagestart($user_ip, PAGE_NEW);
init_userprefs($userdata);
// End session management
define('IN_PHPBB', true);
$phpbb_root_path = './';
// phpBB related files
include_once($phpbb_root_path . 'extension.inc');
include_once($phpbb_root_path . 'common.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_color_groups.' . $phpEx);
// Start session management
$userdata = session_pagestart($user_ip, PAGE_NEW);
init_userprefs($userdata);
// End session management
and yours
Quote:
nothing more ! :wink:
Page 2 of 2
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.1905s (PHP: 10% SQL: 90%)
SQL queries: 10 - Debug Off - GZIP Enabled