How To Add New Pages To phpBB XS


Goto page Previous  1, 2

Subject: Re: How To Add New Pages To PhpBB XS
up

Subject: Re: How To Add New Pages To PhpBB XS
Quote:
I think that the XS' unauthorized access will be good!


search here in the forum about and how to do this

Subject: Re: How To Add New Pages To PhpBB XS
Every thing done! I've found it!
Thanks.

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

Code: [Download] [Hide]
  1. case PAGE_NEW:  
  2. $location = $lang['new'];  
  3. $location_url = "new.$phpEx";  
  4. break;  
  5.  


this in languages/lang_english/lang_main.php

Code: [Download] [Hide]
  1. $lang['new'] = 'New Page';  
  2.  


and this in includes/constants.php

Code: [Download] [Hide]
  1. define('PAGE_NEW', -1975);  
  2.  


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'; )

Profile PM  
Subject: Re: How To Add New Pages To PhpBB XS
moreteavicar wrote: [View Post]
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'; )


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

Code: [Download] [Hide] [Select]
// 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


and yours

Quote:
I add this in viewonline.php

Code: [Download] [Hide]
Code: [Download] [Show]

1. case PAGE_NEW:
2. $location = $lang['new'];
3. $location_url = "new.$phpEx";
4. break;



this in languages/lang_english/lang_main.php

Code: [Download] [Hide]
Code: [Download] [Show]

1. $lang['new'] = 'New Page';



and this in includes/constants.php

Code: [Download] [Hide]
Code: [Download] [Show]

1. define('PAGE_NEW', -1975);



nothing more ! :wink:

Goto page Previous  1, 2

Page 2 of 2


  
You cannot post new topics
You 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