ページへ戻る

− Links

 印刷 

Ver 4.01.19 (related プラグインの拡張など) :: XOOPS マニア

xpwiki:xpWiki開発日記/2009-01-15


2009 1月 15 (木)
 
ページ内コンテンツ
  • Ver 4.01.19 (related プラグインの拡張など)
    • 概要
    • CVS 更新内容
    • 一行コメント

Ver 4.01.19 (related プラグインの拡張など) anchor.png[4] Edit [5]

Tag: プラグイン[6] context[7] 要約[8] 検索[9]

Page Top

概要 anchor.png[10] Edit [11]

  • related プラグインを拡張して、要約を表示するようにした。(thx kazdon[12])
    • action 型では、プラグイン設定で表示・非表示、1ページあたりの表示件数を指定可能。
      1
      2
      3
      4
      5
      6
      
          function plugin_related_init () {
       
              $this->config['showContextAction'] = TRUE;
              $this->config['showMaxAction'] = 100;
       
          }
    • ブロック型では、引数で指定可能。
      • #related([<表示件数>[,backlink][,nopassage][,notitle][,context][,context:<最大バイト数>/<最大分割数>][,separate][,highlight]])
        backlink
        被リンクページのみリストアップする
        nopassage
        ページ更新経過時間を表示しない
        notitle
        ページタイトルを表示しない
        context
        要約を表示する
        separate
        要約<div>を分割表示する
        highlight
        検索ページ名をハイライト表示する
    • 参考スレッド: relatedプラグイン拡張のお願い - XOOPSマニア[13]
  • 検索結果の要約のかながすべてカタカナになっていたのを、ページ内容通りに表示することもできるようにして、プラグイン設定項目とし、デフォルトを 'conv'(ページ内容通り) とした。
  • 検索結果の最大表示件数をプラグイン設定項目に追加し、デフォルトを 500 件とした。
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    
        function plugin_search_init () {
        
            // Allow search via GET method 'index.php?plugin[14]=search&word=keyword[15]'
            // NOTE: Also allows DoS to your site more easily by SPAMbot or worm or ...
            $this->cont['PLUGIN_SEARCH_DISABLE_GET_ACCESS'] =  0; // 1, 0
        
            $this->cont['PLUGIN_SEARCH_MAX_LENGTH'] =  80;
            $this->cont['PLUGIN_SEARCH_MAX_BASE'] =    16; // #search(1,2,3,...,15,16)
            
            $this->config['context'] = 'conv'; // ( '': none or 'db': Use database (light) or 'conv': Convert (heavy) )
            $this->config['resultMax'] = 500;
            
            // Load Language
            $this->load_language();
        }
Page Top

CVS 更新内容 anchor.png[16] Edit [17]

+  今回の更新分
Page Top

一行コメント anchor.png[20] Edit [21]




Last-modified: 2009-01-15 (木) 22:50:44 (JST) (6443d) by nao-pon