OSDN Git Service

FIX: NP_AttachをNucleus 3.65/PHP5.4/MySQL5.5で動作するよう修正
[nucleus-jp/nucleus-plugins.git] / trunk / NP_Paint / paint / Applet_PaintBBS.php
1 <?php\r
2 // vim: tabstop=2:shiftwidth=2\r
3 \r
4 /**\r
5   * Applet_PaintBBS ($Revision: 1.46 $)\r
6   * for PaintBBSv2.22_8\r
7   * \r
8   * by hsur ( http://blog.cles.jp/np_cles )\r
9   * $Id: Applet_PaintBBS.php,v 1.46 2010/06/06 11:44:19 hsur Exp $\r
10 */\r
11 \r
12 /*\r
13   * Copyright (C) 2005-2010 CLES. All rights reserved.\r
14   *\r
15   * This program is free software; you can redistribute it and/or\r
16   * modify it under the terms of the GNU General Public License\r
17   * as published by the Free Software Foundation; either version 2\r
18   * of the License, or (at your option) any later version.\r
19   * \r
20   * This program is distributed in the hope that it will be useful,\r
21   * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
22   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
23   * GNU General Public License for more details.\r
24   * \r
25   * You should have received a copy of the GNU General Public License\r
26   * along with this program; if not, write to the Free Software\r
27   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA\r
28   * \r
29   * In addition, as a special exception, cles( http://blog.cles.jp/np_cles ) gives\r
30   * permission to link the code of this program with those files in the PEAR\r
31   * library that are licensed under the PHP License (or with modified versions\r
32   * of those files that use the same license as those files), and distribute\r
33   * linked combinations including the two. You must obey the GNU General Public\r
34   * License in all respects for all of the code used other than those files in\r
35   * the PEAR library that are licensed under the PHP License. If you modify\r
36   * this file, you may extend this exception to your version of the file,\r
37   * but you are not obligated to do so. If you do not wish to do so, delete\r
38   * this exception statement from your version.\r
39 */\r
40 \r
41 class Applet_PaintBBS extends PaintPlugin {\r
42         function getName(){\r
43                 return _PAINT_Applet_PaintBBS_name . ' ' . _PAINT_Applet;\r
44         }\r
45                 \r
46         function Applet_PaintBBS(){\r
47                 $this->id = '$Id: Applet_PaintBBS.php,v 1.46 2010/06/06 11:44:19 hsur Exp $';\r
48                 $this->name = _PAINT_Applet_PaintBBS_name;\r
49                 $this->parser = 'paintbbs';\r
50                 \r
51                 $this->magic = 'P';\r
52                 $this->animeExt = Array(\r
53                         '.pch',\r
54                 );\r
55 \r
56                 $requiredFiles = Array(\r
57                         'PaintBBS.jar'\r
58                 );\r
59                 $this->enable = $this->isFileInstalled($requiredFiles);\r
60                 \r
61                 $this->templatevars['id'] = $this->id;\r
62                 $this->templatevars['name'] = $this->name;\r
63                 $this->templatevars['parser'] = $this->parser;\r
64                 $this->templatevars['magic'] = $this->magic;\r
65         }\r
66         \r
67         function getCopyrightsPart(){\r
68                 $tpl = $this->template->fetch('copyrights', strtolower(__CLASS__));\r
69                 return $this->template->fill($tpl, $this->templatevars, false);\r
70         }\r
71         \r
72         function getPageTemplate($vars = null){\r
73                 $tpl = $this->template->fetch('pagetemplate', strtolower(__CLASS__));\r
74 \r
75                 global $CONF;\r
76                 $this->templatevars['ActionURL'] = $CONF['ActionURL'];\r
77                 $this->templatevars['PluginURL'] = $CONF['PluginURL'];\r
78                 $this->templatevars['appletBaseUrl'] = $this->appletBaseUrl;\r
79 \r
80                 $vars = array_merge((array)$vars, $this->templatevars);         \r
81                 return $this->template->fill($tpl, $vars, false);\r
82         }\r
83 }\r