Display.template.php 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935
  1. <?php
  2. /**
  3. * Simple Machines Forum (SMF)
  4. *
  5. * @package SMF
  6. * @author Simple Machines
  7. * @copyright 2012 Simple Machines
  8. * @license http://www.simplemachines.org/about/smf/license.php BSD
  9. *
  10. * @version 2.1 Alpha 1
  11. */
  12. function template_main()
  13. {
  14. global $context, $settings, $options, $txt, $scripturl, $modSettings;
  15. // Let them know, if their report was a success!
  16. if ($context['report_sent'])
  17. {
  18. echo '
  19. <div class="infobox">
  20. ', $txt['report_sent'], '
  21. </div>';
  22. }
  23. // Show the anchor for the top and for the first message. If the first message is new, say so.
  24. echo '
  25. <a id="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a id="new"></a>' : '';
  26. // Is this topic also a poll?
  27. if ($context['is_poll'])
  28. {
  29. echo '
  30. <div id="poll">
  31. <div class="cat_bar">
  32. <h3 class="catbg">
  33. <img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.png" alt="" class="icon" /> ', $txt['poll'], '
  34. </h3>
  35. </div>
  36. <div class="windowbg">
  37. <div class="content" id="poll_options">
  38. <h4 id="pollquestion">
  39. ', $context['poll']['question'], '
  40. </h4>';
  41. // Are they not allowed to vote but allowed to view the options?
  42. if ($context['poll']['show_results'] || !$context['allow_vote'])
  43. {
  44. echo '
  45. <dl class="options">';
  46. // Show each option with its corresponding percentage bar.
  47. foreach ($context['poll']['options'] as $option)
  48. {
  49. echo '
  50. <dt class="', $option['voted_this'] ? ' voted' : '', '">', $option['option'], '</dt>
  51. <dd class="statsbar', $option['voted_this'] ? ' voted' : '', '">';
  52. if ($context['allow_poll_view'])
  53. echo '
  54. ', $option['bar_ndt'], '
  55. <span class="percentage">', $option['votes'], ' (', $option['percent'], '%)</span>';
  56. echo '
  57. </dd>';
  58. }
  59. echo '
  60. </dl>';
  61. if ($context['allow_poll_view'])
  62. echo '
  63. <p><strong>', $txt['poll_total_voters'], ':</strong> ', $context['poll']['total_votes'], '</p>';
  64. }
  65. // They are allowed to vote! Go to it!
  66. else
  67. {
  68. echo '
  69. <form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '">';
  70. // Show a warning if they are allowed more than one option.
  71. if ($context['poll']['allowed_warning'])
  72. echo '
  73. <p class="smallpadding">', $context['poll']['allowed_warning'], '</p>';
  74. echo '
  75. <ul class="reset options">';
  76. // Show each option with its button - a radio likely.
  77. foreach ($context['poll']['options'] as $option)
  78. echo '
  79. <li>', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
  80. echo '
  81. </ul>
  82. <div class="submitbutton">
  83. <input type="submit" value="', $txt['poll_vote'], '" class="button_submit" />
  84. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  85. </div>
  86. </form>';
  87. }
  88. // Is the clock ticking?
  89. if (!empty($context['poll']['expire_time']))
  90. echo '
  91. <p><strong>', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ':</strong> ', $context['poll']['expire_time'], '</p>';
  92. echo '
  93. </div>
  94. </div>
  95. </div>
  96. <div id="pollmoderation">';
  97. template_button_strip($context['poll_buttons']);
  98. echo '
  99. </div>';
  100. }
  101. // Does this topic have some events linked to it?
  102. if (!empty($context['linked_calendar_events']))
  103. {
  104. echo '
  105. <div class="linked_events">
  106. <div class="title_bar">
  107. <h3 class="titlebg headerpadding">', $txt['calendar_linked_events'], '</h3>
  108. </div>
  109. <div class="windowbg">
  110. <div class="content">
  111. <ul class="reset">';
  112. foreach ($context['linked_calendar_events'] as $event)
  113. echo '
  114. <li>
  115. ', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '"> <img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="" title="' . $txt['modify'] . '" class="edit_event" /></a> ' : ''), '<strong>', $event['title'], '</strong>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
  116. </li>';
  117. echo '
  118. </ul>
  119. </div>
  120. </div>
  121. </div>';
  122. }
  123. // Show the page index... "Pages: [1]".
  124. echo '
  125. <div class="pagesection">
  126. ', template_button_strip($context['normal_buttons'], 'right'), '
  127. ', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#bot" class="topbottom floatleft">' . $txt['go_down'] . '</a>' : '', '
  128. <div class="pagelinks floatleft">
  129. ', $context['page_index'], '
  130. </div>
  131. </div>';
  132. // Show the topic information - icon, subject, etc.
  133. echo '
  134. <div id="forumposts">
  135. <div class="cat_bar">
  136. <h3 class="catbg">
  137. <img src="', $settings['images_url'], '/topic/', $context['class'], '.png" alt="" />
  138. ', $txt['topic'], ': ', $context['subject'], '&nbsp;<span>(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')</span>
  139. <span class="nextlinks floatright">', $context['previous_next'], '</span>
  140. </h3>
  141. </div>';
  142. echo '
  143. <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 oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\') : false">';
  144. $ignoredMsgs = array();
  145. $removableMessageIDs = array();
  146. $alternate = false;
  147. // Get all the messages...
  148. while ($message = $context['get_message']())
  149. {
  150. $ignoring = false;
  151. $alternate = !$alternate;
  152. if ($message['can_remove'])
  153. $removableMessageIDs[] = $message['id'];
  154. // Are we ignoring this message?
  155. if (!empty($message['is_ignored']))
  156. {
  157. $ignoring = true;
  158. $ignoredMsgs[] = $message['id'];
  159. }
  160. // Show the message anchor and a "new" anchor if this message is new.
  161. if ($message['id'] != $context['first_message'])
  162. echo '
  163. <a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';
  164. echo '
  165. <div class="', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', '">
  166. <div class="post_wrapper">';
  167. // Show information about the poster of this message.
  168. echo '
  169. <div class="poster">
  170. <ul class="dropmenu">
  171. <li>
  172. <h4>';
  173. // Show a link to the member's profile.
  174. echo '
  175. <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
  176. <span style="padding: 6px; display: block;">', $message['member']['name'], '</span>';
  177. // Show avatars, images, etc.?
  178. if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
  179. echo '
  180. ', $message['member']['avatar']['image'], '';
  181. echo '
  182. </a>
  183. </h4>';
  184. // [WIP] The new member info dropdown starts here. Note that conditionals have not been fully checked yet.
  185. echo '
  186. <ul class="smalltext" id="msg_', $message['id'], '_extra_info"', $ignoring ? ' style="display:none;"' : '', '>';
  187. // Don't show these things for guests.
  188. if (!$message['member']['is_guest'])
  189. {
  190. // 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.
  191. if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
  192. echo '
  193. <li class="postgroup">', $message['member']['post_group'], '</li>';
  194. // Show how many posts they have made.
  195. if (!isset($context['disabled_fields']['posts']))
  196. echo '
  197. <li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
  198. // Is karma display enabled? Total or +/-?
  199. if ($modSettings['karmaMode'] == '1')
  200. echo '
  201. <li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
  202. elseif ($modSettings['karmaMode'] == '2')
  203. echo '
  204. <li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
  205. // Is this user allowed to modify this member's karma?
  206. if ($message['member']['karma']['allow'])
  207. echo '
  208. <li class="karma_allow">
  209. <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
  210. <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
  211. </li>';
  212. // Show the member's gender icon?
  213. if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
  214. echo '
  215. <li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
  216. // Show their personal text?
  217. if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
  218. echo '
  219. <li class="blurb">', $message['member']['blurb'], '</li>';
  220. // Any custom fields to show as icons?
  221. if (!empty($message['member']['custom_fields']))
  222. {
  223. $shown = false;
  224. foreach ($message['member']['custom_fields'] as $custom)
  225. {
  226. if ($custom['placement'] != 1 || empty($custom['value']))
  227. continue;
  228. if (empty($shown))
  229. {
  230. $shown = true;
  231. echo '
  232. <li class="im_icons">
  233. <ol>';
  234. }
  235. echo '
  236. <li>', $custom['value'], '</li>';
  237. }
  238. if ($shown)
  239. echo '
  240. </ol>
  241. </li>';
  242. }
  243. // This shows the popular messaging icons.
  244. if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
  245. echo '
  246. <li class="im_icons">
  247. <hr />
  248. <ol>
  249. ', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
  250. ', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
  251. ', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
  252. ', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
  253. </ol>
  254. </li>';
  255. // Show the website and email address buttons.
  256. if ($message['member']['show_profile_buttons'])
  257. {
  258. echo '
  259. <li class="profile">
  260. <ol>';
  261. // Don't show an icon if they haven't specified a website.
  262. if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
  263. echo '
  264. <li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.png" alt="' . $message['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';
  265. // Don't show the email address if they want it hidden.
  266. if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email'])
  267. echo '
  268. <li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';
  269. echo '
  270. </ol>
  271. </li>';
  272. }
  273. // Any custom fields for standard placement?
  274. if (!empty($message['member']['custom_fields']))
  275. {
  276. foreach ($message['member']['custom_fields'] as $custom)
  277. if (empty($custom['placement']) || empty($custom['value']))
  278. echo '
  279. <li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
  280. }
  281. }
  282. // Otherwise, show the guest's email.
  283. elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email'])
  284. echo '
  285. <li class="email"><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';
  286. // Stuff for the staff to wallop them with.
  287. // Maybe they want to report this post to the moderator(s)?
  288. if ($context['can_report_moderator'])
  289. echo '
  290. <li class="report_link"><hr /><a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a></li>';
  291. // Can we issue a warning because of this post? Remember, we can't give guests warnings.
  292. if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
  293. echo '
  294. <li class="issue_warning"><a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.png" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" /></a></li>';
  295. //echo '
  296. // <img class="centericon" src="', $settings['images_url'], '/ip.png" alt="" />';
  297. // Show the IP to this user for this post - because you can moderate?
  298. if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
  299. echo '
  300. <li class="poster_ip"><a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);" class="help">(?)</a></li>';
  301. // Or, should we show it because this is you?
  302. elseif ($message['can_see_ip'])
  303. echo '
  304. <li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $message['member']['ip'], '</a></li>';
  305. // Okay, are you at least logged in? Then we can show something about why IPs are logged...
  306. elseif (!$context['user']['is_guest'])
  307. echo '
  308. <li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $txt['logged'], '</a></li>';
  309. // Otherwise, you see NOTHING!
  310. else
  311. echo '
  312. <li class="poster_ip">', $txt['logged'], '</li>';
  313. // Done with the information about the poster... on to the post itself.
  314. echo '
  315. </ul>
  316. </li>';
  317. // Show the post group icons, but not for guests.
  318. if (!$message['member']['is_guest'])
  319. echo '
  320. <li class="icons">', $message['member']['group_icons'], '</li>';
  321. // Show the member's primary group (like 'Administrator') if they have one.
  322. if (!empty($message['member']['group']))
  323. echo '
  324. <li class="membergroup">', $message['member']['group'], '</li>';
  325. // Show the member's custom title, if they have one.
  326. if (!empty($message['member']['title']))
  327. echo '
  328. <li class="title">', $message['member']['title'], '</li>';
  329. // Show online and offline buttons? PHP could do with a little bit of cleaning up here for brevity, but it works.
  330. // The plan is to make these buttons act sensibly, and link to your own inbox in your own posts (with new PM notification).
  331. // Still has a little bit of hard-coded text. This may be a place where translators should be able to write inclusive strings,
  332. // instead of dealing with $txt['by'] etc in the markup. Must be brief to work, anyway. Cannot ramble on at all.
  333. if (($context['can_send_pm']) && ($message['is_message_author']))
  334. {
  335. echo '
  336. <li class="poster_online"><a href="', $scripturl,'?action=pm">', $txt['pm_short'], ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
  337. }
  338. if (($context['can_send_pm']) && (!$message['is_message_author']) && (!$message['member']['is_guest']))
  339. {
  340. if(!empty($modSettings['onlineEnable']))
  341. echo '
  342. <li class="poster_online"><a href="', $scripturl,'?action=pm;sa=send;u=', $message['member']['id'], '" title="', ($message['member']['online']['is_online']) ? $message['member']['name']. ' is online' : $message['member']['name']. ' is offline', '">Send message <img src="'. $message['member']['online']['image_href']. '" alt="" /></a></li>';
  343. else
  344. echo '
  345. <li class="poster_online"><a href="', $scripturl,'?action=pm;sa=send;u=', $message['member']['id'], '">Send message</a></li>';
  346. }
  347. if ((!$context['can_send_pm']) && (!empty($modSettings['onlineEnable'])))
  348. echo '
  349. <li class="poster_online">', ($message['member']['online']['is_online']) ? $txt['online'] : $txt['offline'], '<img src="'. $message['member']['online']['image_href']. '" alt="" /></li>';
  350. // Are we showing the warning status?
  351. // Don't show these things for guests.
  352. if ((!$message['member']['is_guest']) &&($message['member']['can_see_warning']))
  353. echo '
  354. <li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.png" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
  355. echo '
  356. </ul>';
  357. echo '
  358. </div>
  359. <div class="postarea">
  360. <div class="keyinfo">
  361. <div class="messageicon" ', ($message['icon_url'] !== $settings['images_url'] . '/post/xx.png') ? '' : 'style="position: absolute; z-index: -1;"', '>
  362. <img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
  363. </div>
  364. <h5 id="subject_', $message['id'], '">
  365. <a href="', $message['href'], '" rel="nofollow" title="', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' - ', $message['subject'], '">', !empty($message['counter']) ? '' : '<strong>OP: </strong>', '', $message['time'], '</a>';
  366. // Show "<< Last Edit: Time by Person >>" if this post was edited.
  367. if ($settings['show_modify'] && !empty($message['modified']['name']))
  368. echo '
  369. <span class="smalltext modified" id="modified_', $message['id'], '">
  370. ', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '
  371. </span>';
  372. echo '
  373. </h5>
  374. <div id="msg_', $message['id'], '_quick_mod"', $ignoring ? ' style="display:none;"' : '', '></div>
  375. </div>';
  376. // Ignoring this user? Hide the post.
  377. if ($ignoring)
  378. echo '
  379. <div id="msg_', $message['id'], '_ignored_prompt">
  380. ', $txt['ignoring_user'], '
  381. <a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
  382. </div>';
  383. // Show the post itself, finally!
  384. echo '
  385. <div class="post">';
  386. if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
  387. echo '
  388. <div class="approve_post">
  389. ', $txt['post_awaiting_approval'], '
  390. </div>';
  391. echo '
  392. <div class="inner" id="msg_', $message['id'], '"', $ignoring ? ' style="display:none;"' : '', '>', $message['body'], '</div>
  393. </div>';
  394. // Assuming there are attachments...
  395. if (!empty($message['attachment']))
  396. {
  397. echo '
  398. <div id="msg_', $message['id'], '_footer" class="attachments"', $ignoring ? ' style="display:none;"' : '', '>';
  399. $last_approved_state = 1;
  400. $attachments_per_line = 4;
  401. $i = 0;
  402. foreach ($message['attachment'] as $attachment)
  403. {
  404. // Show a special box for unapproved attachments...
  405. if ($attachment['is_approved'] != $last_approved_state)
  406. {
  407. $last_approved_state = 0;
  408. echo '
  409. <fieldset>
  410. <legend>', $txt['attach_awaiting_approve'];
  411. if ($context['can_approve'])
  412. echo '
  413. &nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
  414. echo '
  415. </legend>';
  416. }
  417. echo '
  418. <div class="floatleft">';
  419. if ($attachment['is_image'])
  420. {
  421. echo '
  422. <div class="attachments_top">';
  423. if ($attachment['thumbnail']['has_thumb'])
  424. echo '
  425. <a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" /></a>';
  426. else
  427. echo '
  428. <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/>';
  429. echo '
  430. </div>';
  431. }
  432. echo '
  433. <div class="attachments_bot">
  434. <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.png" class="centericon" alt="*" />&nbsp;' . $attachment['name'] . '</a> ';
  435. if (!$attachment['is_approved'] && $context['can_approve'])
  436. echo '
  437. [<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
  438. echo '
  439. <br />', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . '<br />' . $txt['attach_viewed'] : '<br />' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '
  440. </div>';
  441. echo '
  442. </div>';
  443. // Next attachment line ?
  444. if (++$i % $attachments_per_line === 0)
  445. echo '
  446. <hr />';
  447. }
  448. // If we had unapproved attachments clean up.
  449. if ($last_approved_state == 0)
  450. echo '
  451. </fieldset>';
  452. echo '
  453. </div>';
  454. }
  455. echo '
  456. </div>';
  457. // Show the quickbuttons, for various operations on posts.
  458. if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
  459. echo '
  460. <ul class="quickbuttons">';
  461. // Maybe we can approve it, maybe we should?
  462. if ($message['can_approve'])
  463. echo '
  464. <li><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" class="approve_button">', $txt['approve'], '</a></li>';
  465. // Can they reply? Have they turned on quick reply?
  466. if ($context['can_quote'] && !empty($options['display_quick_reply']))
  467. echo '
  468. <li><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');" class="quote_button">', $txt['quote'], '</a></li>';
  469. // So... quick reply is off, but they *can* reply?
  470. elseif ($context['can_quote'])
  471. echo '
  472. <li><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" class="quote_button">', $txt['quote'], '</a></li>';
  473. // Can the user modify the contents of this post? Show the modify inline image.
  474. if ($message['can_modify'])
  475. echo '
  476. <li class="quick_edit"><img src="', $settings['images_url'], '/icons/modify_inline.png" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: pointer; display: none; margin: 0 0 0 0;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />', $txt['quick_edit'], '</li>';
  477. // Can the user modify the contents of this post?
  478. if ($message['can_modify'])
  479. echo '
  480. <li class="post_options">', $txt['post_options'], '';
  481. echo '
  482. <ul>';
  483. // Can the user modify the contents of this post?
  484. if ($message['can_modify'])
  485. echo '
  486. <li><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '" class="modify_button">', $txt['modify'], '</a></li>';
  487. // How about... even... remove it entirely?!
  488. if ($message['can_remove'])
  489. echo '
  490. <li><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');" class="remove_button">', $txt['remove'], '</a></li>';
  491. // What about splitting it off the rest of the topic?
  492. if ($context['can_split'] && !empty($context['real_num_replies']))
  493. echo '
  494. <li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '" class="split_button">', $txt['split'], '</a></li>';
  495. // Can we restore topics?
  496. if ($context['can_restore_msg'])
  497. echo '
  498. <li><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" class="restore_button">', $txt['restore_message'], '</a></li>';
  499. // Maybe we can unapprove it?
  500. if ($message['can_unapprove'])
  501. echo '
  502. <li><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" class="unapprove_button">', $txt['unapprove'], '</a></li>';
  503. echo '
  504. </ul>
  505. </li>';
  506. // Show a checkbox for quick moderation?
  507. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
  508. echo '
  509. <li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';
  510. if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
  511. echo '
  512. </ul>';
  513. echo '
  514. <div class="moderatorbar">';
  515. // Are there any custom profile fields for above the signature?
  516. if (!empty($message['member']['custom_fields']))
  517. {
  518. $shown = false;
  519. foreach ($message['member']['custom_fields'] as $custom)
  520. {
  521. if ($custom['placement'] != 2 || empty($custom['value']))
  522. continue;
  523. if (empty($shown))
  524. {
  525. $shown = true;
  526. echo '
  527. <div class="custom_fields_above_signature">
  528. <ul class="reset nolist">';
  529. }
  530. echo '
  531. <li>', $custom['value'], '</li>';
  532. }
  533. if ($shown)
  534. echo '
  535. </ul>
  536. </div>';
  537. }
  538. // Show the member's signature?
  539. if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
  540. echo '
  541. <div class="signature" id="msg_', $message['id'], '_signature"', $ignoring ? ' style="display:none;"' : '', '>', $message['member']['signature'], '</div>';
  542. echo '
  543. </div>
  544. </div>
  545. </div>
  546. <hr class="post_separator" />';
  547. }
  548. echo '
  549. </form>
  550. </div>';
  551. // Show the page index... "Pages: [1]".
  552. echo '
  553. <div class="pagesection">
  554. ', template_button_strip($context['normal_buttons'], 'right'), '
  555. ', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#top" class="topbottom floatleft">' . $txt['go_up'] . '</a>' : '', '
  556. <div class="pagelinks floatleft">
  557. ', $context['page_index'], '
  558. </div>
  559. </div>';
  560. // Show the lower breadcrumbs.
  561. theme_linktree();
  562. echo '
  563. <div id="moderationbuttons">', template_button_strip($context['mod_buttons'], 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';
  564. // Show the jumpto box, or actually...let Javascript do it.
  565. echo '
  566. <div class="plainbox" id="display_jump_to">&nbsp;</div>';
  567. if ($context['can_reply'] && !empty($options['display_quick_reply']))
  568. {
  569. echo '
  570. <a id="quickreply"></a>
  571. <div class="tborder" id="quickreplybox">
  572. <div class="cat_bar">
  573. <h3 class="catbg">
  574. <a href="javascript:oQuickReply.swap();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] > 1 ? 'collapse' : 'expand', '.png" alt="+" id="quickReplyExpand" class="icon" /></a>
  575. <a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
  576. </h3>
  577. </div>
  578. <div id="quickReplyOptions"', $options['display_quick_reply'] > 1 ? '' : ' style="display: none"', '>
  579. <div class="roundframe">
  580. <p class="smalltext lefttext">', $txt['quick_reply_desc'], '</p>
  581. ', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
  582. $context['oldTopicError'] ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
  583. ', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
  584. ', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '', '
  585. <form action="', $scripturl, '?board=', $context['current_board'], ';action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
  586. <input type="hidden" name="topic" value="', $context['current_topic'], '" />
  587. <input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
  588. <input type="hidden" name="icon" value="xx" />
  589. <input type="hidden" name="from_qr" value="1" />
  590. <input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
  591. <input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
  592. <input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
  593. <input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />
  594. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  595. <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />';
  596. // Guests just need more.
  597. if ($context['user']['is_guest'])
  598. echo '
  599. <strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
  600. <strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
  601. // Is visual verification enabled?
  602. if ($context['require_verification'])
  603. echo '
  604. <strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
  605. if ($options['display_quick_reply'] < 3)
  606. {
  607. echo '
  608. <div class="quickReplyContent">
  609. <textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea>
  610. </div>';
  611. }
  612. else
  613. {
  614. // Show the actual posting area...
  615. if ($context['show_bbc'])
  616. {
  617. echo '
  618. <div id="bbcBox_message"></div>';
  619. }
  620. // What about smileys?
  621. if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
  622. echo '
  623. <div id="smileyBox_message"></div>';
  624. echo '
  625. ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
  626. <script type="text/javascript"><!-- // --><![CDATA[
  627. function insertQuoteFast(messageid)
  628. {
  629. if (window.XMLHttpRequest)
  630. getXMLDocument(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';xml;pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), onDocReceived);
  631. else
  632. reqWin(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), 240, 90);
  633. return false;
  634. }
  635. function onDocReceived(XMLDoc)
  636. {
  637. var text = \'\';
  638. for (var i = 0, n = XMLDoc.getElementsByTagName(\'quote\')[0].childNodes.length; i < n; i++)
  639. text += XMLDoc.getElementsByTagName(\'quote\')[0].childNodes[i].nodeValue;
  640. oEditorHandle_', $context['post_box_name'], '.insertText(text, false, true);
  641. ajax_indicator(false);
  642. }
  643. // ]]></script>';
  644. }
  645. echo '
  646. <div class="padding">
  647. <input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
  648. <input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';
  649. if ($context['show_spellchecking'])
  650. echo '
  651. <input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
  652. if (($context['drafts_save']) && !empty($options['drafts_show_saved_enabled']))
  653. echo '
  654. <input type="submit" name="save_draft" value="', $txt['draft_save'], '" onclick="return confirm(' . JavaScriptEscape($txt['draft_save_note']) . ') && submitThisOnce(this);" accesskey="d" tabindex="', $context['tabindex']++, '" class="button_submit" />
  655. <input type="hidden" id="id_draft" name="id_draft" value="', empty($context['id_draft']) ? 0 : $context['id_draft'], '" />';
  656. if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
  657. echo '
  658. <div class="clear righttext padding"><span id="throbber" style="display:none"><img src="' . $settings['images_url'] . '/loading_sm.gif" alt="" class="centericon" />&nbsp;</span><span id="draft_lastautosave" ></span></div>';
  659. echo '
  660. </div>
  661. </form>
  662. </div>
  663. </div>
  664. </div>';
  665. }
  666. else
  667. echo '
  668. <br class="clear" />';
  669. if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
  670. echo '
  671. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/drafts.js?alp21"></script>
  672. <script type="text/javascript"><!-- // --><![CDATA[
  673. var oDraftAutoSave = new smf_DraftAutoSave({
  674. sSelf: \'oDraftAutoSave\',
  675. sLastNote: \'draft_lastautosave\',
  676. sLastID: \'id_draft\',', !empty($context['post_box_name']) ? '
  677. sSceditorID: \'' . $context['post_box_name'] . '\',' : '', '
  678. sType: \'', !empty($options['display_quick_reply']) && $options['display_quick_reply'] > 2 ? 'quick' : 'quick', '\',
  679. iBoard: ', (empty($context['current_board']) ? 0 : $context['current_board']), ',
  680. iFreq: ', (empty($modSettings['masterAutoSaveDraftsDelay']) ? 60000 : $modSettings['masterAutoSaveDraftsDelay'] * 1000), '
  681. });
  682. // ]]></script>';
  683. if ($context['show_spellchecking'])
  684. echo '
  685. <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>
  686. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/spellcheck.js"></script>';
  687. echo '
  688. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/topic.js"></script>
  689. <script type="text/javascript"><!-- // --><![CDATA[';
  690. if (!empty($options['display_quick_reply']))
  691. echo '
  692. var oQuickReply = new QuickReply({
  693. bDefaultCollapsed: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] > 1 ? 'false' : 'true', ',
  694. iTopicId: ', $context['current_topic'], ',
  695. iStart: ', $context['start'], ',
  696. sScriptUrl: smf_scripturl,
  697. sImagesUrl: smf_images_url,
  698. sContainerId: "quickReplyOptions",
  699. sImageId: "quickReplyExpand",
  700. sImageCollapsed: "collapse.png",
  701. sImageExpanded: "expand.png",
  702. sJumpAnchor: "quickreply",
  703. bIsFull: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] > 2 ? 'true' : 'false', '
  704. });';
  705. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
  706. echo '
  707. var oInTopicModeration = new InTopicModeration({
  708. sSelf: \'oInTopicModeration\',
  709. sCheckboxContainerMask: \'in_topic_mod_check_\',
  710. aMessageIds: [\'', implode('\', \'', $removableMessageIDs), '\'],
  711. sSessionId: smf_session_id,
  712. sSessionVar: smf_session_var,
  713. sButtonStrip: \'moderationbuttons\',
  714. sButtonStripDisplay: \'moderationbuttons_strip\',
  715. bUseImageButton: false,
  716. bCanRemove: ', $context['can_remove_post'] ? 'true' : 'false', ',
  717. sRemoveButtonLabel: \'', $txt['quickmod_delete_selected'], '\',
  718. sRemoveButtonImage: \'delete_selected.png\',
  719. sRemoveButtonConfirm: \'', $txt['quickmod_confirm'], '\',
  720. bCanRestore: ', $context['can_restore_msg'] ? 'true' : 'false', ',
  721. sRestoreButtonLabel: \'', $txt['quick_mod_restore'], '\',
  722. sRestoreButtonImage: \'restore_selected.png\',
  723. sRestoreButtonConfirm: \'', $txt['quickmod_confirm'], '\',
  724. bCanSplit: ', $context['can_split'] ? 'true' : 'false', ',
  725. sSplitButtonLabel: \'', $txt['quickmod_split_selected'], '\',
  726. sSplitButtonImage: \'split_selected.png\',
  727. sSplitButtonConfirm: \'', $txt['quickmod_confirm'], '\',
  728. sFormId: \'quickModForm\'
  729. });';
  730. echo '
  731. $(".quick_edit").css("display", "inline");
  732. if (\'XMLHttpRequest\' in window)
  733. {
  734. var oQuickModify = new QuickModify({
  735. sScriptUrl: smf_scripturl,
  736. bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
  737. iTopicId: ', $context['current_topic'], ',
  738. sTemplateBodyEdit: ', JavaScriptEscape('
  739. <div id="quick_edit_body_container" style="width: 90%">
  740. <div id="error_box" style="padding: 4px;" class="error"></div>
  741. <textarea class="editor" name="message" rows="12" style="' . (isBrowser('is_ie8') ? 'width: 635px; max-width: 100%; min-width: 100%' : 'width: 100%') . '; margin-bottom: 10px;" tabindex="' . $context['tabindex']++ . '">%body%</textarea><br />
  742. <input type="hidden" name="\' + smf_session_var + \'" value="\' + smf_session_id + \'" />
  743. <input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
  744. <input type="hidden" name="msg" value="%msg_id%" />
  745. <div class="righttext">
  746. <input type="submit" name="post" value="' . $txt['save'] . '" tabindex="' . $context['tabindex']++ . '" onclick="return oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\');" accesskey="s" class="button_submit" />&nbsp;&nbsp;' . ($context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" tabindex="' . $context['tabindex']++ . '" onclick="spellCheck(\'quickModForm\', \'message\');" class="button_submit" />&nbsp;&nbsp;' : '') . '<input type="submit" name="cancel" value="' . $txt['modify_cancel'] . '" tabindex="' . $context['tabindex']++ . '" onclick="return oQuickModify.modifyCancel();" class="button_submit" />
  747. </div>
  748. </div>'), ',
  749. sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',
  750. sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
  751. sTemplateSubjectNormal: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
  752. sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;(' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')'), ',
  753. sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), ($context['can_reply'] && !empty($options['display_quick_reply'])) ? ',
  754. sFormRemoveAccessKeys: \'postmodify\'' : '', '
  755. });
  756. aJumpTo[aJumpTo.length] = new JumpTo({
  757. sContainerId: "display_jump_to",
  758. sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
  759. iCurBoardId: ', $context['current_board'], ',
  760. iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
  761. sCurBoardName: "', $context['jump_to']['board_name'], '",
  762. sBoardChildLevelIndicator: "==",
  763. sBoardPrefix: "=> ",
  764. sCatSeparator: "-----------------------------",
  765. sCatPrefix: "",
  766. sGoButtonLabel: "', $txt['go'], '"
  767. });
  768. aIconLists[aIconLists.length] = new IconList({
  769. sBackReference: "aIconLists[" + aIconLists.length + "]",
  770. sIconIdPrefix: "msg_icon_",
  771. sScriptUrl: smf_scripturl,
  772. bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
  773. iBoardId: ', $context['current_board'], ',
  774. iTopicId: ', $context['current_topic'], ',
  775. sSessionId: smf_session_id,
  776. sSessionVar: smf_session_var,
  777. sLabelIconList: "', $txt['message_icon'], '",
  778. sBoxBackground: "transparent",
  779. sBoxBackgroundHover: "#ffffff",
  780. iBoxBorderWidthHover: 1,
  781. sBoxBorderColorHover: "#adadad" ,
  782. sContainerBackground: "#ffffff",
  783. sContainerBorder: "1px solid #adadad",
  784. sItemBorder: "1px solid #ffffff",
  785. sItemBorderHover: "1px dotted gray",
  786. sItemBackground: "transparent",
  787. sItemBackgroundHover: "#e0e0f0"
  788. });
  789. }';
  790. if (!empty($ignoredMsgs))
  791. echo '
  792. ignore_toggles([', implode(', ', $ignoredMsgs), '], ', JavaScriptEscape($txt['show_ignore_user_post']), ');';
  793. echo '
  794. // ]]></script>';
  795. }
  796. ?>