PukiWiki に関する情報

ちょっとはまったこと

このサイトに導入したプラグイン

  • コード色分け表示
    • 以下のファイルを ./ へ
      code_highlight.kwd.php
      code_highlight.c.kwd.php
      code_highlight.css
      code_highlight.d.kwd.php
      code_highlight.inc.php
      code_highlight.java.kwd.php
    • ./convert_html.php に「# added」の行を追加
      require_once "code_highlight.inc.php";	# added
      
      function convert_html($lines)
      {
      	global $script,$vars,$digest;
      	static $contents_id = 0;
      	
      	if (!is_array($lines))
      	{
      		$lines = explode("\n",$lines);
      	}
      	
      	$digest = md5(join('',get_source($vars['page'])));
      
      	$highlight = new CodeHighlight;		# added
      	$lines = $highlight->parser($lines);	# added
      	
      	$body = new Body(++$contents_id);
      	$body->parse($lines);
      	$ret = $body->toString();
      	
      	$ret = $highlight->replacer($ret);		# added
      
      	return $ret;
      }
    • ./skin/default.ja.css に以下の行を追加。
      @import "../code_highlight.css";

関連情報


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2010-02-27 (土) 14:20:02 (5173d)