diff --git a/templates/skin/new/topic.tpl b/templates/skin/new/topic.tpl index 49fad867..38923fd1 100644 --- a/templates/skin/new/topic.tpl +++ b/templates/skin/new/topic.tpl @@ -1,72 +1,2 @@ - - {assign var="oBlog" value=$oTopic->getBlog()} - {assign var="oUser" value=$oTopic->getUser()} - {assign var="oVote" value=$oTopic->getVote()} - -
-
-

- {if $oTopic->getPublish()==0} - {$aLang.topic_unpublish} - {/if} - {$oTopic->getTitle()|escape:'html'} - {if $oTopic->getType()=='link'} - {$aLang.topic_link} - {/if} -

- -
- - - {if $oTopic->getType()=='question'} - -
- {if !$oTopic->getUserQuestionIsVote()} -
    - {foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer} -
  • - {/foreach} -
  • - - -
  • - -
- {$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()}. {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}
- {else} - {include file='topic_question.tpl'} - {/if} -
-
- - {/if} - - {$oTopic->getText()} -
- - - {hook run='topic_show_end' topic=$oTopic} -
- \ No newline at end of file +{assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"} +{include file=$sTopicTemplateName} \ No newline at end of file diff --git a/templates/skin/new/topic_link.tpl b/templates/skin/new/topic_link.tpl new file mode 100644 index 00000000..f8484a45 --- /dev/null +++ b/templates/skin/new/topic_link.tpl @@ -0,0 +1,66 @@ + + {assign var="oBlog" value=$oTopic->getBlog()} + {assign var="oUser" value=$oTopic->getUser()} + {assign var="oVote" value=$oTopic->getVote()} + +
+
+

+ {if $oTopic->getPublish()==0} + {$aLang.topic_unpublish} + {/if} + {$oTopic->getTitle()|escape:'html'} + {$aLang.topic_link} +

+ +
+ + {if $bTopicList} + {$oTopic->getTextShort()} + {if $oTopic->getTextShort()!=$oTopic->getText()} +

( + {if $oTopic->getCutText()} + {$oTopic->getCutText()} + {else} + {$aLang.topic_read_more} + {/if} + ) + {/if} + {else} + {$oTopic->getText()} + {/if} +
+ + + {hook run='topic_show_end' topic=$oTopic} +
+ \ No newline at end of file diff --git a/templates/skin/new/topic_list.tpl b/templates/skin/new/topic_list.tpl index 9cf0bdf4..c7ab6ff2 100644 --- a/templates/skin/new/topic_list.tpl +++ b/templates/skin/new/topic_list.tpl @@ -3,89 +3,9 @@ {assign var="oBlog" value=$oTopic->getBlog()} {assign var="oUser" value=$oTopic->getUser()} {assign var="oVote" value=$oTopic->getVote()} - -
- -
- -

- {if $oTopic->getPublish()==0} - {$aLang.topic_unpublish} - {/if} - {$oTopic->getTitle()|escape:'html'} - {if $oTopic->getType()=='link'} - {$aLang.topic_link} - {/if} -

- -
- - {if $oTopic->getType()=='question'} - -
- {if !$oTopic->getUserQuestionIsVote()} -
    - {foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer} -
  • - {/foreach} -
  • - - -
  • - -
- {$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()}. {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}
- {else} - {include file='topic_question.tpl'} - {/if} -
-
- - {/if} - - {$oTopic->getTextShort()} - {if $oTopic->getTextShort()!=$oTopic->getText()} -

( - {if $oTopic->getCutText()} - {$oTopic->getCutText()} - {else} - {$aLang.topic_read_more} - {/if} - ) - {/if} -
- - -
+ + {assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"} + {include file=$sTopicTemplateName bTopicList=true} {/foreach} diff --git a/templates/skin/new/topic_question.tpl b/templates/skin/new/topic_question.tpl index 53f43eee..6c49ed9e 100644 --- a/templates/skin/new/topic_question.tpl +++ b/templates/skin/new/topic_question.tpl @@ -1,3 +1,48 @@ + + {assign var="oBlog" value=$oTopic->getBlog()} + {assign var="oUser" value=$oTopic->getUser()} + {assign var="oVote" value=$oTopic->getVote()} + +
+
+

+ {if $oTopic->getPublish()==0} + {$aLang.topic_unpublish} + {/if} + {if $bTopicList} + {$oTopic->getTitle()|escape:'html'} + + {else} + {$oTopic->getTitle()|escape:'html'} + {/if} +

+ +
+ + + +
+ {if !$oTopic->getUserQuestionIsVote()} +
    + {foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer} +
  • + {/foreach} +
  • + + +
  • + +
+ {$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()}. {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}
+ {else}
    {foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
  • getQuestionAnswerMax()==$aAnswer.count}class="most"{/if}> @@ -9,4 +54,48 @@ {/foreach}
{$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()}. {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}
- \ No newline at end of file + {/if} +
+
+ + {if $bTopicList} + {$oTopic->getTextShort()} + {if $oTopic->getTextShort()!=$oTopic->getText()} +

( + {if $oTopic->getCutText()} + {$oTopic->getCutText()} + {else} + {$aLang.topic_read_more} + {/if} + ) + {/if} + + {else} + {$oTopic->getText()} + {/if} +
+ + + {hook run='topic_show_end' topic=$oTopic} +
+ \ No newline at end of file diff --git a/templates/skin/new/topic_topic.tpl b/templates/skin/new/topic_topic.tpl new file mode 100644 index 00000000..2e6d02ec --- /dev/null +++ b/templates/skin/new/topic_topic.tpl @@ -0,0 +1,69 @@ + + {assign var="oBlog" value=$oTopic->getBlog()} + {assign var="oUser" value=$oTopic->getUser()} + {assign var="oVote" value=$oTopic->getVote()} + +
+
+

+ {if $oTopic->getPublish()==0} + {$aLang.topic_unpublish} + {/if} + {if $bTopicList} + {$oTopic->getTitle()|escape:'html'} + {else} + {$oTopic->getTitle()|escape:'html'} + {/if} +

+ +
+ {if $bTopicList} + {$oTopic->getTextShort()} + {if $oTopic->getTextShort()!=$oTopic->getText()} +

( + {if $oTopic->getCutText()} + {$oTopic->getCutText()} + {else} + {$aLang.topic_read_more} + {/if} + ) + {/if} + {else} + + {$oTopic->getText()} + {/if} + +
+ + + {hook run='topic_show_end' topic=$oTopic} +
+ \ No newline at end of file