comparison forum/Themes/default/BoardIndex.template.php @ 76:e3e11437ecea website

Add forum code
author Chris Cannam
date Sun, 07 Jul 2013 11:25:48 +0200
parents
children
comparison
equal deleted inserted replaced
75:72f59aa7e503 76:e3e11437ecea
1 <?php
2 /**
3 * Simple Machines Forum (SMF)
4 *
5 * @package SMF
6 * @author Simple Machines
7 * @copyright 2011 Simple Machines
8 * @license http://www.simplemachines.org/about/smf/license.php BSD
9 *
10 * @version 2.0
11 */
12
13 function template_main()
14 {
15 global $context, $settings, $options, $txt, $scripturl, $modSettings;
16
17 // Show some statistics if stat info is off.
18 if (!$settings['show_stats_index'])
19 echo '
20 <div id="index_common_stats">
21 ', $txt['members'], ': ', $context['common_stats']['total_members'], ' &nbsp;&#8226;&nbsp; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &nbsp;&#8226;&nbsp; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
22 ', ($settings['show_latest_member'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
23 </div>';
24
25 // Show the news fader? (assuming there are things to show...)
26 if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
27 {
28 echo '
29 <div id="newsfader">
30 <div class="cat_bar">
31 <h3 class="catbg">
32 <img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
33 ', $txt['news'], '
34 </h3>
35 </div>
36 <ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
37
38 foreach ($context['news_lines'] as $news)
39 echo '
40 <li>', $news, '</li>';
41
42 echo '
43 </ul>
44 </div>
45 <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
46 <script type="text/javascript"><!-- // --><![CDATA[
47
48 // Create a news fader object.
49 var oNewsFader = new smf_NewsFader({
50 sSelf: \'oNewsFader\',
51 sFaderControlId: \'smfFadeScroller\',
52 sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
53 iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
54 });
55
56 // Create the news fader toggle.
57 var smfNewsFadeToggle = new smc_Toggle({
58 bToggleEnabled: true,
59 bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
60 aSwappableContainers: [
61 \'smfFadeScroller\'
62 ],
63 aSwapImages: [
64 {
65 sId: \'newsupshrink\',
66 srcExpanded: smf_images_url + \'/collapse.gif\',
67 altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
68 srcCollapsed: smf_images_url + \'/expand.gif\',
69 altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
70 }
71 ],
72 oThemeOptions: {
73 bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
74 sOptionName: \'collapse_news_fader\',
75 sSessionVar: ', JavaScriptEscape($context['session_var']), ',
76 sSessionId: ', JavaScriptEscape($context['session_id']), '
77 },
78 oCookieOptions: {
79 bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
80 sCookieName: \'newsupshrink\'
81 }
82 });
83 // ]]></script>';
84 }
85
86 echo '
87 <div id="boardindex_table">
88 <table class="table_list">';
89
90 /* Each category in categories is made up of:
91 id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
92 new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
93 and boards. (see below.) */
94 foreach ($context['categories'] as $category)
95 {
96 // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
97 if (empty($category['boards']) && !$category['is_collapsed'])
98 continue;
99
100 echo '
101 <tbody class="header" id="category_', $category['id'], '">
102 <tr>
103 <td colspan="4">
104 <div class="cat_bar">
105 <h3 class="catbg">';
106
107 // If this category even can collapse, show a link to collapse it.
108 if ($category['can_collapse'])
109 echo '
110 <a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
111
112 if (!$context['user']['is_guest'] && !empty($category['show_unread']))
113 echo '
114 <a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
115
116 echo '
117 ', $category['link'], '
118 </h3>
119 </div>
120 </td>
121 </tr>
122 </tbody>';
123
124 // Assuming the category hasn't been collapsed...
125 if (!$category['is_collapsed'])
126 {
127
128 echo '
129 <tbody class="content" id="category_', $category['id'], '_boards">';
130 /* Each board in each category's boards has:
131 new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
132 children (see below.), link_children (easier to use.), children_new (are they new?),
133 topics (# of), posts (# of), link, href, and last_post. (see below.) */
134 foreach ($category['boards'] as $board)
135 {
136 echo '
137 <tr id="board_', $board['id'], '" class="windowbg2">
138 <td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
139 <a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
140
141 // If the board or children is new, show an indicator.
142 if ($board['new'] || $board['children_new'])
143 echo '
144 <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
145 // Is it a redirection board?
146 elseif ($board['is_redirect'])
147 echo '
148 <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
149 // No new posts at all! The agony!!
150 else
151 echo '
152 <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
153
154 echo '
155 </a>
156 </td>
157 <td class="info">
158 <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
159
160 // Has it outstanding posts for approval?
161 if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
162 echo '
163 <a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
164
165 echo '
166
167 <p>', $board['description'] , '</p>';
168
169 // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
170 if (!empty($board['moderators']))
171 echo '
172 <p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
173
174 // Show some basic information about the number of posts, etc.
175 echo '
176 </td>
177 <td class="stats windowbg">
178 <p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
179 ', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
180 </p>
181 </td>
182 <td class="lastpost">';
183
184 /* The board's and children's 'last_post's have:
185 time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
186 link, href, subject, start (where they should go for the first unread post.),
187 and member. (which has id, name, link, href, username in it.) */
188 if (!empty($board['last_post']['id']))
189 echo '
190 <p><strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
191 ', $txt['in'], ' ', $board['last_post']['link'], '<br />
192 ', $txt['on'], ' ', $board['last_post']['time'],'
193 </p>';
194 echo '
195 </td>
196 </tr>';
197 // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
198 if (!empty($board['children']))
199 {
200 // Sort the links into an array with new boards bold so it can be imploded.
201 $children = array();
202 /* Each child in each board's children has:
203 id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
204 foreach ($board['children'] as $child)
205 {
206 if (!$child['is_redirect'])
207 $child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
208 else
209 $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
210
211 // Has it posts awaiting approval?
212 if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
213 $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
214
215 $children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
216 }
217 echo '
218 <tr id="board_', $board['id'], '_children">
219 <td colspan="3" class="children windowbg">
220 <strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
221 </td>
222 </tr>';
223 }
224 }
225 echo '
226 </tbody>';
227 }
228 echo '
229 <tbody class="divider">
230 <tr>
231 <td colspan="4"></td>
232 </tr>
233 </tbody>';
234 }
235 echo '
236 </table>
237 </div>';
238
239 if ($context['user']['is_logged'])
240 {
241 echo '
242 <div id="posting_icons" class="floatleft">';
243
244 // Mark read button.
245 $mark_read_button = array(
246 'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
247 );
248
249 echo '
250 <ul class="reset">
251 <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
252 <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
253 <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
254 </ul>
255 </div>';
256
257 // Show the mark all as read button?
258 if ($settings['show_mark_read'] && !empty($context['categories']))
259 echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
260 }
261 else
262 {
263 echo '
264 <div id="posting_icons" class="flow_hidden">
265 <ul class="reset">
266 <li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
267 <li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
268 </ul>
269 </div>';
270 }
271
272 template_info_center();
273 }
274
275 function template_info_center()
276 {
277 global $context, $settings, $options, $txt, $scripturl, $modSettings;
278
279 // Here's where the "Info Center" starts...
280 echo '
281 <span class="clear upperframe"><span></span></span>
282 <div class="roundframe"><div class="innerframe">
283 <div class="cat_bar">
284 <h3 class="catbg">
285 <img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
286 ', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
287 </h3>
288 </div>
289 <div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
290
291 // This is the "Recent Posts" bar.
292 if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
293 {
294 echo '
295 <div class="title_barIC">
296 <h4 class="titlebg">
297 <span class="ie6_header floatleft">
298 <a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
299 ', $txt['recent_posts'], '
300 </span>
301 </h4>
302 </div>
303 <div class="hslice" id="recent_posts_content">
304 <div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
305 <div class="entry-content" style="display: none;">
306 <a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
307 </div>';
308
309 // Only show one post.
310 if ($settings['number_recent_posts'] == 1)
311 {
312 // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
313 echo '
314 <strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
315 <p id="infocenter_onepost" class="middletext">
316 ', $txt['recent_view'], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
317 </p>';
318 }
319 // Show lots of posts.
320 elseif (!empty($context['latest_posts']))
321 {
322 echo '
323 <dl id="ic_recentposts" class="middletext">';
324
325 /* Each post in latest_posts has:
326 board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
327 subject, short_subject (shortened with...), time, link, and href. */
328 foreach ($context['latest_posts'] as $post)
329 echo '
330 <dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
331 <dd>', $post['time'], '</dd>';
332 echo '
333 </dl>';
334 }
335 echo '
336 </div>';
337 }
338
339 // Show information about events, birthdays, and holidays on the calendar.
340 if ($context['show_calendar'])
341 {
342 echo '
343 <div class="title_barIC">
344 <h4 class="titlebg">
345 <span class="ie6_header floatleft">
346 <a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
347 ', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
348 </span>
349 </h4>
350 </div>
351 <p class="smalltext">';
352
353 // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
354 if (!empty($context['calendar_holidays']))
355 echo '
356 <span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
357
358 // People's birthdays. Like mine. And yours, I guess. Kidding.
359 if (!empty($context['calendar_birthdays']))
360 {
361 echo '
362 <span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span> ';
363 /* Each member in calendar_birthdays has:
364 id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
365 foreach ($context['calendar_birthdays'] as $member)
366 echo '
367 <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
368 }
369 // Events like community get-togethers.
370 if (!empty($context['calendar_events']))
371 {
372 echo '
373 <span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
374 /* Each event in calendar_events should have:
375 title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
376 foreach ($context['calendar_events'] as $event)
377 echo '
378 ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
379 }
380 echo '
381 </p>';
382 }
383
384 // Show statistical style information...
385 if ($settings['show_stats_index'])
386 {
387 echo '
388 <div class="title_barIC">
389 <h4 class="titlebg">
390 <span class="ie6_header floatleft">
391 <a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
392 ', $txt['forum_stats'], '
393 </span>
394 </h4>
395 </div>
396 <p>
397 ', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
398 ', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
399 <a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
400 <a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
401 </p>';
402 }
403
404 // "Users online" - in order of activity.
405 echo '
406 <div class="title_barIC">
407 <h4 class="titlebg">
408 <span class="ie6_header floatleft">
409 ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
410 ', $txt['online_users'], '
411 </span>
412 </h4>
413 </div>
414 <p class="inline stats">
415 ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
416
417 // Handle hidden users and buddies.
418 $bracketList = array();
419 if ($context['show_buddies'])
420 $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
421 if (!empty($context['num_spiders']))
422 $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
423 if (!empty($context['num_users_hidden']))
424 $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
425
426 if (!empty($bracketList))
427 echo ' (' . implode(', ', $bracketList) . ')';
428
429 echo $context['show_who'] ? '</a>' : '', '
430 </p>
431 <p class="inline smalltext">';
432
433 // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
434 if (!empty($context['users_online']))
435 {
436 echo '
437 ', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
438
439 // Showing membergroups?
440 if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
441 echo '
442 <br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';
443 }
444
445 echo '
446 </p>
447 <p class="last smalltext">
448 ', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
449 ', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
450 </p>';
451
452 // If they are logged in, but statistical information is off... show a personal message bar.
453 if ($context['user']['is_logged'] && !$settings['show_stats_index'])
454 {
455 echo '
456 <div class="title_barIC">
457 <h4 class="titlebg">
458 <span class="ie6_header floatleft">
459 ', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
460 <span>', $txt['personal_message'], '</span>
461 </span>
462 </h4>
463 </div>
464 <p class="pminfo">
465 <strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
466 <span class="smalltext">
467 ', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
468 </span>
469 </p>';
470 }
471
472 echo '
473 </div>
474 </div></div>
475 <span class="lowerframe"><span></span></span>';
476
477 // Info center collapse object.
478 echo '
479 <script type="text/javascript"><!-- // --><![CDATA[
480 var oInfoCenterToggle = new smc_Toggle({
481 bToggleEnabled: true,
482 bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
483 aSwappableContainers: [
484 \'upshrinkHeaderIC\'
485 ],
486 aSwapImages: [
487 {
488 sId: \'upshrink_ic\',
489 srcExpanded: smf_images_url + \'/collapse.gif\',
490 altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
491 srcCollapsed: smf_images_url + \'/expand.gif\',
492 altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
493 }
494 ],
495 oThemeOptions: {
496 bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
497 sOptionName: \'collapse_header_ic\',
498 sSessionVar: ', JavaScriptEscape($context['session_var']), ',
499 sSessionId: ', JavaScriptEscape($context['session_id']), '
500 },
501 oCookieOptions: {
502 bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
503 sCookieName: \'upshrinkIC\'
504 }
505 });
506 // ]]></script>';
507 }
508 ?>