Pagina 1 din 1

pagina noua, forum phpbb3

Scris: 09-Apr-2007, 20:05:09
de saw
vreau sa creez o noua pagina, rules.php am gasit un tutorial
This 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 file

Cod: 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>
vreau sa stiu si eu unde scriu regulile, fisierele, vreau sa se numeasca: rules.php, language_rules.php si body_rules.html

mentionezi ca sunt incepator, ma puteti ajuta?

Scris: 09-Apr-2007, 22:35:19
de Shadow of Wishes
In primul rand sunt destul de sigur ca, codul mentionat de tine anterior este gresit. El nu va putea fi functional deoarece are multe greseli.

Daca e o sa te ajut putin mai tarziu cu codul corect!

Scris: 13-Apr-2007, 13:29:05
de saw
daca ai codul corect te rog sa mil dai si mie