Dotclear

source: plugins/blocNotes/lib.blocNotes.php @ 366

Revision 366, 1.6 KB checked in by Moe, 16 years ago (diff)

importation de blocNotes

Line 
1<?php
2# ***** BEGIN LICENSE BLOCK *****
3#
4# This file is part of Bloc-Notes.
5# Copyright 2007 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# Images are from Silk Icons : http://www.famfamfam.com/lab/icons/silk/
21#
22# ***** END LICENSE BLOCK *****
23
24class 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 adminPostForm(&$post='')
33          {
34               global $core;
35
36               echo('<div id="blocNotes">'.
37                    form::textarea('blocNotes_text',80,20,
38                    html::escapeHTML($core->blog->settings->blocNotes_text)).
39                    '</div>');
40          }
41
42          public static function adminPost()
43          {
44               global $core;
45
46               if (isset($_POST['blocNotes_text']))
47               {
48                    $core->blog->settings->setNameSpace('blocnotes');
49                    # Bloc-Notes' text
50                    $core->blog->settings->put('blocNotes_text',
51                         $_POST['blocNotes_text'],'text','Bloc-Notes\' text');
52               }
53          }
54     }
55
56?>
Note: See TracBrowser for help on using the repository browser.

Sites map