OSDN Git Service

test plugin for PostAddCategory
authorkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Wed, 28 Feb 2007 09:14:25 +0000 (09:14 +0000)
committerkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Wed, 28 Feb 2007 09:14:25 +0000 (09:14 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@534 1ca29b6e-896d-4ea0-84a5-967f57386b96

trunk/NP_TestPostCategory/NP_TestPostAddCategory.php [new file with mode: 0644]
trunk/NP_TestPostCategory/readme.txt [new file with mode: 0644]

diff --git a/trunk/NP_TestPostCategory/NP_TestPostAddCategory.php b/trunk/NP_TestPostCategory/NP_TestPostAddCategory.php
new file mode 100644 (file)
index 0000000..c1544dc
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+
+class NP_TestPostAddCategory extends NucleusPlugin
+{
+   /* ==================================================================================
+       * Nucleus TestPostAddCategory Plugin
+       *
+       * Copyright 2007 by Kimitake
+       *
+       * ==================================================================================
+       * This program is free software and open source software; you can redistribute
+       * it and/or modify it under the terms of the GNU General Public License as
+       * published by the Free Software Foundation; either version 2 of the License,
+       * or (at your option) any later version.
+       *
+       * This program is distributed in the hope that it will be useful, but WITHOUT
+       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+       * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+       * more details.
+       *
+       * You should have received a copy of the GNU General Public License along
+       * with this program; if not, write to the Free Software Foundation, Inc.,
+       * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
+       * http://www.gnu.org/licenses/gpl.html
+       * ==================================================================================
+       
+   /*
+       * Changes:
+       * v0.1 kimitake         - initial version
+       */
+
+
+       function getName() { return 'TestPostAddCategory';    }
+       function getAuthor() { return 'kimitake';    }
+       function getURL() { return 'http://kimitake.blogdns.net'; }
+       function getVersion() { return '0.1'; }
+       function getDescription() { return 'TestPostAddCategory'; }
+
+       function supportsFeature($what)
+       {
+               switch($what)
+               {
+               case 'SqlTablePrefix':
+                       return 1;
+               default:
+                       return 0;
+               }
+       }
+
+       function install()
+       {
+       }
+
+       function unintall()
+       {
+       }
+
+       function getEventList() { return array('PostAddCategory'); }
+
+       function event_PostAddCategory($data)
+       {
+               define('__WEBLOG_ROOT', dirname(dirname(realpath(__FILE__))));
+               $handle = fopen(__WEBLOG_ROOT."/plugins/TestPostAddCategory.log", "w");
+
+               if ($handle)
+               {
+                       $str = print_r($data, TRUE);
+                       fputs($handle, $str);
+                       fclose($handle);
+               }
+       }
+}
+?>
diff --git a/trunk/NP_TestPostCategory/readme.txt b/trunk/NP_TestPostCategory/readme.txt
new file mode 100644 (file)
index 0000000..7802fe6
--- /dev/null
@@ -0,0 +1,10 @@
+PostAddCategory \82Ì\93®\8dì\8am\94F\97p\83v\83\89\83O\83C\83\93
+
+\8eg\82¢\95û
+\82P\81D\82±\82Ì\83v\83\89\83O\83C\83\93\82ð\83C\83\93\83X\83g\81[\83\8b\82µ\82Ä\81A\90V\8bK\83u\83\8d\83O\82ð\8dì\90¬\82·\82é\81B
+\82Q\81Eplugings \83f\83B\83\8c\83N\83g\83\8a\82É\8f\91\82«\8d\9e\82Ý\8c \8cÀ\82ª\82 \82ê\82ΠTestPostAddCategory.log \83t\83@\83C\83\8b\82ª
+\8fo\97\88\8fã\82ª\82é\82Ì\82Å\81A\82»\82Ì\92\86\90g\82ð\8am\94F\82·\82é\81B
+\82R\81D\93Á\82É\8cã\94¼\95\94\95ª\82Ì name, description \82¨\82æ\82Ñ catid \82Ì\92l\82ð\8am\94F\82·\82é\81B
+
+Document End
+Kimitake 2/28, 2007