![]() |
![]() |
![]()
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: Zarejestrowani Postów: 220 Pomógł: 10 Dołączył: 23.08.2005 Skąd: Łódź Ostrzeżenie: (0%) ![]() ![]() |
Cytat(tiraeth @ 2006-01-06 22:00:33) 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) dziala trzba bylo jeszcze zmienic w jednej funkcji cos i dzial teraz pięknie Wiekie dzięki ale nie dziala do konca, poniewaz wpisuje katalog gdzie sa szablony ale on nadal chce je pobierac z glownego katalogu Ten post edytował vtuner 7.01.2006, 09:32:39 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 8.10.2025 - 06:57 |