$comment_on_type = 'page'; $comment_on_ident = $page_ident; $comment_on_username = $username; $comment_on_name = $name; $comment_on_ident = $page_owner; if (!$page) { // We're adding a new page. // Build nice titles $plain_title = 'Create ' . $page_title; $html_title = $username . ' : ' . $page_title; // Run the command to actually retrieve the content. $body = folio_page_view($page_ident, $page_title, -1, $page, $username); } else { // Viewing an existing page. // Build nice titles $html_title = "<a href='{$url}{$username}/subscribe/rss/page+page_comment/'><img border=0 src='{$url}_templates/icons/rss.png' /></a> {$name} : " . folio_control_breadcrumb($page, $username); $plain_title = $page->title; // Run the command to actually retrieve the content. $body = folio_page_view($page_ident, $page_title, -1, $page, $username) . folio_control_childpagelist($username, $page, $page_owner) . folio_control_commentlist('page', $page_ident); } } else { // We don't have permissions, and so need some sort of title. $html_title = 'You do not have permission to view this page'; $plain_title = 'You do not have permission to view this page'; $body = 'You do not have permission to view this page. Please contact the page\'s' . ' owner and ask for the security to be set to <b>Public</b> or <b>Moderated</b>. ' . ' You will be able to view this page once that has been done. If this page belongs ' . ' to a community, you may also try to join the community. Once you are a member, ' . ' you will be able to see and edit the page.'; } // Transfer into template & write. templates_page_setup(); $body = templates_draw(array('context' => 'contentholder', 'title' => $html_title, 'body' => $body)); echo templates_page_draw(array($plain_title, $body)); // include_once( 'perfstop.php' );
$comment_on_username = $username; $comment_on_name = $name; $comment_on_ident = $page_owner; if (!$page) { // Page does not exist // Build nice titles $plain_title = 'Create ' . $page_title; // Run the command to actually retrieve the content. $page_body = "<p>Page does not exist</p>"; // folio_page_view($page_ident,$page_title, -1, $page, $username); } else { // Viewing an existing page. // Build nice titles $plain_title = $page->title; // Run the command to actually retrieve the content. $page_body = folio_page_makelinks($username, stripslashes($page->body)) . folio_control_commentlist('page', $page_ident); } $created = gmdate("m/d/y h:i", intval($page->created)); $security_ident = intval($page->security_ident); $creator = intval($page->creator_ident); if ($creator < 1) { $creator = 'Anonymous'; } else { $creator = run("users:id_to_name", $creator); } } else { // We don't have permissions, and so need some sort of title. $plain_title = 'You do not have permission to view this page'; $page_body = 'You do not have permission to view this page. Please contact the page\'s' . ' owner and ask for the security to be set to <b>Public</b> or <b>Moderated</b>. ' . ' You will be able to view this page once that has been done. If this page belongs ' . ' to a community, you may also try to join the community. Once you are a member, ' . ' you will be able to see and edit the page.'; } // Transfer into template & write.