4: 2009-04-13 (月) 12:03:39 なーお ソース 現: 2019-08-17 (土) 07:11:56 なーお ソース
Line 6: Line 6:
+ 表示中のツリーを判別するためのインジケータ (テンプレート側で編集) + 表示中のツリーを判別するためのインジケータ (テンプレート側で編集)
++ ツリー(トピック)が2つ以上の場合のみ表示するように変更しました。 ++ ツリー(トピック)が2つ以上の場合のみ表示するように変更しました。
 ++ 当該元記事についた全コメントをツリー表示するか、そのトピだけツリー表示として他のトピックはトピックリスト表示とするか、テンプレートの編集のみで対応できます。
まだまだ未熟ですが、現状でよろしければどうぞお試しください。 まだまだ未熟ですが、現状でよろしければどうぞお試しください。
Line 24: Line 25:
#code(html,nonumber){{ #code(html,nonumber){{
<{d3comment_tree forum_dirname=$mydirname forum_id=$forum.id topic_id=$topic.id external_link_id=$topic.external_link_id order="ASC" postorder=$postorder item="tree"}> <{d3comment_tree forum_dirname=$mydirname forum_id=$forum.id topic_id=$topic.id external_link_id=$topic.external_link_id order="ASC" postorder=$postorder item="tree"}>
 +
}} }}
Line 93: Line 95:
     }      }
    }     }
 +    
    if( ! preg_match( '/^[0-9a-zA-Z_-]+$/' , $forum_dirname ) || $forum_id <= 0 || $external_link_id <= 0 ) {     if( ! preg_match( '/^[0-9a-zA-Z_-]+$/' , $forum_dirname ) || $forum_id <= 0 || $external_link_id <= 0 ) {
     echo "<p>d3comment_tree function does not set properly.</p>" ;      echo "<p>d3comment_tree function does not set properly.</p>" ;
Line 106: Line 108:
     if( ! $trs = $db->query( $sql ) ) die( _MD_D3FORUM_ERR_SQL.__LINE__ ) ;      if( ! $trs = $db->query( $sql ) ) die( _MD_D3FORUM_ERR_SQL.__LINE__ ) ;
     $user_handler =& xoops_gethandler( 'user' ) ;      $user_handler =& xoops_gethandler( 'user' ) ;
 +    
     $topics_count = 0;      $topics_count = 0;
     $topic_last_id = 0;      $topic_last_id = 0;
Line 139: Line 141:
     }      }
     }      }
 +    
     // reverse array if order is "ASC"      // reverse array if order is "ASC"
     if (($disp_order == 'ASC') && ($posts)) {$posts = array_reverse($posts);}      if (($disp_order == 'ASC') && ($posts)) {$posts = array_reverse($posts);}
 +    
     $assign_name = @$params['item'] . @$params['assign'] ;      $assign_name = @$params['item'] . @$params['assign'] ;
     $smarty->assign( $assign_name , $posts ) ;      $smarty->assign( $assign_name , $posts ) ;
