OSDN Git Service

NP_Paint v1.18
[nucleus-jp/nucleus-plugins.git] / trunk / NP_Paint / paint / Applet_Shipainterpro.php
1 <?php\r
2 // vim: tabstop=2:shiftwidth=2\r
3 \r
4 /**\r
5   * Applet_Shipainterpro.php ($Revision: 1.43 $)\r
6   * for Oekaki Shi-Painter Ver1.081\r
7   * \r
8   * by hsur ( http://blog.cles.jp/np_cles )\r
9   * $Id: Applet_Shipainterpro.php,v 1.43 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_Shipainterpro extends PaintPlugin {\r
42         function getName(){\r
43                 return _PAINT_Applet_Shipainterpro_name . ' ' . _PAINT_Applet;\r
44         }\r
45         \r
46         function Applet_Shipainterpro(){\r
47                 $this->id = '$Id: Applet_Shipainterpro.php,v 1.43 2010/06/06 11:44:19 hsur Exp $';\r
48                 $this->name = _PAINT_Applet_Shipainterpro_name;\r
49                 $this->parser = 'paintbbs';\r
50                 \r
51                 $this->magic = 'R';\r
52                 $this->animeExt = Array(\r
53                         '.rpch',\r
54                 );\r
55 \r
56                 $requiredFiles = Array(\r
57                         'spainter.jar',\r
58                         'sp.js',\r
59                         'res/pro.zip', \r
60                         'res/tt.zip',\r
61                         'res/res_pro.zip',\r
62                 );\r
63                 $this->enable = $this->isFileInstalled($requiredFiles);\r
64                 \r
65                 $this->templatevars['id'] = $this->id;\r
66                 $this->templatevars['name'] = $this->name;\r
67                 $this->templatevars['parser'] = $this->parser;\r
68                 $this->templatevars['magic'] = $this->magic;\r
69         }\r
70 \r
71         function getCopyrightsPart(){\r
72                 $tpl = $this->template->fetch('copyrights', strtolower(__CLASS__));\r
73                 return $this->template->fill($tpl, $this->templatevars, false);\r
74         }\r
75                 \r
76         function getPageTemplate($vars = null){\r
77                 $tpl = $this->template->fetch('pagetemplate', strtolower(__CLASS__));\r
78 \r
79                 global $CONF;\r
80                 $this->templatevars['ActionURL'] = $CONF['ActionURL'];\r
81                 $this->templatevars['PluginURL'] = $CONF['PluginURL'];\r
82                 $this->templatevars['appletBaseUrl'] = $this->appletBaseUrl;\r
83 \r
84                 $vars = array_merge((array)$vars, $this->templatevars);         \r
85                 return $this->template->fill($tpl, $vars, false);\r
86         }\r
87 }\r