Template tags for who added the post and for comments number on the homepage
parent
6d9bde1a85
commit
f1578c0a52
22
index.php
22
index.php
|
|
@ -115,14 +115,12 @@ $template = new plantillas($conf->template);
|
|||
$register["description"] = $register["description"];
|
||||
|
||||
$register["title"] = stripslashes($register["title"]);
|
||||
$register["description"] = stripslashes($register["description"]);
|
||||
|
||||
$comment = new comments();
|
||||
$register["description"] = stripslashes($register["description"]);
|
||||
|
||||
switch ($tumble->getType($register["id_post"])) {
|
||||
case "1":
|
||||
$input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}", "{Comments_Number}");
|
||||
$output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato, $comment->countComments($register["id_post"]));
|
||||
$input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}");
|
||||
$output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato, );
|
||||
|
||||
$template->cargarPlantilla($input, $output, "template_regular_post");
|
||||
$template->mostrarPlantilla();
|
||||
|
|
@ -185,6 +183,20 @@ $template = new plantillas($conf->template);
|
|||
$template->mostrarPlantilla();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$comment = new comments();
|
||||
$noComments = $comment->countComments($register["id_post"]);
|
||||
|
||||
$user = new user();
|
||||
$username = $user->getUserByID($register["id_user"]);
|
||||
|
||||
|
||||
$input = array("{Permalink}", "{User}", "{Comments_Number}");
|
||||
$output = array($permalink, $username["name"], $noComments);
|
||||
|
||||
$template->cargarPlantilla($input, $output, "template_details");
|
||||
$template->mostrarPlantilla();
|
||||
}
|
||||
|
||||
$p = new pagination;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<div class="totalComments">
|
||||
<h3>Posted by {User} - <a href="{Permalink}#comments">( {Comments_Number} ) comments</a></h3>
|
||||
</div>
|
||||
|
|
@ -9,8 +9,5 @@
|
|||
<div class="regular">
|
||||
<h2><a href="{Permalink}">{Title}</a></h2>
|
||||
{Body}
|
||||
</div>
|
||||
<div class="totalComments">
|
||||
<h3><a href="{Permalink}#comments">( {Comments_Number} ) comments</a></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue