Chris@76
|
1 <?php
|
Chris@76
|
2 // Version: 1.1.12; Display
|
Chris@76
|
3
|
Chris@76
|
4 function template_main()
|
Chris@76
|
5 {
|
Chris@76
|
6 global $context, $settings, $options, $txt, $scripturl, $modSettings;
|
Chris@76
|
7
|
Chris@76
|
8 // Show the anchor for the top and for the first message. If the first message is new, say so.
|
Chris@76
|
9 echo '
|
Chris@76
|
10 <a name="top"></a>
|
Chris@76
|
11 <a name="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a name="new"></a>' : '';
|
Chris@76
|
12
|
Chris@76
|
13 // Show the linktree as well as the "Who's Viewing" information.
|
Chris@76
|
14 echo '
|
Chris@76
|
15 <table width="100%" cellpadding="3" cellspacing="0">
|
Chris@76
|
16 <tr>
|
Chris@76
|
17 <td valign="bottom">', theme_linktree(), '</td>';
|
Chris@76
|
18 if (!empty($settings['display_who_viewing']))
|
Chris@76
|
19 {
|
Chris@76
|
20 echo '
|
Chris@76
|
21 <td align="center" class="smalltext">';
|
Chris@76
|
22
|
Chris@76
|
23 // Show just numbers...?
|
Chris@76
|
24 if ($settings['display_who_viewing'] == 1)
|
Chris@76
|
25 echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19];
|
Chris@76
|
26 // Or show the actual people viewing the topic?
|
Chris@76
|
27 else
|
Chris@76
|
28 echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
|
Chris@76
|
29
|
Chris@76
|
30 // Now show how many guests are here too.
|
Chris@76
|
31 echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '</td>';
|
Chris@76
|
32 }
|
Chris@76
|
33
|
Chris@76
|
34 // Show the previous/next links.
|
Chris@76
|
35 echo '
|
Chris@76
|
36 <td valign="bottom" align="right" class="smalltext">
|
Chris@76
|
37 <span class="nav">', $context['previous_next'], '</span>
|
Chris@76
|
38 </td>
|
Chris@76
|
39 </tr>
|
Chris@76
|
40 </table>';
|
Chris@76
|
41
|
Chris@76
|
42 // Show the page index... "Pages: [1]".
|
Chris@76
|
43 echo '
|
Chris@76
|
44 <table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
|
Chris@76
|
45 <tr>
|
Chris@76
|
46 <td align="left" class="catbg" width="100%" height="35">
|
Chris@76
|
47 <table cellpadding="3" cellspacing="0" width="100%">
|
Chris@76
|
48 <tr>
|
Chris@76
|
49 <td>
|
Chris@76
|
50 <b>', $txt[139], ':</b> ', $context['page_index'];
|
Chris@76
|
51
|
Chris@76
|
52 // Show a "go down" link?
|
Chris@76
|
53 if (!empty($modSettings['topbottomEnable']))
|
Chris@76
|
54 echo $context['menu_separator'], '<a href="#bot">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/go_down.gif" alt="' . $txt['topbottom5'] . '" border="0" align="top" />' : $txt['topbottom5'], '</a>';
|
Chris@76
|
55
|
Chris@76
|
56 echo '
|
Chris@76
|
57 </td>
|
Chris@76
|
58 <td align="right" style="font-size: smaller;">', theme_show_main_buttons(), '</td>
|
Chris@76
|
59 </tr>
|
Chris@76
|
60 </table>
|
Chris@76
|
61 </td>
|
Chris@76
|
62 </tr>
|
Chris@76
|
63 </table>';
|
Chris@76
|
64
|
Chris@76
|
65 // Is this topic also a poll?
|
Chris@76
|
66 if ($context['is_poll'])
|
Chris@76
|
67 {
|
Chris@76
|
68 echo '
|
Chris@76
|
69 <table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder" style="border-bottom: 0;">
|
Chris@76
|
70 <tr class="titlebg">
|
Chris@76
|
71 <td colspan="2" valign="middle" align="left" style="padding-left: 6px;">
|
Chris@76
|
72 <img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.gif" alt="" align="top" /> ', $txt['smf43'], '
|
Chris@76
|
73 </td>
|
Chris@76
|
74 </tr>
|
Chris@76
|
75 <tr class="windowbg">
|
Chris@76
|
76 <td width="5%" valign="top"><b>', $txt['smf21'], ':</b></td>
|
Chris@76
|
77 <td>
|
Chris@76
|
78 ', $context['poll']['question'];
|
Chris@76
|
79
|
Chris@76
|
80 // Are they not allowed to vote but allowed to view the options?
|
Chris@76
|
81 if ($context['poll']['show_results'] || !$context['allow_vote'])
|
Chris@76
|
82 {
|
Chris@76
|
83 echo '
|
Chris@76
|
84 <table>
|
Chris@76
|
85 <tr>
|
Chris@76
|
86 <td style="padding-top: 2ex;">
|
Chris@76
|
87 <table border="0" cellpadding="0" cellspacing="0">';
|
Chris@76
|
88
|
Chris@76
|
89 // Show each option with its corresponding percentage bar.
|
Chris@76
|
90 foreach ($context['poll']['options'] as $option)
|
Chris@76
|
91 echo '
|
Chris@76
|
92 <tr>
|
Chris@76
|
93 <td', $option['voted_this'] ? ' style="font-weight: bold;"' : '', '>', $option['option'], '</td>', $context['allow_poll_view'] ? '
|
Chris@76
|
94 <td width="7"> </td>
|
Chris@76
|
95 <td nowrap="nowrap">' . $option['bar'] . $option['votes'] . ' (' . $option['percent'] . '%)</td>' : '', '
|
Chris@76
|
96 </tr>';
|
Chris@76
|
97
|
Chris@76
|
98 echo '
|
Chris@76
|
99 </table>
|
Chris@76
|
100 </td>
|
Chris@76
|
101 <td valign="bottom" style="padding-left: 15px;">';
|
Chris@76
|
102
|
Chris@76
|
103 // If they are allowed to revote - show them a link!
|
Chris@76
|
104 if ($context['allow_change_vote'])
|
Chris@76
|
105 echo '
|
Chris@76
|
106 <a href="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], ';sesc=', $context['session_id'], '">', $txt['poll_change_vote'], '</a><br />';
|
Chris@76
|
107
|
Chris@76
|
108 // If we're viewing the results... maybe we want to go back and vote?
|
Chris@76
|
109 if ($context['poll']['show_results'] && $context['allow_vote'])
|
Chris@76
|
110 echo '
|
Chris@76
|
111 <a href="', $scripturl, '?topic=', $context['current_topic'], '.', $context['start'], '">', $txt['poll_return_vote'], '</a><br />';
|
Chris@76
|
112
|
Chris@76
|
113 // If they're allowed to lock the poll, show a link!
|
Chris@76
|
114 if ($context['poll']['lock'])
|
Chris@76
|
115 echo '
|
Chris@76
|
116 <a href="', $scripturl, '?action=lockVoting;topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '</a><br />';
|
Chris@76
|
117
|
Chris@76
|
118 // If they're allowed to edit the poll... guess what... show a link!
|
Chris@76
|
119 if ($context['poll']['edit'])
|
Chris@76
|
120 echo '
|
Chris@76
|
121 <a href="', $scripturl, '?action=editpoll;topic=', $context['current_topic'], '.', $context['start'], '">', $txt['smf39'], '</a>';
|
Chris@76
|
122
|
Chris@76
|
123 echo '
|
Chris@76
|
124 </td>
|
Chris@76
|
125 </tr>', $context['allow_poll_view'] ? '
|
Chris@76
|
126 <tr>
|
Chris@76
|
127 <td colspan="2"><b>' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '</b></td>
|
Chris@76
|
128 </tr>' : '', '
|
Chris@76
|
129 </table><br />';
|
Chris@76
|
130 }
|
Chris@76
|
131 // They are allowed to vote! Go to it!
|
Chris@76
|
132 else
|
Chris@76
|
133 {
|
Chris@76
|
134 echo '
|
Chris@76
|
135 <form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '" style="margin: 0px;">
|
Chris@76
|
136 <table>
|
Chris@76
|
137 <tr>
|
Chris@76
|
138 <td colspan="2">';
|
Chris@76
|
139
|
Chris@76
|
140 // Show a warning if they are allowed more than one option.
|
Chris@76
|
141 if ($context['poll']['allowed_warning'])
|
Chris@76
|
142 echo '
|
Chris@76
|
143 ', $context['poll']['allowed_warning'], '
|
Chris@76
|
144 </td>
|
Chris@76
|
145 </tr><tr>
|
Chris@76
|
146 <td>';
|
Chris@76
|
147
|
Chris@76
|
148 // Show each option with its button - a radio likely.
|
Chris@76
|
149 foreach ($context['poll']['options'] as $option)
|
Chris@76
|
150 echo '
|
Chris@76
|
151 <label for="', $option['id'], '">', $option['vote_button'], ' ', $option['option'], '</label><br />';
|
Chris@76
|
152
|
Chris@76
|
153 echo '
|
Chris@76
|
154 </td>
|
Chris@76
|
155 <td valign="bottom" style="padding-left: 15px;">';
|
Chris@76
|
156
|
Chris@76
|
157 // Allowed to view the results? (without voting!)
|
Chris@76
|
158 if ($context['allow_poll_view'])
|
Chris@76
|
159 echo '
|
Chris@76
|
160 <a href="', $scripturl, '?topic=', $context['current_topic'], '.', $context['start'], ';viewResults">', $txt['smf29'], '</a><br />';
|
Chris@76
|
161
|
Chris@76
|
162 // Show a link for locking the poll as well...
|
Chris@76
|
163 if ($context['poll']['lock'])
|
Chris@76
|
164 echo '
|
Chris@76
|
165 <a href="', $scripturl, '?action=lockVoting;topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '</a><br />';
|
Chris@76
|
166
|
Chris@76
|
167 // Want to edit it? Click right here......
|
Chris@76
|
168 if ($context['poll']['edit'])
|
Chris@76
|
169 echo '
|
Chris@76
|
170 <a href="', $scripturl, '?action=editpoll;topic=', $context['current_topic'], '.', $context['start'], '">', $txt['smf39'], '</a>';
|
Chris@76
|
171
|
Chris@76
|
172 echo '
|
Chris@76
|
173 </td>
|
Chris@76
|
174 </tr><tr>
|
Chris@76
|
175 <td colspan="2"><input type="submit" value="', $txt['smf23'], '" /></td>
|
Chris@76
|
176 </tr>
|
Chris@76
|
177 </table>
|
Chris@76
|
178 <input type="hidden" name="sc" value="', $context['session_id'], '" />
|
Chris@76
|
179 </form>';
|
Chris@76
|
180 }
|
Chris@76
|
181
|
Chris@76
|
182 echo '
|
Chris@76
|
183 </td>
|
Chris@76
|
184 </tr>
|
Chris@76
|
185 </table>';
|
Chris@76
|
186 }
|
Chris@76
|
187
|
Chris@76
|
188 // Does this topic have some events linked to it?
|
Chris@76
|
189 if (!empty($context['linked_calendar_events']))
|
Chris@76
|
190 {
|
Chris@76
|
191 echo '
|
Chris@76
|
192 <table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder">
|
Chris@76
|
193 <tr class="titlebg">
|
Chris@76
|
194 <td colspan="2" valign="middle" align="left" style="padding-left: 6px;">
|
Chris@76
|
195 ', $txt['calendar_linked_events'], '
|
Chris@76
|
196 </td>
|
Chris@76
|
197 </tr>
|
Chris@76
|
198 <tr class="windowbg">
|
Chris@76
|
199 <td width="5%" valign="top">
|
Chris@76
|
200 <ul>';
|
Chris@76
|
201 foreach ($context['linked_calendar_events'] as $event)
|
Chris@76
|
202 {
|
Chris@76
|
203 echo '
|
Chris@76
|
204 <li>
|
Chris@76
|
205 <b>', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: red;">*</a> ' : ''), $event['title'], '</b>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : '');
|
Chris@76
|
206 echo '
|
Chris@76
|
207 </li>';
|
Chris@76
|
208 }
|
Chris@76
|
209 echo '
|
Chris@76
|
210 </ul>
|
Chris@76
|
211 </td>
|
Chris@76
|
212 </tr>
|
Chris@76
|
213 </table>';
|
Chris@76
|
214 }
|
Chris@76
|
215
|
Chris@76
|
216 // Show the topic information - icon, subject, etc.
|
Chris@76
|
217 echo '
|
Chris@76
|
218 <table cellpadding="3" cellspacing="0" border="0" width="100%" align="center" class="tborder" style="border-bottom: 0;">
|
Chris@76
|
219 <tr class="titlebg">
|
Chris@76
|
220 <td valign="middle" align="left" width="15%" style="padding-left: 6px;">
|
Chris@76
|
221 <img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" alt="" />
|
Chris@76
|
222 ', $txt[29], '
|
Chris@76
|
223 </td>
|
Chris@76
|
224 <td valign="middle" align="left" width="85%" style="padding-left: 6px;" id="top_subject">
|
Chris@76
|
225 ', $txt[118], ': ', $context['subject'], ' (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
|
Chris@76
|
226 </td>
|
Chris@76
|
227 </tr>
|
Chris@76
|
228 </table>';
|
Chris@76
|
229
|
Chris@76
|
230 //if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
|
Chris@76
|
231 echo '
|
Chris@76
|
232 <form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return in_edit_mode == 1 ? modify_save(\'' . $context['session_id'] . '\') : confirm(\'' . $txt['quickmod_confirm'] . '\');">';
|
Chris@76
|
233
|
Chris@76
|
234 echo '
|
Chris@76
|
235 <table cellpadding="0" cellspacing="0" border="0" width="100%" class="bordercolor">';
|
Chris@76
|
236
|
Chris@76
|
237 // Get all the messages...
|
Chris@76
|
238 while ($message = $context['get_message']())
|
Chris@76
|
239 {
|
Chris@76
|
240 echo '
|
Chris@76
|
241 <tr><td style="padding: 1px 1px 0 1px;">';
|
Chris@76
|
242
|
Chris@76
|
243 // Show the message anchor and a "new" anchor if this message is new.
|
Chris@76
|
244 if ($message['id'] != $context['first_message'])
|
Chris@76
|
245 echo '
|
Chris@76
|
246 <a name="msg', $message['id'], '"></a>', $message['first_new'] ? '<a name="new"></a>' : '';
|
Chris@76
|
247
|
Chris@76
|
248 echo '
|
Chris@76
|
249 <table cellpadding="3" cellspacing="0" border="0" width="100%">
|
Chris@76
|
250 <tr><td class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', '">';
|
Chris@76
|
251
|
Chris@76
|
252 // Show information about the poster of this message.
|
Chris@76
|
253 echo '
|
Chris@76
|
254 <table width="100%" cellpadding="5" cellspacing="0">
|
Chris@76
|
255 <tr>
|
Chris@76
|
256 <td valign="top" width="15%" rowspan="2">
|
Chris@76
|
257 <b>', $message['member']['link'], '</b><br />
|
Chris@76
|
258 <span class="smalltext">';
|
Chris@76
|
259
|
Chris@76
|
260 // Show the member's custom title, if they have one.
|
Chris@76
|
261 if (isset($message['member']['title']) && $message['member']['title'] != '')
|
Chris@76
|
262 echo '
|
Chris@76
|
263 ', $message['member']['title'], '<br />';
|
Chris@76
|
264
|
Chris@76
|
265 // Show the member's primary group (like 'Administrator') if they have one.
|
Chris@76
|
266 if (isset($message['member']['group']) && $message['member']['group'] != '')
|
Chris@76
|
267 echo '
|
Chris@76
|
268 ', $message['member']['group'], '<br />';
|
Chris@76
|
269
|
Chris@76
|
270 // Don't show these things for guests.
|
Chris@76
|
271 if (!$message['member']['is_guest'])
|
Chris@76
|
272 {
|
Chris@76
|
273 // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
|
Chris@76
|
274 if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
|
Chris@76
|
275 echo '
|
Chris@76
|
276 ', $message['member']['post_group'], '<br />';
|
Chris@76
|
277 echo '
|
Chris@76
|
278 ', $message['member']['group_stars'], '<br />';
|
Chris@76
|
279
|
Chris@76
|
280 // Is karma display enabled? Total or +/-?
|
Chris@76
|
281 if ($modSettings['karmaMode'] == '1')
|
Chris@76
|
282 echo '
|
Chris@76
|
283 <br />
|
Chris@76
|
284 ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<br />';
|
Chris@76
|
285 elseif ($modSettings['karmaMode'] == '2')
|
Chris@76
|
286 echo '
|
Chris@76
|
287 <br />
|
Chris@76
|
288 ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '<br />';
|
Chris@76
|
289
|
Chris@76
|
290 // Is this user allowed to modify this member's karma?
|
Chris@76
|
291 if ($message['member']['karma']['allow'])
|
Chris@76
|
292 echo '
|
Chris@76
|
293 <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
|
Chris@76
|
294 <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a><br />';
|
Chris@76
|
295
|
Chris@76
|
296 // Show online and offline buttons?
|
Chris@76
|
297 if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
|
Chris@76
|
298 echo '
|
Chris@76
|
299 ', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" align="middle" />' : $message['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $message['member']['online']['text'] . '</span>' : '', '<br /><br />';
|
Chris@76
|
300
|
Chris@76
|
301 // Show the member's gender icon?
|
Chris@76
|
302 if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
|
Chris@76
|
303 echo '
|
Chris@76
|
304 ', $txt[231], ': ', $message['member']['gender']['image'], '<br />';
|
Chris@76
|
305
|
Chris@76
|
306 // Show how many posts they have made.
|
Chris@76
|
307 echo '
|
Chris@76
|
308 ', $txt[26], ': ', $message['member']['posts'], '<br />
|
Chris@76
|
309 <br />';
|
Chris@76
|
310
|
Chris@76
|
311 // Show avatars, images, etc.?
|
Chris@76
|
312 if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
|
Chris@76
|
313 echo '
|
Chris@76
|
314 ', $message['member']['avatar']['image'], '<br />';
|
Chris@76
|
315
|
Chris@76
|
316 // Show their personal text?
|
Chris@76
|
317 if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
|
Chris@76
|
318 echo '
|
Chris@76
|
319 ', $message['member']['blurb'], '<br />
|
Chris@76
|
320 <br />';
|
Chris@76
|
321
|
Chris@76
|
322 // This shows the popular messaging icons.
|
Chris@76
|
323 echo '
|
Chris@76
|
324 ', $message['member']['icq']['link'], '
|
Chris@76
|
325 ', $message['member']['msn']['link'], '
|
Chris@76
|
326 ', $message['member']['yim']['link'], '
|
Chris@76
|
327 ', $message['member']['aim']['link'], '<br />';
|
Chris@76
|
328
|
Chris@76
|
329 // Show the profile, website, email address, and personal message buttons.
|
Chris@76
|
330 if ($settings['show_profile_buttons'])
|
Chris@76
|
331 {
|
Chris@76
|
332 // Don't show the profile button if you're not allowed to view the profile.
|
Chris@76
|
333 if ($message['member']['can_view_profile'])
|
Chris@76
|
334 echo '
|
Chris@76
|
335 <a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt[27] . '" title="' . $txt[27] . '" border="0" />' : $txt[27]), '</a>';
|
Chris@76
|
336
|
Chris@76
|
337 // Don't show an icon if they haven't specified a website.
|
Chris@76
|
338 if ($message['member']['website']['url'] != '')
|
Chris@76
|
339 echo '
|
Chris@76
|
340 <a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $txt[515] . '" border="0" />' : $txt[515]), '</a>';
|
Chris@76
|
341
|
Chris@76
|
342 // Don't show the email address if they want it hidden.
|
Chris@76
|
343 if (empty($message['member']['hide_email']))
|
Chris@76
|
344 echo '
|
Chris@76
|
345 <a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';
|
Chris@76
|
346
|
Chris@76
|
347 // Since we know this person isn't a guest, you *can* message them.
|
Chris@76
|
348 if ($context['can_send_pm'])
|
Chris@76
|
349 echo '
|
Chris@76
|
350 <a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $message['member']['online']['label'] . '" border="0" />' : $message['member']['online']['label'], '</a>';
|
Chris@76
|
351 }
|
Chris@76
|
352 }
|
Chris@76
|
353 // Otherwise, show the guest's email.
|
Chris@76
|
354 elseif (empty($message['member']['hide_email']))
|
Chris@76
|
355 echo '
|
Chris@76
|
356 <br />
|
Chris@76
|
357 <br />
|
Chris@76
|
358 <a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';
|
Chris@76
|
359
|
Chris@76
|
360 // Done with the information about the poster... on to the post itself.
|
Chris@76
|
361 echo '
|
Chris@76
|
362 </span>
|
Chris@76
|
363 </td>
|
Chris@76
|
364 <td valign="top" width="85%" height="100%">
|
Chris@76
|
365 <table width="100%" border="0"><tr>
|
Chris@76
|
366 <td align="left" valign="middle"><a href="', $message['href'], '"><img src="', $message['icon_url'] . '" alt="" border="0" /></a></td>
|
Chris@76
|
367 <td align="left" valign="middle">
|
Chris@76
|
368 <div style="font-weight: bold;" id="subject_', $message['id'], '">
|
Chris@76
|
369 <a href="', $message['href'], '">', $message['subject'], '</a>
|
Chris@76
|
370 </div>';
|
Chris@76
|
371
|
Chris@76
|
372 // If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
|
Chris@76
|
373 echo '
|
Chris@76
|
374 <span class="smalltext">« <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' »</span></td>
|
Chris@76
|
375 <td align="right" valign="bottom" height="20" nowrap="nowrap" style="font-size: smaller;">';
|
Chris@76
|
376
|
Chris@76
|
377 // Can they reply? Have they turned on quick reply?
|
Chris@76
|
378 if ($context['can_reply'] && !empty($options['display_quick_reply']))
|
Chris@76
|
379 echo '
|
Chris@76
|
380 <a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" onclick="doQuote(', $message['id'], ', \'', $context['session_id'], '\'); return false;">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>';
|
Chris@76
|
381 // So... quick reply is off, but they *can* reply?
|
Chris@76
|
382 elseif ($context['can_reply'])
|
Chris@76
|
383 echo '
|
Chris@76
|
384 <a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>';
|
Chris@76
|
385
|
Chris@76
|
386 // Can the user modify the contents of this post?
|
Chris@76
|
387 if ($message['can_modify'])
|
Chris@76
|
388 echo '
|
Chris@76
|
389 <a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/modify.gif" alt="' . $txt[66] . '" border="0" />' : $txt[17]), '</a>';
|
Chris@76
|
390
|
Chris@76
|
391 // How about... even... remove it entirely?!
|
Chris@76
|
392 if ($message['can_remove'])
|
Chris@76
|
393 echo '
|
Chris@76
|
394 <a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
|
Chris@76
|
395
|
Chris@76
|
396 // What about splitting it off the rest of the topic?
|
Chris@76
|
397 if ($context['can_split'])
|
Chris@76
|
398 echo '
|
Chris@76
|
399 <a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/split.gif" alt="' . $txt['smf251'] . '" border="0" />' : $txt['smf251']), '</a>';
|
Chris@76
|
400
|
Chris@76
|
401 // Show a checkbox for quick moderation?
|
Chris@76
|
402 if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
|
Chris@76
|
403 echo '
|
Chris@76
|
404 <input type="checkbox" name="msgs[]" value="', $message['id'], '" class="check" />';
|
Chris@76
|
405
|
Chris@76
|
406 // Show the post itself, finally!
|
Chris@76
|
407 echo '
|
Chris@76
|
408 </td>
|
Chris@76
|
409 </tr></table>
|
Chris@76
|
410 <hr width="100%" size="1" class="hrcolor" />
|
Chris@76
|
411 <div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $message['can_modify'] ? '
|
Chris@76
|
412 <img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
|
Chris@76
|
413 </td>
|
Chris@76
|
414 </tr>';
|
Chris@76
|
415
|
Chris@76
|
416 // Now for the attachments, signature, ip logged, etc...
|
Chris@76
|
417 echo '
|
Chris@76
|
418 <tr>
|
Chris@76
|
419 <td valign="bottom" class="smalltext">
|
Chris@76
|
420 <table width="100%" border="0"><tr>
|
Chris@76
|
421 <td align="left" colspan="2" class="smalltext">';
|
Chris@76
|
422
|
Chris@76
|
423 // Assuming there are attachments...
|
Chris@76
|
424 if (!empty($message['attachment']))
|
Chris@76
|
425 {
|
Chris@76
|
426 echo '
|
Chris@76
|
427 <hr width="100%" size="1" class="hrcolor" />';
|
Chris@76
|
428
|
Chris@76
|
429 foreach ($message['attachment'] as $attachment)
|
Chris@76
|
430 {
|
Chris@76
|
431 if ($attachment['is_image'])
|
Chris@76
|
432 {
|
Chris@76
|
433 if ($attachment['thumbnail']['has_thumb'])
|
Chris@76
|
434 echo '
|
Chris@76
|
435 <a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
|
Chris@76
|
436 else
|
Chris@76
|
437 echo '
|
Chris@76
|
438 <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
|
Chris@76
|
439 }
|
Chris@76
|
440 echo '
|
Chris@76
|
441 <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" /> ' . $attachment['name'] . '</a> (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
|
Chris@76
|
442 }
|
Chris@76
|
443 }
|
Chris@76
|
444
|
Chris@76
|
445 echo '
|
Chris@76
|
446 </td>
|
Chris@76
|
447 </tr><tr>
|
Chris@76
|
448 <td align="left" valign="bottom" class="smalltext" id="modified_', $message['id'], '">';
|
Chris@76
|
449
|
Chris@76
|
450 // Show "« Last Edit: Time by Person »" if this post was edited.
|
Chris@76
|
451 if ($settings['show_modify'] && !empty($message['modified']['name']))
|
Chris@76
|
452 echo '
|
Chris@76
|
453 « <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> »';
|
Chris@76
|
454
|
Chris@76
|
455 echo '
|
Chris@76
|
456 </td>
|
Chris@76
|
457 <td align="right" valign="bottom" class="smalltext">';
|
Chris@76
|
458
|
Chris@76
|
459 // Maybe they want to report this post to the moderator(s)?
|
Chris@76
|
460 if ($context['can_report_moderator'])
|
Chris@76
|
461 echo '
|
Chris@76
|
462 <a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['rtm1'], '</a> ';
|
Chris@76
|
463 echo '
|
Chris@76
|
464 <img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />';
|
Chris@76
|
465
|
Chris@76
|
466 // Show the IP to this user for this post - because you can moderate?
|
Chris@76
|
467 if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
|
Chris@76
|
468 echo '
|
Chris@76
|
469 <a href="', $scripturl, '?action=trackip;searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqWin(this.href);" class="help">(?)</a>';
|
Chris@76
|
470 // Or, should we show it because this is you?
|
Chris@76
|
471 elseif ($message['can_see_ip'])
|
Chris@76
|
472 echo '
|
Chris@76
|
473 <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
|
Chris@76
|
474 // Okay, are you at least logged in? Then we can show something about why IPs are logged...
|
Chris@76
|
475 elseif (!$context['user']['is_guest'])
|
Chris@76
|
476 echo '
|
Chris@76
|
477 <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt[511], '</a>';
|
Chris@76
|
478 // Otherwise, you see NOTHING!
|
Chris@76
|
479 else
|
Chris@76
|
480 echo '
|
Chris@76
|
481 ', $txt[511];
|
Chris@76
|
482
|
Chris@76
|
483 echo '
|
Chris@76
|
484 </td>
|
Chris@76
|
485 </tr></table>';
|
Chris@76
|
486
|
Chris@76
|
487 // Show the member's signature?
|
Chris@76
|
488 if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
|
Chris@76
|
489 echo '
|
Chris@76
|
490 <hr width="100%" size="1" class="hrcolor" />
|
Chris@76
|
491 <div class="signature">', $message['member']['signature'], '</div>';
|
Chris@76
|
492
|
Chris@76
|
493 echo '
|
Chris@76
|
494 </td>
|
Chris@76
|
495 </tr>
|
Chris@76
|
496 </table>
|
Chris@76
|
497 </td></tr>
|
Chris@76
|
498 </table>
|
Chris@76
|
499 </td></tr>';
|
Chris@76
|
500 }
|
Chris@76
|
501 echo '
|
Chris@76
|
502 </table>
|
Chris@76
|
503 <a name="lastPost"></a>
|
Chris@76
|
504 <table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td>
|
Chris@76
|
505 <table width="100%" border="0" cellpadding="3" cellspacing="1" class="bordercolor">
|
Chris@76
|
506 <tr>
|
Chris@76
|
507 <td align="left" class="catbg" width="100%" height="30">
|
Chris@76
|
508 <table cellpadding="3" cellspacing="0" width="100%">
|
Chris@76
|
509 <tr>
|
Chris@76
|
510 <td>
|
Chris@76
|
511 <a name="bot"></a><b>', $txt[139], ':</b> ', $context['page_index'], (!empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#top">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/go_up.gif" alt="' . $txt['topbottom4'] . '" border="0" align="top" />' : $txt['topbottom4']) . '</a>' : ''), '
|
Chris@76
|
512 </td>
|
Chris@76
|
513 <td align="right" style="font-size: smaller;">
|
Chris@76
|
514 ', theme_show_main_buttons(), '
|
Chris@76
|
515 </td>
|
Chris@76
|
516 </tr>
|
Chris@76
|
517 </table>
|
Chris@76
|
518 </td>
|
Chris@76
|
519 </tr>
|
Chris@76
|
520 </table>
|
Chris@76
|
521 </td></tr></table>';
|
Chris@76
|
522
|
Chris@76
|
523 if ($context['show_spellchecking'])
|
Chris@76
|
524 echo '
|
Chris@76
|
525 <script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/spellcheck.js"></script>';
|
Chris@76
|
526
|
Chris@76
|
527 echo'
|
Chris@76
|
528 <script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/xml_topic.js"></script>
|
Chris@76
|
529 <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
|
Chris@76
|
530 quickReplyCollapsed = ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true', ';
|
Chris@76
|
531
|
Chris@76
|
532 smf_topic = ', $context['current_topic'], ';
|
Chris@76
|
533 smf_start = ', $context['start'], ';
|
Chris@76
|
534 smf_show_modify = ', $settings['show_modify'] ? '1' : '0', ';
|
Chris@76
|
535
|
Chris@76
|
536 // On quick modify, this is what the body will look like.
|
Chris@76
|
537 var smf_template_body_edit = \'<div id="error_box" style="padding: 4px; color: red;"></div><textarea class="editor" name="message" rows="12" style="width: 94%; margin-bottom: 10px;">%body%</textarea><br /><input type="hidden" name="sc" value="', $context['session_id'], '" /><input type="hidden" name="topic" value="', $context['current_topic'], '" /><input type="hidden" name="msg" value="%msg_id%" /><div style="text-align: center;"><input type="submit" name="post" value="', $txt[10], '" onclick="return modify_save(\\\'' . $context['session_id'] . '\\\');" accesskey="s" /> ', $context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" onclick="spellCheck(\\\'quickModForm\\\', \\\'message\\\');" /> ' : '', '<input type="submit" name="cancel" value="', $txt['modify_cancel'], '" onclick="return modify_cancel();" /></div>\';
|
Chris@76
|
538
|
Chris@76
|
539 // And this is the replacement for the subject.
|
Chris@76
|
540 var smf_template_subject_edit = \'<input type="text" name="subject" value="%subject%" size="60" style="width: 99%;" maxlength="80" />\';
|
Chris@76
|
541
|
Chris@76
|
542 // Restore the message to this after editing.
|
Chris@76
|
543 var smf_template_body_normal = \'%body%\';
|
Chris@76
|
544 var smf_template_subject_normal = \'<a href="', $scripturl, '?topic=', $context['current_topic'], '.msg%msg_id%#msg%msg_id%">%subject%</a>\';
|
Chris@76
|
545 var smf_template_top_subject = "', $txt[118], ': %subject% (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')"
|
Chris@76
|
546
|
Chris@76
|
547 if (window.XMLHttpRequest)
|
Chris@76
|
548 showModifyButtons();
|
Chris@76
|
549 // ]]></script>
|
Chris@76
|
550 <table border="0" width="100%" cellpadding="0" cellspacing="0">
|
Chris@76
|
551 <tr>';
|
Chris@76
|
552 if ($settings['linktree_inline'])
|
Chris@76
|
553 echo '
|
Chris@76
|
554 <td valign="top" align="left">', theme_linktree(), '</td> ';
|
Chris@76
|
555 echo '
|
Chris@76
|
556 <td valign="top" align="right" class="smalltext"> <span class="nav"> ', $context['previous_next'], '</span></td>
|
Chris@76
|
557 </tr><tr>
|
Chris@76
|
558 <td align="left" colspan="2" style="padding-top: 4px;">
|
Chris@76
|
559 ', theme_show_mod_buttons(), '
|
Chris@76
|
560 </td>
|
Chris@76
|
561 </tr>
|
Chris@76
|
562 </table>';
|
Chris@76
|
563
|
Chris@76
|
564 // This button has an identity crisis: it wishes it were an image. (kinda like the characters in The Wizard of Oz.)
|
Chris@76
|
565 if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
|
Chris@76
|
566 echo '
|
Chris@76
|
567 <input type="hidden" name="sc" value="', $context['session_id'], '">';
|
Chris@76
|
568 echo '
|
Chris@76
|
569 </form>';
|
Chris@76
|
570
|
Chris@76
|
571 echo '
|
Chris@76
|
572 <table border="0" width="100%">
|
Chris@76
|
573 <tr>
|
Chris@76
|
574 <td align="right" colspan="2">
|
Chris@76
|
575 <form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '">
|
Chris@76
|
576 <span class="smalltext">' . $txt[160] . ':</span>
|
Chris@76
|
577 <select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 && this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
|
Chris@76
|
578 <option value="">' . $txt[251] . ':</option>';
|
Chris@76
|
579 foreach ($context['jump_to'] as $category)
|
Chris@76
|
580 {
|
Chris@76
|
581 echo '
|
Chris@76
|
582 <option value="" disabled="disabled">-----------------------------</option>
|
Chris@76
|
583 <option value="#', $category['id'], '">', $category['name'], '</option>
|
Chris@76
|
584 <option value="" disabled="disabled">-----------------------------</option>';
|
Chris@76
|
585 foreach ($category['boards'] as $board)
|
Chris@76
|
586 echo '
|
Chris@76
|
587 <option value="?board=', $board['id'], '.0"', $board['is_current'] ? ' selected="selected"' : '', '> ' . str_repeat('==', $board['child_level']) . '=> ' . $board['name'] . '</option>';
|
Chris@76
|
588 }
|
Chris@76
|
589 echo '
|
Chris@76
|
590 </select>
|
Chris@76
|
591 <input type="button" value="', $txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />
|
Chris@76
|
592 </form>
|
Chris@76
|
593 </td>
|
Chris@76
|
594 </tr>
|
Chris@76
|
595 </table>';
|
Chris@76
|
596
|
Chris@76
|
597 if ($context['can_reply'] && !empty($options['display_quick_reply']))
|
Chris@76
|
598 {
|
Chris@76
|
599 echo '
|
Chris@76
|
600 <a name="quickreply"></a>
|
Chris@76
|
601 <table border="0" cellspacing="1" cellpadding="3" class="bordercolor" width="100%" style="clear: both;">
|
Chris@76
|
602 <tr>
|
Chris@76
|
603 <td colspan="2" class="catbg"><a href="javascript:swapQuickReply();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" border="0" id="quickReplyExpand" /></a> <a href="javascript:swapQuickReply();">', $txt['quick_reply_1'], '</a></td>
|
Chris@76
|
604 </tr>
|
Chris@76
|
605 <tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
|
Chris@76
|
606 <td class="windowbg" width="25%" valign="top">', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '</td>
|
Chris@76
|
607 <td class="windowbg" width="75%" align="center">
|
Chris@76
|
608 <form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" style="margin:0px;">
|
Chris@76
|
609 <input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
|
Chris@76
|
610 <input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
|
Chris@76
|
611 <input type="hidden" name="icon" value="xx" />
|
Chris@76
|
612 <input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
|
Chris@76
|
613 <input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
|
Chris@76
|
614 <input type="hidden" name="num_replies" value="', $context['num_replies'], '" />
|
Chris@76
|
615 <textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />
|
Chris@76
|
616 <input type="submit" name="post" value="' . $txt[105] . '" accesskey="s" tabindex="2" />
|
Chris@76
|
617 <input type="submit" name="preview" value="' . $txt[507] . '" accesskey="p" tabindex="4" />';
|
Chris@76
|
618 if ($context['show_spellchecking'])
|
Chris@76
|
619 echo '
|
Chris@76
|
620 <input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" />';
|
Chris@76
|
621 echo '
|
Chris@76
|
622 <input type="hidden" name="sc" value="' . $context['session_id'] . '" />
|
Chris@76
|
623 <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
|
Chris@76
|
624 </form>
|
Chris@76
|
625 </td>
|
Chris@76
|
626 </tr>
|
Chris@76
|
627 </table>';
|
Chris@76
|
628 }
|
Chris@76
|
629 if ($context['show_spellchecking'])
|
Chris@76
|
630 echo '
|
Chris@76
|
631 <form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>';
|
Chris@76
|
632
|
Chris@76
|
633 }
|
Chris@76
|
634
|
Chris@76
|
635 function theme_show_main_buttons()
|
Chris@76
|
636 {
|
Chris@76
|
637 global $context, $settings, $options, $txt, $scripturl;
|
Chris@76
|
638
|
Chris@76
|
639 $buttonArray = array();
|
Chris@76
|
640 if ($context['can_reply'])
|
Chris@76
|
641 $buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';
|
Chris@76
|
642 if ($context['can_add_poll'])
|
Chris@76
|
643 $buttonArray[] = '<a href="' . $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/addpoll.gif" alt="' . $txt['add_poll'] . '" border="0" />' : $txt['add_poll']) . '</a>';
|
Chris@76
|
644 if ($context['can_mark_notify'])
|
Chris@76
|
645 $buttonArray[] = '<a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/notify.gif" alt="' . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';
|
Chris@76
|
646 if ($context['can_send_topic'])
|
Chris@76
|
647 $buttonArray[] = '<a href="' . $scripturl . '?action=sendtopic;topic=' . $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/sendtopic.gif" alt="' . $txt[707] . '" border="0" />' : $txt[707]) . '</a>';
|
Chris@76
|
648 $buttonArray[] = '<a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0" target="_blank">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/print.gif" alt="' . $txt[465] . '" border="0" />' : $txt[465]) . '</a>';
|
Chris@76
|
649
|
Chris@76
|
650 return implode($context['menu_separator'], $buttonArray);
|
Chris@76
|
651 }
|
Chris@76
|
652
|
Chris@76
|
653 function theme_show_mod_buttons()
|
Chris@76
|
654 {
|
Chris@76
|
655 global $context, $settings, $options, $txt, $scripturl, $modSettings;
|
Chris@76
|
656
|
Chris@76
|
657 $moderationButtons = array();
|
Chris@76
|
658
|
Chris@76
|
659 if ($context['can_move'])
|
Chris@76
|
660 $moderationButtons[] = '<a href="' . $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_move.gif" alt="' . $txt[132] . '" border="0" />' : $txt[132]) . '</a>';
|
Chris@76
|
661 if ($context['can_delete'])
|
Chris@76
|
662 $moderationButtons[] = '<a href="' . $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt[162] . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_rem.gif" alt="' . $txt[63] . '" border="0" />' : $txt[63]) . '</a>';
|
Chris@76
|
663 if ($context['can_lock'])
|
Chris@76
|
664 $moderationButtons[] = '<a href="' . $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_lock.gif" alt="' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '" border="0" />' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . '</a>';
|
Chris@76
|
665 if ($context['can_sticky'])
|
Chris@76
|
666 $moderationButtons[] = '<a href="' . $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_sticky.gif" alt="' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '" border="0" />' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . '</a>';
|
Chris@76
|
667 if ($context['can_merge'])
|
Chris@76
|
668 $moderationButtons[] = '<a href="' . $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/merge.gif" alt="' . $txt['smf252'] . '" border="0" />' : $txt['smf252']) . '</a>';
|
Chris@76
|
669 if ($context['can_remove_poll'])
|
Chris@76
|
670 $moderationButtons[] = '<a href="' . $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_remove_poll.gif" alt="' . $txt['poll_remove'] . '" border="0" />' : $txt['poll_remove']) . '</a>';
|
Chris@76
|
671
|
Chris@76
|
672 if ($context['calendar_post'])
|
Chris@76
|
673 $moderationButtons[] = '<a href="' . $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/linktocal.gif" alt="' . $txt['calendar37'] . '" border="0" />' : $txt['calendar37']) . '</a>';
|
Chris@76
|
674
|
Chris@76
|
675 if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
|
Chris@76
|
676 $moderationButtons[] = $settings['use_image_buttons'] ? '<input type="image" name="submit" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete_selected.gif" alt="' . $txt['quickmod_delete_selected'] . '" style="background-color: transparent;" />' : '<a href="javascript:document.forms.quickModForm.submit();">' . $txt['quickmod_delete_selected'] . '</a>';
|
Chris@76
|
677
|
Chris@76
|
678 return implode($context['menu_separator'], $moderationButtons);
|
Chris@76
|
679 }
|
Chris@76
|
680
|
Chris@76
|
681 ?> |