1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 07:54:24 +03:00

Хуки при выводе топиков Issue #40

This commit is contained in:
Mzhelskiy Maxim 2011-12-05 15:47:02 +04:00
parent a7cc4c6150
commit 71f4a16ec9
8 changed files with 88 additions and 75 deletions

View file

@ -26,20 +26,22 @@
<div class="content">
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
{if $oTopic->getCutText()}
{$oTopic->getCutText()}
{else}
{$aLang.topic_read_more}
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
{if $oTopic->getCutText()}
{$oTopic->getCutText()}
{else}
{$aLang.topic_read_more}
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>

View file

@ -42,6 +42,7 @@ jQuery(window).load(function($) {
{assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
<div class="content">
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
@ -56,6 +57,7 @@ jQuery(window).load(function($) {
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>
<!-- Topic Photo Image List -->

View file

@ -22,55 +22,55 @@
{/if}
</ul>
<div id="topic_question_area_{$oTopic->getId()}" class="poll">
{if !$oTopic->getUserQuestionIsVote()}
<ul class="poll-vote">
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
<li><label><input type="radio" id="topic_answer_{$oTopic->getId()}_{$key}" name="topic_answer_{$oTopic->getId()}" value="{$key}" onchange="$('#topic_answer_{$oTopic->getId()}_value').val($(this).val());" /> {$aAnswer.text|escape:'html'}</label></li>
{/foreach}
</ul>
<input type="submit" value="{$aLang.topic_question_vote}" onclick="ls.poll.vote({$oTopic->getId()},$('#topic_answer_{$oTopic->getId()}_value').val());" />
<input type="submit" value="{$aLang.topic_question_abstain}" onclick="ls.poll.vote({$oTopic->getId()},-1)" />
<input type="hidden" id="topic_answer_{$oTopic->getId()}_value" value="-1" />
<p class="poll-total">{$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()} | {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}</p>
{else}
<ul class="poll-result">
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
<li {if $oTopic->getQuestionAnswerMax()==$aAnswer.count}class="most"{/if}>
<dl>
<dt>
<strong>{$oTopic->getQuestionAnswerPercent($key)}%</strong><br />
<span>({$aAnswer.count})</span>
</dt>
<dd>{$aAnswer.text|escape:'html'}<div style="width: {$oTopic->getQuestionAnswerPercent($key)}%;" ></div></dd>
</dl>
</li>
{/foreach}
</ul>
<p class="poll-total">{$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()} | {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}</p>
{/if}
</div>
<div class="content">
<div id="topic_question_area_{$oTopic->getId()}" class="poll">
{if !$oTopic->getUserQuestionIsVote()}
<ul class="poll-vote">
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
<li><label><input type="radio" id="topic_answer_{$oTopic->getId()}_{$key}" name="topic_answer_{$oTopic->getId()}" value="{$key}" onchange="$('#topic_answer_{$oTopic->getId()}_value').val($(this).val());" /> {$aAnswer.text|escape:'html'}</label></li>
{/foreach}
</ul>
<input type="submit" value="{$aLang.topic_question_vote}" onclick="ls.poll.vote({$oTopic->getId()},$('#topic_answer_{$oTopic->getId()}_value').val());" />
<input type="submit" value="{$aLang.topic_question_abstain}" onclick="ls.poll.vote({$oTopic->getId()},-1)" />
<input type="hidden" id="topic_answer_{$oTopic->getId()}_value" value="-1" />
<p class="poll-total">{$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()} | {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}</p>
{else}
<ul class="poll-result">
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
<li {if $oTopic->getQuestionAnswerMax()==$aAnswer.count}class="most"{/if}>
<dl>
<dt>
<strong>{$oTopic->getQuestionAnswerPercent($key)}%</strong><br />
<span>({$aAnswer.count})</span>
</dt>
<dd>{$aAnswer.text|escape:'html'}<div style="width: {$oTopic->getQuestionAnswerPercent($key)}%;" ></div></dd>
</dl>
</li>
{/foreach}
</ul>
<p class="poll-total">{$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()} | {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}</p>
{/if}
</div>
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
{if $oTopic->getCutText()}
{$oTopic->getCutText()}
{else}
{$aLang.topic_read_more}
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
{if $oTopic->getCutText()}
{$oTopic->getCutText()}
{else}
{$aLang.topic_read_more}
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>

View file

@ -25,20 +25,22 @@
<div class="content">
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
{if $oTopic->getCutText()}
{$oTopic->getCutText()}
{else}
{$aLang.topic_read_more}
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
{if $oTopic->getCutText()}
{$oTopic->getCutText()}
{else}
{$aLang.topic_read_more}
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>

View file

@ -31,6 +31,7 @@
<div class="content">
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
@ -45,6 +46,7 @@
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>

View file

@ -52,6 +52,7 @@
{assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
<div class="content">
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
@ -66,6 +67,7 @@
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>

View file

@ -70,7 +70,7 @@
<div class="content">
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
@ -85,6 +85,7 @@
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>

View file

@ -35,6 +35,7 @@
<div class="content">
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
@ -49,6 +50,7 @@
{else}
{$oTopic->getText()}
{/if}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>