function content_render_content
Search API
6.x content.module | content_render_content($bool_show_delete = FALSE) |
4.x content.module | content_render_content($bool_show_delete = FALSE) |
5.x content.module | content_render_content($bool_show_delete = FALSE) |
Return the HTML rendering the content we have in the database.
1 call to content_render_content()
- content_render_block in modules/
content/ content.module - Called when it is time to render the block in question. Expected to return an array which looks like this: array( "title" => "Some title goes here.", "body" => "this is the primary body of the block", );
File
- modules/
content/ content.module, line 675
Code
function content_render_content($bool_show_delete = FALSE) {
$rtn = "";
$res = db_query("SELECT * FROM content WHERE delete_flag = 0
ORDER BY posted DESC");
while ($cur = db_fetch_array($res)) {
$rtn .= "<div class='content'>
<div class='content-text'>" . filter_markup($cur ["content"], "full") . "</div>
<div class='content-posted'>" . t("Posted") . " " . date("D, M jS Y - g:ia", $cur ["posted"]) . "</div>";
if ($bool_show_delete) {
$delete_link = "";
$delete_link = fp_get_js_confirm_link(t("Are you sure you wish to delete this content?"), 'window.location="' . fp_url("content/delete", "aid=" . $cur ["aid"]) . '"', t("Delete?"));
$rtn .= "<div class='content-delete'>$delete_link</div>";
}
$rtn .= "</div>";
}
return $rtn;
}