|
@@ -37,28 +37,37 @@
|
37
|
37
|
*/
|
38
|
38
|
global $HeavyInfo, $UserSubscriptions, $ThreadInfo, $Document;
|
39
|
39
|
|
40
|
|
- if (G::$LoggedUser['DisablePosting']) {
|
|
40
|
+if (G::$LoggedUser['DisablePosting']) {
|
41
|
41
|
return;
|
42
|
|
- }
|
43
|
|
- if (!isset($TextareaCols)) {
|
|
42
|
+}
|
|
43
|
+if (!isset($TextareaCols)) {
|
44
|
44
|
$TextareaCols = 70;
|
45
|
|
- }
|
46
|
|
- if (!isset($TextareaRows)) {
|
|
45
|
+}
|
|
46
|
+if (!isset($TextareaRows)) {
|
47
|
47
|
$TextareaRows = 8;
|
48
|
|
- }
|
49
|
|
- if (!isset($InputAction)) {
|
|
48
|
+}
|
|
49
|
+if (!isset($InputAction)) {
|
50
|
50
|
$InputAction = 'reply';
|
51
|
|
- }
|
52
|
|
- if (!isset($InputTitle)) {
|
|
51
|
+}
|
|
52
|
+if (!isset($InputTitle)) {
|
53
|
53
|
$InputTitle = 'Post comment';
|
54
|
|
- }
|
|
54
|
+}
|
55
|
55
|
|
56
|
|
- $ReplyText = new TEXTAREA_PREVIEW('body', 'quickpost', '',
|
57
|
|
- $TextareaCols, $TextareaRows, false, false, true, array(
|
|
56
|
+ $ReplyText = new TEXTAREA_PREVIEW(
|
|
57
|
+ 'body',
|
|
58
|
+ 'quickpost',
|
|
59
|
+ '',
|
|
60
|
+ $TextareaCols,
|
|
61
|
+ $TextareaRows,
|
|
62
|
+ false,
|
|
63
|
+ false,
|
|
64
|
+ true,
|
|
65
|
+ array(
|
58
|
66
|
'tabindex="1"',
|
59
|
67
|
'onkeyup="resize(\'quickpost\')"'
|
60
|
|
- ));
|
61
|
|
-?>
|
|
68
|
+ )
|
|
69
|
+ );
|
|
70
|
+ ?>
|
62
|
71
|
|
63
|
72
|
<br />
|
64
|
73
|
<div id="reply_box">
|
|
@@ -66,9 +75,9 @@
|
66
|
75
|
<div class="box pad">
|
67
|
76
|
<table class="forum_post box vertical_margin hidden preview_wrap" id="preview_wrap_<?=$ReplyText->getID()?>">
|
68
|
77
|
<colgroup>
|
69
|
|
-<? if (Users::has_avatars_enabled()) { ?>
|
|
78
|
+<?php if (Users::has_avatars_enabled()) { ?>
|
70
|
79
|
<col class="col_avatar" />
|
71
|
|
-<? } ?>
|
|
80
|
+<?php } ?>
|
72
|
81
|
<col class="col_post_body" />
|
73
|
82
|
</colgroup>
|
74
|
83
|
<tr class="colhead_dark">
|
|
@@ -84,11 +93,11 @@
|
84
|
93
|
</td>
|
85
|
94
|
</tr>
|
86
|
95
|
<tr>
|
87
|
|
-<? if (Users::has_avatars_enabled()) { ?>
|
|
96
|
+<?php if (Users::has_avatars_enabled()) { ?>
|
88
|
97
|
<td class="avatar valign_top">
|
89
|
98
|
<?=Users::show_avatar(G::$LoggedUser['Avatar'], G::$LoggedUser['ID'], G::$LoggedUser['Username'], (!isset($HeavyInfo['DisableAvatars']) || $HeavyInfo['DisableAvatars']))?>
|
90
|
99
|
</td>
|
91
|
|
-<? } ?>
|
|
100
|
+<?php } ?>
|
92
|
101
|
<td class="body valign_top">
|
93
|
102
|
<div id="contentpreview" style="text-align: left;">
|
94
|
103
|
<div id="preview_<?=$ReplyText->getID()?>"></div>
|
|
@@ -96,43 +105,47 @@
|
96
|
105
|
</td>
|
97
|
106
|
</tr>
|
98
|
107
|
</table>
|
99
|
|
- <form class="send_form center" name="reply" id="quickpostform" <?=isset($Action)?'action="'.$Action.'"':''?> method="post"<? if (!check_perms('users_mod')) { ?> onsubmit="quickpostform.submit_button.disabled = true;"<? } ?> <? if (!G::$LoggedUser['DisableAutoSave']) { ?>data-autosave-text="quickpost"<? } ?>>
|
|
108
|
+ <form class="send_form center" name="reply" id="quickpostform" <?=isset($Action)?'action="'.$Action.'"':''?> method="post"<?php if (!check_perms('users_mod')) {
|
|
109
|
+ ?> onsubmit="quickpostform.submit_button.disabled = true;"<?php
|
|
110
|
+ } ?> <?php if (!G::$LoggedUser['DisableAutoSave']) {
|
|
111
|
+ ?>data-autosave-text="quickpost"<?php
|
|
112
|
+ } ?>>
|
100
|
113
|
<input type="hidden" name="action" value="<?=$InputAction?>" />
|
101
|
114
|
<input type="hidden" name="auth" value="<?=G::$LoggedUser['AuthKey']?>" />
|
102
|
115
|
<input type="hidden" name="<?=$InputName?>" data-autosave-id="<?=$InputID?>" value="<?=$InputID?>" />
|
103
|
116
|
<div id="quickreplytext">
|
104
|
|
-<?
|
|
117
|
+<?php
|
105
|
118
|
echo $ReplyText->getBuffer();
|
106
|
119
|
?>
|
107
|
120
|
<br />
|
108
|
121
|
</div>
|
109
|
122
|
<div class="preview_submit">
|
110
|
|
-<?
|
111
|
|
- if (isset($SubscribeBox) && !isset($ForumID) && Subscriptions::has_subscribed_comments($Document, $InputID) === false) {
|
112
|
|
-?>
|
|
123
|
+<?php
|
|
124
|
+if (isset($SubscribeBox) && !isset($ForumID) && Subscriptions::has_subscribed_comments($Document, $InputID) === false) {
|
|
125
|
+ ?>
|
113
|
126
|
<input id="subscribebox" type="checkbox" name="subscribe"<?=!empty($HeavyInfo['AutoSubscribe']) ? ' checked="checked"' : ''?> tabindex="2" />
|
114
|
127
|
<label for="subscribebox">Subscribe</label>
|
115
|
|
-<?
|
116
|
|
- }
|
|
128
|
+ <?php
|
|
129
|
+}
|
117
|
130
|
// Forum thread logic
|
118
|
131
|
// This might use some more abstraction
|
119
|
|
- if (isset($ForumID)) {
|
|
132
|
+if (isset($ForumID)) {
|
120
|
133
|
if (!Subscriptions::has_subscribed($InputID)) {
|
121
|
|
-?>
|
|
134
|
+ ?>
|
122
|
135
|
<input id="subscribebox" type="checkbox" name="subscribe"<?=!empty($HeavyInfo['AutoSubscribe']) ? ' checked="checked"' : ''?> tabindex="2" />
|
123
|
136
|
<label for="subscribebox">Subscribe</label>
|
124
|
|
-<?
|
|
137
|
+ <?php
|
125
|
138
|
}
|
126
|
139
|
if ($ThreadInfo['LastPostAuthorID'] == G::$LoggedUser['ID']
|
127
|
|
- && (check_perms('site_forums_double_post')
|
128
|
|
- || in_array($ForumID, FORUMS_TO_ALLOW_DOUBLE_POST))
|
|
140
|
+ && (check_perms('site_forums_double_post')
|
|
141
|
+ || in_array($ForumID, FORUMS_TO_ALLOW_DOUBLE_POST))
|
129
|
142
|
) {
|
130
|
|
-?>
|
|
143
|
+ ?>
|
131
|
144
|
<input id="mergebox" type="checkbox" name="merge" tabindex="2" />
|
132
|
145
|
<label for="mergebox">Merge</label>
|
133
|
|
-<?
|
|
146
|
+ <?php
|
134
|
147
|
}
|
135
|
|
- }
|
|
148
|
+}
|
136
|
149
|
?>
|
137
|
150
|
<input type="button" value="Preview" class="hidden button_preview_<?=$ReplyText->getID()?>" tabindex="1" />
|
138
|
151
|
<input type="submit" value="Post reply" id="submit_button" tabindex="1" />
|