転載・引用について

ユーザ用ツール

サイト用ツール


tweet

つぶやき

技術系や雑感等は再編集して本文の記事にする事を前提としているので、こっちにLinkを張らないでください。

Blikiを整理

Blikiの入力画面には特に何も記載されていないので、Templateが扱えるかどうかを確認してみた。

結論から言えば、このコードはそこまで考慮して書かれていないので、Templateを導入することは出来なかった。
そこまでの対応をするくらいなら1から書いた方が早いかもしれない。そんな時間はないので、今回はここで諦めよう。

しかし、最初からHeaderと末尾にTag位は入れたいなぁ。

そうそう、コードを読んでたらあまりにも整形されていなかったので、手で整形し直した。ついでに、無駄な判断分があったので、一部修正。
まぁ、あんまりにも小さな修正なので、影響は皆無だろう。ま、いいか。取りあえず貼り付けてみる。

$ cat ./syntax.php
<?php
/**
 * bliki Plugin: Adds a simple blogging engine to your wiki
 * 
 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 * @author     Beau Lebens <beau@dentedreality.com.au>
 * @author     Anthony Caetano <Anthony.Caetano@Sanlam.co.za>
 * @author     HEO SeonMeyong <seirios.seirios.org>
 * 
 */
 
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'syntax.php');
 
/**
 * All DokuWiki plugins to extend the parser/rendering mechanism
 * need to inherit from this class
 */
class syntax_plugin_bliki extends DokuWiki_Syntax_Plugin {
 
    /**
     * return some info
     */
    function getInfo(){
        return array(
            'author' => 'Beau Lebens',
            'email'  => 'beau@dentedreality.com.au',
            'date'   => '2005-09-06',
            'name'   => 'Bliki: The Wiki Blog',
            'desc'   => 'Adds basic blogging functionality to any page of your wiki.',
            'url'    => 'http://www.dokuwiki.org/plugin:bliki',
        );
    }
 
    /**
     * What kind of syntax are we?
     */
    function getType(){
        return 'substition';
    }
 
    /**
     * What kind of syntax do we allow (optional)
     */
    function getAllowedTypes() {
        return array('container', 'formatting', 'substition', 'protected', 'disabled', 'paragraphs');
    }
 
    /**
     * What about paragraphs? (optional)
     */
    function getPType(){
        return 'block';
    }
 
    /**
     * Where to sort in?
     */ 
    function getSort(){
        return 400;
    }
 
 
    /**
     * Connect pattern to lexer
     */
    function connectTo($mode) {
      $this->Lexer->addSpecialPattern('~~BLIKI~~', $mode, 'plugin_bliki');
    }
 
    /**
     * Handle the match
     */
    function handle($match, $state, $pos, &$handler){
        return array();
    }
 
    /**
    * @return Array
    * @param String $ID
    * @param Int $num
    * @param Int $offset
    * @desc Finds the full pathnames of the most recent $num posts, starting at the optional within the $ID blog/namespace.
    */
    function getPosts($ID, $num, $offset = 0) {
        global $conf;
        $recents = array();
        $counter = 0;
 
        // fully-qaulify the ID that we're working with (to dig into the namespace)
        $fp = wikiFN($ID);
        $ID = substr($fp, 0, strrpos($fp, '.'));

        // Only do it if the namespace exists
        if (is_dir($ID . '/')) {
            if ($conf['bliki']['structure'] == 'flat') {
                $posts = $this->read_dir_to_array($ID . '/', 'file', '/^[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{6}\.txt$/');
                sort($posts);
                while (sizeof($recents) < $num && sizeof($posts)) {
                    $post = array_pop($posts);
                    $counter++;
                    if ($counter > $offset) {
                        $recents[] = $ID . '/' . $post;
                    }
                }
                return $recents;
            } else {   // $conf['bliki']['structure'] == 'deep'
                $years = $this->read_dir_to_array($ID . '/', 'dir');
                sort($years);
                // Now start working backwards through it all and get the most recent posts
                while (sizeof($recents) < $num && sizeof($years)) {
                    $year = array_pop($years);
                    $months = $this->read_dir_to_array($ID . '/' . $year . '/', 'dir');
                    sort($months);
                    while (sizeof($recents) < $num && sizeof($months)) { 
                        $month = array_pop($months); 
                        $days = $this->read_dir_to_array($ID . '/' . $year . '/' . $month . '/', 'dir');
                        sort($days);
                        while (sizeof($recents) < $num && sizeof($days)) {
                            $day = array_pop($days);
                            $posts = $this->read_dir_to_array($ID . '/' . $year . '/' . $month . '/' . $day . '/', 
                                                              'file', 
                                                              '/^[0-9]{6}\.txt$/');
                            sort($posts);
                            while (sizeof($recents) < $num && sizeof($posts)) {
                                $post = array_pop($posts);
                                $counter++;
                                if ($counter > $offset) {
                                    $recents[] = $ID . '/' . $year . '/' . $month . '/' . $day . '/' . $post;
                                }
                            }
                        }
                    }
                }
                return $recents;
            }
        }
    }
 
