Browse Source

Changed the date format

pecesama 18 years ago
parent
commit
e0f94f88a1
1 changed files with 8 additions and 8 deletions
  1. 8 8
      index.php

+ 8 - 8
index.php View File

48
 
48
 
49
 		if ($tumble->contarRegistros()>0) {				
49
 		if ($tumble->contarRegistros()>0) {				
50
 			while($register = mysql_fetch_array($rs)) {			
50
 			while($register = mysql_fetch_array($rs)) {			
51
-
51
+				$formatedDate = date("M d", strtotime($register["date"]));
52
 				$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
52
 				$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
53
 				switch ($tumble->getType($register["id_post"])) {
53
 				switch ($tumble->getType($register["id_post"])) {
54
 					case "1":
54
 					case "1":
55
 						$input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}");
55
 						$input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}");
56
-						$output = array($register["date"], $permalink, $register["title"], $register["description"], $conf->urlGelato);
56
+						$output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato);
57
 											
57
 											
58
 						$template->cargarPlantilla($input, $output, "template_regular_post");
58
 						$template->cargarPlantilla($input, $output, "template_regular_post");
59
 						$template->mostrarPlantilla();
59
 						$template->mostrarPlantilla();
60
 						break;
60
 						break;
61
 					case "2":
61
 					case "2":
62
 						$input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{URL_Tumble}");
62
 						$input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{URL_Tumble}");
63
-						$output = array($register["date"], $permalink, $register["url"], "", $register["description"], $conf->urlGelato);
63
+						$output = array($formatedDate, $permalink, $register["url"], "", $register["description"], $conf->urlGelato);
64
 						
64
 						
65
 						$template->cargarPlantilla($input, $output, "template_photo");
65
 						$template->cargarPlantilla($input, $output, "template_photo");
66
 						$template->mostrarPlantilla();							   
66
 						$template->mostrarPlantilla();							   
67
 						break;
67
 						break;
68
 					case "3":
68
 					case "3":
69
 						$input = array("{Date_Added}", "{Permalink}", "{Quote}", "{Source}", "{URL_Tumble}");
69
 						$input = array("{Date_Added}", "{Permalink}", "{Quote}", "{Source}", "{URL_Tumble}");
70
-						$output = array($register["date"], $permalink, $register["description"], $register["title"], $conf->urlGelato);
70
+						$output = array($formatedDate, $permalink, $register["description"], $register["title"], $conf->urlGelato);
71
 						
71
 						
72
 						$template->cargarPlantilla($input, $output, "template_quote");
72
 						$template->cargarPlantilla($input, $output, "template_quote");
73
 						$template->mostrarPlantilla();
73
 						$template->mostrarPlantilla();
74
 						break;
74
 						break;
75
 					case "4":
75
 					case "4":
76
 						$input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
76
 						$input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
77
-						$output = array($register["date"], $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
77
+						$output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
78
 						
78
 						
79
 						$template->cargarPlantilla($input, $output, "template_url");
79
 						$template->cargarPlantilla($input, $output, "template_url");
80
 						$template->mostrarPlantilla();
80
 						$template->mostrarPlantilla();
81
 						break;
81
 						break;
82
 					case "5":
82
 					case "5":
83
 						$input = array("{Date_Added}", "{Permalink}", "{Title}", "{Conversation}", "{URL_Tumble}");
83
 						$input = array("{Date_Added}", "{Permalink}", "{Title}", "{Conversation}", "{URL_Tumble}");
84
-						$output = array($register["date"], $permalink, $register["title"], $tumble->formatConversation($register["description"]), $conf->urlGelato);
84
+						$output = array($formatedDate, $permalink, $register["title"], $tumble->formatConversation($register["description"]), $conf->urlGelato);
85
 						
85
 						
86
 						$template->cargarPlantilla($input, $output, "template_conversation");
86
 						$template->cargarPlantilla($input, $output, "template_conversation");
87
 						$template->mostrarPlantilla();
87
 						$template->mostrarPlantilla();
88
 						break;
88
 						break;
89
 					case "6":
89
 					case "6":
90
 						$input = array("{Date_Added}", "{Permalink}", "{Video}", "{Caption}", "{URL_Tumble}");
90
 						$input = array("{Date_Added}", "{Permalink}", "{Video}", "{Caption}", "{URL_Tumble}");
91
-						$output = array($register["date"], $permalink, $tumble->getVideoPlayer($register["url"]), $register["description"], $conf->urlGelato);
91
+						$output = array($formatedDate, $permalink, $tumble->getVideoPlayer($register["url"]), $register["description"], $conf->urlGelato);
92
 						
92
 						
93
 						$template->cargarPlantilla($input, $output, "template_video");
93
 						$template->cargarPlantilla($input, $output, "template_video");
94
 						$template->mostrarPlantilla();
94
 						$template->mostrarPlantilla();
95
 						break;
95
 						break;
96
 					case "7":
96
 					case "7":
97
 						$input = array("{Date_Added}", "{Permalink}", "{Mp3}", "{Caption}", "{URL_Tumble}");
97
 						$input = array("{Date_Added}", "{Permalink}", "{Mp3}", "{Caption}", "{URL_Tumble}");
98
-						$output = array($register["date"], $permalink, $tumble->getMp3Player($register["url"]), $register["description"], $conf->urlGelato);
98
+						$output = array($formatedDate, $permalink, $tumble->getMp3Player($register["url"]), $register["description"], $conf->urlGelato);
99
 						
99
 						
100
 						$template->cargarPlantilla($input, $output, "template_mp3");
100
 						$template->cargarPlantilla($input, $output, "template_mp3");
101
 						$template->mostrarPlantilla();
101
 						$template->mostrarPlantilla();