E-mail
パスワード
次回から自動ログインする
パスワード紛失
新規登録
ホーム
|
新着情報
|
研究室
|
掲示板
|
ぶろぐ
|
Wiki
|
お問合せ
|
アルバム
|
リンク
|
サイトマップ
|
|
一覧
検索
最新
ヘルプ
ページへ戻る
履歴
リンク元
印刷
inc/d3forum/d3com_tree
をテンプレートにして作成
xpwiki
:inc/d3forum/d3com_tree をテンプレートにして作成
開始行:
* コメント統合で d3forumのツリー全表示
[[元ネタ:http://www.xugj.org/modules/QandA/index.php?topi...
上の内容から以下の機能を追加しました。
+ 「投稿の新しいものから」「投稿の古いものから」をクリッ...
+ 表示中のツリーを判別するためのインジケータ (テンプレ...
++ ツリー(トピック)が2つ以上の場合のみ表示するように変...
+ 当該元記事についた全コメントをツリー表示するか、そのト...
まだまだ未熟ですが、現状でよろしければどうぞお試しくださ...
実装済みのサイト(参考まで) : [[モバイルテンプハウス:...
** 背景
コメント統合で付いたコメント。 質問内容が変わったりし...
オリジナル版では、元記事にジャンプして初めてその存在に...
色々な案を考えてやってみたのですが、一番しっくりきたの...
** 仕様
- ツリーに表示されたリンクをクリックすると、表示中のトピ...
- プラグインの呼び出し例
#code(html,nonumber){{
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
}}
- プラグインの呼び出しの際のオプションは、以下です。 「o...
++ forum_dirname: d3forumのディレクトリ名。d3forumテン...
++ forum_id: コメント統合したd3forumのforum番号。d3foru...
++ topic_id: コメント統合記事以外の時に表示トピックを限...
++ external_link_id: コメント統合記事の外部リンク番号。...
++ order: 表示の昇順/降順指定。 「ASC」=「降順」、「...
++ limit: ツリーに表示する最大タイトル数。 指定しなけ...
++ postorder: 「投稿の新しいものから」「投稿の古いもの...
++ item: テンプレート内で参照する変数名。
** コード
sumartyプラグインを1つ作って、テンプレートから呼び出して...
*** function.d3comment_tree.php
以下のコードを「function.d3comment_tree.php」 として新...
(2009/3/31:90行目でERRORが出ていたので修正しました。
2009/4/13:コメント統合記事かつトピックが2つ以上の場...
#code(php,1-){{
<?php
/*
* Smarty plugin
* ------------------------------------------------------...
* Type: function
* Name: d3comment_tree
* Version: 0.1.2
* Date: April 13, 2009
* Author: naao
* Purpose: Shows comment trees in a external link id
* Input:
*
* Examples: <{d3comment_tree forum_dirname=$mydirname fo...
*
*/
function smarty_function_d3comment_tree($params, &$smarty)
{
// transitional from 'dirname' -> 'forum_dirname'
$params['forum_dirname'] = @$params['forum_dirname'] . @...
$forum_dirname = ! empty( $params['forum_dirname'] ) ? $...
$forum_id = ! empty( $params['forum_id'] ) ? intval( $pa...
$topic_id = ! empty( $params['topic_id'] ) ? intval( $pa...
$external_link_id = ! empty( $params['external_link_id']...
$limit = ! empty( $params['limit'] ) ? intval( $params['...
$_order = strtolower(@$params['order']) == 'asc' ? 'ASC'...
$postorder = ! empty( $params['postorder'] ) ? intval( $...
$item = ! empty( $params['item'] ) ? $params['item'] : '...
if ( $_order != '') {
$disp_order = $_order ;
$whr_order = "post_time DESC";
} else {
switch ($postorder) {
case 0:
$whr_order = "t.topic_id ASC,p.order_in_tree,p.post_i...
break;
case 2:
$disp_order = 'ASC' ;
$whr_order = "post_time DESC";
break;
case 3:
$whr_order = "post_time DESC";
break;
default:
}
}
if( ! preg_match( '/^[0-9a-zA-Z_-]+$/' , $forum_dirname ...
echo "<p>d3comment_tree function does not set properly....
} else {
$db =& Database::getInstance() ;
$myts =& MyTextSanitizer::getInstance() ;
// main query
$sql = "SELECT p.*,t.topic_locked,t.topic_id,t.forum_id...
if( ! $trs = $db->query( $sql ) ) die( _MD_D3FORUM_ERR_...
$user_handler =& xoops_gethandler( 'user' ) ;
$topics_count = 0;
$topic_last_id = 0;
while( $post_row = $db->fetchArray( $trs ) ) {
// get this poster's object
$poster_obj =& $user_handler->get( intval( $post_row['...
if( is_object( $poster_obj ) ) {
$poster_uname4disp = $poster_obj->getVar( 'uname' ) ;
} else {
$poster_uname4disp = "" ;
}
$poster_uname4disp = $poster_uname4disp ? $poster_unam...
// posts array
$posts[] = array(
'id' => intval( $post_row['post_id'] ) ,
'subject' => $myts->makeTboxData4Show( $post_row['sub...
'post_time_formatted' => formatTimestamp( $post_row['...
'poster_uid' => intval( $post_row['uid'] ) ,
'poster_uname' => $poster_uname4disp ,
'icon' => intval( $post_row['icon'] ) ,
'depth_in_tree' => intval( $post_row['depth_in_tree']...
'order_in_tree' => intval( $post_row['order_in_tree']...
'topic_id' => intval( $post_row['topic_id'] ) ,
'ul_in' => '<ul><li>' ,
'ul_out' => '</li></ul>' ,
) ;
if (intval( $post_row['topic_id'] ) != $topic_last_id) {
$topics_count ++ ;
$topic_last_id = intval( $post_row['topic_id'] );
}
}
// reverse array if order is "ASC"
if (($disp_order == 'ASC') && ($posts)) {$posts = array...
$assign_name = @$params['item'] . @$params['assign'] ;
$smarty->assign( $assign_name , $posts ) ;
$smarty->assign( $assign_name."_tp_count" , $topics_cou...
}
}
?>
}}
*** d3forum_main_listposts.html
テンプレート「(d3forum)_main_listposts.html」を編集します。
(A案)全投稿をツリー表示するか、(B案)当該ツリー以外...
&ref(tree_alltree.jpg,mw:200); &ref(tree_topicslist.jpg,m...
**** A案:全topicの全postsツリー表示
当該元記事にぶらさがる、全トピックの全投稿を、ツリー表...
#code(html,1-){{
<!-- start module contents -->
<div class="d3f_breadcrumbs">
<{if $mod_config.show_breadcrumbs}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3F...
>
<{foreach from=$category.paths_raw key=parent_id item=pa...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>">...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>">...
<{/if}>
<{if $prev_topic.id || $next_topic.id}>
(<{if $prev_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$prev_topic...
<{/if}>
<{if $prev_topic.id && $next_topic.id}>
|
<{/if}>
<{if $next_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$next_topic...
<{/if}>)
<{/if}>
</div>
<h1 class="d3f_title" style="clear:both"><{$topic.title}>...
<{include file="db:`$mydirname`_inc_topicbar.html"}>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if $topic.external_link_id && ($tree_tp_count > 1) && ...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<br />
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder==3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$tree|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- top of posts -->
<div class="d3f_wrap">
<{foreach item=post from=$posts}>
<{include file="db:`$mydirname`_inc_eachpost.html" post=...
<{/foreach}>
</div>
<!-- bottom of posts -->
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder!=3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
}}
**** B案:当該topic内postsツリー + 全topicsリスト表示
当該元記事にぶらさがる、全トピックのうち当該トピックの...
#code(html,1-){{
<!-- start module contents -->
<div class="d3f_breadcrumbs">
<{if $mod_config.show_breadcrumbs}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3F...
>
<{foreach from=$category.paths_raw key=parent_id item=pa...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>">...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>">...
<{/if}>
<{if $prev_topic.id || $next_topic.id}>
(<{if $prev_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$prev_topic...
<{/if}>
<{if $prev_topic.id && $next_topic.id}>
|
<{/if}>
<{if $next_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$next_topic...
<{/if}>)
<{/if}>
</div>
<h1 class="d3f_title" style="clear:both"><{$topic.title}>...
<{include file="db:`$mydirname`_inc_topicbar.html"}>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.topic_id==$topic.id)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end topic list -->
<!-- start topic list -->
<{if $topic.external_link_id && ($tree_tp_count>1)}>
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.depth_in_tree==0)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<{/if}>
<!-- end post tree -->
<br />
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<br />
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder==3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$tree|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- top of posts -->
<div class="d3f_wrap">
<{foreach item=post from=$posts}>
<{include file="db:`$mydirname`_inc_eachpost.html" post=...
<{/foreach}>
</div>
<!-- bottom of posts -->
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder!=3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
<!-- start module contents -->
<!-- breadcrumbs -->
<{if $mod_config.show_breadcrumbs}>
<div class="d3f_breadcrumbs">
<{strip}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3...
>
<{foreach from=$category.paths_raw key=parent_id item=p...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>"...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>"...
>
<a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"...
<{/strip}>
</div>
<{/if}>
<h1 class="d3f_title"><{$post.subject}></h1>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$posts item=eachpost}>
<{if $eachpost.id == $post.id}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{else}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{/if}>
<a href="<{$mod_url}>/index.php?post_id=<{$eachpost.id}>...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start topic list -->
<{if $topic.external_link_id && ($tree_tp_count>1)}>
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.depth_in_tree==0)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<{/if}>
<!-- end post tree -->
<br />
<p class="d3f_topicinfo"><a href="<{$mod_url}>/index.php?...
<div class="d3f_wrap">
<{include file="db:`$mydirname`_inc_eachpost.html" caller...
</div>
<!-- quick reply form -->
<{if $post.can_reply}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
}}
*** d3forum_main_viewpost.html
1ポスト表示においても、上記のB案に準じたtopicsリスト表...
&ref(tree_viewpost.jpg,mw:200,mh:200);
#code(html,1-){{
<!-- start module contents -->
<!-- breadcrumbs -->
<{if $mod_config.show_breadcrumbs}>
<div class="d3f_breadcrumbs">
<{strip}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3...
>
<{foreach from=$category.paths_raw key=parent_id item=p...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>"...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>"...
>
<a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"...
<{/strip}>
</div>
<{/if}>
<h1 class="d3f_title"><{$post.subject}></h1>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$posts item=eachpost}>
<{if $eachpost.id == $post.id}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{else}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{/if}>
<a href="<{$mod_url}>/index.php?post_id=<{$eachpost.id}>...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start topic list -->
<{if $topic.external_link_id && ($tree_tp_count>1)}>
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.depth_in_tree==0)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<{/if}>
<!-- end post tree -->
<br />
<p class="d3f_topicinfo"><a href="<{$mod_url}>/index.php?...
<div class="d3f_wrap">
<{include file="db:`$mydirname`_inc_eachpost.html" caller...
</div>
<!-- quick reply form -->
<{if $post.can_reply}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
}}
*** おまけ d3forum_comment_listposts_flat.html
**** おまけ-1(A案)
テンプレート「(d3forum)_comment_listposts_flat.html」の...
但し、%%コメント元のモジュール単位でパラメータ変更ができ...
#code(html,1-){{
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><a name="comment"><{$s...
<{foreach from=$tree item=eachpost}>
<ul class='d3f_eachbranch'><{"<span style='padding-left:...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
}}
**** おまけ-2(B案)
上記「おまけ」の記述だと、ツリーをクリックするとd3forumの...
[[表示例:http://www.naaon.com/modules/plactice/index.php/...
ちょっと「くどい」気もしますが、サイト管理上の使い勝手は...
なお、ALTSYSでフォーラムの言語定数設定にて、「_MD_D3FORUM...
#code(html,1-){{
<h2 class="head d3f_tree d3f_head"><a name="comment"><{$s...
<!-- start post tree -->
<{foreach from=$posts item=eachpost}>
<ul class='d3f_eachbranch'><{"<span style='padding-left:...
<a href="#post_id<{$eachpost.id}>" id="post_path<{$eachp...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
</ul>
<{/foreach}>
<!-- end post tree -->
<br />
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$post_hits|string_format:$smarty.const._MD_D3FORUM_FMT...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<br />
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<{if $tree_tp_count > 1}>
<{foreach from=$tree item=eachpost}>
<{if $eachpost.depth_in_tree == 0}>
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{/if}>
<{/foreach}>
<{/if}>
<{if $plugin_params.order != 'asc'}>
<!-- begin simple comment form -->
<{if $forum.can_post && ! $plugin_params.no_form}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- end simple comment form -->
<{/if}>
<h2 class="head"><{if $plugin_params.h2_comments}><{$plug...
<{if $pagenav}><div class="d3f_pagenav"><{$pagenav}></div...
<{if $forum.can_post && $plugin_params.no_form}>
<!-- link to comment input form -->
<div><a href="<{$mod_url}>/index.php?page=newtopic&f...
<{/if}>
<!-- top of posts -->
<div class="d3f_wrap" id="d3comment_listposts_flat">
<{foreach item=post from=$posts}>
<div class="head d3f_head">
<a href="<{$mod_url}>/index.php?post_id=<{$post.id}>" id...
</div>
<div class="d3f_info_ctrl" style="float:right;">
<{if $post.can_edit}>
<a href="<{$mod_url}>/index.php?page=edit&post_id=<{...
<{/if}>
<{if $post.can_delete}>
<a href="<{$mod_url}>/index.php?page=delete&post_id=...
<{/if}>
<{if $post.can_reply}>
<a href="<{$mod_url}>/index.php?page=reply&post_id=<...
<{/if}>
</div>
<div class="d3f_info even">
<{if $post.poster_uid != 0}><a href="<{$xoops_url}>/user...
<{$smarty.const._MD_D3FORUM_ON}> <{$post.post_time_forma...
</div>
<div class="d3f_body" style="padding: 2px 2px 16px 16px; ...
<{$post.post_text}>
</div>
<{/foreach}>
</div>
<!-- bottom of posts -->
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$post_hits|string_format:$smarty.const._MD_D3FORUM_FMT...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<{if $pagenav}><div class="d3f_pagenav"><{$pagenav}></div...
<{if $plugin_params.order == 'asc'}>
<!-- begin simple comment form -->
<{if $forum.can_post && ! $plugin_params.no_form}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- end simple comment form -->
<{/if}>
}}
終了行:
* コメント統合で d3forumのツリー全表示
[[元ネタ:http://www.xugj.org/modules/QandA/index.php?topi...
上の内容から以下の機能を追加しました。
+ 「投稿の新しいものから」「投稿の古いものから」をクリッ...
+ 表示中のツリーを判別するためのインジケータ (テンプレ...
++ ツリー(トピック)が2つ以上の場合のみ表示するように変...
+ 当該元記事についた全コメントをツリー表示するか、そのト...
まだまだ未熟ですが、現状でよろしければどうぞお試しくださ...
実装済みのサイト(参考まで) : [[モバイルテンプハウス:...
** 背景
コメント統合で付いたコメント。 質問内容が変わったりし...
オリジナル版では、元記事にジャンプして初めてその存在に...
色々な案を考えてやってみたのですが、一番しっくりきたの...
** 仕様
- ツリーに表示されたリンクをクリックすると、表示中のトピ...
- プラグインの呼び出し例
#code(html,nonumber){{
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
}}
- プラグインの呼び出しの際のオプションは、以下です。 「o...
++ forum_dirname: d3forumのディレクトリ名。d3forumテン...
++ forum_id: コメント統合したd3forumのforum番号。d3foru...
++ topic_id: コメント統合記事以外の時に表示トピックを限...
++ external_link_id: コメント統合記事の外部リンク番号。...
++ order: 表示の昇順/降順指定。 「ASC」=「降順」、「...
++ limit: ツリーに表示する最大タイトル数。 指定しなけ...
++ postorder: 「投稿の新しいものから」「投稿の古いもの...
++ item: テンプレート内で参照する変数名。
** コード
sumartyプラグインを1つ作って、テンプレートから呼び出して...
*** function.d3comment_tree.php
以下のコードを「function.d3comment_tree.php」 として新...
(2009/3/31:90行目でERRORが出ていたので修正しました。
2009/4/13:コメント統合記事かつトピックが2つ以上の場...
#code(php,1-){{
<?php
/*
* Smarty plugin
* ------------------------------------------------------...
* Type: function
* Name: d3comment_tree
* Version: 0.1.2
* Date: April 13, 2009
* Author: naao
* Purpose: Shows comment trees in a external link id
* Input:
*
* Examples: <{d3comment_tree forum_dirname=$mydirname fo...
*
*/
function smarty_function_d3comment_tree($params, &$smarty)
{
// transitional from 'dirname' -> 'forum_dirname'
$params['forum_dirname'] = @$params['forum_dirname'] . @...
$forum_dirname = ! empty( $params['forum_dirname'] ) ? $...
$forum_id = ! empty( $params['forum_id'] ) ? intval( $pa...
$topic_id = ! empty( $params['topic_id'] ) ? intval( $pa...
$external_link_id = ! empty( $params['external_link_id']...
$limit = ! empty( $params['limit'] ) ? intval( $params['...
$_order = strtolower(@$params['order']) == 'asc' ? 'ASC'...
$postorder = ! empty( $params['postorder'] ) ? intval( $...
$item = ! empty( $params['item'] ) ? $params['item'] : '...
if ( $_order != '') {
$disp_order = $_order ;
$whr_order = "post_time DESC";
} else {
switch ($postorder) {
case 0:
$whr_order = "t.topic_id ASC,p.order_in_tree,p.post_i...
break;
case 2:
$disp_order = 'ASC' ;
$whr_order = "post_time DESC";
break;
case 3:
$whr_order = "post_time DESC";
break;
default:
}
}
if( ! preg_match( '/^[0-9a-zA-Z_-]+$/' , $forum_dirname ...
echo "<p>d3comment_tree function does not set properly....
} else {
$db =& Database::getInstance() ;
$myts =& MyTextSanitizer::getInstance() ;
// main query
$sql = "SELECT p.*,t.topic_locked,t.topic_id,t.forum_id...
if( ! $trs = $db->query( $sql ) ) die( _MD_D3FORUM_ERR_...
$user_handler =& xoops_gethandler( 'user' ) ;
$topics_count = 0;
$topic_last_id = 0;
while( $post_row = $db->fetchArray( $trs ) ) {
// get this poster's object
$poster_obj =& $user_handler->get( intval( $post_row['...
if( is_object( $poster_obj ) ) {
$poster_uname4disp = $poster_obj->getVar( 'uname' ) ;
} else {
$poster_uname4disp = "" ;
}
$poster_uname4disp = $poster_uname4disp ? $poster_unam...
// posts array
$posts[] = array(
'id' => intval( $post_row['post_id'] ) ,
'subject' => $myts->makeTboxData4Show( $post_row['sub...
'post_time_formatted' => formatTimestamp( $post_row['...
'poster_uid' => intval( $post_row['uid'] ) ,
'poster_uname' => $poster_uname4disp ,
'icon' => intval( $post_row['icon'] ) ,
'depth_in_tree' => intval( $post_row['depth_in_tree']...
'order_in_tree' => intval( $post_row['order_in_tree']...
'topic_id' => intval( $post_row['topic_id'] ) ,
'ul_in' => '<ul><li>' ,
'ul_out' => '</li></ul>' ,
) ;
if (intval( $post_row['topic_id'] ) != $topic_last_id) {
$topics_count ++ ;
$topic_last_id = intval( $post_row['topic_id'] );
}
}
// reverse array if order is "ASC"
if (($disp_order == 'ASC') && ($posts)) {$posts = array...
$assign_name = @$params['item'] . @$params['assign'] ;
$smarty->assign( $assign_name , $posts ) ;
$smarty->assign( $assign_name."_tp_count" , $topics_cou...
}
}
?>
}}
*** d3forum_main_listposts.html
テンプレート「(d3forum)_main_listposts.html」を編集します。
(A案)全投稿をツリー表示するか、(B案)当該ツリー以外...
&ref(tree_alltree.jpg,mw:200); &ref(tree_topicslist.jpg,m...
**** A案:全topicの全postsツリー表示
当該元記事にぶらさがる、全トピックの全投稿を、ツリー表...
#code(html,1-){{
<!-- start module contents -->
<div class="d3f_breadcrumbs">
<{if $mod_config.show_breadcrumbs}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3F...
>
<{foreach from=$category.paths_raw key=parent_id item=pa...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>">...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>">...
<{/if}>
<{if $prev_topic.id || $next_topic.id}>
(<{if $prev_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$prev_topic...
<{/if}>
<{if $prev_topic.id && $next_topic.id}>
|
<{/if}>
<{if $next_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$next_topic...
<{/if}>)
<{/if}>
</div>
<h1 class="d3f_title" style="clear:both"><{$topic.title}>...
<{include file="db:`$mydirname`_inc_topicbar.html"}>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if $topic.external_link_id && ($tree_tp_count > 1) && ...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<br />
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder==3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$tree|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- top of posts -->
<div class="d3f_wrap">
<{foreach item=post from=$posts}>
<{include file="db:`$mydirname`_inc_eachpost.html" post=...
<{/foreach}>
</div>
<!-- bottom of posts -->
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder!=3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
}}
**** B案:当該topic内postsツリー + 全topicsリスト表示
当該元記事にぶらさがる、全トピックのうち当該トピックの...
#code(html,1-){{
<!-- start module contents -->
<div class="d3f_breadcrumbs">
<{if $mod_config.show_breadcrumbs}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3F...
>
<{foreach from=$category.paths_raw key=parent_id item=pa...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>">...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>">...
<{/if}>
<{if $prev_topic.id || $next_topic.id}>
(<{if $prev_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$prev_topic...
<{/if}>
<{if $prev_topic.id && $next_topic.id}>
|
<{/if}>
<{if $next_topic.id}>
<a href="<{$mod_url}>/index.php?topic_id=<{$next_topic...
<{/if}>)
<{/if}>
</div>
<h1 class="d3f_title" style="clear:both"><{$topic.title}>...
<{include file="db:`$mydirname`_inc_topicbar.html"}>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.topic_id==$topic.id)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end topic list -->
<!-- start topic list -->
<{if $topic.external_link_id && ($tree_tp_count>1)}>
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.depth_in_tree==0)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<{/if}>
<!-- end post tree -->
<br />
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<br />
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder==3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$tree|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- top of posts -->
<div class="d3f_wrap">
<{foreach item=post from=$posts}>
<{include file="db:`$mydirname`_inc_eachpost.html" post=...
<{/foreach}>
</div>
<!-- bottom of posts -->
<{include file="db:`$mydirname`_inc_postorder_links.html"}>
<!-- quick reply form -->
<{if $first_post.can_reply && ($postorder!=3)}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
<!-- start module contents -->
<!-- breadcrumbs -->
<{if $mod_config.show_breadcrumbs}>
<div class="d3f_breadcrumbs">
<{strip}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3...
>
<{foreach from=$category.paths_raw key=parent_id item=p...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>"...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>"...
>
<a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"...
<{/strip}>
</div>
<{/if}>
<h1 class="d3f_title"><{$post.subject}></h1>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$posts item=eachpost}>
<{if $eachpost.id == $post.id}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{else}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{/if}>
<a href="<{$mod_url}>/index.php?post_id=<{$eachpost.id}>...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start topic list -->
<{if $topic.external_link_id && ($tree_tp_count>1)}>
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.depth_in_tree==0)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<{/if}>
<!-- end post tree -->
<br />
<p class="d3f_topicinfo"><a href="<{$mod_url}>/index.php?...
<div class="d3f_wrap">
<{include file="db:`$mydirname`_inc_eachpost.html" caller...
</div>
<!-- quick reply form -->
<{if $post.can_reply}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
}}
*** d3forum_main_viewpost.html
1ポスト表示においても、上記のB案に準じたtopicsリスト表...
&ref(tree_viewpost.jpg,mw:200,mh:200);
#code(html,1-){{
<!-- start module contents -->
<!-- breadcrumbs -->
<{if $mod_config.show_breadcrumbs}>
<div class="d3f_breadcrumbs">
<{strip}>
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3...
>
<{foreach from=$category.paths_raw key=parent_id item=p...
<a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>"...
>
<{/foreach}>
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>"...
>
<a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"...
<{/strip}>
</div>
<{/if}>
<h1 class="d3f_title"><{$post.subject}></h1>
<{include file="db:`$mydirname`_inc_d3comment_summary.htm...
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$posts item=eachpost}>
<{if $eachpost.id == $post.id}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{else}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<{/if}>
<a href="<{$mod_url}>/index.php?post_id=<{$eachpost.id}>...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start topic list -->
<{if $topic.external_link_id && ($tree_tp_count>1)}>
<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3...
<{foreach from=$tree item=eachpost}>
<{if ($eachpost.depth_in_tree==0)}>
<{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbra...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth...
<{/if}>
<{$eachpost.ul_out}>
<{/foreach}>
<{/if}>
<!-- end post tree -->
<br />
<p class="d3f_topicinfo"><a href="<{$mod_url}>/index.php?...
<div class="d3f_wrap">
<{include file="db:`$mydirname`_inc_eachpost.html" caller...
</div>
<!-- quick reply form -->
<{if $post.can_reply}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- forum jump -->
<form name="forum_jump_box" action="<{$mod_url}>/index.ph...
<p>
<select name="forum_id"><{$forum_jumpbox_options}></sel...
<input type="submit" value="<{$smarty.const._MD_D3FORUM...
<a href="<{$mod_url}>/index.php?page=search"><{$smarty....
</p>
</form>
<hr class="notification" />
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
}}
*** おまけ d3forum_comment_listposts_flat.html
**** おまけ-1(A案)
テンプレート「(d3forum)_comment_listposts_flat.html」の...
但し、%%コメント元のモジュール単位でパラメータ変更ができ...
#code(html,1-){{
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<!-- start post tree -->
<h2 class="head d3f_tree d3f_head"><a name="comment"><{$s...
<{foreach from=$tree item=eachpost}>
<ul class='d3f_eachbranch'><{"<span style='padding-left:...
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
<{$eachpost.ul_out}>
<{/foreach}>
<!-- end post tree -->
}}
**** おまけ-2(B案)
上記「おまけ」の記述だと、ツリーをクリックするとd3forumの...
[[表示例:http://www.naaon.com/modules/plactice/index.php/...
ちょっと「くどい」気もしますが、サイト管理上の使い勝手は...
なお、ALTSYSでフォーラムの言語定数設定にて、「_MD_D3FORUM...
#code(html,1-){{
<h2 class="head d3f_tree d3f_head"><a name="comment"><{$s...
<!-- start post tree -->
<{foreach from=$posts item=eachpost}>
<ul class='d3f_eachbranch'><{"<span style='padding-left:...
<a href="#post_id<{$eachpost.id}>" id="post_path<{$eachp...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{if $forum.isadminormod}><a href="<{$mod_url}>/index.ph...
</ul>
<{/foreach}>
<!-- end post tree -->
<br />
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$post_hits|string_format:$smarty.const._MD_D3FORUM_FMT...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<br />
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum...
<{if $tree_tp_count > 1}>
<{foreach from=$tree item=eachpost}>
<{if $eachpost.depth_in_tree == 0}>
<a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.top...
(<{$eachpost.poster_uname}>, <{$eachpost.post_time_forma...
<{/if}>
<{/foreach}>
<{/if}>
<{if $plugin_params.order != 'asc'}>
<!-- begin simple comment form -->
<{if $forum.can_post && ! $plugin_params.no_form}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- end simple comment form -->
<{/if}>
<h2 class="head"><{if $plugin_params.h2_comments}><{$plug...
<{if $pagenav}><div class="d3f_pagenav"><{$pagenav}></div...
<{if $forum.can_post && $plugin_params.no_form}>
<!-- link to comment input form -->
<div><a href="<{$mod_url}>/index.php?page=newtopic&f...
<{/if}>
<!-- top of posts -->
<div class="d3f_wrap" id="d3comment_listposts_flat">
<{foreach item=post from=$posts}>
<div class="head d3f_head">
<a href="<{$mod_url}>/index.php?post_id=<{$post.id}>" id...
</div>
<div class="d3f_info_ctrl" style="float:right;">
<{if $post.can_edit}>
<a href="<{$mod_url}>/index.php?page=edit&post_id=<{...
<{/if}>
<{if $post.can_delete}>
<a href="<{$mod_url}>/index.php?page=delete&post_id=...
<{/if}>
<{if $post.can_reply}>
<a href="<{$mod_url}>/index.php?page=reply&post_id=<...
<{/if}>
</div>
<div class="d3f_info even">
<{if $post.poster_uid != 0}><a href="<{$xoops_url}>/user...
<{$smarty.const._MD_D3FORUM_ON}> <{$post.post_time_forma...
</div>
<div class="d3f_body" style="padding: 2px 2px 16px 16px; ...
<{$post.post_text}>
</div>
<{/foreach}>
</div>
<!-- bottom of posts -->
<div class="d3f_link">
<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_F...
(<{$post_hits|string_format:$smarty.const._MD_D3FORUM_FMT...
<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&am...
<{if $pagenav}><div class="d3f_pagenav"><{$pagenav}></div...
<{if $plugin_params.order == 'asc'}>
<!-- begin simple comment form -->
<{if $forum.can_post && ! $plugin_params.no_form}>
<{include file="db:`$mydirname`_inc_post_form_quick.html...
<{/if}>
<!-- end simple comment form -->
<{/if}>
}}
ページ名:
ぺージ情報
ぺージ名 :
inc/d3forum/d3com_tree
ページ別名 :
未設定
ページ作成 :
なーお
閲覧可
グループ :
すべての訪問者
ユーザー :
すべての訪問者
編集可
グループ :
なし
ユーザー :
なし
Counter: 0, today: 0, yesterday: 0
Go Page Top
Powered by
XOOPS Cube
2.2 © 2001-2012
XOOPS Cube Project
, theme design by
BCOOL
ログイン
ユーザ名:
パスワード:
IDとパスワードを記憶
パスワード紛失
新規登録
メインメニュー
ホーム
なーお'nぶろぐ
フォーラム
なーお'n研究室
xpwiki
最新ページ一覧
全ページ一覧
ヘルプ
新着情報
マイアルバム
ラン記録
大会リスト
シューズリスト
画像マネージャ
マイフレンド
WEBリンク集