Dotclear

source: plugins/wikiTables/_admin.php @ 1218

Revision 1218, 1.5 KB checked in by Moe, 14 years ago (diff)

added Wiki Tables plugin (closes #197)

Line 
1<?php
2# ***** BEGIN LICENSE BLOCK *****
3#
4# This file is part of Wiki Tables, a plugin for Dotclear 2
5# Copyright (C) 2009 Moe (http://gniark.net/)
6#
7# Wiki Tables 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# Wiki Tables 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 License
17# along with this program; if not, write to the Free Software Foundation,
18# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19#
20# Icon (icon.png) is from Silk Icons :
21# http://www.famfamfam.com/lab/icons/silk/
22#
23# ***** END LICENSE BLOCK *****
24
25if (!defined('DC_CONTEXT_ADMIN')) {return;}
26
27$core->addBehavior('adminPostHeaders',
28     array('wikiTablesAdmin','postHeaders'));
29
30# modified from the YASH plugin
31$core->addBehavior('coreInitWikiPost',
32     array('wikiTablesAdmin','coreInitWikiPost'));
33
34class wikiTablesAdmin
35{
36     public static function coreInitWikiPost(&$wiki2xhtml)
37     {
38          $wiki2xhtml->registerFunction('macro:table',
39               array('wikiTables','transform'));
40     }
41     
42     # /modified from the YASH plugin
43     
44     public static function postHeaders()
45     {
46          return('<script type="text/javascript" '.
47               'src="index.php?pf=wikiTables/js/post.js"></script>');
48     }
49}
50
51?>
Note: See TracBrowser for help on using the repository browser.

Sites map