pagina noua, forum phpbb3

Discuţii legate de instalarea şi funcţionarea unor MODificări vechi sau noi ale forumului phpBB 3.0.x.
Reguli forum
Aveti o problema si vreti sa primiti ajutor? Click aici ! Nu uitati si de regulamentul forumului !
Închis
saw
Nou venit
Mesaje: 8
Membru din: 04-Apr-2007, 12:18:44

pagina noua, forum phpbb3

Mesaj 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?
Avatar utilizator
Shadow of Wishes
Autor de StiluriAutor de Stiluri
Mesaje: 796
Membru din: 03-Mar-2007, 20:18:30
Versiune: 3.0.6 SVN
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Experimentat

Mesaj 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!
saw
Nou venit
Mesaje: 8
Membru din: 04-Apr-2007, 12:18:44

Mesaj de saw »

daca ai codul corect te rog sa mil dai si mie
Închis

Înapoi la “3.0.x Suport pentru MODificări”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 7 vizitatori