    /**
    * @return String
    * @param Array $list
    * @desc Compiles the contents of all the files listed (as fully-qualified paths)  
    *       in $list into a single string. Compiles in the order listed. Adds date headers
    *       where required and a footer after each post.
    */
    function compilePosts($list) {
        global $ID, $conf;

        if (sizeof($list)) {
            $last_date = false;
            $str = '';
            foreach ($list as $file) {
                // Decide if we need to add a date divider
                $file = str_replace('\\', '/', $file);
                $ts = $this->getTimestampFromFile($file);
                $date = date('Y-m-d', $ts);
                if ($date != $last_date) {
                    $str .= $this->getDateHeader($ts);
                    $last_date = $date;
                }
                // Add this file's contents to the output
                $str .= file_get_contents($file);
                // And add a wiki-formatted footer of meta data as well, accounting for rewrites
                $post_url = $this->getUrlPartFromTimestamp($ID, $ts);
                $edit_url = $this->getRewriteUrl($post_url, 'do=edit', false);
                $timestamp = date($conf['bliki']['datefooter'], $ts);
                $str .= str_replace(array('{timestamp}', '{permalink}', '{edit}'), array($timestamp, $post_url, "this>$edit_url"), $conf['bliki']['footer']);
            }
            return $str;
        } else {
            return '';
        }
    }
 
    /**
    * @return String
    * @param timestamp $ts
    * @desc Returns a wiki-formatted date header for between posts.
    */
    function getDateHeader($ts) {
        global $conf;
 
        $date = date($conf['bliki']['dateheader'], $ts);
        return $date . "\n";
    }
 
    /**
    * @return timestamp
    * @param String $filename
    * @desc Returns a timestamp based on the filename/namespace structure
    */
    function getTimestampFromFile($file) {
        global $conf;
 
        if ($conf['bliki']['structure'] == 'flat') {
            $parts = explode('-', basename($file));
            $ts = mktime(substr($parts[3], 0, 2), substr($parts[3], 2, 2), substr($parts[3], 4, 2), $parts[1], $parts[2], $parts[0]);
        } else {  // $conf['bliki']['structure'] == 'deep'
            $parts = explode('/', dirname($file));
            $s = sizeof($parts);
            $date = $parts[$s-3] . '-' . $parts[$s-2] . '-' . $parts[$s-1];
            $filename = basename($file);
            $ts = mktime(substr($filename, 0, 2), substr($filename, 2, 2), substr($filename, 4, 2), $parts[$s-2], $parts[$s-1], $parts[$s-3]);
        }
        return $ts;
    }
 
    /**
    * @return String
    * @param String $ID
    * @param timestamp $ts
    * @desc Returns a post url for a post based on the post's timestamp and the base ID
    */
    function getUrlPartFromTimestamp($ID, $ts=0) {
        global $conf;
 
        if ($ts == 0) {
            $ts = time();
        }
        if ($conf['userewrite'] > 0) {
            $sep = ($conf['useslash'] == true ? '/' : ':');
        } else {
            $sep = ':';
        }
        if ($conf['bliki']['structure'] == 'flat') {
            return $ID . $sep . date('Y-m-d-His', $ts);
        } else { // $conf['bliki']['structure'] == 'deep'
            return $ID . $sep . date('Y' . $sep . 'm' . $sep . 'd' . $sep . 'His', $ts);
        }
    }
 
