これは公開・サポートが停止されたプラグインのソースです
<?php /** * NP_NoLinkNoDisplay * 指定した範囲内にリンクが含まれていない場合、その部分を非表示にします。 * -------- * Copyright (C) 2006 NKJG * * This program is free 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * -------- * History : * ver.1.0 (20060420) * - 最初のリリース */ class NP_NoLinkNoDisplay extends NucleusPlugin { var $level = 0; // ====== プラグイン情報 ====== function getName(){ return 'No Link No Display'; } function getAuthor(){ return 'NKJG'; } function getURL(){ return 'http://niku.suku.name/'; } function getVersion(){ return '1.0'; } function getDescription(){ return 'A no-link-no-display plugin.'; } function supportsFeature($what) { return (int)($what == 'SqlTablePrefix'); } function doSkinVar($type, $mode) { switch ($mode) { case 'start' : if (ob_start(array($this, 'NLNDHandler'))) { $this->level++; } break; case 'end' : if ($this->level) { ob_end_flush(); $this->level--; } break; } } function NLNDHandler($string) { if (!preg_match('!<a\s!isS', $string)) { $string = ''; } return $string; } } ?>