sorki ze dopiero teraz ale poszedłem sie zdrzemnac po całonej pracy

<?php
class skorka
{
var $theme;
function skorka($theme)
{
$this->theme = $theme;
}
function tpl($string, $file)
{
$string = str_replace('{theme}', $this->theme, $string); if($file != '')
{
$bbmls = $GLOBALS['bbmls'];
$bbmls->use_file($file);
$string = preg_replace('{[([^:}]+):([^}]+)]}e', '$bbmls->fetch('__1_2
')', $string); }
}
function menu($r)
{
$string = str_replace('{tytul}', $r['tytul'], $string); return $string;
}
function news($r, $kom)
{
$bbmls = $GLOBALS['bbmls'];
$bbat = $GLOBALS['bbat'];
$bbmls->use_file('news');
$string = str_replace('{tytul}', $r['tytul'], $string); if($r['dtresc'] == '') {$string = str_replace('{wiecej}', '', $string);} else { $string = str_replace('{wiecej}', '<a href=\"'.$bbat->make_link('nowosci', $r['id']).'\">'.$bbmls->fetch('__news_wiecej').' ', $string); } if($bbat->get(1) == '') {$string = str_replace('{dluga:tresc}', '', $string);} else { $string = str_replace('{dluga:tresc}', nl2br($r['dtresc']), $string); } if($bbat->get(1) == '') {$string = str_replace('{wstecz}', '', $string);} else { $string = str_replace('{wstecz}', '<a href=\"javascript.go(-1)\">'.$bbmls->fetch('__news_wstecz').'', $string); } $string = str_replace('{komentarze}', '<a href=\"'.$bbat->make_link('komenarze', 'nowosci', $id).'\">'.$bbmls->fetch('__news_komenatrze').'('.$kom.')', $string); return $string;
}
function mn_open() {
}
function mn_close() {
}
function mt_close() {
$main = str_replace('{tytul}', $tpl['main']['title'], $tpl_file); $main = str_replace('{text}', $tpl['main']['text'], $main); return skorka::tpl($main, '');
}
}
?>
Oczekuje efektu ze zrobi mi cos takiego ze w main.tpl bede mial wyglad zwyklego działu, a w kodzie mam cos takiego
- mam coś takiego $skorka->mn_open(); echo tytul; $skorka->mn_close(); chce zeby to co pomedzy mn_open i close zostało przezuczone do talicy $tpl['main']['title']
- nastepnie mam pomedzy mn_close() a mt_close(); echo tresc; chce zeby to wrzucilo do tablicy $tpl['main']['title'];
- nastpenie chce aby mn_close(); mi przefiltrowało wszystko, do pliczku mani.tpl i wyrzucilo zawartośc tpl z odpowienimi modenizacjami. w tablach chce przechowywac kod html, php itd ..
Błąd znaleźiony
w ob_start() pokreciłem. dzięki za pomoc nospor