Changeset 3710:e8d45069746a
- Timestamp:
- 02/19/18 16:54:30 (8 years ago)
- Branch:
- default
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r3703 r3710 292 292 '<p class="area"><label class="required" ' . 293 293 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . 294 form::textarea('post_content', 50, 10, '', '', '', false, 'required placeholder="' . __('Content') . '"') .294 form::textarea('post_content', 50, 10, array('extra_html' => 'required placeholder="' . __('Content') . '"')) . 295 295 '</p>' . 296 296 '<p><label for="cat_id" class="classic">' . __('Category:') . '</label> ' . -
admin/post.php
r3707 r3710 526 526 'checked' => isset($comments[$rs->comment_id]), 527 527 'extra_html' => 'title="' . ($tb ? __('select this trackback') : __('select this comment') . '"') 528 529 530 531 532 533 534 535 536 537 538 539 540 541 528 ) 529 ) : '') . '</td>' . 530 '<td class="maximal">' . html::escapeHTML($rs->comment_author) . '</td>' . 531 '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $rs->comment_dt) . '</td>' . 532 '<td class="nowrap"><a href="' . $core->adminurl->get("admin.comments", array('ip' => $rs->comment_ip)) . '">' . $rs->comment_ip . '</a></td>' . 533 '<td class="nowrap status">' . $img_status . '</td>' . 534 '<td class="nowrap status"><a href="' . $comment_url . '">' . 535 '<img src="images/edit-mini.png" alt="" title="' . __('Edit this comment') . '" /> ' . __('Edit') . '</a></td>' . 536 537 '</tr>'; 538 } 539 540 echo '</table></div>'; 541 }; 542 542 543 543 /* Post form if we can edit post 544 544 -------------------------------------------------------- */ 545 if ($can_edit_post) { 546 $sidebar_items = new ArrayObject(array( 547 'status-box' => array( 548 'title' => __('Status'), 549 'items' => array( 550 'post_status' => 551 '<p class="entry-status"><label for="post_status">' . __('Entry status') . ' ' . $img_status . '</label>' . 552 form::combo('post_status', $status_combo, 553 array('default' => $post_status, 'class' => 'maximal', 'disabled' => !$can_publish)) . 554 '</p>', 555 'post_dt' => 556 '<p><label for="post_dt">' . __('Publication date and hour') . '</label>' . 557 form::field('post_dt', 16, 16, $post_dt, ($bad_dt ? 'invalid' : '')) . 558 '</p>', 559 'post_lang' => 560 '<p><label for="post_lang">' . __('Entry language') . '</label>' . 561 form::combo('post_lang', $lang_combo, $post_lang) . 562 '</p>', 563 'post_format' => 545 if ($can_edit_post) { 546 $sidebar_items = new ArrayObject(array( 547 'status-box' => array( 548 'title' => __('Status'), 549 'items' => array( 550 'post_status' => 551 '<p class="entry-status"><label for="post_status">' . __('Entry status') . ' ' . $img_status . '</label>' . 552 form::combo('post_status', $status_combo, 553 array('default' => $post_status, 'class' => 'maximal', 'disabled' => !$can_publish)) . 554 '</p>', 555 'post_dt' => 556 '<p><label for="post_dt">' . __('Publication date and hour') . '</label>' . 557 form::field('post_dt', 16, 16, $post_dt, ($bad_dt ? 'invalid' : '')) . 558 '</p>', 559 'post_lang' => 560 '<p><label for="post_lang">' . __('Entry language') . '</label>' . 561 form::combo('post_lang', $lang_combo, $post_lang) . 562 '</p>', 563 'post_format' => 564 '<div>' . 565 '<h5 id="label_format"><label for="post_format" class="classic">' . __('Text formatting') . '</label></h5>' . 566 '<p>' . form::combo('post_format', $available_formats, $post_format, 'maximal') . '</p>' . 567 '<p class="format_control control_no_xhtml">' . 568 '<a id="convert-xhtml" class="button' . ($post_id && $post_format != 'wiki' ? ' hide' : '') . '" href="' . 569 $core->adminurl->get('admin.post', array('id' => $post_id, 'xconv' => '1')) . 570 '">' . 571 __('Convert to XHTML') . '</a></p></div>')), 572 'metas-box' => array( 573 'title' => __('Filing'), 574 'items' => array( 575 'post_selected' => 576 '<p><label for="post_selected" class="classic">' . 577 form::checkbox('post_selected', 1, $post_selected) . ' ' . 578 __('Selected entry') . '</label></p>', 579 'cat_id' => 580 '<div>' . 581 '<h5 id="label_cat_id">' . __('Category') . '</h5>' . 582 '<p><label for="cat_id">' . __('Category:') . '</label>' . 583 form::combo('cat_id', $categories_combo, $cat_id, 'maximal') . 584 '</p>' . 585 ($core->auth->check('categories', $core->blog->id) ? 564 586 '<div>' . 565 '<h5 id="label_format"><label for="post_format" class="classic">' . __('Text formatting') . '</label></h5>' . 566 '<p>' . form::combo('post_format', $available_formats, $post_format, 'maximal') . '</p>' . 567 '<p class="format_control control_no_xhtml">' . 568 '<a id="convert-xhtml" class="button' . ($post_id && $post_format != 'wiki' ? ' hide' : '') . '" href="' . 569 $core->adminurl->get('admin.post', array('id' => $post_id, 'xconv' => '1')) . 570 '">' . 571 __('Convert to XHTML') . '</a></p></div>')), 572 'metas-box' => array( 573 'title' => __('Filing'), 574 'items' => array( 575 'post_selected' => 576 '<p><label for="post_selected" class="classic">' . 577 form::checkbox('post_selected', 1, $post_selected) . ' ' . 578 __('Selected entry') . '</label></p>', 579 'cat_id' => 580 '<div>' . 581 '<h5 id="label_cat_id">' . __('Category') . '</h5>' . 582 '<p><label for="cat_id">' . __('Category:') . '</label>' . 583 form::combo('cat_id', $categories_combo, $cat_id, 'maximal') . 584 '</p>' . 585 ($core->auth->check('categories', $core->blog->id) ? 586 '<div>' . 587 '<h5 id="create_cat">' . __('Add a new category') . '</h5>' . 588 '<p><label for="new_cat_title">' . __('Title:') . ' ' . 589 form::field('new_cat_title', 30, 255, '', 'maximal') . '</label></p>' . 590 '<p><label for="new_cat_parent">' . __('Parent:') . ' ' . 591 form::combo('new_cat_parent', $categories_combo, '', 'maximal') . 592 '</label></p>' . 593 '</div>' 594 : '') . 595 '</div>')), 596 'options-box' => array( 597 'title' => __('Options'), 598 'items' => array( 599 'post_open_comment_tb' => 600 '<div>' . 601 '<h5 id="label_comment_tb">' . __('Comments and trackbacks list') . '</h5>' . 602 '<p><label for="post_open_comment" class="classic">' . 603 form::checkbox('post_open_comment', 1, $post_open_comment) . ' ' . 604 __('Accept comments') . '</label></p>' . 605 ($core->blog->settings->system->allow_comments ? 606 ($isContributionAllowed($post_id, strtotime($post_dt), true) ? 607 '' : 608 '<p class="form-note warn">' . 609 __('Warning: Comments are not more accepted for this entry.') . '</p>') : 587 '<h5 id="create_cat">' . __('Add a new category') . '</h5>' . 588 '<p><label for="new_cat_title">' . __('Title:') . ' ' . 589 form::field('new_cat_title', 30, 255, '', 'maximal') . '</label></p>' . 590 '<p><label for="new_cat_parent">' . __('Parent:') . ' ' . 591 form::combo('new_cat_parent', $categories_combo, '', 'maximal') . 592 '</label></p>' . 593 '</div>' 594 : '') . 595 '</div>')), 596 'options-box' => array( 597 'title' => __('Options'), 598 'items' => array( 599 'post_open_comment_tb' => 600 '<div>' . 601 '<h5 id="label_comment_tb">' . __('Comments and trackbacks list') . '</h5>' . 602 '<p><label for="post_open_comment" class="classic">' . 603 form::checkbox('post_open_comment', 1, $post_open_comment) . ' ' . 604 __('Accept comments') . '</label></p>' . 605 ($core->blog->settings->system->allow_comments ? 606 ($isContributionAllowed($post_id, strtotime($post_dt), true) ? 607 '' : 610 608 '<p class="form-note warn">' . 611 __('Comments are not accepted on this blog so far.') . '</p>') . 612 '<p><label for="post_open_tb" class="classic">' . 613 form::checkbox('post_open_tb', 1, $post_open_tb) . ' ' . 614 __('Accept trackbacks') . '</label></p>' . 615 ($core->blog->settings->system->allow_trackbacks ? 616 ($isContributionAllowed($post_id, strtotime($post_dt), false) ? 617 '' : 618 '<p class="form-note warn">' . 619 __('Warning: Trackbacks are not more accepted for this entry.') . '</p>') : 620 '<p class="form-note warn">' . __('Trackbacks are not accepted on this blog so far.') . '</p>') . 621 '</div>', 622 'post_password' => 623 '<p><label for="post_password">' . __('Password') . '</label>' . 624 form::field('post_password', 10, 32, html::escapeHTML($post_password), 'maximal') . 625 '</p>', 626 'post_url' => 627 '<div class="lockable">' . 628 '<p><label for="post_url">' . __('Edit basename') . '</label>' . 629 form::field('post_url', 10, 255, html::escapeHTML($post_url), 'maximal') . 630 '</p>' . 609 __('Warning: Comments are not more accepted for this entry.') . '</p>') : 631 610 '<p class="form-note warn">' . 632 __('Warning: If you set the URL manually, it may conflict with another entry.') . 633 '</p></div>' 634 )))); 635 636 $main_items = new ArrayObject(array( 637 "post_title" => 638 '<p class="col">' . 639 '<label class="required no-margin bold" for="post_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Title:') . '</label>' . 640 form::field('post_title', 20, 255, html::escapeHTML($post_title), 'maximal', '', false, 'required placeholder="' . __('Title') . '"') . 641 '</p>', 642 643 "post_excerpt" => 644 '<p class="area" id="excerpt-area"><label for="post_excerpt" class="bold">' . __('Excerpt:') . ' <span class="form-note">' . 645 __('Introduction to the post.') . '</span></label> ' . 646 form::textarea('post_excerpt', 50, 5, html::escapeHTML($post_excerpt)) . 647 '</p>', 648 649 "post_content" => 650 '<p class="area" id="content-area"><label class="required bold" ' . 651 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . 652 form::textarea('post_content', 50, $core->auth->getOption('edit_size'), html::escapeHTML($post_content), 653 '', '', false, 'required placeholder="' . __('Content') . '"') . 654 '</p>', 655 656 "post_notes" => 657 '<p class="area" id="notes-area"><label for="post_notes" class="bold">' . __('Personal notes:') . ' <span class="form-note">' . 658 __('Unpublished notes.') . '</span></label>' . 659 form::textarea('post_notes', 50, 5, html::escapeHTML($post_notes)) . 660 '</p>' 661 ) 662 ); 663 664 # --BEHAVIOR-- adminPostFormItems 665 $core->callBehavior('adminPostFormItems', $main_items, $sidebar_items, isset($post) ? $post : null, 'post'); 666 667 echo '<div class="multi-part" title="' . ($post_id ? __('Edit entry') : __('New entry')) . 668 sprintf(' › %s', $post_format) . '" id="edit-entry">'; 669 echo '<form action="' . $core->adminurl->get('admin.post') . '" method="post" id="entry-form">'; 670 echo '<div id="entry-wrapper">'; 671 echo '<div id="entry-content"><div class="constrained">'; 672 673 echo '<h3 class="out-of-screen-if-js">' . __('Edit post') . '</h3>'; 674 675 foreach ($main_items as $id => $item) { 676 echo $item; 677 } 678 679 # --BEHAVIOR-- adminPostForm (may be deprecated) 680 $core->callBehavior('adminPostForm', isset($post) ? $post : null, 'post'); 681 611 __('Comments are not accepted on this blog so far.') . '</p>') . 612 '<p><label for="post_open_tb" class="classic">' . 613 form::checkbox('post_open_tb', 1, $post_open_tb) . ' ' . 614 __('Accept trackbacks') . '</label></p>' . 615 ($core->blog->settings->system->allow_trackbacks ? 616 ($isContributionAllowed($post_id, strtotime($post_dt), false) ? 617 '' : 618 '<p class="form-note warn">' . 619 __('Warning: Trackbacks are not more accepted for this entry.') . '</p>') : 620 '<p class="form-note warn">' . __('Trackbacks are not accepted on this blog so far.') . '</p>') . 621 '</div>', 622 'post_password' => 623 '<p><label for="post_password">' . __('Password') . '</label>' . 624 form::field('post_password', 10, 32, html::escapeHTML($post_password), 'maximal') . 625 '</p>', 626 'post_url' => 627 '<div class="lockable">' . 628 '<p><label for="post_url">' . __('Edit basename') . '</label>' . 629 form::field('post_url', 10, 255, html::escapeHTML($post_url), 'maximal') . 630 '</p>' . 631 '<p class="form-note warn">' . 632 __('Warning: If you set the URL manually, it may conflict with another entry.') . 633 '</p></div>' 634 )))); 635 636 $main_items = new ArrayObject(array( 637 "post_title" => 638 '<p class="col">' . 639 '<label class="required no-margin bold" for="post_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Title:') . '</label>' . 640 form::field('post_title', 20, 255, html::escapeHTML($post_title), 'maximal', '', false, 'required placeholder="' . __('Title') . '"') . 641 '</p>', 642 643 "post_excerpt" => 644 '<p class="area" id="excerpt-area"><label for="post_excerpt" class="bold">' . __('Excerpt:') . ' <span class="form-note">' . 645 __('Introduction to the post.') . '</span></label> ' . 646 form::textarea('post_excerpt', 50, 5, html::escapeHTML($post_excerpt)) . 647 '</p>', 648 649 "post_content" => 650 '<p class="area" id="content-area"><label class="required bold" ' . 651 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . 652 form::textarea('post_content', 50, $core->auth->getOption('edit_size'), 653 array( 654 'default' => html::escapeHTML($post_content), 655 'extra_html' => 'required placeholder="' . __('Content') . '"' 656 )) . 657 '</p>', 658 659 "post_notes" => 660 '<p class="area" id="notes-area"><label for="post_notes" class="bold">' . __('Personal notes:') . ' <span class="form-note">' . 661 __('Unpublished notes.') . '</span></label>' . 662 form::textarea('post_notes', 50, 5, html::escapeHTML($post_notes)) . 663 '</p>' 664 ) 665 ); 666 667 # --BEHAVIOR-- adminPostFormItems 668 $core->callBehavior('adminPostFormItems', $main_items, $sidebar_items, isset($post) ? $post : null, 'post'); 669 670 echo '<div class="multi-part" title="' . ($post_id ? __('Edit entry') : __('New entry')) . 671 sprintf(' › %s', $post_format) . '" id="edit-entry">'; 672 echo '<form action="' . $core->adminurl->get('admin.post') . '" method="post" id="entry-form">'; 673 echo '<div id="entry-wrapper">'; 674 echo '<div id="entry-content"><div class="constrained">'; 675 676 echo '<h3 class="out-of-screen-if-js">' . __('Edit post') . '</h3>'; 677 678 foreach ($main_items as $id => $item) { 679 echo $item; 680 } 681 682 # --BEHAVIOR-- adminPostForm (may be deprecated) 683 $core->callBehavior('adminPostForm', isset($post) ? $post : null, 'post'); 684 685 echo 686 '<p class="border-top">' . 687 ($post_id ? form::hidden('id', $post_id) : '') . 688 '<input type="submit" value="' . __('Save') . ' (s)" ' . 689 'accesskey="s" name="save" /> '; 690 if ($post_id) { 691 $preview_url = 692 $core->blog->url . $core->url->getURLFor('preview', $core->auth->userID() . '/' . 693 http::browserUID(DC_MASTER_KEY . $core->auth->userID() . $core->auth->cryptLegacy($core->auth->userID())) . 694 '/' . $post->post_url); 695 echo '<a id="post-preview" href="' . $preview_url . '" class="button modal" accesskey="p">' . __('Preview') . ' (p)' . '</a>'; 696 } else { 682 697 echo 683 '<p class="border-top">' . 684 ($post_id ? form::hidden('id', $post_id) : '') . 685 '<input type="submit" value="' . __('Save') . ' (s)" ' . 686 'accesskey="s" name="save" /> '; 687 if ($post_id) { 688 $preview_url = 689 $core->blog->url . $core->url->getURLFor('preview', $core->auth->userID() . '/' . 690 http::browserUID(DC_MASTER_KEY . $core->auth->userID() . $core->auth->cryptLegacy($core->auth->userID())) . 691 '/' . $post->post_url); 692 echo '<a id="post-preview" href="' . $preview_url . '" class="button modal" accesskey="p">' . __('Preview') . ' (p)' . '</a>'; 693 } else { 694 echo 695 '<a id="post-cancel" href="' . $core->adminurl->get("admin.home") . '" class="button" accesskey="c">' . __('Cancel') . ' (c)</a>'; 696 } 697 698 '<a id="post-cancel" href="' . $core->adminurl->get("admin.home") . '" class="button" accesskey="c">' . __('Cancel') . ' (c)</a>'; 699 } 700 701 echo 702 ($can_delete ? ' <input type="submit" class="delete" value="' . __('Delete') . '" name="delete" />' : '') . 703 $core->formNonce() . 704 '</p>'; 705 706 echo '</div></div>'; // End #entry-content 707 echo '</div>'; // End #entry-wrapper 708 709 echo '<div id="entry-sidebar" role="complementary">'; 710 711 foreach ($sidebar_items as $id => $c) { 712 echo '<div id="' . $id . '" class="sb-box">' . 713 '<h4>' . $c['title'] . '</h4>'; 714 foreach ($c['items'] as $e_name => $e_content) { 715 echo $e_content; 716 } 717 echo '</div>'; 718 } 719 720 # --BEHAVIOR-- adminPostFormSidebar (may be deprecated) 721 $core->callBehavior('adminPostFormSidebar', isset($post) ? $post : null, 'post'); 722 echo '</div>'; // End #entry-sidebar 723 724 echo '</form>'; 725 726 # --BEHAVIOR-- adminPostForm 727 $core->callBehavior('adminPostAfterForm', isset($post) ? $post : null, 'post'); 728 729 echo '</div>'; 730 } 731 732 if ($post_id) { 733 /* Comments 734 -------------------------------------------------------- */ 735 736 $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC'); 737 738 $comments = $core->blog->getComments(array_merge($params, array('comment_trackback' => 0))); 739 740 echo 741 '<div id="comments" class="clear multi-part" title="' . __('Comments') . '">'; 742 $combo_action = $comments_actions_page->getCombo(); 743 $has_action = !empty($combo_action) && !$comments->isEmpty(); 744 echo 745 '<p class="top-add"><a class="button add" href="#comment-form">' . __('Add a comment') . '</a></p>'; 746 747 if ($has_action) { 748 echo '<form action="' . $core->adminurl->get('admin.post') . '" id="form-comments" method="post">'; 749 } 750 751 echo '<h3>' . __('Comments') . '</h3>'; 752 if (!$comments->isEmpty()) { 753 $showComments($comments, $has_action); 754 } else { 755 echo '<p>' . __('No comments') . '</p>'; 756 } 757 758 if ($has_action) { 698 759 echo 699 ($can_delete ? ' <input type="submit" class="delete" value="' . __('Delete') . '" name="delete" />' : '') . 760 '<div class="two-cols">' . 761 '<p class="col checkboxes-helpers"></p>' . 762 763 '<p class="col right"><label for="action" class="classic">' . __('Selected comments action:') . '</label> ' . 764 form::combo('action', $combo_action) . 765 form::hidden(array('section'), 'comments') . 766 form::hidden(array('id'), $post_id) . 700 767 $core->formNonce() . 701 '</p>'; 702 703 echo '</div></div>'; // End #entry-content 704 echo '</div>'; // End #entry-wrapper 705 706 echo '<div id="entry-sidebar" role="complementary">'; 707 708 foreach ($sidebar_items as $id => $c) { 709 echo '<div id="' . $id . '" class="sb-box">' . 710 '<h4>' . $c['title'] . '</h4>'; 711 foreach ($c['items'] as $e_name => $e_content) { 712 echo $e_content; 768 '<input type="submit" value="' . __('ok') . '" /></p>' . 769 '</div>' . 770 '</form>'; 771 } 772 /* Add a comment 773 -------------------------------------------------------- */ 774 775 echo 776 '<div class="fieldset clear">' . 777 '<h3>' . __('Add a comment') . '</h3>' . 778 779 '<form action="' . $core->adminurl->get("admin.comment") . '" method="post" id="comment-form">' . 780 '<div class="constrained">' . 781 '<p><label for="comment_author" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Name:') . '</label>' . 782 form::field('comment_author', 30, 255, html::escapeHTML($core->auth->getInfo('user_cn')), 783 '', '', false, 'required placeholder="' . __('Author') . '"') . 784 '</p>' . 785 786 '<p><label for="comment_email">' . __('Email:') . '</label>' . 787 form::field('comment_email', 30, 255, html::escapeHTML($core->auth->getInfo('user_email'))) . 788 '</p>' . 789 790 '<p><label for="comment_site">' . __('Web site:') . '</label>' . 791 form::field('comment_site', 30, 255, html::escapeHTML($core->auth->getInfo('user_url'))) . 792 '</p>' . 793 794 '<p class="area"><label for="comment_content" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . 795 __('Comment:') . '</label> ' . 796 form::textarea('comment_content', 50, 8, array('extra_html' => 'required placeholder="' . __('Comment') . '"')) . 797 '</p>' . 798 799 '<p>' . 800 form::hidden('post_id', $post_id) . 801 $core->formNonce() . 802 '<input type="submit" name="add" value="' . __('Save') . '" /></p>' . 803 '</div>' . #constrained 804 805 '</form>' . 806 '</div>' . #add comment 807 '</div>'; #comments 808 } 809 810 if ($post_id && $post_status == 1) { 811 /* Trackbacks 812 -------------------------------------------------------- */ 813 814 $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC'); 815 $trackbacks = $core->blog->getComments(array_merge($params, array('comment_trackback' => 1))); 816 817 # Actions combo box 818 $combo_action = $comments_actions_page->getCombo(); 819 $has_action = !empty($combo_action) && !$trackbacks->isEmpty(); 820 821 if (!empty($_GET['tb_auto'])) { 822 $tb_urls = implode("\n", $TB->discover($post_excerpt_xhtml . ' ' . $post_content_xhtml)); 823 } 824 825 # Display tab 826 echo 827 '<div id="trackbacks" class="clear multi-part" title="' . __('Trackbacks') . '">'; 828 829 # tracbacks actions 830 if ($has_action) { 831 echo '<form action="' . $core->adminurl->get("admin.post") . '" id="form-trackbacks" method="post">'; 832 } 833 834 echo '<h3>' . __('Trackbacks received') . '</h3>'; 835 836 if (!$trackbacks->isEmpty()) { 837 $showComments($trackbacks, $has_action, true); 838 } else { 839 echo '<p>' . __('No trackback') . '</p>'; 840 } 841 842 if ($has_action) { 843 echo 844 '<div class="two-cols">' . 845 '<p class="col checkboxes-helpers"></p>' . 846 847 '<p class="col right"><label for="action" class="classic">' . __('Selected trackbacks action:') . '</label> ' . 848 form::combo('action', $combo_action) . 849 form::hidden('id', $post_id) . 850 form::hidden(array('section'), 'trackbacks') . 851 $core->formNonce() . 852 '<input type="submit" value="' . __('ok') . '" /></p>' . 853 '</div>' . 854 '</form>'; 855 } 856 857 /* Add trackbacks 858 -------------------------------------------------------- */ 859 if ($can_edit_post && $post->post_status) { 860 echo 861 '<div class="fieldset clear">'; 862 863 echo 864 '<h3>' . __('Ping blogs') . '</h3>' . 865 '<form action="' . $core->adminurl->get("admin.post", array('id' => $post_id)) . '" id="trackback-form" method="post">' . 866 '<p><label for="tb_urls" class="area">' . __('URLs to ping:') . '</label>' . 867 form::textarea('tb_urls', 60, 5, $tb_urls) . 868 '</p>' . 869 870 '<p><label for="tb_excerpt" class="area">' . __('Excerpt to send:') . '</label>' . 871 form::textarea('tb_excerpt', 60, 5, $tb_excerpt) . '</p>' . 872 873 '<p>' . 874 $core->formNonce() . 875 '<input type="submit" name="ping" value="' . __('Ping blogs') . '" />' . 876 (empty($_GET['tb_auto']) ? 877 ' <a class="button" href="' . 878 $core->adminurl->get("admin.post", array('id' => $post_id, 'tb_auto' => 1, 'tb' => 1)) . 879 '">' . __('Auto discover ping URLs') . '</a>' 880 : '') . 881 '</p>' . 882 '</form>'; 883 884 $pings = $TB->getPostPings($post_id); 885 886 if (!$pings->isEmpty()) { 887 echo '<h3>' . __('Previously sent pings') . '</h3>'; 888 889 echo '<ul class="nice">'; 890 while ($pings->fetch()) { 891 echo 892 '<li>' . dt::dt2str(__('%Y-%m-%d %H:%M'), $pings->ping_dt) . ' - ' . 893 $pings->ping_url . '</li>'; 713 894 } 714 echo '</div>'; 715 } 716 717 # --BEHAVIOR-- adminPostFormSidebar (may be deprecated) 718 $core->callBehavior('adminPostFormSidebar', isset($post) ? $post : null, 'post'); 719 echo '</div>'; // End #entry-sidebar 720 721 echo '</form>'; 722 723 # --BEHAVIOR-- adminPostForm 724 $core->callBehavior('adminPostAfterForm', isset($post) ? $post : null, 'post'); 895 echo '</ul>'; 896 } 725 897 726 898 echo '</div>'; 727 899 } 728 900 729 if ($post_id) { 730 /* Comments 731 -------------------------------------------------------- */ 732 733 $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC'); 734 735 $comments = $core->blog->getComments(array_merge($params, array('comment_trackback' => 0))); 736 737 echo 738 '<div id="comments" class="clear multi-part" title="' . __('Comments') . '">'; 739 $combo_action = $comments_actions_page->getCombo(); 740 $has_action = !empty($combo_action) && !$comments->isEmpty(); 741 echo 742 '<p class="top-add"><a class="button add" href="#comment-form">' . __('Add a comment') . '</a></p>'; 743 744 if ($has_action) { 745 echo '<form action="' . $core->adminurl->get('admin.post') . '" id="form-comments" method="post">'; 746 } 747 748 echo '<h3>' . __('Comments') . '</h3>'; 749 if (!$comments->isEmpty()) { 750 $showComments($comments, $has_action); 751 } else { 752 echo '<p>' . __('No comments') . '</p>'; 753 } 754 755 if ($has_action) { 756 echo 757 '<div class="two-cols">' . 758 '<p class="col checkboxes-helpers"></p>' . 759 760 '<p class="col right"><label for="action" class="classic">' . __('Selected comments action:') . '</label> ' . 761 form::combo('action', $combo_action) . 762 form::hidden(array('section'), 'comments') . 763 form::hidden(array('id'), $post_id) . 764 $core->formNonce() . 765 '<input type="submit" value="' . __('ok') . '" /></p>' . 766 '</div>' . 767 '</form>'; 768 } 769 /* Add a comment 770 -------------------------------------------------------- */ 771 772 echo 773 '<div class="fieldset clear">' . 774 '<h3>' . __('Add a comment') . '</h3>' . 775 776 '<form action="' . $core->adminurl->get("admin.comment") . '" method="post" id="comment-form">' . 777 '<div class="constrained">' . 778 '<p><label for="comment_author" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Name:') . '</label>' . 779 form::field('comment_author', 30, 255, html::escapeHTML($core->auth->getInfo('user_cn')), 780 '', '', false, 'required placeholder="' . __('Author') . '"') . 781 '</p>' . 782 783 '<p><label for="comment_email">' . __('Email:') . '</label>' . 784 form::field('comment_email', 30, 255, html::escapeHTML($core->auth->getInfo('user_email'))) . 785 '</p>' . 786 787 '<p><label for="comment_site">' . __('Web site:') . '</label>' . 788 form::field('comment_site', 30, 255, html::escapeHTML($core->auth->getInfo('user_url'))) . 789 '</p>' . 790 791 '<p class="area"><label for="comment_content" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . 792 __('Comment:') . '</label> ' . 793 form::textarea('comment_content', 50, 8, '', '', '', false, 'required placeholder="' . __('Comment') . '"') . 794 '</p>' . 795 796 '<p>' . 797 form::hidden('post_id', $post_id) . 798 $core->formNonce() . 799 '<input type="submit" name="add" value="' . __('Save') . '" /></p>' . 800 '</div>' . #constrained 801 802 '</form>' . 803 '</div>' . #add comment 804 '</div>'; #comments 805 } 806 807 if ($post_id && $post_status == 1) { 808 /* Trackbacks 809 -------------------------------------------------------- */ 810 811 $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC'); 812 $trackbacks = $core->blog->getComments(array_merge($params, array('comment_trackback' => 1))); 813 814 # Actions combo box 815 $combo_action = $comments_actions_page->getCombo(); 816 $has_action = !empty($combo_action) && !$trackbacks->isEmpty(); 817 818 if (!empty($_GET['tb_auto'])) { 819 $tb_urls = implode("\n", $TB->discover($post_excerpt_xhtml . ' ' . $post_content_xhtml)); 820 } 821 822 # Display tab 823 echo 824 '<div id="trackbacks" class="clear multi-part" title="' . __('Trackbacks') . '">'; 825 826 # tracbacks actions 827 if ($has_action) { 828 echo '<form action="' . $core->adminurl->get("admin.post") . '" id="form-trackbacks" method="post">'; 829 } 830 831 echo '<h3>' . __('Trackbacks received') . '</h3>'; 832 833 if (!$trackbacks->isEmpty()) { 834 $showComments($trackbacks, $has_action, true); 835 } else { 836 echo '<p>' . __('No trackback') . '</p>'; 837 } 838 839 if ($has_action) { 840 echo 841 '<div class="two-cols">' . 842 '<p class="col checkboxes-helpers"></p>' . 843 844 '<p class="col right"><label for="action" class="classic">' . __('Selected trackbacks action:') . '</label> ' . 845 form::combo('action', $combo_action) . 846 form::hidden('id', $post_id) . 847 form::hidden(array('section'), 'trackbacks') . 848 $core->formNonce() . 849 '<input type="submit" value="' . __('ok') . '" /></p>' . 850 '</div>' . 851 '</form>'; 852 } 853 854 /* Add trackbacks 855 -------------------------------------------------------- */ 856 if ($can_edit_post && $post->post_status) { 857 echo 858 '<div class="fieldset clear">'; 859 860 echo 861 '<h3>' . __('Ping blogs') . '</h3>' . 862 '<form action="' . $core->adminurl->get("admin.post", array('id' => $post_id)) . '" id="trackback-form" method="post">' . 863 '<p><label for="tb_urls" class="area">' . __('URLs to ping:') . '</label>' . 864 form::textarea('tb_urls', 60, 5, $tb_urls) . 865 '</p>' . 866 867 '<p><label for="tb_excerpt" class="area">' . __('Excerpt to send:') . '</label>' . 868 form::textarea('tb_excerpt', 60, 5, $tb_excerpt) . '</p>' . 869 870 '<p>' . 871 $core->formNonce() . 872 '<input type="submit" name="ping" value="' . __('Ping blogs') . '" />' . 873 (empty($_GET['tb_auto']) ? 874 ' <a class="button" href="' . 875 $core->adminurl->get("admin.post", array('id' => $post_id, 'tb_auto' => 1, 'tb' => 1)) . 876 '">' . __('Auto discover ping URLs') . '</a>' 877 : '') . 878 '</p>' . 879 '</form>'; 880 881 $pings = $TB->getPostPings($post_id); 882 883 if (!$pings->isEmpty()) { 884 echo '<h3>' . __('Previously sent pings') . '</h3>'; 885 886 echo '<ul class="nice">'; 887 while ($pings->fetch()) { 888 echo 889 '<li>' . dt::dt2str(__('%Y-%m-%d %H:%M'), $pings->ping_dt) . ' - ' . 890 $pings->ping_url . '</li>'; 891 } 892 echo '</ul>'; 893 } 894 895 echo '</div>'; 896 } 897 898 echo '</div>'; #trackbacks 899 } 900 901 dcPage::helpBlock('core_post', 'core_trackbacks', 'core_wiki'); 902 dcPage::close(); 901 echo '</div>'; #trackbacks 902 } 903 904 dcPage::helpBlock('core_post', 'core_trackbacks', 'core_wiki'); 905 dcPage::close(); -
plugins/blowupConfig/index.php
r3709 r3710 422 422 '<h4 class="border-top">' . __('Additional CSS') . '</h4>' . 423 423 '<p><label for="extra_css">' . __('Any additional CSS styles (must be written using the CSS syntax):') . '</label> ' . 424 form::textarea('extra_css', 72, 5, html::escapeHTML($blowup_user['extra_css']), 'maximal', '', false, 'title="' . __('Additional CSS') . '"') . 424 form::textarea('extra_css', 72, 5, array( 425 'default' => html::escapeHTML($blowup_user['extra_css']), 426 'class' => 'maximal', 427 'extra_html' => 'title="' . __('Additional CSS') . '"' 428 )) . 425 429 '</p>' . 426 430 '</div>'; … … 442 446 '<div id="bu_export_content">' . 443 447 '<p>' . __('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.') . '</p>' . 444 '<p>' . form::textarea('export_code', 72, 5, implode('; ', $tmp_array), 'maximal', '', false, 'title="' . __('Copy this code:') . '"') . '</p>' . 448 '<p>' . form::textarea('export_code', 72, 5, array( 449 'default' => implode('; ', $tmp_array), 450 'class' => 'maximal', 451 'extra_html' => 'title="' . __('Copy this code:') . '"' 452 )) . '</p>' . 445 453 '</div>' . 446 454 '</div>'; -
plugins/pages/page.php
r3707 r3710 477 477 '<p class="area" id="content-area"><label class="required bold" ' . 478 478 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . 479 form::textarea('post_content', 50, $core->auth->getOption('edit_size'), html::escapeHTML($post_content), '', '', false, 'required placeholder="' . __('Content') . '"') . 479 form::textarea('post_content', 50, $core->auth->getOption('edit_size'), 480 array( 481 'default' => html::escapeHTML($post_content), 482 'extra_html' => 'required placeholder="' . __('Content') . '"' 483 )) . 480 484 '</p>', 481 485 … … 649 653 '<p class="area"><label for="comment_content" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . 650 654 __('Comment:') . '</label> ' . 651 form::textarea('comment_content', 50, 8, '', '', '', false, 'required placeholder="' . __('Comment') . '"') .655 form::textarea('comment_content', 50, 8, array('extra_html' => 'required placeholder="' . __('Comment') . '"')) . 652 656 '</p>' . 653 657 -
plugins/themeEditor/index.php
r3709 r3710 110 110 '<div class="fieldset"><h3>' . __('File editor') . '</h3>' . 111 111 '<p><label for="file_content">' . sprintf(__('Editing file %s'), '<strong>' . $file['f']) . '</strong></label></p>' . 112 '<p>' . form::textarea('file_content', 72, 25, html::escapeHTML($file['c']), 'maximal', '', !$file['w']) . '</p>'; 112 '<p>' . form::textarea('file_content', 72, 25, array( 113 'default' => html::escapeHTML($file['c']), 114 'class' => 'maximal', 115 'disabled' => !$file['w'] 116 )) . '</p>'; 113 117 114 118 if ($file['w']) {
Note: See TracChangeset
for help on using the changeset viewer.