OSDN Git Service

NP_Paint v1.18
[nucleus-jp/nucleus-plugins.git] / trunk / NP_Paint / paint / Palette_Selfy.php
1 <?php\r
2 // vim: tabstop=2:shiftwidth=2\r
3 \r
4 /**\r
5   * Palette_Selfy.php ($Revision: 1.17 $)\r
6   * for palette_selfy.js 2004/04/11\r
7   * \r
8   * by hsur ( http://blog.cles.jp/np_cles )\r
9   * $Id: Palette_Selfy.php,v 1.17 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 \r
42 class Palette_Selfy extends PaintPlugin {\r
43         function getName(){\r
44                 return 'palette-selfy ' . _PAINT_Palette;\r
45         }\r
46         \r
47         function Palette_Selfy(){\r
48                 $this->id = '$Id: Palette_Selfy.php,v 1.17 2010/06/06 11:44:19 hsur Exp $';\r
49                 $this->name = 'Palette-Selfy';\r
50                 \r
51                 $requiredFiles = Array('palette_selfy.js');\r
52                 $this->enable = $this->isFileInstalled($requiredFiles);\r
53         }\r
54 \r
55         function getCopyrightsPart(){\r
56         return <<<END\r
57 <a href="http://useyan.x0.com/s/cgi/relm/palette_selfy.html">Palette-Selfy</a> by <a href="http://roo.to/materia/">Snow Materia</a>\r
58 ( /w Palette_Selfy Plugin by <a href="http://blog.cles.jp">cles</a> )\r
59 <br />\r
60 END;\r
61         }\r
62         \r
63         function getHeaderPart(){\r
64         return <<<END\r
65 <script type="text/javascript" src="{$this->appletBaseUrl}palette_selfy.js" charset="shift_jis"></script>\r
66 END;\r
67         }\r
68         \r
69         function getAfterAppletPart(){\r
70         return <<<END\r
71 <div style="width: 100px;">\r
72 <script type="text/javascript" charset="shift_jis">\r
73 <!--\r
74 palette_selfy();\r
75 //-->\r
76 </script>\r
77 </div>\r
78 END;\r
79         }\r
80 }\r