Skip navigation

iG::Syntax Hiliter (Wordpress plugin)を使ってみるテスト

HTMLタグ、CODEやPREなどを使う場合に、プログラム言語ごとに色分け表示してくれて、さらに行番号を付加してくれる、便利なWordpressプラグインiG::Syntax Hiliterを使ってみるテスト。

因みに、日本語版は、MMRT daily lifeさんが配布している。
iG::Syntax Hiliter 日本語版

使ってみるテスト:

JavaScript:
  1. /***block comments
  2. **********************************/
  3.  
  4. var stringWithUrl1 = "http://2chi.fourier.jp/";
  5. var stringWithUrl2 = 'http://2chi.fourier.jp/newrss';
  6.  
  7. // callback for the match sorting
  8. dpSyntaxHighlighter.prototype.SortCallback = function(m1, m2)
  9. {
  10.     // sort matches by index first
  11.     if(m1.index <m2.index)
  12.         return -1;
  13.     else (m1.index> m2.index)
  14.         return 1;
  15. }

PHP:
  1. ob_start("parseOutputBuffer")// Start Code Buffering
  2.  
  3. function parseOutputBuffer($buf) {
  4.     global $portal_small_code, $portal_gzcompress;
  5.     global $PHP_SELF, $HTTP_ACCEPT_ENCODING;
  6.  
  7.     // cleaning out the code.
  8.     if($portal_small_code && !$portal_gzcompress) {
  9.         $buf = str_replace("    ", "", $buf);
  10.         $buf = str_replace("\n", "", $buf);
  11.         $buf = str_replace(chr(13), "", $buf);
  12.     }
  13. }

CSS:
  1. html,body{margin:0;padding:0}
  2. body{font: 76% arial,sans-serif;text-align:center}
  3. p{margin:0 10px 10px}
  4. #navigation{background:#B9CAFF}
  5. #extra{background:#FF8539}
  6. #footer{background: #333;color: #FFF}
  7.  
  8. #container{width:700px;margin:0 auto}
  9. #content{float:right;width:500px}

Tags: ,
  • 住所から緯度経度を割り出すサンプル
    (google maps api + google ajax search api)
  • links for 2008-07-31
  • links for 2008-04-08
  • links for 2008-03-06
  • links for 2007-12-08
  • WordPress database error: [Table './fourier_2chi/chi_comments' is marked as crashed and last (automatic?) repair failed]
    SELECT * FROM chi_comments WHERE comment_post_ID = '9' AND comment_approved = '1' ORDER BY comment_date

    Post a Comment

    Your email is never published nor shared. Required fields are marked *
    *
    *