Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 530

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-includes/theme.php on line 623

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/custom_posts/custom_posts.php on line 22

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 46

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 67

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 75

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 92

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiRender.php on line 70

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 181

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 538

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 695

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 1087

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112
おれせか

おれせか

なんかそれっぽいのをうにうに。

まずは『modPukiWkiで複数行の引数を渡せるようにする』のまま修正。

なんかエラーが出る・・・なんぞこれ。
ちょっと下記のようにイジイジしてみたらとりあえずエラー無くなった。

  • %inst-dir%/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php
//▼ここから▼
/*
if (preg_match("/^\#([^\(]+)(?:\((.*)\))?/", $text, $out) || ! PukiWikiPlugin::exist_plugin_convert($out[1])) {
    return new PukiWikiDiv($out);
}
 */
//▲ここまでを▲
// 以下のように修正
if (preg_match("/^\#([^\(]+)(?:\((.*)\))?/", $text, $out) || ! PukiWikiPlugin::exist_plugin_convert($out[1])) {
    return new PukiWikiParagraph($text);
} else {
    return new PukiWikiDiv($out);
} 

でも、なんかおかしい。つーか元から入ってるpukiwikiプラグインも動作してない。
そもそもPukiwiki.ini.phpに書いたはずの「PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK」がどうも定義されてないっぺー。
というわけで色々見たかんじどうもini読み込んでないぽってことでちょっとイジイジ。

  • %inst-dir%/wp-content/plugins/modPukiWiki/PukiWiki.php
//▼ここから▼
/*
//環境定義ファイルの読込
if (file_exists('PukiWiki.ini.php')) {
    include('PukiWiki.ini.php');
} else if (file_exists('PukiWiki.ini.dist.php')) {
    include('PukiWiki.ini.dist.php');
}
 */
//▲ここまでを▲
// 以下のように修正
//環境定義ファイルの読込
if (file_exists(dirname(__FILE__) . '/PukiWiki.ini.php')) {
    include('PukiWiki.ini.php');
} else if (file_exists(dirname(__FILE__) . '/PukiWiki.ini.dist.php')) {
    include('PukiWiki.ini.dist.php');
} 

これでオッケー。

というわけで、さっきでっちあげたコード書く用のpukiwikiプラグインを

 #code(php)
      ほげほげ
 #code(end)

てな形から

 #code(php){{
     ほげほげ
 }}

に変更した。

PAGETOP
  • %inst-dir%/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php

class PukiWikiHeading{~}のfunction PukiWikiHeading(){~}の中。

 /* ▼08/10/25 ichi 変更▼
 *************************************************/
//$this->level  = min(6, strspn($text, '*'));
$min_level = is_single() ? 1 : 2;
$this->level  = min(6, strspn($text, '*') + $min_level);
/*************************************************/ 

あとタグにつくclassやらも変更。
同クラス内のtoString(){~}内。

 /* ▼08/10/25 ichi 変更▼
 *************************************************/
//return $this->msg_top . $this->wrap(parent::toString(), 'h' . $this->level, " id=\"{$this->id}\" class=\"".PukiWikiConfig::getParam('style_prefix')."head\"");
return $this->wrap(parent::toString(), 'h' . $this->level, ' class="contentsTitle"');
/*************************************************/ 

ついでにpukiwiki記法でのコメントアウトを「//」だとコード内のコメントアウトとよくかぶるので、「##」に変えた。

 /* ▼08/10/25 ichi 変更▼
 *************************************************/
// Escape comments
//if (substr($line, 0, 2) == '//') continue;
if (substr($line, 0, 2) == '##') continue;
/*************************************************/ 

あと「 」(半角スペース)から開始の行がpre扱いになるのが鬱陶しくてしかたなかったので以下の部分を削除。

// Pre
if ($head == ' ' || $head == "\t") {
    $this->last = & $this->last->add(new PukiWikiPre($this,$line));
    continue;
} 

このままだとpreがpukiwiki記法で書けないので、それっぽいpukiwikiプラグイン適当にでっちあげて使用中。

PAGETOP

WordPressでpukiwiki記法を参考にしてWordPressでpukiwiki記法を使えるようにしたんだけど、pukiwiki.phpをEternal Betaさんのとこのもので上書きして、設定の『WP_PLUGIN_PUKIWIKI_RENDER_ALL』の値を『1』にしたらどうもnowikiが入ってないとpukiwiki記法として認識されない様子。

基本pukiwiki記法で書きたくて、毎回pukiwikiやらnowikiって書くのもアホらしーのでソースを修正。

if ( strstr($text, $OpenTag) === FALSE) {
    return $text;
} else { 

となっているところを、

if ( strstr($text, $OpenTag) === FALSE) {
    //Re-conver <!-- more -->
    $text = preg_replace("/\s*<a href=\"(.*?)#more-(.*?)\" class=\"more-link\">(.*?)<\/a>/","\n\n[[\\3>\\1#more-\\2]]",$text);
    $text = preg_replace("/\s*<span id=\"more-(.*?)\"><\/span>/","\n\n&aname(more-\\1);",$text);

    $render = &new PukiWikiRender('wordpress');
    $retstr = $render->transform($text);
    unset($render);
    return $retstr;
} else { 

と修正。

てか、元のpukiwiki.phpの内容をコピペってちょっと正規表現修正しただけなんじゃけどね。


あと、wordpress側と重複してstripslashesしてる部分があったので削除

function pukiwiki($text) {
/* ▼08/10/24 ichi 削除▼
 *************************************************/
    //$text = stripslashes($text);
/*************************************************/ 
PAGETOP

Search