OSDN Git Service

Added stationary plugin. This is just a stationary
authorhenoheno <henoheno>
Tue, 8 Feb 2005 14:15:14 +0000 (23:15 +0900)
committerhenoheno <henoheno>
Tue, 8 Feb 2005 14:15:14 +0000 (23:15 +0900)
plugin/stationary.inc.php

index 5ea684c..873b997 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: stationary.inc.php,v 1.1 2005/02/08 14:04:05 henoheno Exp $
+// $Id: stationary.inc.php,v 1.2 2005/02/08 14:15:14 henoheno Exp $
 //
 // Stationary plugin
 // License: The same as PukiWiki
@@ -9,22 +9,36 @@ define('PLUGIN_STATIONARY_MAX', 10);
 
 function plugin_stationary_init()
 {
+       if (PKWK_SAFE_MODE || PKWK_READONLY) return; // Do nothing
 
 }
 
 function plugin_stationary_convert()
 {
-       return '#stationary()' . '</br>' ."\n";
+       if (PKWK_SAFE_MODE || PKWK_READONLY) return ''; // Show nothing
+
+       $result = '#stationary()';
+
+       return htmlspecialchars($result) . '<br/>';
 }
 
 function plugin_stationary_inline()
 {
-       return '&stationary();';
+       if (PKWK_SAFE_MODE || PKWK_READONLY) return ''; // Show nothing
+
+       $result = '&stationary(){};';
+
+       return htmlspecialchars($result);
 }
 
 function plugin_stationary_action()
 {
-       die_message('stationary');
-}
+       if (PKWK_SAFE_MODE || PKWK_READONLY)
+               die_message('PKWK_SAFE_MODE or PKWK_READONLY prohibits this');
+
+       $msg  = 'Message';
+       $body = 'Message body';
 
+       return array('msg'=>htmlspecialchars($msg), 'body'=>htmlspecialchars($body));
+}
 ?>