if (is_array($story)) { foreach ($story as $key => $value) { $this_key = "story_" . $key; $$this_key = $value; $tpl->assign($this_key, $$this_key); } } if ($story_showtitle) { $tpl->assign("atitle", $story_title); $tpl->assign("asubtitle", $story_headline); } $this_template = "stories_" . $story_tpl . ".tpl"; if (($story_tpl != 'plain') && (file_exists($tpl_dir . "/" . $this_template))) { $tpl->assign("artikel", nl2br($story_text)); if (!$story_pos) { $stories .= $tpl->fetch($this_template); } else { $x_stories = $story_pos . "_stories"; $$x_stories .= $tpl->fetch($this_template); } } else { $stories .= $story_text; } } $tpl->assign("body_top_stories", $body_top_stories); $tpl->assign("body_bottom_stories", $body_bottom_stories); $tpl->assign("stories", $stories); } if (is_array($topics['panels'])) { foreach ($topics['panels'] as $pid => $panel) { if (is_array($panel)) { foreach ($panel as $key => $value) { $this_key = "panel_" . $key; $$this_key = $value; $tpl->assign($this_key, $$this_key); } } $tpl->assign("pshowtitle", $panel_showtitle); $tpl->assign("ptitle", $panel_title); $tpl->assign("ptext", nl2br($panel_text)); $this_template = "panels_" . $panel_tpl . ".tpl"; if (($panel_tpl != 'plain') && (file_exists($tpl_dir . "/" . $this_template))) { $this_panel = $tpl->fetch($this_template); } else { $this_panel = $panel_text; } if ($panel_pos) { $x_panels = $panel_pos . "_panels"; $$x_panels .= $this_panel; } } $tpl->assign("left_panels", $left_panels); $tpl->assign("right_panels", $right_panels); } $topic = $topics[1]; if (is_array($topic)) { foreach ($topic as $key => $value) { $this_key = "topic_" . $key; $$this_key = $value; $tpl->assign($this_key, $$this_key); } } $text = $tpl->fetch("str:" . $stories); $tpl->assign("text", $text); $this_template = "index_body_" . $topic_tpl . ".tpl"; if (file_exists($tpl_dir . "/" . $this_template)) { if ($topic_text) { $text = $tpl->fetch("str:" . $topic_text); $tpl->assign("text", $text); } $body = $tpl->fetch($this_template); } else { $body = $tpl->fetch("index_body_standard.tpl"); } $tpl->assign("body", $body); #echo "
"; #print_r($tpl); #echo ""; $tpl->display("index.tpl"); ?>