1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-14 23:08:18 +03:00

новые хуки

This commit is contained in:
Mzhelskiy Maxim 2012-07-26 14:51:31 +04:00
parent 1967503303
commit c3df2d65d2
5 changed files with 10 additions and 0 deletions

View file

@ -687,7 +687,10 @@ class ActionTalk extends Action {
/**
* Добавляем коммент
*/
$this->Hook_Run('talk_comment_add_before', array('oCommentNew'=>$oCommentNew,'oCommentParent'=>$oCommentParent,'oTalk'=>$oTalk));
if ($this->Comment_AddComment($oCommentNew)) {
$this->Hook_Run('talk_comment_add_after', array('oCommentNew'=>$oCommentNew,'oCommentParent'=>$oCommentParent,'oTalk'=>$oTalk));
$this->Viewer_AssignAjax('sCommentId',$oCommentNew->getId());
$oTalk->setDateLast(date("Y-m-d H:i:s"));
$oTalk->setUserIdLast($oCommentNew->getUserId());

View file

@ -48,6 +48,7 @@
<ul class="topic-info">
<li class="topic-info-favourite"><a href="#" onclick="return ls.favourite.toggle({$oTalk->getId()},this,'talk');" class="favourite {if $oTalk->getIsFavourite()}active{/if}"></a></li>
<li class="delete"><a href="{router page='talk'}delete/{$oTalk->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('{$aLang.talk_inbox_delete_confirm}');" class="delete">{$aLang.delete}</a></li>
{hook run='talk_read_info_item' talk=$oTalk}
</ul>
</footer>
</article>

View file

@ -5,6 +5,8 @@
iMaxIdComment=$iMaxIdComment
}
{hook run='comment_tree_begin' iTargetId=$iTargetId sTargetType=$sTargetType}
<div class="comments" id="comments">
<header class="comments-header">
<h3><span id="count-comments">{$iCountComment}</span> {$iCountComment|declension:$aLang.comment_declension:'russian'}</h3>
@ -46,6 +48,7 @@
{include file='comment_paging.tpl' aPagingCmt=$aPagingCmt}
{hook run='comment_tree_end' iTargetId=$iTargetId sTargetType=$sTargetType}
{if $bAllowNewComment}
{$sNoticeNotAllow}

View file

@ -33,6 +33,7 @@
</li>
<li class="topic-info-favourite" onclick="return ls.favourite.toggle({$oTalk->getId()},$('#fav_topic_{$oTalk->getId()}'),'talk');"><i id="fav_topic_{$oTalk->getId()}" class="favourite {if $oTalk->getIsFavourite()}active{/if}"></i></li>
<li class="delete"><a href="{router page='talk'}delete/{$oTalk->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('{$aLang.talk_inbox_delete_confirm}');" class="delete">{$aLang.delete}</a></li>
{hook run='talk_read_info_item' talk=$oTalk}
</ul>
</footer>
</article>

View file

@ -5,6 +5,7 @@
iMaxIdComment=$iMaxIdComment
}
{hook run='comment_tree_begin' iTargetId=$iTargetId sTargetType=$sTargetType}
<div class="comments" id="comments">
<header class="comments-header">
@ -48,6 +49,7 @@
{include file='comment_paging.tpl' aPagingCmt=$aPagingCmt}
{hook run='comment_tree_end' iTargetId=$iTargetId sTargetType=$sTargetType}
{if $bAllowNewComment}
{$sNoticeNotAllow}