From 8372469cbe000b82120da231d9faa000b582e44d Mon Sep 17 00:00:00 2001 From: shizuki Date: Tue, 3 Feb 2009 00:38:52 +0000 Subject: [PATCH] git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@844 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- NP_FootNote/NP_FootNote.php | 167 -------------------------------------------- 1 file changed, 167 deletions(-) delete mode 100644 NP_FootNote/NP_FootNote.php diff --git a/NP_FootNote/NP_FootNote.php b/NP_FootNote/NP_FootNote.php deleted file mode 100644 index 39d6a4a..0000000 --- a/NP_FootNote/NP_FootNote.php +++ /dev/null @@ -1,167 +0,0 @@ -createOption('CreateTitle', _CLT_TITLE, 'yesno', 'yes'); - $this->createOption('Split', _NOTE_SPLT, 'yesno', 'no'); - } - - function getEventList() - { - $events = array ( - 'PreItem', - 'PreSkinParse' - ); - return $events; - } - - function init() - { - $language = ereg_replace( '[\\|/]', '', getLanguageName()); - if (file_exists($this->getDirectory() . $language . '.php')) { - include_once($this->getDirectory() . $language . '.php'); - }else { - include_once($this->getDirectory() . 'english.php'); - } - } - - function event_PreSkinParse($data) - { - $this->skinType = $data['type']; - } - - function event_PreItem($data) - { - $skinType = $this->skinType; - $this->nodeId = 0; - $this->noteList = array(); - $this->itemId = $data['item']->itemid; - $cData = array( - &$this, - 'footnote' - ); - $iBody =& $data['item']->body; - $iMore =& $data['item']->more; - $iBody = preg_replace_callback("/\(\((.*)\)\)/Us", - $cData, - $iBody); - $nsplit = $this->getOption('Split'); - if ($nsplit == 'yes' && $skinType != 'item') { - if ($footNote = implode('', $this->noteList)) { - $iBody .= ''; - } - $this->noteList = array(); - } - if ($iMore) { - $iMore = preg_replace_callback("/\(\((.*)\)\)/Us", - $cData, - $iMore); - if ($footNote = implode('', $this->noteList)) { - $iMore .= ''; - } - } elseif ($footNote = implode('', $this->noteList)) { - $iBody .= ''; - } - } - - function footnote($matches){ - global $manager; - $this->nodeId++; - $iid = intval($this->itemId); - $bid = getBlogIDFromItemID($iid); - $b =& $manager->getBlog($bid); - $bsname = $b->getShortName(); - if ($this->getOption('CreateTitle') == 'yes') { - $fNote = htmlspecialchars(strip_tags($matches[1])); - $fNote = preg_replace('/\r\n/s', '', $fNote); - $fNote = ' title="' . $fNote . '"'; - }else{ - $fNote = ''; - } - $footNoteID = $bsname . $iid . '-' . $this->nodeId; - $note = '' - . '' - . '*' . $this->nodeid - . '' - . ''; - $this->noteList[] = '
  • ' - . '' - . _NOTE_WORD . $this->nodeId - . '' - . $matches[1] - . '
  • '; - return $note; - } -} -- 2.11.0