Seite 1 von 1

Code-Schnipsel

Verfasst: 02.10.2007 21:19
von Isyan
Hallo,

könnte man diese Code so umändern, dass es für phpBB3 Kompatibel wäre?

Code: Alles auswählen

<?php
/***************************************************************************
 *                                DATEINAME.php
 *                            -------------------
 *   begin                : Saturday, Dec 20, 2003
 *   email                : -
 *   $Id: $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// Start output of page
//
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
   'body' => 'dateiname.tpl')
);

//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
weil im ordner "includes/" kein page_header.php ist und so...


Gruß

Re: Code-Schnipsel

Verfasst: 02.10.2007 21:33
von igelein
Isyan hat geschrieben:Hallo,

könnte man diese Code so umändern, dass es für phpBB3 Kompatibel wäre?

Code: Alles auswählen

<?php
/***************************************************************************
 *                                DATEINAME.php
 *                            -------------------
 *   begin                : Saturday, Dec 20, 2003
 *   email                : -
 *   $Id: $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// Start output of page
//
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
   'body' => 'dateiname.tpl')
);

//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
weil im ordner "includes/" kein page_header.php ist und so...


Gruß
Was soll der Mod den bewirken?

Evtl. wurde er schon von jdm. anderes "übersetzt

@ Mods bitte verschieben nach phpBB 3.0: Mods und Styles

Dr. Death, du weißt schon warum ich es hier rein schreibe ;-)

Verfasst: 02.10.2007 21:42
von nickvergessen

Verfasst: 02.10.2007 21:52
von Isyan
nickvergessen hat geschrieben:http://www.phpbb.de/viewtopic.php?t=148994
:-? opps... danke ;)


ABER... wie muss die dazu gehörige .html seite den eingerichtet sein, dass es sich zum forum anpasst :S? habe es nicht machen können :S

Verfasst: 03.10.2007 10:24
von Dr.Death
Das findest Du auch auf den im bereits verlinkgtem Olympuswiki -->

http://olympuswiki.naderman.de/Adding_pages

Verfasst: 03.10.2007 10:36
von Isyan
Hallo,

mein Editor zeigt mir einen Fehler in dieser Zeile an:
// A typical usage for sending your variables to your template.
$template->assign_vars(array(
'THIS_VAR' => $this_var,
'ANOTHER_VAR' => do (something),
));
kann es sein, dass es eigentlich so heißen sollte:

Code: Alles auswählen

// A typical usage for sending your variables to your template.
$template->assign_vars(array(
    'THIS_VAR' => $this_var,
    'ANOTHER_VAR' => do_(something),
));
oder doch so:

Code: Alles auswählen

// A typical usage for sending your variables to your template.
$template->assign_vars(array(
    'THIS_VAR' => $this_var,
    'ANOTHER_VAR' => $another_var,
));

MfG

Verfasst: 03.10.2007 10:41
von Dr.Death
Das do (something) ist sinnbildlich gemeint.... Übersetzt: tue (etwas).

Wenn man programmieren möchte, sollte man sich auch mal mit der englischen Sprache auseinander setzen.....

Verfasst: 03.10.2007 10:42
von Isyan
Ja ich hab des schon verstanden was des bedeutet, aber was sollte ich da den einfügen?



///EDIT
ok hab die einbindcode von nickvergessen genommen und die HTML Code von Dr.Death... das funktioniert ja ;) also egal... danke euch!!!

Verfasst: 06.10.2007 12:44
von Isyan
hmm