Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.73 KB | None | 0 0
  1. {strip}
  2. {assign var="oCommentAuthor" value=$oComment->getUser()}
  3. {assign var="oCommentAuthorLogin" value=$oCommentAuthor->getLogin()}
  4. {assign var="oCommentAuthorId" value=$oComment->getUserId()}
  5. {assign var="oCommentId" value=$oComment->getId()}
  6. {assign var="oCommentRating" value=$oComment->getRating()}
  7. {assign var="oCommentDate" value=$oComment->getDate()}
  8. {if $oUserCurrent}
  9.     {assign var="oCommentVote" value=$oComment->getVote()}
  10.     {assign var="oCommentVoteCount" value=$oComment->getCountVote()}
  11.     {if $oCommentAuthorId == $oUserCurrent->getId()}
  12.         {assign var="oCommentSelf" value="comment-self"}
  13.     {/if}
  14.     {if $sDateReadLast <= $oCommentDate}
  15.         {assign var="oCommentNew" value="comment-new"}
  16.     {/if}
  17. {/if}
  18.  
  19. <section data-id="{$oCommentId}" id="comment_id_{$oCommentId}" class="comment {if $oComment->isBad()}comment-bad{/if} {if $oComment->getDelete()}comment-deleted{elseif $oUserCurrent and $oComment->getUserId() == $oUserCurrent->getId()} comment-self{elseif $sDateReadLast <= $oComment->getDate()} comment-new{/if}">
  20.     {if $oCommentRating <= $oConfig->GetValue('module.user.bad_rating')}
  21.         <div id="comment_content_id_{$oCommentId}" class="comment-content">
  22.             <div class="text"><em>{$aLang.comment_was_hidden}</em></div>
  23.         </div>
  24.     {elseif !$oComment->getDelete() or $bOneComment or ($oUserCurrent and $oComment->testAllowDelete($oUserCurrent))}
  25.         <a name="comment{$oCommentId}"></a>
  26.         <div data-id="{$oCommentId}" class="folding"></div>
  27.         <div id="comment_content_id_{$oCommentId}" class="comment-content">
  28.             <div class="text current">{$oComment->getText()}</div>
  29.             <div class="comment-info" data-id="{$oCommentId}">
  30.                 <a href="/profile/{$oCommentAuthorLogin}" data-user_id="{$oCommentAuthorId}">
  31.                     <img src="{$oCommentAuthor->getProfileAvatarPath(24)}" class="comment-avatar"/>
  32.                 </a>
  33.                 <a class="comment-author" href="/profile/{$oCommentAuthorLogin}">{$oCommentAuthorLogin}</a>
  34.                 <time class="comment-date" datetime="{date_format date=$oCommentDate format='c'}" title="{$oCommentDate}">
  35.                     {date_format date=$oCommentDate format="j F Y, H:i"}
  36.                 </time>
  37.                 <a class="comment-link" href="#comment{$oCommentId}" title="{$aLang.comment_url_notice}"></a>
  38.                 {if $oComment->getPid()}
  39.                     <a href="#comment{$oComment->getPid()}" class="goto goto-comment-parent" title="{$aLang.comment_goto_parent}"></a>
  40.                 {/if}
  41.                 <span>{$aLang.comment_was_hidden}</span>
  42.             </div>
  43.     {else}
  44.         <section data-id="{$oCommentId}" id="comment_id_{$oCommentId}" class="comment comment-deleted">
  45.             <div class="text current"><em>{$aLang.comment_was_hidden}</em></div>
  46.             <div class="comment-info" data-id="{$oCommentId}"></div>
  47.     {/if}
  48. {elseif $oComment->getDelete()}
  49.     {if $oUserCurrent and $oUserCurrent->isAdministrator()}
  50.         <section data-id="{$oCommentId}" id="comment_id_{$oCommentId}" class="comment comment-deleted comment-bad">
  51.             <a id="comment{$oCommentId}"></a>
  52.             <div class="text current">{$oComment->getText()}</div>
  53.             <div class="comment-info" data-id="{$oCommentId}">
  54.                 <a href="/profile/{$oCommentAuthorLogin}" data-user_id="{$oCommentAuthorId}">
  55.                     <img src="{$oCommentAuthor->getProfileAvatarPath(24)}" class="comment-avatar"/>
  56.                 </a>
  57.                 <a class="comment-author" href="/profile/{$oCommentAuthorLogin}">{$oCommentAuthorLogin}</a>
  58.                 <time class="comment-date" datetime="{date_format date=$oCommentDate format='c'}" title="{$oCommentDate}">
  59.                     {date_format date=$oCommentDate format="j F Y, H:i"}
  60.                 </time>
  61.                 <a class="comment-link" href="#comment{$oCommentId}" title="{$aLang.comment_url_notice}"></a>
  62.                 {if $oComment->getPid()}
  63.                     <a href="#comment{$oComment->getPid()}" class="goto goto-comment-parent" title="{$aLang.comment_goto_parent}"></a>
  64.                 {/if}
  65.                 <a class="comment-repair link-dotted">{$aLang.comment_repair}</a>
  66.                 <span>{$aLang.comment_was_delete}</span>
  67.             </div>
  68.     {else}
  69.         <section data-id="{$oCommentId}" id="comment_id_{$oCommentId}" class="comment comment-deleted">
  70.             <a id="comment{$oCommentId}"></a>
  71.             <div class="text current"><em>{$aLang.comment_was_delete}</em></div>
  72.             <div class="comment-info" data-id="{$oCommentId}"></div>
  73.     {/if}
  74. {else}
  75.     <section data-id="{$oCommentId}" id="comment_id_{$oCommentId}" class="comment {if $oComment->isBad()}comment-bad{/if} {$oCommentSelf} {$oCommentNew}">
  76.         <a id="comment{$oCommentId}"></a>
  77.         <div id="comment_content_id_{$oCommentId}" class="comment-content">
  78.             <div class="text current">{$oComment->getText()}</div>
  79.         </div>
  80.         <div class="comment-info" data-id="{$oCommentId}">
  81.             <a href="/profile/{$oCommentAuthorLogin}" data-user_id="{$oCommentAuthorId}">
  82.                 <img src="{$oCommentAuthor->getProfileAvatarPath(24)}" class="comment-avatar"/>
  83.             </a>
  84.             <a class="comment-author {if $iAuthorId == $oCommentAuthorId}comment-topic-author {if $sAuthorNotice}" title="{$sAuthorNotice}{/if}{/if}" href="/profile/{$oCommentAuthorLogin}">{$oCommentAuthorLogin}</a>
  85.             <time class="comment-date" datetime="{date_format date=$oCommentDate format='c'}" title="{$oCommentDate}">
  86.                 {date_format date=$oCommentDate format="j F Y, H:i"}
  87.             </time>
  88.             <a class="comment-link" href="#comment{$oCommentId}" title="{$aLang.comment_url_notice}"></a>
  89.             {if $oComment->getPid()}
  90.                 <a href="#comment{$oComment->getPid()}" class="goto goto-comment-parent" title="{$aLang.comment_goto_parent}"></a>
  91.             {/if}
  92.             {if $oUserCurrent}
  93. <<<<<<< ACL-CRUD
  94.                 {if !$oComment->getDelete() and !$bAllowNewComment and $bAddCommentPermission}
  95.                     <li>
  96.                         <a href="#" onclick="ls.comments.toggleCommentForm({$oComment->getId()}); return false;" class="reply-link link-dotted">{$aLang.comment_answer}</a>
  97.                     </li>
  98.                 {/if}
  99.  
  100.                 {if !$oComment->getDelete() and $oComment->testAllowDelete($oUserCurrent)}
  101.                     <li>
  102.                         <a href="#" class="comment-delete link-dotted" onclick="ls.comments.toggle(this,{$oComment->getId()}); return false;">{$aLang.comment_delete}</a>
  103.                     </li>
  104.                 {/if}
  105.  
  106.                 {if $oComment->getDelete() and $oComment->testAllowDelete($oUserCurrent)}
  107.                     <li>
  108.                         <a href="#" class="comment-repair link-dotted" onclick="ls.comments.toggle(this,{$oComment->getId()}); return false;">{$aLang.comment_repair}</a>
  109.                     </li>
  110.                 {/if}
  111.  
  112.                 {if $oComment->testAllowEdit($editAccessMask)}
  113.                     <li class="comment-edit-bw"><a href="#" class="link-dotted" onclick="return ls.comments.toggleEditForm({$oComment->getId()}, true, {if $oComment->testAllowLock($editAccessMask)}true{else}false{/if});">{$aLang.comment_edit}</a></li>
  114.                     <li class="comment-save-edit-bw"><a href="#" class="link-dotted" onclick="return ls.comments.saveEdit({$oComment->getId()});">{$aLang.comment_save_edit}</a></li>
  115.                     <li class="comment-preview-edit-bw"><a href="#" class="link-dotted" onclick="return ls.comments.previewEdit({$oComment->getId()});">{$aLang.comment_preview_edit}</a></li>
  116.                     <li class="comment-cancel-edit-bw"><a href="#" class="link-dotted" onclick="return ls.comments.toggleEditForm({$oComment->getId()}, false);">{$aLang.comment_cancel_edit}</a></li>
  117. =======
  118.                 {if !$bNoCommentFavourites}
  119.                 <div class="comment-favourite">
  120.                     {if $oComment->getCountFavourite() > 0}
  121.                         <div class="favourite link-dotted{if $oComment->getIsFavourite()} active{/if}" data-target_id="{$oCommentId}" data-target_type="comment">
  122.                             {if $oComment->getIsFavourite()}
  123.                                 {$aLang.comment_favourite_add_already}
  124.                             {else}
  125.                                 {$aLang.comment_favourite_add}
  126.                             {/if}
  127.                         </div>
  128.                         <span class="favourite-count" id="fav_count_comment_{$oCommentId}">{$oComment->getCountFavourite()}</span>
  129.                     {else}
  130.                         <div class="favourite link-dotted" data-target_id="{$oCommentId}" data-target_type="comment">{$aLang.comment_favourite_add}</div>
  131.                         <span class="favourite-count" id="fav_count_comment_{$oCommentId}"></span>
  132.                     {/if}
  133.                 </div>
  134.                 <div id="vote_area_comment_{$oCommentId}" class="vote comment-vote
  135.                    {if $oCommentVoteCount > 0}
  136.                        {if $oCommentRating > 0} vote-count-positive
  137.                        {elseif $oCommentRating < 0} vote-count-negative
  138.                        {else} vote-count-mixed
  139.                        {/if}
  140.                    {/if}
  141.                    {if $oCommentVote} voted
  142.                        {if $oCommentVote->getDirection() > 0} voted-up
  143.                        {else} voted-down
  144.                        {/if}
  145.                    {elseif !isset($oCommentSelf)}
  146.                        {if (strtotime($oCommentDate)>=time()-$oConfig->GetValue('acl.vote.comment.limit_time'))} vote-enabled{/if}
  147.                    {/if}
  148.                    ">
  149.                     <div class="vote-item vote-up" data-direction="1" data-target_id="{$oCommentId}" data-target_type="comment"></div>
  150.                     <span class="vote-count" id="vote_total_comment_{$oCommentId}" data-target_id="{$oCommentId}" data-target_type="comment" data-count="{$oCommentVoteCount}">{if $oCommentRating > 0}+{/if}{$oCommentRating}</span>
  151.                     <div class="vote-item vote-down" data-direction="-1" data-target_id="{$oCommentId}" data-target_type="comment"></div>
  152.                 </div>
  153. >>>>>>> development
  154.                 {/if}
  155.                 <a class="reply-link link-dotted">{$aLang.comment_answer}</a>
  156.                 <a class="link-dotted comment-edit-bw {if (strtotime($oCommentDate)<=time()-$oConfig->GetValue('acl.edit.comment.limit_time'))} edit-timeout{/if}">{$aLang.comment_edit}</a>
  157.                 {hook run='comment_action' comment=$oComment}
  158.                 {include file='comment_modify_notice.tpl'}
  159.             {/if}
  160.         </div>
  161.  
  162.     {/if}
  163. </section>
  164. {/strip}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement