blob: a50083e71296fc979d406385b411ed6fb8cda022 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
{strip}
{if $comments_style eq 'threaded' && $comment.level}
<div style="margin-left:20px">
{else}
<div style="margin-left:0px">
{/if}
<div class="body" id="comment_{$comment.content_id|escape}">
{if $gBitUser->getPreference('boards_show_avatars','y') == 'y'}
<div class="userinfo">
{if $comment.user_id == $smarty.const.ANONYMOUS_USER_ID}
<strong>{$comment.anon_name|escape}</strong>
{else}
<strong>{displayname hash=$comment}</strong>
<br />
{if $comment.user_id != $smarty.const.ANONYMOUS_USER_ID && !empty($comment.user_avatar_url)}
<div><a href="{$comment.user_url}"><img src="{$comment.user_avatar_url}" class="img-responsive" alt="{tr}Profile Picture{/tr}" /></a></div>
{/if}
<div class="date">{tr}Joined: {/tr}{$comment.registration_date|bit_short_date}</div>
{/if}
</div>
{/if}
<div class="wrapper{if $gBitUser->getPreference('boards_show_avatars','y') == 'y'} showavatar{/if}{if $smarty.request.comments_style eq 'threaded'} indent{$comment.level}{/if}">
{if !$post_is_preview}
<div class="floaticon">
{if $print_page ne 'y' && $comment.deleted==0 }
{if !$topic_locked && $board->hasPostCommentsPermission()}
<a href="{$comments_return_url}&post_comment_reply_id={$comment.content_id}&post_comment_request=1#editcomments" rel="nofollow">{booticon iname="icon-comment-alt" ipackage="icons" iexplain="Reply to this Post" iforce="icon"}</a>
{/if}
{if !$topic_locked && $board->hasPostCommentsPermission()}
<a href="{$comments_return_url}&post_comment_reply_id={$comment.content_id}&post_comment_request=1&quote=y#editcomments" rel="nofollow">{booticon ipackage="icons" iname="icon-comment" iexplain="Reply with Quote to this Post" iforce="icon"}</a>
{/if}
{if $comment.is_editable || $gContent->hasUserPermission('p_liberty_edit_comments')}
<a href="{$comments_return_url}&post_comment_id={$comment.comment_id}&post_comment_request=1#editcomments" rel="nofollow">{booticon iname="icon-edit" ipackage="icons" iexplain="Edit" iforce="icon"}</a>
{/if}
{if $board->hasUserPermission( 'p_liberty_admin_comments' )}
<a href="{$comments_return_url}&delete_comment_id={$comment.comment_id}" rel="nofollow">{booticon iname="icon-trash" ipackage="icons" iexplain="Remove" iforce="icon"}</a>
{/if}
{if $board->hasUpdatePermission() && (($comment.user_id<0 && $comment.is_approved==0)||$comment.user_id>=0) && !$comment.is_warned}
{if $comment.user_id<0 && $comment.is_approved==0}
<a title="{tr}Approve this post{/tr}" href="{$smarty.const.BOARDS_PKG_URL}view_topic_inc.php?t={$thread->mRootId}&action=1&comment_id={$comment.comment_id}">
{booticon iname="icon-plus-sign" ipackage="icons" iexplain="Approve Post" iforce="icon"}
</a>
<a title="{tr}Reject this post{/tr}" href="{$smarty.const.BOARDS_PKG_URL}view_topic_inc.php?t={$thread->mRootId}&action=2&comment_id={$comment.comment_id}">
{booticon iname="icon-minus-sign" ipackage="icons" iexplain="Reject Post" iforce="icon"}
</a>
{elseif !$comment.is_warned && $comment.user_id>=0}
<a onclick="return BitBoards.warn( 'warn_block_{$comment.comment_id|escape:"url"}', this )" title="{tr}Warn the poster about this post{/tr}" href="{$smarty.const.BOARDS_PKG_URL}view_topic_inc.php?t={$thread->mRootId}&action=3&comment_id={$comment.comment_id}">
{booticon iname="icon-warning-sign" ipackage="icons" iexplain="Warn Post" iforce="icon"}
</a>
<div class="warn_block" style="display:none;" id="warn_block_{$comment.comment_id|escape:"url"}">
{form action="`$thread_mInfo.display_url`"}
<input type="hidden" value="3" name="action" />
<input type="hidden" value="{$thread_mInfo.th_thread_id}" name="t" />
<input type="hidden" value="{$comment.comment_id}" name="comment_id" />
<textarea style="vertical-align: top;" rows="3" cols="10" name="warning_message" onclick="this.value=''; this.innerHTML=''; this.onclick=null;">
Enter Warning Message
</textarea>
<input type="submit" class="btn btn-default" value="Warn" />
{/form}
</div>
{/if}
{/if}
{/if}<!-- end print_page -->
</div><!-- end .floaticon -->
{/if}
<div class="header">
{if $comment.title neq ""}<h2>{$comment.title|escape}</h2>{/if}
<span class="date">
{if $gBitUser->getPreference('boards_show_avatars','y') != 'y'}
{tr}Posted by{/tr}: {if $comment.user_id < 0}{$comment.unreg_uname|escape}{else}{displayname hash=$comment}{/if},
{else}
{tr}Posted{/tr}:
{/if}
{$comment.created|reltime}
{if $board->hasAdminPermission() && $comment.last_modified != $comment.created}
<em> {tr}Last modified{/tr}:
{if $comment.user_id < 0}
{$comment.unreg_uname|escape}
{else}
{displayname user=$comment.modifier_user user_id=$comment.modifier_user_id real_name=$comment.modifier_real_name}
{/if}, {$comment.last_modified|reltime} </em>
{/if}
</span>
</div><!-- end .header -->
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='comment' serviceHash=$comment}
{if $gBitUser->isRegistered() and $comment.is_warned}
<div class="warning">
{assign var=comment_id value=$comment.comment_id}
<a onclick="
var e = document.getElementById('warned_message_{$comment.comment_id|escape:"url"}');
var url = '{$smarty.const.BOARDS_PKG_URL}ajax.php?req=10&comment_id={$comment_id}&seq=' + new Date().getTime();
var element = 'warned_message_{$comment.comment_id|escape:"url"}';
var params = null;
{literal}
var ajax = new Ajax.Updater(
{success: element},
url, {method: 'get', parameters: params, onFailure: reportError}
);
{/literal}
e.style.display='block';
this.oldonclick=this.onclick;
this.onclick=new Function('
document.getElementById(\'warned_message_{$comment.comment_id|escape:"url"}\').style.display=\'none\';
this.onclick=this.oldonclick;
return false;
');
return false;
" href="{$thread_mInfo.display_url}&warning[{$comment_id}]={if empty($warnings.$comment_id)}show{else}hide{/if}"
>{booticon ipackage="icons" iname="icon-warning-sign" iexplain="Warned Post"}</a>
<div id="warned_message_{$comment.comment_id|escape:"url"}">
{if !empty($warnings.$comment_id)}{$comment.warned_message}{/if}
</div>
{if empty($warnings.$comment_id)}
<script type="text/javascript">/*<![CDATA[*/
var warned_message_{$comment.comment_id|escape:"url"} = document.getElementById('warned_message_{$comment.comment_id|escape:"url"}');
warned_message_{$comment.comment_id|escape:"url"}.style.display='none';
/*]]>*/</script>
{/if}
</div>
{/if}
<div class="content">
{$comment.parsed_data}
{if $gBitSystem->isFeatureActive( 'comments_allow_attachments' )}
{include file="bitpackage:liberty/list_comment_files_inc.tpl" storageHash=$comment.storage}
{/if}
</div><!-- end .content -->
</div><!-- end .wrapper -->
<div class="clear"><!-- --></div>
</div> <!-- end .body -->
<div class="signature"> </div>
{if $comment.children}
<div id="comment_{$comment.content_id}_children">
{foreach key=key item=item from=$comment.children}
{include file="bitpackage:boards/post_display.tpl" comment=$item}
{/foreach}
</div>
{/if}
<div id="comment_{$comment.content_id}_footer"></div>
</div><!-- end .left margin -->
{/strip}
|