function show_post($topicid, $post, $open, $openids = false) { if ($openids[$post["id"]]) { $open = 1; } ?> <div class="postheader"> <img id=arrow<?php echo $post["id"]; ?> src="arrow-<?php echo $open ? 'down' : 'right'; ?> .gif" width=20 height=20 style="width:1.3em;height:1.3em" onClick="fold('<?php echo $topicid; ?> ',<?php echo $post["id"]; ?> )"> <?php if ($post["status"]) { ?> <a href="./" onClick="return fold('<?php echo $topicid; ?> ',<?php echo $post["id"]; ?> )" class="<?php echo $post["status"]; ?> ">[<?php echo strtoupper($post["status"]); ?> ]</a> <?php } ?> <a href="./" onClick="return fold('<?php echo $topicid; ?> ',<?php echo $post["id"]; ?> )" name=p<?php echo $post["id"]; ?> ><?php echo trim($post["subject"]) ? htmlentities($post["subject"]) : "No subject"; ?> </a> <i>by <?php if ($post["owner"]) { print "<a href=\"member.php?id={$post['owner']}\">{$post['owner']}</a>"; } else { $name = $post["ownername"]; if ($name === '') { $name = "Anonymous"; } print htmlentities($name); if ($name !== 'Anonymous') { print " (unregistered)"; } } ?> </i> <nobr>on <b><?php echo date("D, M j, Y @ H:i T", $post["time"]); ?> </b></nobr> <?php if ($post["descendants"]) { print "({$post['descendants']} repl" . ($post["descendants"] == 1 ? "y" : "ies") . ")"; } ?> </div> <div id=postbody<?php echo $post["id"]; ?> class="postbody"><?php if ($open) { show_body($topicid, $post, $openids); } ?> </div> <?php }
include $theme_content_folder . '/_footer.php'; $body_content['footer'] = ob_get_contents(); ob_end_clean(); } // get aside content /* $body_content['aside'] = insert_aside($aside_content); */ if (file_exists($theme_content_folder . '/_aside.php')) { ob_start(); include $theme_content_folder . '/_aside.php'; $body_content['aside'] = ob_get_contents(); ob_end_clean(); } // buffer main content and insert into a variable ob_start(); include $content_partial; $body_content['main'] = ob_get_contents(); ob_end_clean(); /* with a builder file we can use a different html structure */ if (file_exists($theme_content_folder . '/builder.php')) { include $theme_content_folder . '/builder.php'; } else { // output default head section $head_content = ''; show_head($head_content, $config); // output default body section show_body($body_content, $config); } } // end checking for $_GET['page_name']
foreach ($ancestors as $ancestor) { if ($ancestor == $topid) { $foundtop = 1; } if (!$foundtop) { continue; } if ($curpost === false) { $curpost =& $top; } else { $curpost =& $curpost["children"][$ancestor]; } list($rc, $curpost["children"]) = ff_getposts(false, $curpost["id"], 1); $openids[$ancestor] = 1; } show_body($topicid, $top, $openids); $html = ob_get_contents(); ob_end_clean(); ?> parent.document.getElementById('postbody<?php echo $topid; ?> ').innerHTML='<?php echo jsencode($html); ?> '; parent.document.getElementById('arrow<?php echo $topid; ?> ').src='arrow-down.gif'; parent.unfolding = '';