|
|
@@ -24,8 +24,10 @@
|
|
24
|
24
|
|
|
25
|
25
|
if (isset($_GET["post"])) {
|
|
26
|
26
|
$id_post = $_GET["post"];
|
|
27
|
|
- } else {
|
|
28
|
|
- $id_post = (isset($param_url[2])) ? ((is_numeric($param_url[2])) ? $param_url[2] : null) : null;
|
|
|
27
|
+ } else {
|
|
|
28
|
+ if (isset($param_url[1]) && $param_url[1]=="post") {
|
|
|
29
|
+ $id_post = (isset($param_url[2])) ? ((is_numeric($param_url[2])) ? $param_url[2] : null) : null;
|
|
|
30
|
+ }
|
|
29
|
31
|
}
|
|
30
|
32
|
|
|
31
|
33
|
$input = array("{Title}", "{Description}", "{URL_Tumble}");
|
|
|
@@ -109,11 +111,61 @@
|
|
109
|
111
|
$template->renderizaEtiqueta("No posts in this tumblelog.", "div","error");
|
|
110
|
112
|
}
|
|
111
|
113
|
} else {
|
|
112
|
|
- /*
|
|
113
|
|
- $row = $tumble->obtenerArticulo($id_post);
|
|
|
114
|
+ $register = $tumble->getPost($id_post);
|
|
114
|
115
|
|
|
115
|
|
- */
|
|
116
|
|
-
|
|
|
116
|
+ $formatedDate = date("M d", strtotime($register["date"]));
|
|
|
117
|
+ $permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
|
|
|
118
|
+ switch ($tumble->getType($register["id_post"])) {
|
|
|
119
|
+ case "1":
|
|
|
120
|
+ $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}");
|
|
|
121
|
+ $output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato);
|
|
|
122
|
+
|
|
|
123
|
+ $template->cargarPlantilla($input, $output, "template_regular_post");
|
|
|
124
|
+ $template->mostrarPlantilla();
|
|
|
125
|
+ break;
|
|
|
126
|
+ case "2":
|
|
|
127
|
+ $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{URL_Tumble}");
|
|
|
128
|
+ $output = array($formatedDate, $permalink, $register["url"], "", $register["description"], $conf->urlGelato);
|
|
|
129
|
+
|
|
|
130
|
+ $template->cargarPlantilla($input, $output, "template_photo");
|
|
|
131
|
+ $template->mostrarPlantilla();
|
|
|
132
|
+ break;
|
|
|
133
|
+ case "3":
|
|
|
134
|
+ $input = array("{Date_Added}", "{Permalink}", "{Quote}", "{Source}", "{URL_Tumble}");
|
|
|
135
|
+ $output = array($formatedDate, $permalink, $register["description"], $register["title"], $conf->urlGelato);
|
|
|
136
|
+
|
|
|
137
|
+ $template->cargarPlantilla($input, $output, "template_quote");
|
|
|
138
|
+ $template->mostrarPlantilla();
|
|
|
139
|
+ break;
|
|
|
140
|
+ case "4":
|
|
|
141
|
+ $input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
|
|
|
142
|
+ $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
|
|
|
143
|
+
|
|
|
144
|
+ $template->cargarPlantilla($input, $output, "template_url");
|
|
|
145
|
+ $template->mostrarPlantilla();
|
|
|
146
|
+ break;
|
|
|
147
|
+ case "5":
|
|
|
148
|
+ $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Conversation}", "{URL_Tumble}");
|
|
|
149
|
+ $output = array($formatedDate, $permalink, $register["title"], $tumble->formatConversation($register["description"]), $conf->urlGelato);
|
|
|
150
|
+
|
|
|
151
|
+ $template->cargarPlantilla($input, $output, "template_conversation");
|
|
|
152
|
+ $template->mostrarPlantilla();
|
|
|
153
|
+ break;
|
|
|
154
|
+ case "6":
|
|
|
155
|
+ $input = array("{Date_Added}", "{Permalink}", "{Video}", "{Caption}", "{URL_Tumble}");
|
|
|
156
|
+ $output = array($formatedDate, $permalink, $tumble->getVideoPlayer($register["url"]), $register["description"], $conf->urlGelato);
|
|
|
157
|
+
|
|
|
158
|
+ $template->cargarPlantilla($input, $output, "template_video");
|
|
|
159
|
+ $template->mostrarPlantilla();
|
|
|
160
|
+ break;
|
|
|
161
|
+ case "7":
|
|
|
162
|
+ $input = array("{Date_Added}", "{Permalink}", "{Mp3}", "{Caption}", "{URL_Tumble}");
|
|
|
163
|
+ $output = array($formatedDate, $permalink, $tumble->getMp3Player($register["url"]), $register["description"], $conf->urlGelato);
|
|
|
164
|
+
|
|
|
165
|
+ $template->cargarPlantilla($input, $output, "template_mp3");
|
|
|
166
|
+ $template->mostrarPlantilla();
|
|
|
167
|
+ break;
|
|
|
168
|
+ }
|
|
117
|
169
|
}
|
|
118
|
170
|
|
|
119
|
171
|
$input = array("{URL_Tumble}");
|