Line 153: Line 155:
*** d3forum_main_listposts.html [#q607f13d] *** d3forum_main_listposts.html [#q607f13d]
テンプレート「(d3forum)_main_listposts.html」を編集します。 テンプレート「(d3forum)_main_listposts.html」を編集します。
 +(A案)全投稿をツリー表示するか、(B案)当該ツリー以外はトピックリストを表示するか、テンプレートの編集で選択できます。
 +&ref(tree_alltree.jpg,mw:200); &ref(tree_topicslist.jpg,mw:200);
 +
**** A案:全topicの全postsツリー表示 [#f8cf2264] **** A案:全topicの全postsツリー表示 [#f8cf2264]
 当該元記事にぶらさがる、全トピックの全投稿を、ツリー表示します。  当該元記事にぶらさがる、全トピックの全投稿を、ツリー表示します。
Line 348: Line 353:
<hr class="notification" /> <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_D3FORUM_TOP}></a>
 +      > 
 +     <{foreach from=$category.paths_raw key=parent_id item=parent_title_raw}>
 +     <a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>"><{$parent_title_raw|escape}></a>
 +      >
 +     <{/foreach}>
 +     <a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>"><{$forum.title}></a>
 +      >
 +     <a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"><{$topic.title}></a>
 +    <{/strip}>
 +</div>
 +<{/if}>
 +
 +<h1 class="d3f_title"><{$post.subject}></h1>
 +
 +<{include file="db:`$mydirname`_inc_d3comment_summary.html"}>
 +
 +<div class="d3f_link">
 +<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_FMT_POSTDISPLAYSINFO}>
 +<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&external_link_id=<{$topic.external_link_id|escape:"url"}>"><{$smarty.const._MD_D3FORUM_LINK_LISTALLCOMMENTS}></a></div>
 +
 +<!-- start post tree -->
 +<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3FORUM_POSTSTREE}></h2>
 +
 +<{foreach from=$posts item=eachpost}>
 +<{if $eachpost.id == $post.id}>
 +    <{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbranch'>\n\t"|replace:"<li>":"<li class='d3f_eachbranchitem d3f_currenttopic'><span style='padding-left:`$eachpost.depth_in_tree`0px;'>"}>
 +<{else}>
 +    <{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbranch'>\n\t"|replace:"<li>":"<li class='d3f_eachbranchitem'><span style='padding-left:`$eachpost.depth_in_tree`0px;'>"}>
 +<{/if}>
 +    <a href="<{$mod_url}>/index.php?post_id=<{$eachpost.id}>" id="post_path<{$eachpost.unique_path}>" name="post_path<{$eachpost.unique_path}>"><img src="<{$mod_imageurl}>/posticon<{$eachpost.icon}>.gif" alt="<{$icon_meanings[$eachpost.icon]}>" /> <{$eachpost.subject}></a>
 +    (<{$eachpost.poster_uname}>, <{$eachpost.post_time_formatted}>)
 +    <{if $forum.isadminormod}><a href="<{$mod_url}>/index.php?page=cutpasteposts&post_id=<{$eachpost.id}>"><img src="<{$mod_imageurl}>/adminicon_cutpaste.gif" alt="<{$smarty.const._MD_D3FORUM_CUTPASTEPOSTS}>" /></a><{/if}></span>
 +<{$eachpost.ul_out}>
 +<{/foreach}>
 +<!-- end post tree -->
 +
 +<{d3comment_tree forum_dirname=$mydirname forum_id=$forum.id topic_id=$topic.id external_link_id=$topic.external_link_id postorder=$postorder item="tree"}>
 +<!-- start topic list  -->
 +<{if $topic.external_link_id && ($tree_tp_count>1)}>
 +<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3FORUM_LINK_LISTALLCOMMENTS}></h2>
 +<{foreach from=$tree item=eachpost}>
 +  <{if ($eachpost.depth_in_tree==0)}>
 +    <{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbranch'>\n\t"|replace:"<li>":"<li class='d3f_eachbranchitem'>"}>
 +    <a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.topic_id}>#post_id<{$eachpost.id}>" id="post_path<{$eachpost.unique_path}>" name="post_path<{$eachpost.unique_path}>"><img src="<{$mod_imageurl}>/posticon<{$eachpost.icon}>.gif" alt="<{$icon_meanings[$eachpost.icon]}>" /> <{$eachpost.subject}></a>
 +    (<{$eachpost.poster_uname}>, <{$eachpost.post_time_formatted}>)
 +    <{if $forum.isadminormod}><a href="<{$mod_url}>/index.php?page=cutpasteposts&post_id=<{$eachpost.id}>"><img src="<{$mod_imageurl}>/adminicon_cutpaste.gif" alt="<{$smarty.const._MD_D3FORUM_CUTPASTEPOSTS}>" /></a><{/if}>
 +    <{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth_in_tree==0)}><font color="red">★表示中トピック</font><{/if}>
 +  <{/if}>
 +<{$eachpost.ul_out}>
 +<{/foreach}>
 +<{/if}>
 +<!-- end post tree  -->
 +<br />
 +<p class="d3f_topicinfo"><a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"><{$smarty.const._MD_D3FORUM_LINK_LISTPOSTS}></a></p>
 +
 +<div class="d3f_wrap">
 +<{include file="db:`$mydirname`_inc_eachpost.html" caller="viewpost" inner_link_format="`$mod_url`/index.php?post_id=%s"}>
 +</div>
 +
 +<!-- quick reply form -->
 +<{if $post.can_reply}>
 +    <{include file="db:`$mydirname`_inc_post_form_quick.html" uname=$xoops_uname h2_title=$smarty.const._MD_D3FORUM_REPLYTHISPOST quick_form_mode="reply" subject_raw=$post.subject_raw}>
 +<{/if}>
 +
 +<!-- forum jump -->
 +<form name="forum_jump_box" action="<{$mod_url}>/index.php" method="get" style="clear:both;">
 +    <p>
 +     <select name="forum_id"><{$forum_jumpbox_options}></select>
 +     <input type="submit" value="<{$smarty.const._MD_D3FORUM_BTN_JUMPTOFORUM}>" />
 +      
 +     <a href="<{$mod_url}>/index.php?page=search"><{$smarty.const._MD_D3FORUM_LINK_ADVSEARCH}></a>
 +    </p>
 +</form>
 +
 +<hr class="notification" />
 +
 +<{include file='db:system_notification_select.html'}>
 +<!-- end module contents -->
 +}}
 +
 +*** d3forum_main_viewpost.html [#kb559619]
 +1ポスト表示においても、上記のB案に準じたtopicsリスト表示が希望の場合には、テンプレート「(d3forum)_main_viewpost.html」を編集します。
 +&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_D3FORUM_TOP}></a>
 +      > 
 +     <{foreach from=$category.paths_raw key=parent_id item=parent_title_raw}>
 +     <a href="<{$mod_url}>/index.php?cat_id=<{$parent_id}>"><{$parent_title_raw|escape}></a>
 +      >
 +     <{/foreach}>
 +     <a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>"><{$forum.title}></a>
 +      >
 +     <a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"><{$topic.title}></a>
 +    <{/strip}>
 +</div>
 +<{/if}>
 +
 +<h1 class="d3f_title"><{$post.subject}></h1>
 +
 +<{include file="db:`$mydirname`_inc_d3comment_summary.html"}>
 +
 +<div class="d3f_link">
 +<{$posts|@count|string_format:$smarty.const._MD_D3FORUM_FMT_POSTDISPLAYSINFO}>
 +<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>&external_link_id=<{$topic.external_link_id|escape:"url"}>"><{$smarty.const._MD_D3FORUM_LINK_LISTALLCOMMENTS}></a></div>
 +
 +<!-- start post tree -->
 +<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3FORUM_POSTSTREE}></h2>
 +
 +<{foreach from=$posts item=eachpost}>
 +<{if $eachpost.id == $post.id}>
 +    <{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbranch'>\n\t"|replace:"<li>":"<li class='d3f_eachbranchitem d3f_currenttopic'><span style='padding-left:`$eachpost.depth_in_tree`0px;'>"}>
 +<{else}>
 +    <{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbranch'>\n\t"|replace:"<li>":"<li class='d3f_eachbranchitem'><span style='padding-left:`$eachpost.depth_in_tree`0px;'>"}>
 +<{/if}>
 +    <a href="<{$mod_url}>/index.php?post_id=<{$eachpost.id}>" id="post_path<{$eachpost.unique_path}>" name="post_path<{$eachpost.unique_path}>"><img src="<{$mod_imageurl}>/posticon<{$eachpost.icon}>.gif" alt="<{$icon_meanings[$eachpost.icon]}>" /> <{$eachpost.subject}></a>
 +    (<{$eachpost.poster_uname}>, <{$eachpost.post_time_formatted}>)
 +    <{if $forum.isadminormod}><a href="<{$mod_url}>/index.php?page=cutpasteposts&post_id=<{$eachpost.id}>"><img src="<{$mod_imageurl}>/adminicon_cutpaste.gif" alt="<{$smarty.const._MD_D3FORUM_CUTPASTEPOSTS}>" /></a><{/if}></span>
 +<{$eachpost.ul_out}>
 +<{/foreach}>
 +<!-- end post tree -->
 +
 +<{d3comment_tree forum_dirname=$mydirname forum_id=$forum.id topic_id=$topic.id external_link_id=$topic.external_link_id postorder=$postorder item="tree"}>
 +<!-- start topic list  -->
 +<{if $topic.external_link_id && ($tree_tp_count>1)}>
 +<h2 class="head d3f_tree d3f_head"><{$smarty.const._MD_D3FORUM_LINK_LISTALLCOMMENTS}></h2>
 +<{foreach from=$tree item=eachpost}>
 +  <{if ($eachpost.depth_in_tree==0)}>
 +    <{$eachpost.ul_in|replace:"<ul>":"<ul class='d3f_eachbranch'>\n\t"|replace:"<li>":"<li class='d3f_eachbranchitem'>"}>
 +    <a href="<{$mod_url}>/index.php?topic_id=<{$eachpost.topic_id}>#post_id<{$eachpost.id}>" id="post_path<{$eachpost.unique_path}>" name="post_path<{$eachpost.unique_path}>"><img src="<{$mod_imageurl}>/posticon<{$eachpost.icon}>.gif" alt="<{$icon_meanings[$eachpost.icon]}>" /> <{$eachpost.subject}></a>
 +    (<{$eachpost.poster_uname}>, <{$eachpost.post_time_formatted}>)
 +    <{if $forum.isadminormod}><a href="<{$mod_url}>/index.php?page=cutpasteposts&post_id=<{$eachpost.id}>"><img src="<{$mod_imageurl}>/adminicon_cutpaste.gif" alt="<{$smarty.const._MD_D3FORUM_CUTPASTEPOSTS}>" /></a><{/if}>
 +    <{if ($eachpost.topic_id==$topic.id) && ($eachpost.depth_in_tree==0)}><font color="red">★表示中トピック</font><{/if}>
 +  <{/if}>
 +<{$eachpost.ul_out}>
 +<{/foreach}>
 +<{/if}>
 +<!-- end post tree  -->
 +<br />
 +<p class="d3f_topicinfo"><a href="<{$mod_url}>/index.php?topic_id=<{$topic.id}>"><{$smarty.const._MD_D3FORUM_LINK_LISTPOSTS}></a></p>
 +
 +<div class="d3f_wrap">
 +<{include file="db:`$mydirname`_inc_eachpost.html" caller="viewpost" inner_link_format="`$mod_url`/index.php?post_id=%s"}>
 +</div>
 +
 +<!-- quick reply form -->
 +<{if $post.can_reply}>
 +    <{include file="db:`$mydirname`_inc_post_form_quick.html" uname=$xoops_uname h2_title=$smarty.const._MD_D3FORUM_REPLYTHISPOST quick_form_mode="reply" subject_raw=$post.subject_raw}>
 +<{/if}>
 +
 +<!-- forum jump -->
 +<form name="forum_jump_box" action="<{$mod_url}>/index.php" method="get" style="clear:both;">
 +    <p>
 +     <select name="forum_id"><{$forum_jumpbox_options}></select>
 +     <input type="submit" value="<{$smarty.const._MD_D3FORUM_BTN_JUMPTOFORUM}>" />
 +      
 +     <a href="<{$mod_url}>/index.php?page=search"><{$smarty.const._MD_D3FORUM_LINK_ADVSEARCH}></a>
 +    </p>
 +</form>
 +
 +<hr class="notification" />
 +
<{include file='db:system_notification_select.html'}> <{include file='db:system_notification_select.html'}>
<!-- end module contents --> <!-- end module contents -->
Line 441: Line 620:
    <a href="<{$mod_url}>/index.php?page=edit&post_id=<{$post.id}>"><{$smarty.const._MD_D3FORUM_POSTEDIT}></a> |     <a href="<{$mod_url}>/index.php?page=edit&post_id=<{$post.id}>"><{$smarty.const._MD_D3FORUM_POSTEDIT}></a> |
    <{/if}>     <{/if}>
 +    
    <{if $post.can_delete}>     <{if $post.can_delete}>
    <a href="<{$mod_url}>/index.php?page=delete&post_id=<{$post.id}>"><{$smarty.const._MD_D3FORUM_POSTDELETE}></a> |     <a href="<{$mod_url}>/index.php?page=delete&post_id=<{$post.id}>"><{$smarty.const._MD_D3FORUM_POSTDELETE}></a> |
    <{/if}>     <{/if}>
 +    
    <{if $post.can_reply}>     <{if $post.can_reply}>
    <a href="<{$mod_url}>/index.php?page=reply&post_id=<{$post.id}>"><{$smarty.const._MD_D3FORUM_POSTREPLY}></a>     <a href="<{$mod_url}>/index.php?page=reply&post_id=<{$post.id}>"><{$smarty.const._MD_D3FORUM_POSTREPLY}></a>


トップ   差分 バックアップ 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 3603, today: 1, yesterday: 0