1 | <?php |
---|
2 | /** |
---|
3 | * @package Dotclear |
---|
4 | * @subpackage Backend |
---|
5 | * |
---|
6 | * @copyright Olivier Meunier & Association Dotclear |
---|
7 | * @copyright GPL-2.0-only |
---|
8 | */ |
---|
9 | |
---|
10 | require dirname(__FILE__) . '/../inc/admin/prepend.php'; |
---|
11 | |
---|
12 | dcPage::check('usage,contentadmin'); |
---|
13 | |
---|
14 | $post_id = ''; |
---|
15 | $cat_id = ''; |
---|
16 | $post_dt = ''; |
---|
17 | $post_format = $core->auth->getOption('post_format'); |
---|
18 | $post_editor = $core->auth->getOption('editor'); |
---|
19 | $post_password = ''; |
---|
20 | $post_url = ''; |
---|
21 | $post_lang = $core->auth->getInfo('user_lang'); |
---|
22 | $post_title = ''; |
---|
23 | $post_excerpt = ''; |
---|
24 | $post_excerpt_xhtml = ''; |
---|
25 | $post_content = ''; |
---|
26 | $post_content_xhtml = ''; |
---|
27 | $post_notes = ''; |
---|
28 | $post_status = $core->auth->getInfo('user_post_status'); |
---|
29 | $post_selected = false; |
---|
30 | $post_open_comment = $core->blog->settings->system->allow_comments; |
---|
31 | $post_open_tb = $core->blog->settings->system->allow_trackbacks; |
---|
32 | |
---|
33 | $page_title = __('New entry'); |
---|
34 | |
---|
35 | $can_view_page = true; |
---|
36 | $can_edit_post = $core->auth->check('usage,contentadmin', $core->blog->id); |
---|
37 | $can_publish = $core->auth->check('publish,contentadmin', $core->blog->id); |
---|
38 | $can_delete = false; |
---|
39 | |
---|
40 | $post_headlink = '<link rel="%s" title="%s" href="' . $core->adminurl->get('admin.post', ['id' => "%s"], '&', true) . '" />'; |
---|
41 | $post_link = '<a href="' . $core->adminurl->get('admin.post', ['id' => "%s"], '&', true) . '" title="%s">%s</a>'; |
---|
42 | $next_link = $prev_link = $next_headlink = $prev_headlink = null; |
---|
43 | |
---|
44 | # If user can't publish |
---|
45 | if (!$can_publish) { |
---|
46 | $post_status = -2; |
---|
47 | } |
---|
48 | |
---|
49 | # Getting categories |
---|
50 | $categories_combo = dcAdminCombos::getCategoriesCombo( |
---|
51 | $core->blog->getCategories() |
---|
52 | ); |
---|
53 | |
---|
54 | $status_combo = dcAdminCombos::getPostStatusesCombo(); |
---|
55 | |
---|
56 | $img_status_pattern = '<img class="img_select_option" alt="%1$s" title="%1$s" src="images/%2$s" />'; |
---|
57 | |
---|
58 | # Formats combo |
---|
59 | $core_formaters = $core->getFormaters(); |
---|
60 | $available_formats = ['' => '']; |
---|
61 | foreach ($core_formaters as $editor => $formats) { |
---|
62 | foreach ($formats as $format) { |
---|
63 | $available_formats[$format] = $format; |
---|
64 | } |
---|
65 | } |
---|
66 | |
---|
67 | # Languages combo |
---|
68 | $rs = $core->blog->getLangs(['order' => 'asc']); |
---|
69 | $lang_combo = dcAdminCombos::getLangsCombo($rs, true); |
---|
70 | |
---|
71 | # Validation flag |
---|
72 | $bad_dt = false; |
---|
73 | |
---|
74 | # Trackbacks |
---|
75 | $TB = new dcTrackback($core); |
---|
76 | $tb_urls = $tb_excerpt = ''; |
---|
77 | |
---|
78 | # Get entry informations |
---|
79 | if (!empty($_REQUEST['id'])) { |
---|
80 | $page_title = __('Edit entry'); |
---|
81 | |
---|
82 | $params['post_id'] = $_REQUEST['id']; |
---|
83 | |
---|
84 | $post = $core->blog->getPosts($params); |
---|
85 | |
---|
86 | if ($post->isEmpty()) { |
---|
87 | $core->error->add(__('This entry does not exist.')); |
---|
88 | $can_view_page = false; |
---|
89 | } else { |
---|
90 | $post_id = $post->post_id; |
---|
91 | $cat_id = $post->cat_id; |
---|
92 | $post_dt = date('Y-m-d H:i', strtotime($post->post_dt)); |
---|
93 | $post_format = $post->post_format; |
---|
94 | $post_password = $post->post_password; |
---|
95 | $post_url = $post->post_url; |
---|
96 | $post_lang = $post->post_lang; |
---|
97 | $post_title = $post->post_title; |
---|
98 | $post_excerpt = $post->post_excerpt; |
---|
99 | $post_excerpt_xhtml = $post->post_excerpt_xhtml; |
---|
100 | $post_content = $post->post_content; |
---|
101 | $post_content_xhtml = $post->post_content_xhtml; |
---|
102 | $post_notes = $post->post_notes; |
---|
103 | $post_status = $post->post_status; |
---|
104 | $post_selected = (boolean) $post->post_selected; |
---|
105 | $post_open_comment = (boolean) $post->post_open_comment; |
---|
106 | $post_open_tb = (boolean) $post->post_open_tb; |
---|
107 | |
---|
108 | $can_edit_post = $post->isEditable(); |
---|
109 | $can_delete = $post->isDeletable(); |
---|
110 | |
---|
111 | $next_rs = $core->blog->getNextPost($post, 1); |
---|
112 | $prev_rs = $core->blog->getNextPost($post, -1); |
---|
113 | |
---|
114 | if ($next_rs !== null) { |
---|
115 | $next_link = sprintf($post_link, $next_rs->post_id, |
---|
116 | html::escapeHTML($next_rs->post_title), __('Next entry') . ' »'); |
---|
117 | $next_headlink = sprintf($post_headlink, 'next', |
---|
118 | html::escapeHTML($next_rs->post_title), $next_rs->post_id); |
---|
119 | } |
---|
120 | |
---|
121 | if ($prev_rs !== null) { |
---|
122 | $prev_link = sprintf($post_link, $prev_rs->post_id, |
---|
123 | html::escapeHTML($prev_rs->post_title), '« ' . __('Previous entry')); |
---|
124 | $prev_headlink = sprintf($post_headlink, 'previous', |
---|
125 | html::escapeHTML($prev_rs->post_title), $prev_rs->post_id); |
---|
126 | } |
---|
127 | |
---|
128 | try { |
---|
129 | $core->media = new dcMedia($core); |
---|
130 | } catch (Exception $e) { |
---|
131 | $core->error->add($e->getMessage()); |
---|
132 | } |
---|
133 | |
---|
134 | # Sanitize trackbacks excerpt |
---|
135 | $tb_excerpt = empty($_POST['tb_excerpt']) ? |
---|
136 | $post_excerpt_xhtml . ' ' . $post_content_xhtml : |
---|
137 | $_POST['tb_excerpt']; |
---|
138 | $tb_excerpt = html::decodeEntities(html::clean($tb_excerpt)); |
---|
139 | $tb_excerpt = text::cutString(html::escapeHTML($tb_excerpt), 255); |
---|
140 | $tb_excerpt = preg_replace('/\s+/ms', ' ', $tb_excerpt); |
---|
141 | } |
---|
142 | } |
---|
143 | if (isset($_REQUEST['section']) && $_REQUEST['section'] == 'trackbacks') { |
---|
144 | $anchor = 'trackbacks'; |
---|
145 | } else { |
---|
146 | $anchor = 'comments'; |
---|
147 | } |
---|
148 | |
---|
149 | $comments_actions_page = new dcCommentsActionsPage($core, $core->adminurl->get('admin.post'), ['id' => $post_id, '_ANCHOR' => $anchor, 'section' => $anchor]); |
---|
150 | |
---|
151 | if ($comments_actions_page->process()) { |
---|
152 | return; |
---|
153 | } |
---|
154 | |
---|
155 | # Ping blogs |
---|
156 | if (!empty($_POST['ping'])) { |
---|
157 | if (!empty($_POST['tb_urls']) && $post_id && $post_status == 1 && $can_edit_post) { |
---|
158 | $tb_urls = $_POST['tb_urls']; |
---|
159 | $tb_urls = str_replace("\r", '', $tb_urls); |
---|
160 | $tb_post_title = html::escapeHTML(trim(html::clean($post_title))); |
---|
161 | $tb_post_url = $post->getURL(); |
---|
162 | |
---|
163 | foreach (explode("\n", $tb_urls) as $tb_url) { |
---|
164 | try { |
---|
165 | # --BEHAVIOR-- adminBeforePingTrackback |
---|
166 | $core->callBehavior('adminBeforePingTrackback', $tb_url, $post_id, $tb_post_title, $tb_excerpt, $tb_post_url); |
---|
167 | |
---|
168 | $TB->ping($tb_url, $post_id, $tb_post_title, $tb_excerpt, $tb_post_url); |
---|
169 | } catch (Exception $e) { |
---|
170 | $core->error->add($e->getMessage()); |
---|
171 | } |
---|
172 | } |
---|
173 | |
---|
174 | if (!$core->error->flag()) { |
---|
175 | dcPage::addSuccessNotice(__('All pings sent.')); |
---|
176 | $core->adminurl->redirect( |
---|
177 | 'admin.post', |
---|
178 | ['id' => $post_id, 'tb' => '1'] |
---|
179 | ); |
---|
180 | } |
---|
181 | } |
---|
182 | } |
---|
183 | |
---|
184 | # Format excerpt and content |
---|
185 | elseif (!empty($_POST) && $can_edit_post) { |
---|
186 | $post_format = $_POST['post_format']; |
---|
187 | $post_excerpt = $_POST['post_excerpt']; |
---|
188 | $post_content = $_POST['post_content']; |
---|
189 | |
---|
190 | $post_title = $_POST['post_title']; |
---|
191 | |
---|
192 | $cat_id = (integer) $_POST['cat_id']; |
---|
193 | |
---|
194 | if (isset($_POST['post_status'])) { |
---|
195 | $post_status = (integer) $_POST['post_status']; |
---|
196 | } |
---|
197 | |
---|
198 | if (empty($_POST['post_dt'])) { |
---|
199 | $post_dt = ''; |
---|
200 | } else { |
---|
201 | try |
---|
202 | { |
---|
203 | $post_dt = strtotime($_POST['post_dt']); |
---|
204 | if ($post_dt == false || $post_dt == -1) { |
---|
205 | $bad_dt = true; |
---|
206 | throw new Exception(__('Invalid publication date')); |
---|
207 | } |
---|
208 | $post_dt = date('Y-m-d H:i', $post_dt); |
---|
209 | } catch (Exception $e) { |
---|
210 | $core->error->add($e->getMessage()); |
---|
211 | } |
---|
212 | } |
---|
213 | |
---|
214 | $post_open_comment = !empty($_POST['post_open_comment']); |
---|
215 | $post_open_tb = !empty($_POST['post_open_tb']); |
---|
216 | $post_selected = !empty($_POST['post_selected']); |
---|
217 | $post_lang = $_POST['post_lang']; |
---|
218 | $post_password = !empty($_POST['post_password']) ? $_POST['post_password'] : null; |
---|
219 | |
---|
220 | $post_notes = $_POST['post_notes']; |
---|
221 | |
---|
222 | if (isset($_POST['post_url'])) { |
---|
223 | $post_url = $_POST['post_url']; |
---|
224 | } |
---|
225 | |
---|
226 | $core->blog->setPostContent( |
---|
227 | $post_id, $post_format, $post_lang, |
---|
228 | $post_excerpt, $post_excerpt_xhtml, $post_content, $post_content_xhtml |
---|
229 | ); |
---|
230 | } |
---|
231 | |
---|
232 | # Delete post |
---|
233 | if (!empty($_POST['delete']) && $can_delete) { |
---|
234 | try { |
---|
235 | # --BEHAVIOR-- adminBeforePostDelete |
---|
236 | $core->callBehavior('adminBeforePostDelete', $post_id); |
---|
237 | $core->blog->delPost($post_id); |
---|
238 | $core->adminurl->redirect("admin.posts"); |
---|
239 | } catch (Exception $e) { |
---|
240 | $core->error->add($e->getMessage()); |
---|
241 | } |
---|
242 | } |
---|
243 | |
---|
244 | # Create or update post |
---|
245 | if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) { |
---|
246 | # Create category |
---|
247 | if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { |
---|
248 | |
---|
249 | $cur_cat = $core->con->openCursor($core->prefix . 'category'); |
---|
250 | $cur_cat->cat_title = $_POST['new_cat_title']; |
---|
251 | $cur_cat->cat_url = ''; |
---|
252 | |
---|
253 | $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; |
---|
254 | |
---|
255 | # --BEHAVIOR-- adminBeforeCategoryCreate |
---|
256 | $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); |
---|
257 | |
---|
258 | $cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); |
---|
259 | |
---|
260 | # --BEHAVIOR-- adminAfterCategoryCreate |
---|
261 | $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $cat_id); |
---|
262 | } |
---|
263 | |
---|
264 | $cur = $core->con->openCursor($core->prefix . 'post'); |
---|
265 | |
---|
266 | $cur->post_title = $post_title; |
---|
267 | $cur->cat_id = ($cat_id ?: null); |
---|
268 | $cur->post_dt = $post_dt ? date('Y-m-d H:i:00', strtotime($post_dt)) : ''; |
---|
269 | $cur->post_format = $post_format; |
---|
270 | $cur->post_password = $post_password; |
---|
271 | $cur->post_lang = $post_lang; |
---|
272 | $cur->post_title = $post_title; |
---|
273 | $cur->post_excerpt = $post_excerpt; |
---|
274 | $cur->post_excerpt_xhtml = $post_excerpt_xhtml; |
---|
275 | $cur->post_content = $post_content; |
---|
276 | $cur->post_content_xhtml = $post_content_xhtml; |
---|
277 | $cur->post_notes = $post_notes; |
---|
278 | $cur->post_status = $post_status; |
---|
279 | $cur->post_selected = (integer) $post_selected; |
---|
280 | $cur->post_open_comment = (integer) $post_open_comment; |
---|
281 | $cur->post_open_tb = (integer) $post_open_tb; |
---|
282 | |
---|
283 | if (isset($_POST['post_url'])) { |
---|
284 | $cur->post_url = $post_url; |
---|
285 | } |
---|
286 | |
---|
287 | # Update post |
---|
288 | if ($post_id) { |
---|
289 | try { |
---|
290 | # --BEHAVIOR-- adminBeforePostUpdate |
---|
291 | $core->callBehavior('adminBeforePostUpdate', $cur, $post_id); |
---|
292 | |
---|
293 | $core->blog->updPost($post_id, $cur); |
---|
294 | |
---|
295 | # --BEHAVIOR-- adminAfterPostUpdate |
---|
296 | $core->callBehavior('adminAfterPostUpdate', $cur, $post_id); |
---|
297 | dcPage::addSuccessNotice(sprintf(__('The post "%s" has been successfully updated'), html::escapeHTML($cur->post_title))); |
---|
298 | $core->adminurl->redirect( |
---|
299 | 'admin.post', |
---|
300 | ['id' => $post_id] |
---|
301 | ); |
---|
302 | } catch (Exception $e) { |
---|
303 | $core->error->add($e->getMessage()); |
---|
304 | } |
---|
305 | } else { |
---|
306 | $cur->user_id = $core->auth->userID(); |
---|
307 | |
---|
308 | try { |
---|
309 | # --BEHAVIOR-- adminBeforePostCreate |
---|
310 | $core->callBehavior('adminBeforePostCreate', $cur); |
---|
311 | |
---|
312 | $return_id = $core->blog->addPost($cur); |
---|
313 | |
---|
314 | # --BEHAVIOR-- adminAfterPostCreate |
---|
315 | $core->callBehavior('adminAfterPostCreate', $cur, $return_id); |
---|
316 | |
---|
317 | dcPage::addSuccessNotice(__('Entry has been successfully created.')); |
---|
318 | $core->adminurl->redirect( |
---|
319 | 'admin.post', |
---|
320 | ['id' => $return_id] |
---|
321 | ); |
---|
322 | } catch (Exception $e) { |
---|
323 | $core->error->add($e->getMessage()); |
---|
324 | } |
---|
325 | } |
---|
326 | } |
---|
327 | |
---|
328 | # Getting categories |
---|
329 | $categories_combo = dcAdminCombos::getCategoriesCombo( |
---|
330 | $core->blog->getCategories() |
---|
331 | ); |
---|
332 | /* DISPLAY |
---|
333 | -------------------------------------------------------- */ |
---|
334 | $default_tab = 'edit-entry'; |
---|
335 | if (!$can_edit_post) { |
---|
336 | $default_tab = ''; |
---|
337 | } |
---|
338 | if (!empty($_GET['co'])) { |
---|
339 | $default_tab = 'comments'; |
---|
340 | } elseif (!empty($_GET['tb'])) { |
---|
341 | $default_tab = 'trackbacks'; |
---|
342 | } |
---|
343 | |
---|
344 | if ($post_id) { |
---|
345 | switch ($post_status) { |
---|
346 | case 1: |
---|
347 | $img_status = sprintf($img_status_pattern, __('Published'), 'check-on.png'); |
---|
348 | break; |
---|
349 | case 0: |
---|
350 | $img_status = sprintf($img_status_pattern, __('Unpublished'), 'check-off.png'); |
---|
351 | break; |
---|
352 | case -1: |
---|
353 | $img_status = sprintf($img_status_pattern, __('Scheduled'), 'scheduled.png'); |
---|
354 | break; |
---|
355 | case -2: |
---|
356 | $img_status = sprintf($img_status_pattern, __('Pending'), 'check-wrn.png'); |
---|
357 | break; |
---|
358 | default: |
---|
359 | $img_status = ''; |
---|
360 | } |
---|
361 | $edit_entry_str = __('“%s”'); |
---|
362 | $page_title_edit = sprintf($edit_entry_str, html::escapeHTML($post_title)) . ' ' . $img_status; |
---|
363 | } else { |
---|
364 | $img_status = ''; |
---|
365 | } |
---|
366 | |
---|
367 | $admin_post_behavior = ''; |
---|
368 | if ($post_editor) { |
---|
369 | $p_edit = $c_edit = ''; |
---|
370 | if (!empty($post_editor[$post_format])) { |
---|
371 | $p_edit = $post_editor[$post_format]; |
---|
372 | } |
---|
373 | if (!empty($post_editor['xhtml'])) { |
---|
374 | $c_edit = $post_editor['xhtml']; |
---|
375 | } |
---|
376 | if ($p_edit == $c_edit) { |
---|
377 | $admin_post_behavior .= $core->callBehavior('adminPostEditor', |
---|
378 | $p_edit, 'post', ['#post_excerpt', '#post_content', '#comment_content'], $post_format); |
---|
379 | } else { |
---|
380 | $admin_post_behavior .= $core->callBehavior('adminPostEditor', |
---|
381 | $p_edit, 'post', ['#post_excerpt', '#post_content'], $post_format); |
---|
382 | $admin_post_behavior .= $core->callBehavior('adminPostEditor', |
---|
383 | $c_edit, 'comment', ['#comment_content'], 'xhtml'); |
---|
384 | } |
---|
385 | } |
---|
386 | |
---|
387 | dcPage::open($page_title . ' - ' . __('Entries'), |
---|
388 | dcPage::jsDatePicker() . |
---|
389 | dcPage::jsModal() . |
---|
390 | dcPage::jsMetaEditor() . |
---|
391 | $admin_post_behavior . |
---|
392 | dcPage::jsLoad('js/_post.js') . |
---|
393 | dcPage::jsConfirmClose('entry-form', 'comment-form') . |
---|
394 | # --BEHAVIOR-- adminPostHeaders |
---|
395 | $core->callBehavior('adminPostHeaders') . |
---|
396 | dcPage::jsPageTabs($default_tab) . |
---|
397 | $next_headlink . "\n" . $prev_headlink, |
---|
398 | dcPage::breadcrumb( |
---|
399 | [ |
---|
400 | html::escapeHTML($core->blog->name) => '', |
---|
401 | __('Entries') => $core->adminurl->get("admin.posts"), |
---|
402 | ($post_id ? $page_title_edit : $page_title) => '' |
---|
403 | ]) |
---|
404 | , [ |
---|
405 | 'x-frame-allow' => $core->blog->url |
---|
406 | ] |
---|
407 | ); |
---|
408 | |
---|
409 | if (!empty($_GET['upd'])) { |
---|
410 | dcPage::success(__('Entry has been successfully updated.')); |
---|
411 | } elseif (!empty($_GET['crea'])) { |
---|
412 | dcPage::success(__('Entry has been successfully created.')); |
---|
413 | } elseif (!empty($_GET['attached'])) { |
---|
414 | dcPage::success(__('File has been successfully attached.')); |
---|
415 | } elseif (!empty($_GET['rmattach'])) { |
---|
416 | dcPage::success(__('Attachment has been successfully removed.')); |
---|
417 | } |
---|
418 | |
---|
419 | if (!empty($_GET['creaco'])) { |
---|
420 | dcPage::success(__('Comment has been successfully created.')); |
---|
421 | } |
---|
422 | if (!empty($_GET['tbsent'])) { |
---|
423 | dcPage::success(__('All pings sent.')); |
---|
424 | } |
---|
425 | |
---|
426 | # XHTML conversion |
---|
427 | if (!empty($_GET['xconv'])) { |
---|
428 | $post_excerpt = $post_excerpt_xhtml; |
---|
429 | $post_content = $post_content_xhtml; |
---|
430 | $post_format = 'xhtml'; |
---|
431 | |
---|
432 | dcPage::message(__('Don\'t forget to validate your XHTML conversion by saving your post.')); |
---|
433 | } |
---|
434 | |
---|
435 | if ($post_id && $post->post_status == 1) { |
---|
436 | echo '<p><a class="onblog_link outgoing" href="' . $post->getURL() . '" title="' . html::escapeHTML($post_title) . '">' . __('Go to this entry on the site') . ' <img src="images/outgoing-link.svg" alt="" /></a></p>'; |
---|
437 | } |
---|
438 | if ($post_id) { |
---|
439 | echo '<p class="nav_prevnext">'; |
---|
440 | if ($prev_link) {echo $prev_link;} |
---|
441 | if ($next_link && $prev_link) {echo ' | ';} |
---|
442 | if ($next_link) {echo $next_link;} |
---|
443 | |
---|
444 | # --BEHAVIOR-- adminPostNavLinks |
---|
445 | $core->callBehavior('adminPostNavLinks', isset($post) ? $post : null, 'post'); |
---|
446 | |
---|
447 | echo '</p>'; |
---|
448 | } |
---|
449 | |
---|
450 | # Exit if we cannot view page |
---|
451 | if (!$can_view_page) { |
---|
452 | dcPage::helpBlock('core_post'); |
---|
453 | dcPage::close(); |
---|
454 | exit; |
---|
455 | } |
---|
456 | |
---|
457 | # Controls comments or trakbacks capabilities |
---|
458 | $isContributionAllowed = function ($id, $dt, $com = true) { |
---|
459 | global $core; |
---|
460 | |
---|
461 | if (!$id) { |
---|
462 | return true; |
---|
463 | } |
---|
464 | if ($com) { |
---|
465 | if (($core->blog->settings->system->comments_ttl == 0) || |
---|
466 | (time() - $core->blog->settings->system->comments_ttl * 86400 < $dt)) { |
---|
467 | return true; |
---|
468 | } |
---|
469 | } else { |
---|
470 | if (($core->blog->settings->system->trackbacks_ttl == 0) || |
---|
471 | (time() - $core->blog->settings->system->trackbacks_ttl * 86400 < $dt)) { |
---|
472 | return true; |
---|
473 | } |
---|
474 | } |
---|
475 | return false; |
---|
476 | }; |
---|
477 | |
---|
478 | # Show comments or trackbacks |
---|
479 | $showComments = function ($rs, $has_action, $tb = false) { |
---|
480 | global $core; |
---|
481 | echo |
---|
482 | '<div class="table-outer">' . |
---|
483 | '<table class="comments-list"><tr>' . |
---|
484 | '<th colspan="2" class="first">' . __('Author') . '</th>' . |
---|
485 | '<th>' . __('Date') . '</th>' . |
---|
486 | '<th class="nowrap">' . __('IP address') . '</th>' . |
---|
487 | '<th>' . __('Status') . '</th>' . |
---|
488 | '<th>' . __('Edit') . '</th>' . |
---|
489 | '</tr>'; |
---|
490 | $comments = []; |
---|
491 | if (isset($_REQUEST['comments'])) { |
---|
492 | foreach ($_REQUEST['comments'] as $v) { |
---|
493 | $comments[(integer) $v] = true; |
---|
494 | } |
---|
495 | } |
---|
496 | |
---|
497 | while ($rs->fetch()) { |
---|
498 | $comment_url = $core->adminurl->get("admin.comment", ['id' => $rs->comment_id]); |
---|
499 | |
---|
500 | $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; |
---|
501 | $sts_class = ''; |
---|
502 | switch ($rs->comment_status) { |
---|
503 | case 1: |
---|
504 | $img_status = sprintf($img, __('Published'), 'check-on.png'); |
---|
505 | $sts_class = 'sts-online'; |
---|
506 | break; |
---|
507 | case 0: |
---|
508 | $img_status = sprintf($img, __('Unpublished'), 'check-off.png'); |
---|
509 | $sts_class = 'sts-offline'; |
---|
510 | break; |
---|
511 | case -1: |
---|
512 | $img_status = sprintf($img, __('Pending'), 'check-wrn.png'); |
---|
513 | $sts_class = 'sts-pending'; |
---|
514 | break; |
---|
515 | case -2: |
---|
516 | $img_status = sprintf($img, __('Junk'), 'junk.png'); |
---|
517 | $sts_class = 'sts-junk'; |
---|
518 | break; |
---|
519 | } |
---|
520 | |
---|
521 | echo |
---|
522 | '<tr class="line ' . ($rs->comment_status != 1 ? ' offline ' : '') . $sts_class . '"' . |
---|
523 | ' id="c' . $rs->comment_id . '">' . |
---|
524 | |
---|
525 | '<td class="nowrap">' . |
---|
526 | ($has_action ? form::checkbox(['comments[]'], $rs->comment_id, |
---|
527 | [ |
---|
528 | 'checked' => isset($comments[$rs->comment_id]), |
---|
529 | 'extra_html' => 'title="' . ($tb ? __('select this trackback') : __('select this comment') . '"') |
---|
530 | ] |
---|
531 | ) : '') . '</td>' . |
---|
532 | '<td class="maximal">' . html::escapeHTML($rs->comment_author) . '</td>' . |
---|
533 | '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $rs->comment_dt) . '</td>' . |
---|
534 | '<td class="nowrap"><a href="' . $core->adminurl->get("admin.comments", ['ip' => $rs->comment_ip]) . '">' . $rs->comment_ip . '</a></td>' . |
---|
535 | '<td class="nowrap status">' . $img_status . '</td>' . |
---|
536 | '<td class="nowrap status"><a href="' . $comment_url . '">' . |
---|
537 | '<img src="images/edit-mini.png" alt="" title="' . __('Edit this comment') . '" /> ' . __('Edit') . '</a></td>' . |
---|
538 | |
---|
539 | '</tr>'; |
---|
540 | } |
---|
541 | |
---|
542 | echo '</table></div>'; |
---|
543 | }; |
---|
544 | |
---|
545 | /* Post form if we can edit post |
---|
546 | -------------------------------------------------------- */ |
---|
547 | if ($can_edit_post) { |
---|
548 | $sidebar_items = new ArrayObject([ |
---|
549 | 'status-box' => [ |
---|
550 | 'title' => __('Status'), |
---|
551 | 'items' => [ |
---|
552 | 'post_status' => |
---|
553 | '<p class="entry-status"><label for="post_status">' . __('Entry status') . ' ' . $img_status . '</label>' . |
---|
554 | form::combo('post_status', $status_combo, |
---|
555 | ['default' => $post_status, 'class' => 'maximal', 'disabled' => !$can_publish]) . |
---|
556 | '</p>', |
---|
557 | 'post_dt' => |
---|
558 | '<p><label for="post_dt">' . __('Publication date and hour') . '</label>' . |
---|
559 | form::field('post_dt', 16, 16, $post_dt, ($bad_dt ? 'invalid' : '')) . |
---|
560 | /* |
---|
561 | Previous line will be replaced by this one as soon as every browser will support datetime-local input type |
---|
562 | Dont forget to remove call to datepicker in post.js |
---|
563 | |
---|
564 | form::datetime('post_dt', [ |
---|
565 | 'default' => html::escapeHTML(dt::str('%Y-%m-%dT%H:%M', strtotime($post_dt))), |
---|
566 | 'class' => ($bad_dt ? 'invalid' : '') |
---|
567 | ]) . |
---|
568 | */ |
---|
569 | '</p>', |
---|
570 | 'post_lang' => |
---|
571 | '<p><label for="post_lang">' . __('Entry language') . '</label>' . |
---|
572 | form::combo('post_lang', $lang_combo, $post_lang) . |
---|
573 | '</p>', |
---|
574 | 'post_format' => |
---|
575 | '<div>' . |
---|
576 | '<h5 id="label_format"><label for="post_format" class="classic">' . __('Text formatting') . '</label></h5>' . |
---|
577 | '<p>' . form::combo('post_format', $available_formats, $post_format, 'maximal') . '</p>' . |
---|
578 | '<p class="format_control control_no_xhtml">' . |
---|
579 | '<a id="convert-xhtml" class="button' . ($post_id && $post_format != 'wiki' ? ' hide' : '') . '" href="' . |
---|
580 | $core->adminurl->get('admin.post', ['id' => $post_id, 'xconv' => '1']) . |
---|
581 | '">' . |
---|
582 | __('Convert to XHTML') . '</a></p></div>']], |
---|
583 | 'metas-box' => [ |
---|
584 | 'title' => __('Filing'), |
---|
585 | 'items' => [ |
---|
586 | 'post_selected' => |
---|
587 | '<p><label for="post_selected" class="classic">' . |
---|
588 | form::checkbox('post_selected', 1, $post_selected) . ' ' . |
---|
589 | __('Selected entry') . '</label></p>', |
---|
590 | 'cat_id' => |
---|
591 | '<div>' . |
---|
592 | '<h5 id="label_cat_id">' . __('Category') . '</h5>' . |
---|
593 | '<p><label for="cat_id">' . __('Category:') . '</label>' . |
---|
594 | form::combo('cat_id', $categories_combo, $cat_id, 'maximal') . |
---|
595 | '</p>' . |
---|
596 | ($core->auth->check('categories', $core->blog->id) ? |
---|
597 | '<div>' . |
---|
598 | '<h5 id="create_cat">' . __('Add a new category') . '</h5>' . |
---|
599 | '<p><label for="new_cat_title">' . __('Title:') . ' ' . |
---|
600 | form::field('new_cat_title', 30, 255, ['class' => 'maximal']) . '</label></p>' . |
---|
601 | '<p><label for="new_cat_parent">' . __('Parent:') . ' ' . |
---|
602 | form::combo('new_cat_parent', $categories_combo, '', 'maximal') . |
---|
603 | '</label></p>' . |
---|
604 | '</div>' |
---|
605 | : '') . |
---|
606 | '</div>']], |
---|
607 | 'options-box' => [ |
---|
608 | 'title' => __('Options'), |
---|
609 | 'items' => [ |
---|
610 | 'post_open_comment_tb' => |
---|
611 | '<div>' . |
---|
612 | '<h5 id="label_comment_tb">' . __('Comments and trackbacks list') . '</h5>' . |
---|
613 | '<p><label for="post_open_comment" class="classic">' . |
---|
614 | form::checkbox('post_open_comment', 1, $post_open_comment) . ' ' . |
---|
615 | __('Accept comments') . '</label></p>' . |
---|
616 | ($core->blog->settings->system->allow_comments ? |
---|
617 | ($isContributionAllowed($post_id, strtotime($post_dt), true) ? |
---|
618 | '' : |
---|
619 | '<p class="form-note warn">' . |
---|
620 | __('Warning: Comments are not more accepted for this entry.') . '</p>') : |
---|
621 | '<p class="form-note warn">' . |
---|
622 | __('Comments are not accepted on this blog so far.') . '</p>') . |
---|
623 | '<p><label for="post_open_tb" class="classic">' . |
---|
624 | form::checkbox('post_open_tb', 1, $post_open_tb) . ' ' . |
---|
625 | __('Accept trackbacks') . '</label></p>' . |
---|
626 | ($core->blog->settings->system->allow_trackbacks ? |
---|
627 | ($isContributionAllowed($post_id, strtotime($post_dt), false) ? |
---|
628 | '' : |
---|
629 | '<p class="form-note warn">' . |
---|
630 | __('Warning: Trackbacks are not more accepted for this entry.') . '</p>') : |
---|
631 | '<p class="form-note warn">' . __('Trackbacks are not accepted on this blog so far.') . '</p>') . |
---|
632 | '</div>', |
---|
633 | 'post_password' => |
---|
634 | '<p><label for="post_password">' . __('Password') . '</label>' . |
---|
635 | form::field('post_password', 10, 32, html::escapeHTML($post_password), 'maximal') . |
---|
636 | '</p>', |
---|
637 | 'post_url' => |
---|
638 | '<div class="lockable">' . |
---|
639 | '<p><label for="post_url">' . __('Edit basename') . '</label>' . |
---|
640 | form::field('post_url', 10, 255, html::escapeHTML($post_url), 'maximal') . |
---|
641 | '</p>' . |
---|
642 | '<p class="form-note warn">' . |
---|
643 | __('Warning: If you set the URL manually, it may conflict with another entry.') . |
---|
644 | '</p></div>' |
---|
645 | ]]]); |
---|
646 | |
---|
647 | $main_items = new ArrayObject([ |
---|
648 | "post_title" => |
---|
649 | '<p class="col">' . |
---|
650 | '<label class="required no-margin bold" for="post_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Title:') . '</label>' . |
---|
651 | form::field('post_title', 20, 255, [ |
---|
652 | 'default' => html::escapeHTML($post_title), |
---|
653 | 'class' => 'maximal', |
---|
654 | 'extra_html' => 'required placeholder="' . __('Title') . '" lang="' . $post_lang . '" spellcheck="true"' |
---|
655 | ]) . |
---|
656 | '</p>', |
---|
657 | |
---|
658 | "post_excerpt" => |
---|
659 | '<p class="area" id="excerpt-area"><label for="post_excerpt" class="bold">' . __('Excerpt:') . ' <span class="form-note">' . |
---|
660 | __('Introduction to the post.') . '</span></label> ' . |
---|
661 | form::textarea('post_excerpt', 50, 5, |
---|
662 | [ |
---|
663 | 'default' => html::escapeHTML($post_excerpt), |
---|
664 | 'extra_html' => 'lang="' . $post_lang . '" spellcheck="true"' |
---|
665 | ]) . |
---|
666 | '</p>', |
---|
667 | |
---|
668 | "post_content" => |
---|
669 | '<p class="area" id="content-area"><label class="required bold" ' . |
---|
670 | 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . |
---|
671 | form::textarea('post_content', 50, $core->auth->getOption('edit_size'), |
---|
672 | [ |
---|
673 | 'default' => html::escapeHTML($post_content), |
---|
674 | 'extra_html' => 'required placeholder="' . __('Content') . '" lang="' . $post_lang . '" spellcheck="true"' |
---|
675 | ]) . |
---|
676 | '</p>', |
---|
677 | |
---|
678 | "post_notes" => |
---|
679 | '<p class="area" id="notes-area"><label for="post_notes" class="bold">' . __('Personal notes:') . ' <span class="form-note">' . |
---|
680 | __('Unpublished notes.') . '</span></label>' . |
---|
681 | form::textarea('post_notes', 50, 5, |
---|
682 | [ |
---|
683 | 'default' => html::escapeHTML($post_notes), |
---|
684 | 'extra_html' => 'lang="' . $post_lang . '" spellcheck="true"' |
---|
685 | ]) . |
---|
686 | '</p>' |
---|
687 | ] |
---|
688 | ); |
---|
689 | |
---|
690 | # --BEHAVIOR-- adminPostFormItems |
---|
691 | $core->callBehavior('adminPostFormItems', $main_items, $sidebar_items, isset($post) ? $post : null, 'post'); |
---|
692 | |
---|
693 | echo '<div class="multi-part" title="' . ($post_id ? __('Edit entry') : __('New entry')) . |
---|
694 | sprintf(' › %s', $post_format) . '" id="edit-entry">'; |
---|
695 | echo '<form action="' . $core->adminurl->get('admin.post') . '" method="post" id="entry-form">'; |
---|
696 | echo '<div id="entry-wrapper">'; |
---|
697 | echo '<div id="entry-content"><div class="constrained">'; |
---|
698 | |
---|
699 | echo '<h3 class="out-of-screen-if-js">' . __('Edit post') . '</h3>'; |
---|
700 | |
---|
701 | foreach ($main_items as $id => $item) { |
---|
702 | echo $item; |
---|
703 | } |
---|
704 | |
---|
705 | # --BEHAVIOR-- adminPostForm (may be deprecated) |
---|
706 | $core->callBehavior('adminPostForm', isset($post) ? $post : null, 'post'); |
---|
707 | |
---|
708 | echo |
---|
709 | '<p class="border-top">' . |
---|
710 | ($post_id ? form::hidden('id', $post_id) : '') . |
---|
711 | '<input type="submit" value="' . __('Save') . ' (s)" ' . |
---|
712 | 'accesskey="s" name="save" /> '; |
---|
713 | if ($post_id) { |
---|
714 | $preview_url = |
---|
715 | $core->blog->url . $core->url->getURLFor('preview', $core->auth->userID() . '/' . |
---|
716 | http::browserUID(DC_MASTER_KEY . $core->auth->userID() . $core->auth->cryptLegacy($core->auth->userID())) . |
---|
717 | '/' . $post->post_url); |
---|
718 | echo '<a id="post-preview" href="' . $preview_url . '" class="button modal" accesskey="p">' . __('Preview') . ' (p)' . '</a>'; |
---|
719 | } else { |
---|
720 | echo |
---|
721 | '<a id="post-cancel" href="' . $core->adminurl->get("admin.home") . '" class="button" accesskey="c">' . __('Cancel') . ' (c)</a>'; |
---|
722 | } |
---|
723 | |
---|
724 | echo |
---|
725 | ($can_delete ? ' <input type="submit" class="delete" value="' . __('Delete') . '" name="delete" />' : '') . |
---|
726 | $core->formNonce() . |
---|
727 | '</p>'; |
---|
728 | |
---|
729 | echo '</div></div>'; // End #entry-content |
---|
730 | echo '</div>'; // End #entry-wrapper |
---|
731 | |
---|
732 | echo '<div id="entry-sidebar" role="complementary">'; |
---|
733 | |
---|
734 | foreach ($sidebar_items as $id => $c) { |
---|
735 | echo '<div id="' . $id . '" class="sb-box">' . |
---|
736 | '<h4>' . $c['title'] . '</h4>'; |
---|
737 | foreach ($c['items'] as $e_name => $e_content) { |
---|
738 | echo $e_content; |
---|
739 | } |
---|
740 | echo '</div>'; |
---|
741 | } |
---|
742 | |
---|
743 | # --BEHAVIOR-- adminPostFormSidebar (may be deprecated) |
---|
744 | $core->callBehavior('adminPostFormSidebar', isset($post) ? $post : null, 'post'); |
---|
745 | echo '</div>'; // End #entry-sidebar |
---|
746 | |
---|
747 | echo '</form>'; |
---|
748 | |
---|
749 | # --BEHAVIOR-- adminPostForm |
---|
750 | $core->callBehavior('adminPostAfterForm', isset($post) ? $post : null, 'post'); |
---|
751 | |
---|
752 | echo '</div>'; |
---|
753 | } |
---|
754 | |
---|
755 | if ($post_id) { |
---|
756 | /* Comments |
---|
757 | -------------------------------------------------------- */ |
---|
758 | |
---|
759 | $params = ['post_id' => $post_id, 'order' => 'comment_dt ASC']; |
---|
760 | |
---|
761 | $comments = $core->blog->getComments(array_merge($params, ['comment_trackback' => 0])); |
---|
762 | |
---|
763 | echo |
---|
764 | '<div id="comments" class="clear multi-part" title="' . __('Comments') . '">'; |
---|
765 | $combo_action = $comments_actions_page->getCombo(); |
---|
766 | $has_action = !empty($combo_action) && !$comments->isEmpty(); |
---|
767 | echo |
---|
768 | '<p class="top-add"><a class="button add" href="#comment-form">' . __('Add a comment') . '</a></p>'; |
---|
769 | |
---|
770 | if ($has_action) { |
---|
771 | echo '<form action="' . $core->adminurl->get('admin.post') . '" id="form-comments" method="post">'; |
---|
772 | } |
---|
773 | |
---|
774 | echo '<h3>' . __('Comments') . '</h3>'; |
---|
775 | if (!$comments->isEmpty()) { |
---|
776 | $showComments($comments, $has_action); |
---|
777 | } else { |
---|
778 | echo '<p>' . __('No comments') . '</p>'; |
---|
779 | } |
---|
780 | |
---|
781 | if ($has_action) { |
---|
782 | echo |
---|
783 | '<div class="two-cols">' . |
---|
784 | '<p class="col checkboxes-helpers"></p>' . |
---|
785 | |
---|
786 | '<p class="col right"><label for="action" class="classic">' . __('Selected comments action:') . '</label> ' . |
---|
787 | form::combo('action', $combo_action) . |
---|
788 | form::hidden(['section'], 'comments') . |
---|
789 | form::hidden(['id'], $post_id) . |
---|
790 | $core->formNonce() . |
---|
791 | '<input type="submit" value="' . __('ok') . '" /></p>' . |
---|
792 | '</div>' . |
---|
793 | '</form>'; |
---|
794 | } |
---|
795 | /* Add a comment |
---|
796 | -------------------------------------------------------- */ |
---|
797 | |
---|
798 | echo |
---|
799 | '<div class="fieldset clear">' . |
---|
800 | '<h3>' . __('Add a comment') . '</h3>' . |
---|
801 | |
---|
802 | '<form action="' . $core->adminurl->get("admin.comment") . '" method="post" id="comment-form">' . |
---|
803 | '<div class="constrained">' . |
---|
804 | '<p><label for="comment_author" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Name:') . '</label>' . |
---|
805 | form::field('comment_author', 30, 255, [ |
---|
806 | 'default' => html::escapeHTML($core->auth->getInfo('user_cn')), |
---|
807 | 'extra_html' => 'required placeholder="' . __('Author') . '"' |
---|
808 | ]) . |
---|
809 | '</p>' . |
---|
810 | |
---|
811 | '<p><label for="comment_email">' . __('Email:') . '</label>' . |
---|
812 | form::email('comment_email', 30, 255, html::escapeHTML($core->auth->getInfo('user_email'))) . |
---|
813 | '</p>' . |
---|
814 | |
---|
815 | '<p><label for="comment_site">' . __('Web site:') . '</label>' . |
---|
816 | form::url('comment_site', 30, 255, html::escapeHTML($core->auth->getInfo('user_url'))) . |
---|
817 | '</p>' . |
---|
818 | |
---|
819 | '<p class="area"><label for="comment_content" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . |
---|
820 | __('Comment:') . '</label> ' . |
---|
821 | form::textarea('comment_content', 50, 8, |
---|
822 | [ |
---|
823 | 'extra_html' => 'required placeholder="' . __('Comment') . '" lang="' . $core->auth->getInfo('user_lang') . |
---|
824 | '" spellcheck="true"' |
---|
825 | ]) . |
---|
826 | '</p>' . |
---|
827 | |
---|
828 | '<p>' . |
---|
829 | form::hidden('post_id', $post_id) . |
---|
830 | $core->formNonce() . |
---|
831 | '<input type="submit" name="add" value="' . __('Save') . '" /></p>' . |
---|
832 | '</div>' . #constrained |
---|
833 | |
---|
834 | '</form>' . |
---|
835 | '</div>' . #add comment |
---|
836 | '</div>'; #comments |
---|
837 | } |
---|
838 | |
---|
839 | if ($post_id && $post_status == 1) { |
---|
840 | /* Trackbacks |
---|
841 | -------------------------------------------------------- */ |
---|
842 | |
---|
843 | $params = ['post_id' => $post_id, 'order' => 'comment_dt ASC']; |
---|
844 | $trackbacks = $core->blog->getComments(array_merge($params, ['comment_trackback' => 1])); |
---|
845 | |
---|
846 | # Actions combo box |
---|
847 | $combo_action = $comments_actions_page->getCombo(); |
---|
848 | $has_action = !empty($combo_action) && !$trackbacks->isEmpty(); |
---|
849 | |
---|
850 | if (!empty($_GET['tb_auto'])) { |
---|
851 | $tb_urls = implode("\n", $TB->discover($post_excerpt_xhtml . ' ' . $post_content_xhtml)); |
---|
852 | } |
---|
853 | |
---|
854 | # Display tab |
---|
855 | echo |
---|
856 | '<div id="trackbacks" class="clear multi-part" title="' . __('Trackbacks') . '">'; |
---|
857 | |
---|
858 | # tracbacks actions |
---|
859 | if ($has_action) { |
---|
860 | echo '<form action="' . $core->adminurl->get("admin.post") . '" id="form-trackbacks" method="post">'; |
---|
861 | } |
---|
862 | |
---|
863 | echo '<h3>' . __('Trackbacks received') . '</h3>'; |
---|
864 | |
---|
865 | if (!$trackbacks->isEmpty()) { |
---|
866 | $showComments($trackbacks, $has_action, true); |
---|
867 | } else { |
---|
868 | echo '<p>' . __('No trackback') . '</p>'; |
---|
869 | } |
---|
870 | |
---|
871 | if ($has_action) { |
---|
872 | echo |
---|
873 | '<div class="two-cols">' . |
---|
874 | '<p class="col checkboxes-helpers"></p>' . |
---|
875 | |
---|
876 | '<p class="col right"><label for="action" class="classic">' . __('Selected trackbacks action:') . '</label> ' . |
---|
877 | form::combo('action', $combo_action) . |
---|
878 | form::hidden('id', $post_id) . |
---|
879 | form::hidden(['section'], 'trackbacks') . |
---|
880 | $core->formNonce() . |
---|
881 | '<input type="submit" value="' . __('ok') . '" /></p>' . |
---|
882 | '</div>' . |
---|
883 | '</form>'; |
---|
884 | } |
---|
885 | |
---|
886 | /* Add trackbacks |
---|
887 | -------------------------------------------------------- */ |
---|
888 | if ($can_edit_post && $post->post_status) { |
---|
889 | echo |
---|
890 | '<div class="fieldset clear">'; |
---|
891 | |
---|
892 | echo |
---|
893 | '<h3>' . __('Ping blogs') . '</h3>' . |
---|
894 | '<form action="' . $core->adminurl->get("admin.post", ['id' => $post_id]) . '" id="trackback-form" method="post">' . |
---|
895 | '<p><label for="tb_urls" class="area">' . __('URLs to ping:') . '</label>' . |
---|
896 | form::textarea('tb_urls', 60, 5, $tb_urls) . |
---|
897 | '</p>' . |
---|
898 | |
---|
899 | '<p><label for="tb_excerpt" class="area">' . __('Excerpt to send:') . '</label>' . |
---|
900 | form::textarea('tb_excerpt', 60, 5, $tb_excerpt) . '</p>' . |
---|
901 | |
---|
902 | '<p>' . |
---|
903 | $core->formNonce() . |
---|
904 | '<input type="submit" name="ping" value="' . __('Ping blogs') . '" />' . |
---|
905 | (empty($_GET['tb_auto']) ? |
---|
906 | ' <a class="button" href="' . |
---|
907 | $core->adminurl->get("admin.post", ['id' => $post_id, 'tb_auto' => 1, 'tb' => 1]) . |
---|
908 | '">' . __('Auto discover ping URLs') . '</a>' |
---|
909 | : '') . |
---|
910 | '</p>' . |
---|
911 | '</form>'; |
---|
912 | |
---|
913 | $pings = $TB->getPostPings($post_id); |
---|
914 | |
---|
915 | if (!$pings->isEmpty()) { |
---|
916 | echo '<h3>' . __('Previously sent pings') . '</h3>'; |
---|
917 | |
---|
918 | echo '<ul class="nice">'; |
---|
919 | while ($pings->fetch()) { |
---|
920 | echo |
---|
921 | '<li>' . dt::dt2str(__('%Y-%m-%d %H:%M'), $pings->ping_dt) . ' - ' . |
---|
922 | $pings->ping_url . '</li>'; |
---|
923 | } |
---|
924 | echo '</ul>'; |
---|
925 | } |
---|
926 | |
---|
927 | echo '</div>'; |
---|
928 | } |
---|
929 | |
---|
930 | echo '</div>'; #trackbacks |
---|
931 | } |
---|
932 | |
---|
933 | dcPage::helpBlock('core_post', 'core_trackbacks', 'core_wiki'); |
---|
934 | dcPage::close(); |
---|