*pukiwiki [#geed59c4] 2014/11/12にレンタルスペースであるusamimi.infoさんのPHPバージョンが5.3から5.5へアップグレードされた事により今まで使用していたpukiwiki 1.4.7が正常に動作しない為2014/11/13にpukiwiki1.5.0へアップグレード致しました。~ それに伴い当pukiwikiのプラグインの設定や本体の設定をメモ書きを・・・。 #contents **pukiwiki.ini.php [#ga76b1d3] -$script_directory_index - //$script_directory_index = 'index.php'; + $script_directory_index = 'index.php'; -$modifier - $modifier = 'anonymous'; + $modifier = 'シンプルなスクーターサイト'; -$modifierlink - $modifierlink = 'http://pukiwiki.example.com/'; + $modifierlink = 'http://www.usamimi.info/~who/'; -$defaultpage - $defaultpage = 'FrontPage'; // Top / Default page + $defaultpage = 'シンプルなスクーターサイト'; // Top / Default page -$nowikiname - $nowikiname = 0; + $nowikiname = 1; **default.ini.php [#m3b68244] -$attach_link - $attach_link = 1; + $attach_link = 0; -$related_link - $related_link = 1; + $related_link = 0; **/lib/make_link.php [#xa3da93a] -class Link_url extends Link~ 364行辺り function Link_url($start) { parent::Link($start); } function get_pattern() { $s1 = $this->start + 1; return <<<EOD (\[\[ # (1) open bracket ((?:(?!\]\]).)+) # (2) alias (?:>|:) )? ( # (3) url - (?:(?:https?|ftp|news):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+ + (?:(?:\+?https?|\+?ftp|\+?news):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+ ) (?($s1)\]\]) # close bracket EOD; 381行辺り function toString() { if (FALSE) { $rel = ''; } else { $rel = ' rel="nofollow"'; } + if (ereg("^(\+)(.*)", $this->name, $regs)) { + return '<a href="' . $regs[2] . '" target="_blank" ' . $rel . '>' . $this->alias . '</a>'; + }else{ return '<a href="' . $this->name . '"' . $rel . '>' . $this->alias . '</a>'; + } } [[PukiWiki別窓リンク:http://www.ns-lab.org/wiki/?PukiWiki%2F%E6%94%B9%E8%89%AF%2F%E5%88%A5%E7%AA%93%E3%83%AA%E3%83%B3%E3%82%AF]]参考 **/lib/file.php [#x2de2606] [[美麻wikiさんより引用:http://www.miasa.info/index.php?%C8%FE%CB%E3Wiki%A4%C7%A5%B7%A5%B9%A5%C6%A5%E0%C5%AA%A4%CB%BD%A4%C0%B5%A4%B7%A4%C6%A4%A4%A4%EB%C5%C0#offddcd4]](問題がありましたらご報告下さい。)~ // Create and write diff $oldpostdata = is_page($page) ? join('', get_source($page)) : ''; $diffdata = do_diff($oldpostdata, $postdata); + // add client info + global $now; + $referer = htmlspecialchars($_SERVER['HTTP_REFERER']); + $user_agent = htmlspecialchars($_SERVER['HTTP_USER_AGENT']); + $diffdata .= "IP:{$_SERVER['REMOTE_ADDR']} TIME:\"$now\" REFERER:\"$referer\" USER_AGENT:\"$user_agent\"\n"; file_write(DIFF_DIR, $page, $diffdata); // Create backup **/lib/init.php [#i5b3c7da] [[美麻wikiさんより引用:http://www.miasa.info/index.php?%C8%FE%CB%E3Wiki%A4%C7%A5%B7%A5%B9%A5%C6%A5%E0%C5%AA%A4%CB%BD%A4%C0%B5%A4%B7%A4%C6%A4%A4%A4%EB%C5%C0#offddcd4]](問題がありましたらご報告下さい。)~ $user_agent = $matches = array(); $user_agent['agent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; -unset(${$ua}, $_SERVER[$ua], $HTTP_SERVER_VARS[$ua], $ua); // safety +//unset(${$ua}, $_SERVER[$ua], $HTTP_SERVER_VARS[$ua], $ua); // safety foreach ($agents as $agent) { if (preg_match($agent['pattern'], $user_agent['agent'], $matches)) { break; } } -unset($agents, $matches); +//unset($agents, $matches); // Profile-related init and setting define('UA_PROFILE', isset($user_agent['profile']) ? $user_agent['profile'] : ''); **/skin/pukiwiki.skin.php [#qb727896] -SKIN_DEFAULT_DISABLE_TOPICPATH if (! defined('SKIN_DEFAULT_DISABLE_TOPICPATH')) - define('SKIN_DEFAULT_DISABLE_TOPICPATH', 1); // 1, 0 + define('SKIN_DEFAULT_DISABLE_TOPICPATH', 0); // 1, 0 -SKIN_DEFAULT_DISABLE_TOPICPATH~ プラグインs.inc.php導入により加筆修正 <?php if ($is_page) { ?> <?php if(SKIN_DEFAULT_DISABLE_TOPICPATH) { ?> <a href="<?php echo $link['reload'] ?>"><span class="small"><?php echo $link['reload'] ?></span></a> <?php } else { ?> <span class="small"> - <?php require_once(PLUGIN_DIR . 'topicpath.inc.php'); echo plugin_topicpath_inline(); ?> + <?php require_once(PLUGIN_DIR . 'topicpath.inc.php'); echo plugin_topicpath_inline(); ?><br> + <?php require_once(PLUGIN_DIR . 's.inc.php'); echo plugin_s_convert_get_short_link(); ?> </span> <?php } ?> <?php } ?> **/plugin/ [#q7f63ad3] ***s.inc.php [#gd6986b7] 導入~ ***number.inc.php [#td450ddc] 導入~ ***topicpath.inc.php [#yb15bf4b] -38行目 - if ($page == '' || $page == $defaultpage) return ''; + if ($page == '' || $page == $defaultpage) return PLUGIN_TOPICPATH_TOP_LABEL ." /"; -PLUGIN_TOPICPATH_TOP_DISPLAY - $topic_path[] = make_pagelink($defaultpage, PLUGIN_TOPICPATH_TOP_LABEL); + $topic_path[] = '<a href="' . $script . '">' . PLUGIN_TOPICPATH_TOP_LABEL . '</a>'; IP:27.141.48.105 TIME:"2015-03-14 (土) 18:38:37" REFERER:"http://www.usamimi.info/~who/" USER_AGENT:"Mozilla/5.0 (Windows NT 5.1; rv:36.0) Gecko/20100101 Firefox/36.0"