Changeset 2043
- Timestamp:
- 02/07/10 12:54:48 (14 years ago)
- Location:
- plugins/tinyMce
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/tinyMce/_admin.php
r2026 r2043 22 22 if (!defined('DC_CONTEXT_ADMIN')) {exit;} 23 23 24 # replace default page 25 //$core->setPostType('post','plugin.php?p=tinyMce&id=%d',$core->url->getBase('post').'/%s'); 26 27 $core->addBehavior('adminPostHeaders', 28 array('tinyMceAdmin','postHeaders')); 29 24 # post 30 25 $core->addBehavior('adminPostNavLinks', 31 26 array('tinyMceAdmin','adminPostNavLinks')); 27 28 # page 29 30 $core->addBehavior('adminPageNavLinks', 31 array('tinyMceAdmin','adminPageNavLinks')); 32 32 33 33 class tinyMceAdmin 34 34 { 35 public static function postHeaders()36 {37 global $core;38 39 return;40 return41 '<script type="text/javascript">'."\n".42 "//<![CDATA[\n".43 dcPage::jsVar('dotclear.msg.confirm_tinyMce',44 __('Are you sure you want to convert this post to XHTML?')).45 '$(function() {'.46 '$("#tinyMce").click(function() {'.47 'return window.confirm(dotclear.msg.confirm_tinyMce);'.48 '});'.49 '});'.50 "\n//]]>\n".51 "</script>\n";52 }53 54 35 public static function adminPostNavLinks($post) 55 36 { … … 59 40 60 41 echo('<p>'. 61 '<a href="plugin.php?p=tinyMce&id='.$post->post_id.'"'. 42 '<a href="plugin.php?p=tinyMce&type=post&id='.$post->post_id.'"'. 43 ' class="button" id="tinyMce">'.__('Edit this post with TinyMCE').'</a>'. 44 '</p>'); 45 } 46 47 public static function adminPageNavLinks($post) 48 { 49 # don't display anything if this is a new page 50 $post_title = $post->post_title; 51 if (!isset($post_title)) {return;} 52 53 echo('<p>'. 54 '<a href="plugin.php?p=tinyMce&type=page&id='.$post->post_id.'"'. 62 55 ' class="button" id="tinyMce">'.__('Edit this post with TinyMCE').'</a>'. 63 56 '</p>'); -
plugins/tinyMce/_define.php
r2033 r2043 26 26 /* Description */ 'TinyMCE editor', 27 27 /* Author */ 'Moe (http://gniark.net/)', 28 /* Version */ '0. 1.1',28 /* Version */ '0.2', 29 29 /* Permissions */ 'usage,contentadmin' 30 30 ); -
plugins/tinyMce/admin/post.php
r2033 r2043 86 86 $core->error->add(__('This entry format is not XHTML.').' '. 87 87 __('You have to convert this entry to XHTML format to use TinyMCE, this operation cannot be undone.').' '. 88 '<a href=" plugin.php?p=tinyMce&id='.$post_id.'&xconv=1" '.88 '<a href="'.$p_url.'&id='.$post_id.'&xconv=1" '. 89 89 'id="tinyMce-convert" class="button">'. 90 90 __('Convert this post to XHTML format').'</a> '. -
plugins/tinyMce/index.php
r2026 r2043 40 40 else 41 41 { 42 require_once(dirname(__FILE__).'/admin/post.php'); 42 if (isset($_GET['type']) && ($_GET['type'] == 'page')) 43 { 44 require_once(dirname(__FILE__).'/admin/page.php'); 45 } 46 else 47 { 48 require_once(dirname(__FILE__).'/admin/post.php'); 49 } 43 50 } 44 51
Note: See TracChangeset
for help on using the changeset viewer.