![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 220 Pomógł: 10 Dołączył: 23.08.2005 Skąd: Łódź Ostrzeżenie: (0%) ![]() ![]() |
Jak prosto zrobić aby sam kod funkcji itp. będą w samym pliku test.php natomiast caly wyglad w test.tpl w phpbb jest cos takiego:
i potem odpowiednie odwolania do roznych czesci strony
patrzylem na te wszytkie funcje assign_vars i set_filenames ale one maja odwołania w całym kodzie forum. Czy można to jakość w prostrzy sposob zrobic?? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Przyjaciele php.pl Postów: 1 789 Pomógł: 41 Dołączył: 30.10.2003 Skąd: Wrocław Ostrzeżenie: (0%) ![]() ![]() |
Wyciągnij sobie plik /includes/template.php z phpBB i zmień:
Kod /** * Generates a full path+filename for the given filename, which can either * be an absolute name, or a name relative to the rootdir for this Template * object. */ function make_filename($filename) { // Check if it's an absolute or relative path. if (substr($filename, 0, 1) != '/') { $filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename; } if (!file_exists($filename)) { die("Template->make_filename(): Error - file $filename does not exist"); } return $filename; } na Kod /** * Generates a full path+filename for the given filename, which can either * be an absolute name, or a name relative to the rootdir for this Template * object. */ function make_filename($filename) { // Check for slash in $filename or in $root if (substr($filename, 0, 1) != '/' && substr($this->root, -1) != '/') { // There is no / mark in both of strings $filename = $root . '/' . $filename; } else { // There is / mark in one of the string (or in both) $filename = $root . $filename; } if (!file_exists($filename)) { die("Template->make_filename(): Error - file $filename does not exist"); } return $filename; } Chyba zadziała... potem już normalnie tak jak w phpBB:
Powinno działać (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) |
|
|
![]() ![]() |
![]() |
Aktualny czas: 3.10.2025 - 00:55 |