Strict Standards: Non-static method Protector::getInstance() should not be called statically in /home/suehirogari/suehirogari.com/xoops_trust_path/modules/protector/include/precheck_functions.php on line 12

Strict Standards: Non-static method XCube_Root::getSingleton() should not be called statically in /home/suehirogari/suehirogari.com/public_html/include/common.php on line 18

Deprecated: Non-static method XCube_Root::getSingleton() should not be called statically, assuming $this from incompatible context in /home/suehirogari/suehirogari.com/public_html/modules/user/preload/Primary/Primary.class.php on line 13
xugj_blockでブロック表示要素のfunc opt はxoops_version.phpに記載されてます。 | 社内SEのウェブ制作

2012.09.28xoopsズープス

xugj_blockでブロック表示要素のfunc opt はxoops_version.phpに記載されてます。

xugj_blockでブロック要素を表示するための基本構文 

<{xugj_block file="☆" func="○" opt="□" item="△"}>

基本構文を作るためのfunc opt itemはxoops_version.phpに記載があります

該当モジュールのblockのテンプレートを探し、
その名前をxoops_version.php内で検索。
 
d3pipeの場合は d3pipes_block_sync.htmlだから、
block_sync.html の部分:テンプレート名から先頭のモジュール名+アンダーバーを除いて検索する。
 
すると、下記のような箇所に当たる
 
$modversion['blocks'][2] = array(
'file' => 'blocks.php' ,
'name' => constant($constpref.'_BNAME_SYNC') ,
'description' => '' ,
'show_func' => 'b_d3pipes_sync_show' ,
'edit_func' => 'b_d3pipes_sync_edit' , // appropriation
'options' => "$mydirname||1|10|db:{$mydirname}_block_sync.html|mergesort|1" ,
'template' => '' , // use "module" template instead
'can_clone' => true ,
) ;
 
PHPはよく分からないのですが、前述のサイトのとおりに行くと、
 
☆:/modules/モジュールディレクトリ名/blocks/blocks.php ←上記'file'内のblock.phpまで指定
 
○:'show_func' => 'b_d3pipes_sync_show' のb_d3pipes_sync_showの部分
opt: 'options' => "$mydirname||1|10|db:{$mydirname}_block_sync.html|mergesort|1" ,の
 
"$mydirname||1|10|db:{$mydirname}_block_sync.html|mergesort|1" の部分の | を カンマ,に変換。
ちなみに二番目の1は今回の場合表示させたいd3pip3のパイプ番号、10は表示個数あとは、わからない。。。てかいじってない。
 
item:はxoops_blockプラグインのときの assainと同じもの任意で可だが、今回はblockが無難らしい。
 
 
で、これらを埋め込むとこんな感じになりました。
(パイプ番号5番のRSSを表示)
 

各モジュールのブロック表示基本構文参考例

 
<{xugj_block file="modules/d3pipes/blocks/blocks.php" func="b_d3pipes_sync_show" 
opt="d3pipes,,5,10,db:d3pipes_block_sync.html,mergesort"  item="block"}>
 

このカテゴリの人気記事



  • コメント (0)
  • トラックバック (0)
  • 閲覧 (18827)

トラックバック

トラックバックpingアドレス http://www.suehirogari.com/modules/blog/tb.php/603

コメントの投稿

コメント投稿に関するルール : コメントは全て承認が必要

キーワードでサイト内を検索
人気のエントリ