diff --git a/index.php b/index.php index 4b361c2..b21fe5a 100644 --- a/index.php +++ b/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; diff --git a/themes/tumblr/template_details.htm b/themes/tumblr/template_details.htm new file mode 100644 index 0000000..1714eb6 --- /dev/null +++ b/themes/tumblr/template_details.htm @@ -0,0 +1,3 @@ +
+

Posted by {User} - ( {Comments_Number} ) comments

+
\ No newline at end of file diff --git a/themes/tumblr/template_regular_post.htm b/themes/tumblr/template_regular_post.htm index 746653e..fdca816 100644 --- a/themes/tumblr/template_regular_post.htm +++ b/themes/tumblr/template_regular_post.htm @@ -9,8 +9,5 @@

{Title}

{Body} -
-
-

( {Comments_Number} ) comments

-
+ \ No newline at end of file