    /**
    * @return String
    * @param String $url
    * @param String $query
    * @desc Returns a url properly prefixed according to the $conf['rewrite'] option
    *       A $page is an appropriately constructed (namespace inclusive and considering $conf['useslash']) page reference
    *       A $query contains a query string parameters to append
    */
    function getRewriteUrl($page, $query, $base = true) {
        global $conf;

        if ($base) {
            $str = DOKU_BASE;
        }
        if ($conf['userewrite'] == 0) {
            $str .= DOKU_SCRIPT . '?id=' . $page;
            if ($query != '') {
                $str .=  '&' . $query;
            }
        } else if ($conf['userewrite'] == 1) {
            $str .= idfilter($page, false);
            if ($query != '') {
                $str .=  '?' . $query;
            }
        } else {
            $str .= DOKU_SCRIPT . '/' . idfilter($page, false);
            if ($query != '') {
                $str .=  '?' . $query;
            }
        }
        return $str;
    }
 
    /**
    * @return String
    * @param String $label
    * @desc Creates the HTML required for the "New Post" link, using the lable provided.
    */
    function newPostLink($label) {
        global $conf, $ID;
 
        $sep = ($conf['useslash'] == true ? '/' : ':');
        $html = '<div id="blognew"><a href="';
        $html .= $this->getRewriteUrl($this->getUrlPartFromTimestamp($ID, time() + (isset($conf['bliki']['offset']) ? ($conf['bliki']['offset'] * 3600) : 0)), 'do=edit');
        $html .= '">' . $label . '</a></div>';
        return $html;
    }
 
    /**
    * @return String
    * @param Int $page
    * @param String $label
    * @desc Creates the HTML required for a link to an older/newer page of posts. 
    */
    function pagingLink($page, $label) {
        global $conf, $ID;
 
        $html = '<a href="';
        $html .= $this->getRewriteUrl($ID, "page=$page");
        $html .= '">' . $label . '</a>';
        return $html;
    }
 
    /**
    * @return Array
    * @param String $dir
    * @param String $select
    * @param String $match
    * @desc Reads all entries in a directory into an array, sorted alpha, dirs then files.
    *       $select is used to selects either only dir(ectories), file(s) or both
    *       If $match is supplied, it should be a / delimited regex to match the filename against
    */
    function read_dir_to_array($dir, $select = 'both', $match = false) { 
        $files = array();
        $dirs  = array();
 
        // Read all the entries in the directory specified
        $handle = @opendir($dir);
        if (!$handle) {
            return false;
        }
        while ($file = @readdir($handle)) {
            // Ignore self and parent references
            if ($file != '.' && $file != '..') {
                if (($select == 'both' || $select == 'dir') && is_dir($dir . $file)) {
                    $dirs[] = $file;
                } else if (($select == 'both' || $select == 'file') && !is_dir($dir . $file)) { 
                    if (is_string($match)) {
                        if (!preg_match($match, $file)) {
                            continue;
                        }
                    }
                    $files[] = $file;
                }
            }
        }
        @closedir($handle);
 
        // Sort anything found alphabetically and combine the results (dirs->files)
        if (sizeof($dirs) > 0) {
            sort($dirs, SORT_STRING);
        }
        if (sizeof($files) > 0) {
            sort($files, SORT_STRING);
        }
 
        // Put the directories and files back together and return them
        return array_merge($dirs, $files);
    }
 
    /**
     * Create output
     */
    function render($mode, &$renderer, $data) {
        global $ID, $conf;

        // Set the page number (determines which posts we display)
        if (isset($_REQUEST['page'])) {
            $page = $_REQUEST['page'];
        } else {
            $page = 0;
        }
 
        if ($mode == 'xhtml') {
            // Addlink for creating a new post
            $renderer->doc .= $this->newPostLink($conf['bliki']['newlabel']);

            // Go and get the required blog posts and compile them into one wikitext string
            // FIXME $config var for how many? or inline directive?
            $recents = $this->getPosts($ID, $conf['bliki']['numposts'], ($page * $conf['bliki']['numposts']));
            $compiled = $this->compilePosts($recents);

            // Disable section editing to avoid weird links
            $conf['maxseclevel'] = 0;

            // Disbale caching because we need to get new files always
            $renderer->info['cache'] = false;

            // Add the compiled blog posts after rendering them.
            $renderer->doc .= p_render('xhtml', p_get_instructions($compiled), $info);

            // Add a link to older entries if we filled the number per page (assuming there's more)
            if (sizeof($recents) == $conf['bliki']['numposts']) {
                $renderer->doc .= '<div id="blogolder">' . $this->pagingLink($page+1, $conf['bliki']['olderlabel']) . '</div>';
            }

            // And also a link to newer posts if we're not on page 0
            if ($page != 0) {
                $renderer->doc .= '<div id="blognewer">' . $this->pagingLink($page-1, $conf['bliki']['newerlabel']) . '</div>';
            }
            return true;
        }
        return false;
    }
}
 
