1 | <?php |
---|
2 | # ***** BEGIN LICENSE BLOCK ***** |
---|
3 | # |
---|
4 | # This file is part of Bloc-Notes. |
---|
5 | # Copyright 2008 Moe (http://gniark.net/) |
---|
6 | # |
---|
7 | # Bloc-Notes is free software; you can redistribute it and/or modify |
---|
8 | # it under the terms of the GNU General Public License as published by |
---|
9 | # the Free Software Foundation; either version 3 of the License, or |
---|
10 | # (at your option) any later version. |
---|
11 | # |
---|
12 | # Bloc-Notes is distributed in the hope that it will be useful, |
---|
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | # GNU General Public License for more details. |
---|
16 | # |
---|
17 | # You should have received a copy of the GNU General Public License |
---|
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | # |
---|
20 | # Icon (icon.png) is from Silk Icons : http://www.famfamfam.com/lab/icons/silk/ |
---|
21 | # |
---|
22 | # ***** END LICENSE BLOCK ***** |
---|
23 | |
---|
24 | class blocNotes |
---|
25 | { |
---|
26 | public static function adminDashboardIcons(&$core, &$icons) |
---|
27 | { |
---|
28 | $icons['blocNotes'] = array(__('Bloc-Notes'),'plugin.php?p=blocNotes', |
---|
29 | 'index.php?pf=blocNotes/icon.png'); |
---|
30 | } |
---|
31 | |
---|
32 | public static function textarea(&$post='') |
---|
33 | { |
---|
34 | global $core; |
---|
35 | |
---|
36 | echo('<p class="area" id="blocNotes">'. |
---|
37 | '<label for="blocNotes_text">'.__('Bloc-notes :').'</label>'. |
---|
38 | form::textarea('blocNotes_text',80,20, |
---|
39 | html::escapeHTML($core->blog->settings->blocNotes_text)). |
---|
40 | '</p>'); |
---|
41 | } |
---|
42 | |
---|
43 | public static function adminPost() |
---|
44 | { |
---|
45 | global $core; |
---|
46 | |
---|
47 | if (isset($_POST['blocNotes_text'])) |
---|
48 | { |
---|
49 | $core->blog->settings->setNameSpace('blocnotes'); |
---|
50 | # Bloc-Notes' text |
---|
51 | $core->blog->settings->put('blocNotes_text', |
---|
52 | $_POST['blocNotes_text'],'text','Bloc-Notes\' text'); |
---|
53 | } |
---|
54 | } |
---|
55 | |
---|
56 | public static function adminPostHeaders() |
---|
57 | { |
---|
58 | return '<script type="text/javascript" src="index.php?pf=blocNotes/post.js">'. |
---|
59 | '</script>'."\n"; |
---|
60 | } |
---|
61 | } |
---|
62 | |
---|
63 | ?> |
---|