Dotclear

source: plugins/tinyMce/_admin.php @ 2107

Revision 2107, 1.7 KB checked in by Moe, 14 years ago (diff)

TinyMCE 0.2.2 :

  • removed broken buttons (see #411)
  • Property svn:executable set to *
Line 
1<?php 
2# ***** BEGIN LICENSE BLOCK *****
3#
4# This file is part of TinyMCE, a plugin for Dotclear 2
5# Copyright 2010 Moe (http://gniark.net/)
6#
7# TinyMCE is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public License v2.0
9# as published by the Free Software Foundation.
10#
11# TinyMCE is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public
17# License along with this program. If not, see
18# <http://www.gnu.org/licenses/>.
19#
20# ***** END LICENSE BLOCK *****
21
22if (!defined('DC_CONTEXT_ADMIN')) {exit;}
23
24# post
25$core->addBehavior('adminPostNavLinks',
26     array('tinyMceAdmin','adminPostNavLinks'));
27
28# page
29$core->addBehavior('adminPageNavLinks',
30     array('tinyMceAdmin','adminPageNavLinks'));
31 
32class tinyMceAdmin
33{
34     public static function adminPostNavLinks($post)
35     {
36          # don't display anything if this is a new post
37          $post_title = $post->post_title;
38          if (!isset($post_title)) {return;}
39 
40          echo('<p>'.
41               '<a href="plugin.php?p=tinyMce&amp;type=post&amp;id='.$post->post_id.'"'.
42               ' class="button" id="tinyMce">'.__('Edit this post with TinyMCE').'</a>'.
43               '</p>');
44     }
45     
46     public static function adminPageNavLinks($post)
47     {
48          # don't display anything if this is a new page
49          $post_title = $post->post_title;
50          if (!isset($post_title)) {return;}
51 
52          echo('<p>'.
53               '<a href="plugin.php?p=tinyMce&amp;type=page&amp;id='.$post->post_id.'"'.
54               ' class="button" id="tinyMce">'.__('Edit this post with TinyMCE').'</a>'.
55               '</p>');
56     }
57}
58
59?>
Note: See TracBrowser for help on using the repository browser.

Sites map