plugins:itemdate:itemdate_code

NP_ItemDate.phpのソースコード

<?php 
 
class NP_ItemDate extends NucleusPlugin { 
 
   function getEventList() { return array(); } 
   function getName() { return 'ItemDate'; } 
   function getAuthor()  { return 'Andy'; } 
   function getURL()  { return 'http"//lab.matsubarafamily.com/'; } 
   function getVersion() { return '0.1'; } 
   function getDescription() { 
      return  'This plugin shows the date the item in the item skin.'; 
   } 
 
   function doSkinVar($skinType, $format) { 
      global $itemid, $manager, $blog; 
      switch ($skinType) { 
      case 'item' : 
         $item =& $manager->getItem($itemid,'',''); 
         if (strpos($format, '%') === FALSE) { 
            $defaultFormat = ''; 
         } else { 
            $defaultFormat = $format; 
            $format = ''; 
         } 
         $time = strtotime($item['itime']); 
         echo formatDate($format, $time , $defaultFormat, &$blog); 
      } 
   } 
 
} 
?>
 
plugins/itemdate/itemdate_code.txt · 最終更新: 2011/03/23 21:28 (外部編集)