Browse Source

Comments number on front-page

pecesama 16 years ago
parent
commit
510091bc10

+ 2 - 1
admin/themes/admin/template_add_video.htm View File

3
 			<label for="url">Video URL</label>			
3
 			<label for="url">Video URL</label>			
4
 			<br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
4
 			<br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
5
 			<div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
5
 			<div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
6
-				This is the URL from the video sites YouTube, Vimeo, Yahoo, Daily Motion or even an Slide Share Presentation.<br>
6
+				This is the URL from the video sites YouTube, Vimeo, Yahoo, Daily Motion <br />
7
+				or even an Slide Share Presentation.<br />
7
 				<span style="font-size: 10px; font-weight: normal;">(ie. http://youtube.com/watch?v=HcBFLN9cli0)</span>
8
 				<span style="font-size: 10px; font-weight: normal;">(ie. http://youtube.com/watch?v=HcBFLN9cli0)</span>
8
 			</div>
9
 			</div>
9
 		</div>									
10
 		</div>									

+ 5 - 3
index.php View File

116
 
116
 
117
                                 $register["title"] = stripslashes($register["title"]);
117
                                 $register["title"] = stripslashes($register["title"]);
118
                                 $register["description"] = stripslashes($register["description"]);
118
                                 $register["description"] = stripslashes($register["description"]);
119
-
119
+								
120
+								$comment = new comments();
121
+								
120
                                 switch ($tumble->getType($register["id_post"])) {
122
                                 switch ($tumble->getType($register["id_post"])) {
121
                                         case "1":
123
                                         case "1":
122
-                                                $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}");
123
-                                                $output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato);
124
+                                                $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}", "{Comments_Number}");
125
+                                                $output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato, $comment->countComments($register["id_post"]));
124
                                                                                         
126
                                                                                         
125
                                                 $template->cargarPlantilla($input, $output, "template_regular_post");
127
                                                 $template->cargarPlantilla($input, $output, "template_regular_post");
126
                                                 $template->mostrarPlantilla();
128
                                                 $template->mostrarPlantilla();

+ 14 - 1
themes/tumblr/style.css View File

292
 #commentForm #btnAdd {
292
 #commentForm #btnAdd {
293
 	margin: 0;
293
 	margin: 0;
294
 	float: right;
294
 	float: right;
295
-}
295
+}
296
+
297
+.totalComments h3 {
298
+	margin: 0 10px 0 0;
299
+	font-size: 10pt;
300
+	font-weight: normal;
301
+	text-align: right;
302
+	color: #999;
303
+	font-style: italic;
304
+}
305
+
306
+.totalComments a {
307
+	color: #999;
308
+}

+ 4 - 1
themes/tumblr/template_regular_post.htm View File

9
 				<div class="regular">
9
 				<div class="regular">
10
 					<h2><a href="{Permalink}">{Title}</a></h2>
10
 					<h2><a href="{Permalink}">{Title}</a></h2>
11
 					{Body}
11
 					{Body}
12
-				</div>				
12
+				</div>
13
+				<div class="totalComments">
14
+					<h3><a href="{Permalink}#comments">( {Comments_Number} ) comments</a></h3>
15
+				</div>		
13
 			</div>
16
 			</div>