vreau sa stiu si eu unde scriu regulile, fisierele, vreau sa se numeasca: rules.php, language_rules.php si body_rules.htmlThis gives you a [very] basic overview of creating a new PHP page in phpBB.
It is assumed that you have at least basic knowledge of php to perform this kind of integration.
The phpbb page consists of 3 parts:
1. yourpage.php //a browsable file such as index.php
2. yourpage.php // a language file
3. yourpage_body.html // a template fileCod: Selectaţi tot
<php>session_begin(); $auth->acl($user->data); $user->setup('yourpage'); // (2) your language file $this_var = do (something); $page_title = 'My new page'; // page title, see below // Send these variables to the template (3) file. $template->assign_vars(array( 'THIS_VAR' => $this_var, 'TEXT_VAR' => do (something), )); // Output the page page_header($page_title); // set the filename of the template you want to use for this file. $template->set_filenames(array( 'body' => yourpage_body.html) // template file name (3) ); page_footer(); ?>
Cod: Selectaţi tot
?php /** * * yourpage [English] * * @package language * @version $Id: yourpage.php,v x.xxx yyyy/mm/dd hh:mm:ss Username Exp $ * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** * DO NOT CHANGE */ if (empty($lang) || !is_array($lang)) { $lang = array(); } // DEVELOPERS PLEASE NOTE // // Placeholders can now contain order information, e.g. instead of // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows // translators to re-order the output of data while ensuring it remains correct // // You do not need this where single placeholders are used, e.g. 'Message %d' is fine // equally where a string contains only two placeholders which are used to wrap text // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( 'TEXT_VAR' => 'say something special', 'ANOTHER_TEXT_VAR' => 'say something else special', ));
Cod: Selectaţi tot
<INCLUDE> <div>{TEXT_VAR}</div> <div>{ANOTHER_TEXT_VAR}</div> <div>{THIS_VAR}</div> <INCLUDE>
mentionezi ca sunt incepator, ma puteti ajuta?