OSDN Git Service

NP_Paint v1.18
[nucleus-jp/nucleus-plugins.git] / trunk / NP_Paint / paint / Viewer_Spch.php
1 <?php\r
2 // vim: tabstop=2:shiftwidth=2\r
3 \r
4 /**\r
5   * Viewer_Spch ($Revision: 1.14 $)\r
6   * for pchview_115\r
7   * \r
8   * by hsur ( http://blog.cles.jp/np_cles )\r
9   * $Id: Viewer_Spch.php,v 1.14 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 Viewer_Spch extends PaintPlugin {\r
42         function getName(){\r
43                 return 'SPCH Viewer ' . _PAINT_Viewer_spch_desc;\r
44         }\r
45 \r
46         function Viewer_Spch(){\r
47                 $this->id = '$Id: Viewer_Spch.php,v 1.14 2010/06/06 11:44:19 hsur Exp $';\r
48                 $this->name = 'spch viewer';\r
49 \r
50                 $this->animeExt = Array(\r
51                         'spch',\r
52                         'rpch',\r
53                 );\r
54 \r
55                 $requiredFiles = Array(\r
56                         'PCHViewer.jar', \r
57                         'res/res.zip', \r
58                         'res/tt.zip',\r
59                 );\r
60                 $this->enable = $this->isFileInstalled($requiredFiles);\r
61 \r
62                 $this->templatevars['id'] = $this->id;\r
63                 $this->templatevars['name'] = $this->name;\r
64         }\r
65                 \r
66         function getPageTemplate($vars = null){\r
67                 $tpl = $this->template->fetch('pagetemplate', strtolower(__CLASS__));\r
68                 \r
69                 global $CONF;\r
70                 $this->templatevars['MediaURL'] = $CONF['MediaURL'];\r
71                 $this->templatevars['ActionURL'] = $CONF['ActionURL'];\r
72                 $this->templatevars['PluginURL'] = $CONF['PluginURL'];\r
73                 $this->templatevars['appletBaseUrl'] = $this->appletBaseUrl;\r
74                 \r
75                 $vars = array_merge((array)$vars, $this->templatevars);         \r
76                 return $this->template->fill($tpl, $vars, false);\r
77         }\r
78 }\r