blob: c991e29dacf59985013d14da91789962dc2bf53f (
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
|
{strip}
<br />
<div class="display comment">
<div class="header">
{if !( $post_comment_request || $post_comment_preview )}
<a name="editcomments"></a>
{/if}
<h2>{tr}Comments{/tr}</h2>
</div>
<div class="body">
{formfeedback hash=$formfeedback}
{if $post_comment_preview}
<h2>{tr}Comments Preview{/tr}</h2>
<div class="preview">
{include file='bitpackage:liberty/display_comment.tpl' comment=$postComment}
</div><!-- end .preview -->
{/if}
{form action="`$comments_return_url`#editcomments"}
<input type="hidden" name="comments_maxComments" value="{$maxComments}" />
<input type="hidden" name="comments_style" value="{$comments_style}" />
<input type="hidden" name="comments_sort_mode" value="{$comments_sort_mode}" />
{if $post_comment_request || $post_comment_preview}
<a name="editcomments"></a>
{legend legend="Post Comment"}
<input type="hidden" name="post_comment_reply_id" value="{$post_comment_reply_id}" />
<input type="hidden" name="post_comment_id" value="{$post_comment_id}" />
<div class="row">
{formlabel label="Title" for="comments-title"}
{forminput}
<input type="text" size="50" name="comment_title" id="comments-title" value="{$postComment.title}" />
{formhelp note=""}
{/forminput}
</div>
{assign var=textarea_id value="commentpost"}
{if $gBitSystem->isPackageActive( 'smileys' )}
{include file="bitpackage:smileys/smileys_full.tpl"}
{/if}
{if $gBitSystem->isPackageActive( 'quicktags' )}
{include file="bitpackage:quicktags/quicktags_full.tpl" formId="commentpost"}
{/if}
<div class="row">
{formlabel label="Comment" for="commentpost"}
{forminput}
<textarea id="commentpost" name="comment_data" rows="6" cols="50">{$postComment.data}</textarea>
{formhelp note="Use [http://www.foo.com] or [http://www.foo.com|description] for links.<br />HTML tags are not allowed inside comments."}
{/forminput}
</div>
<div class="row submit">
<input type="submit" name="post_comment_preview" value="{tr}Preview{/tr}"/>
<input type="submit" name="post_comment_submit" value="{tr}Post{/tr}"/>
</div>
{/legend}
{elseif $gBitUser->hasPermission( 'bit_p_post_comments' )}
<div class="row">
<input type="submit" name="post_comment_request" value="{tr}Add Comment{/tr}" />
</div>
{/if}
{/form}
{if $comments and $gBitSystem->isFeatureActive('comments_display_option_bar')}
{form action="`$comments_return_url`#editcomments"}
<input type="hidden" name="post_comment_reply_id" value="{$post_comment_reply_id}" />
<input type="hidden" name="post_comment_id" value="{$post_comment_id}" />
<table class="optionbar">
<caption>{tr}Comments Filter{/tr}</caption>
<tr>
<td>
<label for="comments-maxcomm">{tr}Messages{/tr} </label>
<select name="comments_maxComments" id="comments-maxcomm">
{* 1 comment selection is used for directly displaying a single comment via a URL *}
<option value="1" {if $maxComments eq 1}selected="selected"{/if}>1</option>
<option value="5" {if $maxComments eq 5}selected="selected"{/if}>5</option>
<option value="10" {if $maxComments eq 10}selected="selected"{/if}>10</option>
<option value="20" {if $maxComments eq 20}selected="selected"{/if}>20</option>
<option value="50" {if $maxComments eq 50}selected="selected"{/if}>50</option>
<option value="100" {if $maxComments eq 100}selected="selected"{/if}>100</option>
<option value="999999" {if $maxComments eq 999999}selected="selected"{/if}>All</option>
</select>
</td>
<td>
<label for="comments-style">{tr}Style{/tr} </label>
<select name="comments_style" id="comments-style">
<option value="flat" {if $comments_style eq "flat"}selected="selected"{/if}>Flat</option>
<option value="threaded" {if $comments_style eq "threaded"}selected="selected"{/if}>Threaded</option>
</select>
</td>
<td>
<label for="comments-sort">{tr}Sort{/tr} </label>
<select name="comments_sort_mode" id="comments-sort">
<option value="commentDate_desc" {if $comments_sort_mode eq "commentDate_desc"}selected="selected"{/if}>Newest first</option>
<option value="commentDate_asc" {if $comments_sort_mode eq "commentDate_asc"}selected="selected"{/if}>Oldest first</option>
</select>
</td>
<td style="text-align:right"><input type="submit" name="comments_setOptions" value="set" /></td>
</tr>
</table>
{/form}
{/if}
{section name=ix loop=$comments}
{displaycomment comment="$comments[ix]"}
{/section}
{libertypagination hash=$commentsPgnHash}
</div><!-- end .body -->
</div><!-- end .comment -->
{/strip}
|