?>
$ 

→ 続き...

· 2018/07/02 19:01 · 2009/02/07 05:00

DokuWiki 日本語強化

参照URL: http://www.higuchi.com/dokuwiki/dokuwiki:localize

  1. MailのEncodeをISO-2022-jpにする
    • 今回、これを導入しなかった。だって、ja=iso2022-jpって言えないし。だからってiso2022-jpに固定するのもどうよ?
  2. 検索の日本語化
    1. pkgsrcからMecabを入れる
      • /etc/mk.confにMECAB_CHARSET= utf-8 を忘れずに設定すること
    2. inc/indexer.phpに以下の変更を加える
      • $ diff -c ./indexer.php.orig ./indexer.php
        *** ./indexer.php.orig  Sat Feb  7 21:48:34 2009
        --- ./indexer.php       Sat Feb  7 22:02:14 2009
        ***************
        *** 6,11 ****
        --- 6,15 ----
           * @author     Andreas Gohr <andi@splitbrain.org>
           */
          
        + /* for Japanese index search with Mecab */
        + define ('PRE_TOKENIZER', '/usr/pkg/bin/mecab -O wakati');
        + /* ------------------------------------ */
        + 
          if(!defined('DOKU_INC')) die('meh.');
          require_once(DOKU_INC.'inc/io.php');
          require_once(DOKU_INC.'inc/utf8.php');
        ***************
        *** 55,62 ****
        --- 59,70 ----
              $l = strlen($w);
              // If left alone, all chinese "words" will get put into w3.idx
              // So the "length" of a "word" is faked
        + /* for Japanese index search with Mecab */
        + /*
              if(preg_match('/'.IDX_ASIAN2.'/u',$w))
                  $l += ord($w) - 0xE1;  // Lead bytes from 0xE2-0xEF
        + */
        + /* ------------------------------------ */
              return $l;
          }
          
        ***************
        *** 220,225 ****
        --- 228,257 ----
          
              list($page,$body) = $data;
          
        + /* for Japanese index search with Mecab */
        +     if(function_exists(proc_open) && defined('PRE_TOKENIZER')) {
        +         $dspec = array(
        +             0 => array("pipe", "r"),
        +             1 => array("pipe", "w"),
        +             2 => array("file", "/dev/null", "w")
        +         );
        +         $process = proc_open(PRE_TOKENIZER, $dspec, $pipes);
        +         if(is_resource($process)) {
        +             stream_set_blocking($pipes[0], FALSE);
        +             stream_set_blocking($pipes[1], FALSE);
        +             fwrite($pipes[0], $body . "\n");
        +             fclose($pipes[0]);
        +  
        +             $body = '';
        +             while(!feof($pipes[1])) {
        +                 $body .= fgets($pipes[1], 32768);
        +             }
        +             fclose($pipes[1]);
        +             proc_close($process);
        +         }
        +     }
        + /* ------------------------------------ */
        + 
              $body   = strtr($body, "\r\n\t", '   ');
              $tokens = explode(' ', $body);
              $tokens = array_count_values($tokens);   // count the frequency of each token
        ***************
        *** 489,495 ****
        --- 521,532 ----
                      $wild |= 2;
                      $wlen -= 1;
                  }
        + /* for Japanese index search with Mecab */
        + /*
                  if ($wlen < IDX_MINWORDLENGTH && $wild == 0 && !is_numeric($xword)) continue;
        + */
        +         if (preg_match('/[^0-9A-Za-z]/u', $string) && $wlen < IDX_MINWORDLENGTH && $wild == 0 && !is_numeric($xword)) continue;
        + /* ------------------------------------ */
                  if(!isset($tokens[$xword])){
                      $tokenlength[$wlen][] = $xword;
                  }
        ***************
        *** 628,639 ****
        --- 665,701 ----
           */
          function idx_tokenizer($string,&$stopwords,$wc=false){
              $words = array();
        + /* for Japanese index search with Mecab */
        +     if(function_exists(proc_open) && defined('PRE_TOKENIZER')) {
        +         $dspec = array(
        +             0 => array("pipe", "r"),
        +             1 => array("pipe", "w"),
        +             2 => array("file", "/dev/null", "w")
        +         );
        +         $process = proc_open(PRE_TOKENIZER, $dspec, $pipes);
        +         if(is_resource($process)) {
        +             stream_set_blocking($pipes[0], FALSE);
        +             stream_set_blocking($pipes[1], FALSE);
        +             fwrite($pipes[0], $string . "\n");
        +             fclose($pipes[0]);
        +             $string = '';
        +             while(!feof($pipes[1])) {
        +                 $string .= fgets($pipes[1], 32768);
        +             }
        +             fclose($pipes[1]);
        +             proc_close($process);
        +         }
        +     }
        + /* ------------------------------------ */
              $wc = ($wc) ? '' : $wc = '\*';
          
              if(preg_match('/[^0-9A-Za-z]/u', $string)){
        + /* for Japanese index search with Mecab */
        + /*
                  // handle asian chars as single words (may fail on older PHP version)
                  $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$string);
                  if(!is_null($asia)) $string = $asia; //recover from regexp failure
        + */
          
                  $arr = explode(' ', utf8_stripspecials($string,' ','\._\-:'.$wc));
                  foreach ($arr as $w) {
                 

こんなんでどうだろう…。

· 2018/07/02 19:01 · 2009/02/07 04:00

My access counter

view counterをInstallしたが、色々気に入らないので、まずはcounterを直してみた。

方針は、

  1. 今日のunique viewerの表示 → 1
  2. 今日のall viewerの表示 → 2
  3. 今までのunique viewerの合計 → 3
  4. 今までのviewerの合計 → 4

を表示すること。

高々これだけでも結構面倒。少しPHPを勉強する気になった。

以下、Install方法

  1. [DokuWiki Data Dir]/pages/_views を作成(普通は[DokuWiki Dir]/data/_viewだろう)
    • Ownerをuser.wwwにするならpermissionを775に www.wwwなら755にする
    • ここに各namespace毎の参照記録が配置される
    • file formatは以下の通り
      • Filename: namespace
      • Data Format: 1 2 3 4 Today ¥n <IP Address>¥n….
  2. [DokuWiki Dir]/inc/counter.phpを設置
    • <?php
       
      /* 
       * DokuWiki Counter
       * Original: Dokuwiki:plugins:viewcounter
       * Revised by seirios@seirios.org.
       * log: 2009/02/07 First Revision
       *
       * Function: Print view counter of followings.
       *     - Today's unique viewers
       *     - Today's all viewers
       *     - Total of "Today's unique viewers"
       *     - Total viewers
      */
       
      global $ID, $ACT;
      $views_str    = "views";
      $myip         = "<".$_SERVER["REMOTE_ADDR"].">";
      $ips          = "";
      $unique       = true;
      $todayviews   = 1;
      $utodayviews  = 1;
      $allviews     = 1;
      $uallviews    = 1;
      $d            = date("Ymd");
       
      $file = realpath($conf["datadir"])."/_views/".$ID;
       
      if (file_exists($file)) {
          $content = file_get_contents($file);
          $pos  = strpos($content, " ");
      
          if ($pos !== FALSE) {
              $todayviews  = substr($content, 0, $pos);
              $str         = substr($content, $pos + 1);
              $pos         = strpos($str, " ");
              $utodayviews = substr($str, 0, $pos);
              $str         = substr($str, $pos + 1);
              $pos         = strpos($str, " ");
              $allviews    = substr($str, 0, $pos);
              $str         = substr($str, $pos + 1);
              $pos         = strpos($str, " ");
              $uallviews   = substr($str, 0, $pos);
              $str         = substr($str, $pos + 1);
              $pos         = strpos($str, " ");
      
              if ($pos !== FALSE) {
                  $old_d = substr($str, 0, $pos);
                  $ips   = substr($str, $pos + 1);
      
                  if ($old_d != $d) {
                      $todayviews  = 1;
                      $utodayviews = 1;
                      $ips   = "";
                  } else if (strpos($ips, $myip) !== FALSE) {
                      ++$todayviews;
                      ++$allviews;
                      $unique = FALSE;
                  } else {
                      ++$todayviews;
                      ++$utodayviews;
                      ++$allviews;
                      ++$uallviews;
                  }
              }
          }
      }
      
      if (($ACT == "show") && ($INFO["exists"])) {
          if ($unique !== FALSE) {
              $ips.="\n".$myip;
          }
      
          $content = $todayviews." ".$utodayviews." ".$allviews." ".$uallviews." ".$d." ".$ips;
          file_put_contents($file, $content);
      }
      
      $fn.=" : Counter: ($todayviews / $utodayviews / $allviews / $uallviews $views_str) ";
      
      ?>
            
  1. [DokuWiki Dir]/inc/template.phpを修正
    • 以下のpatchを適用する
    • # diff -c ./template.php.orig ./template.php
      *** ./template.php.orig Sat Feb  7 14:15:51 2009
      --- ./template.php      Sat Feb  7 14:36:51 2009
      ***************
      *** 945,950 ****
      --- 945,951 ----
        
          // print it
          if($INFO['exists']){
      +     include("counter.php");
            $out = '';
            $out .= $fn;
            $out .= ' &middot; ';
      
            

取りあえずこれだけで最小限のカウンターが、ページ最下部に表示されます。

このカウンターでは、ちっとも目立たないので、そこをどう修正するかが今後の検討課題ですね。

· 2018/07/02 19:01 · 2009/02/07 03:00

Access Counter

DokuWikiにAccess Counterを追加してみる。

追加したのはviewcounter。

  1. data/pages/_cacheを作成。
    • permissionを775にしておく。Ownerをuser.wwwにする
  2. inc/template.phpを修正
    • 個人的には、ここが気に入らないが、仕方がない。
      • $ diff -c inc/template.php.orig inc/template.php
        *** inc/template.php.orig Sat Feb  7 14:15:51 2009
        --- inc/template.php      Sat Feb  7 14:18:46 2009
        ***************
        *** 927,932 ****
        --- 927,935 ----
            global $INFO;
            global $REV;
            global $ID;
        + /* for access counter */
        +   global $ACT;
        + /* ------------------ */
          
            // return if we are not allowed to view the page
            if (!auth_quickaclcheck($ID)) { return false; }
        ***************
        *** 940,945 ****
        --- 943,963 ----
                $fn = str_replace(fullpath($conf['datadir']).'/','',$fn);
              }
            }
        +   /* for access counter */
        +   $ID_fn = str_replace(':', '_', $ID); 
        +   $fp_views=fopen(realpath($conf['datadir'])."/_cache/$ID_fn.visits",'a+'); 
        +   if ($fp_views) { 
        +     fscanf($fp_views,"%i",$views); 
        +     if (($ACT == 'show') && ($INFO['exists'])) { 
        +       $views++; 
        +       ftruncate($fp_views,0); 
        +       fseek($fp_views, 0); 
        +       fwrite($fp_views,$views); 
        +     } 
        +     $fn.=" ($views views) "; 
        +     fclose($fp_views); 
        +   } 
        +   /* ------------------ */
            $fn = utf8_decodeFN($fn);
            $date = strftime($conf['dformat'],$INFO['lastmod']);
                

→ 続き...

· 2018/07/02 19:01 · 2009/02/07 02:00

Blikiのformat

Blikiの表示フォーマットをいじってみる。
本質的にはPHPのdate関数と同じ形式でいける模様。

というわけで、日付の表示を yyyy/mm/dd (曜日)形式にしてみた。
この方が見やすいのは慣れの問題なんだろうけど。

いじり方は、conf/local.phpの

$conf['bliki']['dateheader'] = '===== l,F j =====';

の部分を

$conf['bliki']['dateheader'] = '===== Y/m/d (D) =====';

に直しただけ。 ついでにFooterを

$conf['bliki']['footer'] = '<sub>Posted @ {timestamp} -- [[{permalink}|Permalink]] -- [[{edit}|Edit]]</sub>';

になおしておくと、余計な文字列が表示されない。

問題は、timestampのフォーマットだけど、今はここまではいいや。

· 2018/07/02 19:01 · 2009/02/07 01:00
このウェブサイトはクッキーを使用しています。 Webサイトを使用することで、あなたはあなたのコンピュータにクッキーを保存することに同意します。 また、あなたはあなたが私たちのプライバシーポリシーを読んで理解したことを認めます。 同意しない場合はウェブサイトを離れてください。クッキーに関する詳細情報
tweet.txt · 最終更新: by seirios

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki