浏览代码

Template and CSS cleanup, bug fixes, etc.

See the read me file inside the Themes folder.
Antechinus 12 年之前
父节点
当前提交
a309e8c46f
共有 72 个文件被更改,包括 9174 次插入9012 次删除
  1. 69 0
      Themes/READ_ME.txt
  2. 487 506
      Themes/default/BoardIndex.template.php
  3. 804 816
      Themes/default/Calendar.template.php
  4. 918 919
      Themes/default/Display.template.php
  5. 173 185
      Themes/default/Help.template.php
  6. 427 415
      Themes/default/MessageIndex.template.php
  7. 422 404
      Themes/default/Recent.template.php
  8. 432 472
      Themes/default/Stats.template.php
  9. 542 531
      Themes/default/css/admin.css
  10. 3415 3278
      Themes/default/css/index.css
  11. 二进制
      Themes/default/images/admin/administration.png
  12. 二进制
      Themes/default/images/admin/attachment.png
  13. 二进制
      Themes/default/images/admin/ban.png
  14. 二进制
      Themes/default/images/admin/boards.png
  15. 二进制
      Themes/default/images/admin/calendar.png
  16. 二进制
      Themes/default/images/admin/corefeatures.png
  17. 二进制
      Themes/default/images/admin/current_theme.png
  18. 二进制
      Themes/default/images/admin/engines.png
  19. 二进制
      Themes/default/images/admin/features.png
  20. 二进制
      Themes/default/images/admin/languages.png
  21. 二进制
      Themes/default/images/admin/logs.png
  22. 二进制
      Themes/default/images/admin/mail.png
  23. 二进制
      Themes/default/images/admin/maintain.png
  24. 二进制
      Themes/default/images/admin/membergroups.png
  25. 二进制
      Themes/default/images/admin/members.png
  26. 二进制
      Themes/default/images/admin/modifications.png
  27. 二进制
      Themes/default/images/admin/news.png
  28. 二进制
      Themes/default/images/admin/packages.png
  29. 二进制
      Themes/default/images/admin/paid.png
  30. 二进制
      Themes/default/images/admin/permissions.png
  31. 二进制
      Themes/default/images/admin/posts.png
  32. 二进制
      Themes/default/images/admin/regcenter.png
  33. 二进制
      Themes/default/images/admin/reports.png
  34. 二进制
      Themes/default/images/admin/scheduled.png
  35. 二进制
      Themes/default/images/admin/search.png
  36. 二进制
      Themes/default/images/admin/security.png
  37. 二进制
      Themes/default/images/admin/server.png
  38. 二进制
      Themes/default/images/admin/smiley.png
  39. 二进制
      Themes/default/images/admin/support.png
  40. 二进制
      Themes/default/images/admin/support~.png
  41. 二进制
      Themes/default/images/admin/themes.png
  42. 二进制
      Themes/default/images/collapse.png
  43. 二进制
      Themes/default/images/expand.png
  44. 二进制
      Themes/default/images/icons/calendar.png
  45. 二进制
      Themes/default/images/icons/calendar_modify.png
  46. 二进制
      Themes/default/images/icons/profile_sm.png
  47. 二进制
      Themes/default/images/icons/profile_sm~.png
  48. 二进制
      Themes/default/images/post/angry.png
  49. 二进制
      Themes/default/images/post/cheesy.png
  50. 二进制
      Themes/default/images/post/clip.png
  51. 二进制
      Themes/default/images/post/exclamation.png
  52. 二进制
      Themes/default/images/post/grin.png
  53. 二进制
      Themes/default/images/post/lamp.png
  54. 二进制
      Themes/default/images/post/moved.png
  55. 二进制
      Themes/default/images/post/poll.png
  56. 二进制
      Themes/default/images/post/question.png
  57. 二进制
      Themes/default/images/post/recycled.png
  58. 二进制
      Themes/default/images/post/sad.png
  59. 二进制
      Themes/default/images/post/smiley.png
  60. 二进制
      Themes/default/images/post/thumbdown.png
  61. 二进制
      Themes/default/images/post/thumbup.png
  62. 二进制
      Themes/default/images/post/wink.png
  63. 二进制
      Themes/default/images/post/wireless.png
  64. 二进制
      Themes/default/images/post/xx.png
  65. 二进制
      Themes/default/images/theme/bars.png
  66. 二进制
      Themes/default/images/theme/lower_section.png
  67. 二进制
      Themes/default/images/theme/upper_section.png
  68. 二进制
      Themes/default/images/upshrink.png
  69. 二进制
      Themes/default/images/upshrink2.png
  70. 629 597
      Themes/default/index.template.php
  71. 795 793
      Themes/default/languages/index.english.php
  72. 61 96
      Themes/default/scripts/theme.js

+ 69 - 0
Themes/READ_ME.txt

@@ -0,0 +1,69 @@
+
+ The Great Readme. Someone might even read it.
+ =============================================
+ 
+ July 18th, 2012. Let's see if we can kill GitHub!
+ 
+ Most of the stuff I've done for looks is CSS changes only.
+ Markup changes were limited to bug fixes, consistency across templates, or useful features.
+ The markup changes are as small as possible and should all be bulletproof.
+ 
+ TEMPLATES:
+ ----------
+ 
+ 1/ index.template.php:			Significant markup revisions. All very good ones.
+								Trust me on this, or at least please discuss it.
+
+ 2/ BoardIndex.template.php:	Cleanup and buglet fixes. Some useful tweaks.
+
+ 3/ Calendar.template.php:		Cleanup and buglet fixes. Improved looks via CSS.
+
+ 4/ GenericMenu.template.php:	Added chosen class to third level for consistency. That's about it IIRC.
+
+ 5/ Help.template.php:			Minor cleanup (old spans, etc). Improved looks via CSS.
+
+ 6/ MessageIndex.template.php:	Cleanup and buglet fixes. Some useful tweaks.
+
+ 7/ Recent.template.php:		Cleanup and buglet fixes. Some useful tweaks.
+
+ 8/ Stats.template.php:			Minor cleanup. Improved looks via CSS only.
+								Went to town on statsbar styling. Much better IMO. Polls are the same.
+
+ LANGUAGES:
+ ----------
+ 
+ 1/ index.english.php			Chnaged the last post string to something cleaner.
+ 
+ SCRIPTS:
+ --------
+
+ 1/ scripts/theme.js:			Removed old stuff that was only for adding :hover pseudo class to IE6.
+
+ CSS:
+ ----
+ 
+ 1/ index.css, of course.		Lots of stuff there. Combination of bug fixes, less crap, and better looks.
+
+ 2/ admin.css, too.				Just a bit here and there.
+ 
+ OTHER:
+ ------
+
+ 1/ Assorted images:			Old big nasty sprites are gone.
+								New smaller ones are much better, and no more hhtp requests than before. YAY!
+
+								Have changed message icons to 18x18 instead of 16x16.
+								They really do need a little extra grunt with the other stuff around them.
+								20x20 was too big. 16x16 is too small in that situation.
+
+ PROBLEMS (meh):
+ ===============
+ 
+ 1/	Currently not sure WTF is going on the the drop menu third levels being clipped in IE, Chrome and Opera.
+	Will find a solution, but CSS3 transitions is not it. Tried those, and the results were less than pleasing.
+	I know the problem is related to the js, as it disappears when js is disabled. CSS seems fine, AFAICT.
+
+ 2/	Haven't tackled rtl.css yet, but it shouldn't be hard to sort.
+ 
+ 3/ Oh yeah, the stuff I don't know about yet. You get that. Hey ho.
+ 

+ 487 - 506
Themes/default/BoardIndex.template.php

@@ -1,507 +1,488 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-function template_main()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	// Show some statistics if stat info is off.
-	if (!$settings['show_stats_index'])
-		echo '
-	<div id="index_common_stats">
-		', $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'], '<br />
-		', ($settings['show_latest_member'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
-	</div>';
-
-	// Show the news fader?  (assuming there are things to show...)
-	if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
-	{
-		echo '
-	<div id="newsfader">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<img id="newsupshrink" src="', $settings['images_url'], '/collapse.png" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
-				', $txt['news'], '
-			</h3>
-		</div>
-		<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
-
-			foreach ($context['news_lines'] as $news)
-				echo '
-			<li>', $news, '</li>';
-
-	echo '
-		</ul>
-	</div>
-	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
-	<script type="text/javascript"><!-- // --><![CDATA[
-
-		// Create a news fader object.
-		var oNewsFader = new smf_NewsFader({
-			sSelf: \'oNewsFader\',
-			sFaderControlId: \'smfFadeScroller\',
-			sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
-			iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
-		});
-
-		// Create the news fader toggle.
-		var smfNewsFadeToggle = new smc_Toggle({
-			bToggleEnabled: true,
-			bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
-			aSwappableContainers: [
-				\'smfFadeScroller\'
-			],
-			aSwapImages: [
-				{
-					sId: \'newsupshrink\',
-					srcExpanded: smf_images_url + \'/collapse.png\',
-					altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
-					srcCollapsed: smf_images_url + \'/expand.png\',
-					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
-				}
-			],
-			oThemeOptions: {
-				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
-				sOptionName: \'collapse_news_fader\',
-				sSessionVar: smf_session_var,
-				sSessionId: smf_session_id
-			},
-			oCookieOptions: {
-				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
-				sCookieName: \'newsupshrink\'
-			}
-		});
-	// ]]></script>';
-	}
-
-	echo '
-	<div id="boardindex_table">
-		<table class="table_list">';
-
-	/* Each category in categories is made up of:
-	id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
-	new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
-	and boards. (see below.) */
-	foreach ($context['categories'] as $category)
-	{
-		// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
-		if (empty($category['boards']) && !$category['is_collapsed'])
-			continue;
-
-		echo '
-			<tbody class="header" id="category_', $category['id'], '">
-				<tr>
-					<td colspan="4">
-						<div class="cat_bar">
-							<h3 class="catbg">';
-
-		// If this category even can collapse, show a link to collapse it.
-		if ($category['can_collapse'])
-			echo '
-								<a class="collapse" href="', $category['collapse_href'], '" title="' ,$category['is_collapsed'] ? $txt['show'] : $txt['hide'] ,'">', $category['collapse_image'], '</a>';
-
-		if (!$context['user']['is_guest'] && !empty($category['show_unread']))
-			echo '
-								<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
-
-		echo '
-								', $category['link'], '
-							</h3>
-						</div>
-					</td>
-				</tr>
-			</tbody>';
-
-		// Assuming the category hasn't been collapsed...
-		if (!$category['is_collapsed'])
-		{
-
-		echo '
-			<tbody class="content" id="category_', $category['id'], '_boards">';
-			/* Each board in each category's boards has:
-			new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
-			children (see below.), link_children (easier to use.), children_new (are they new?),
-			topics (# of), posts (# of), link, href, and last_post. (see below.) */
-			foreach ($category['boards'] as $board)
-			{
-				echo '
-				<tr id="board_', $board['id'], '" class="windowbg2">
-					<td class="icon"', !empty($board['children']) ? ' rowspan="2"' : '', '>
-						<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
-
-				// If the board or children is new, show an indicator.
-				if ($board['new'] || $board['children_new'])
-					echo '
-							<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
-				// Is it a redirection board?
-				elseif ($board['is_redirect'])
-					echo '
-							<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
-				// No new posts at all! The agony!!
-				else
-					echo '
-							<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
-
-				echo '
-						</a>
-					</td>
-					<td class="info">
-						<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
-
-				// Has it outstanding posts for approval?
-				if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
-					echo '
-						<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>';
-
-				echo '
-
-						<p>', $board['description'] , '</p>';
-
-				// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
-				if (!empty($board['moderators']))
-					echo '
-						<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
-
-				// Show some basic information about the number of posts, etc.
-					echo '
-					</td>
-					<td class="windowbg stats">
-						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
-						', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
-						</p>
-					</td>
-					<td class="lastpost">';
-
-				if (!empty($board['last_post']['id']))
-					echo '
-						<p>', $board['last_post']['last_post_message'], '</p>';
-				echo '
-					</td>
-				</tr>';
-				// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
-				if (!empty($board['children']))
-				{
-					// Sort the links into an array with new boards bold so it can be imploded.
-					$children = array();
-					/* Each child in each board's children has:
-							id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
-					foreach ($board['children'] as $child)
-					{
-						if (!$child['is_redirect'])
-							$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_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']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
-						else
-							$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
-
-						// Has it posts awaiting approval?
-						if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
-							$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>';
-
-						$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
-					}
-					echo '
-					<tr id="board_', $board['id'], '_children">
-						<td colspan="3" class="children windowbg">
-							<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
-						</td>
-					</tr>';
-				}
-			}
-		echo '
-			</tbody>';
-		}
-		echo '
-			<tbody class="divider">
-				<tr>
-					<td colspan="4"></td>
-				</tr>
-			</tbody>';
-	}
-	echo '
-		</table>
-	</div>';
-
-	if ($context['user']['is_logged'])
-	{
-		echo '
-	<div id="posting_icons" class="floatleft">';
-
-		echo '
-		<ul class="reset">
-			<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
-			<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
-			<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
-		</ul>
-	</div>';
-
-		// Show the mark all as read button?
-		if ($settings['show_mark_read'] && !empty($context['categories']))
-			echo '<div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>';
-	}
-	else
-	{
-		echo '
-	<div id="posting_icons" class="flow_hidden">
-		<ul class="reset">
-			<li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
-			<li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
-		</ul>
-	</div>';
-	}
-
-	template_info_center();
-}
-
-function template_info_center()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	// Here's where the "Info Center" starts...
-	echo '
-	<span class="clear upperframe"><span></span></span>
-	<div class="roundframe"><div class="innerframe">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
-				<a href="#" id="upshrink_link">', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '</a>
-			</h3>
-		</div>
-		<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
-
-	// This is the "Recent Posts" bar.
-	if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
-	{
-		echo '
-			<div class="title_barIC">
-				<h4 class="titlebg">
-					<span class="ie6_header floatleft">
-						<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.png" alt="', $txt['recent_posts'], '" /></a>
-						', $txt['recent_posts'], '
-					</span>
-				</h4>
-			</div>
-			<div class="hslice" id="recent_posts_content">
-				<div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
-				<div class="entry-content" style="display: none;">
-					<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
-				</div>';
-
-		// Only show one post.
-		if ($settings['number_recent_posts'] == 1)
-		{
-			// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
-			echo '
-				<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
-				<p id="infocenter_onepost" class="middletext">
-					', $txt['recent_view'], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
-				</p>';
-		}
-		// Show lots of posts.
-		elseif (!empty($context['latest_posts']))
-		{
-			echo '
-				<dl id="ic_recentposts" class="middletext">';
-
-			/* Each post in latest_posts has:
-					board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
-					subject, short_subject (shortened with...), time, link, and href. */
-			foreach ($context['latest_posts'] as $post)
-				echo '
-					<dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
-					<dd>', $post['time'], '</dd>';
-			echo '
-				</dl>';
-		}
-		echo '
-			</div>';
-	}
-
-	// Show information about events, birthdays, and holidays on the calendar.
-	if ($context['show_calendar'])
-	{
-		echo '
-			<div class="title_barIC">
-				<h4 class="titlebg">
-					<span class="ie6_header floatleft">
-						<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.png', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
-						', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
-					</span>
-				</h4>
-			</div>
-			<p class="smalltext">';
-
-		// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
-		if (!empty($context['calendar_holidays']))
-			echo '
-				<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
-
-		// People's birthdays. Like mine. And yours, I guess. Kidding.
-		if (!empty($context['calendar_birthdays']))
-		{
-			echo '
-				<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span> ';
-			
-			// Each member in calendar_birthdays has:
-			//		id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) 
-			foreach ($context['calendar_birthdays'] as $member)
-				echo '
-				<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
-		}
-		
-		// Events like community get-togethers.
-		if (!empty($context['calendar_events']))
-		{
-			echo '
-				<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
-			
-			// Each event in calendar_events should have:
-			//		title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
-			foreach ($context['calendar_events'] as $event)
-				echo '
-					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" class="centericon" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
-		}
-		
-		echo '
-			</p>';
-	}
-
-	// Show statistical style information...
-	if ($settings['show_stats_index'])
-	{
-		echo '
-			<div class="title_barIC">
-				<h4 class="titlebg">
-					<span class="ie6_header floatleft">
-						<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.png" alt="', $txt['forum_stats'], '" /></a>
-						', $txt['forum_stats'], '
-					</span>
-				</h4>
-			</div>
-			<p>
-				', $context['common_stats']['boardindex_total_posts'], ' ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
-				', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
-				<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
-				<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
-			</p>';
-	}
-
-	// "Users online" - in order of activity.
-	echo '
-			<div class="title_barIC">
-				<h4 class="titlebg">
-					<span class="ie6_header floatleft">
-						', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.png', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
-						', $txt['online_users'], '
-					</span>
-				</h4>
-			</div>
-			<p class="inline stats">
-				', $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'];
-
-	// Handle hidden users and buddies.
-	$bracketList = array();
-	if ($context['show_buddies'])
-		$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
-	if (!empty($context['num_spiders']))
-		$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
-	if (!empty($context['num_users_hidden']))
-		$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
-
-	if (!empty($bracketList))
-		echo ' (' . implode(', ', $bracketList) . ')';
-
-	echo $context['show_who'] ? '</a>' : '', '
-			</p>
-			<p class="inline smalltext">';
-
-	// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
-	if (!empty($context['users_online']))
-	{
-		echo '
-				', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
-
-		// Showing membergroups?
-		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
-			echo '
-				<br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';
-	}
-
-	echo '
-			</p>
-			<p class="last smalltext">
-				', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
-				', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
-			</p>';
-
-	// If they are logged in, but statistical information is off... show a personal message bar.
-	if ($context['user']['is_logged'] && !$settings['show_stats_index'])
-	{
-		echo '
-			<div class="title_barIC">
-				<h4 class="titlebg">
-					<span class="ie6_header floatleft">
-						', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.png" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
-						<span>', $txt['personal_message'], '</span>
-					</span>
-				</h4>
-			</div>
-			<p class="pminfo">
-				<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
-				<span class="smalltext">
-					', $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'], '
-				</span>
-			</p>';
-	}
-
-	echo '
-		</div>
-	</div></div>
-	<span class="lowerframe"><span></span></span>';
-
-	// Info center collapse object.
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var oInfoCenterToggle = new smc_Toggle({
-			bToggleEnabled: true,
-			bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
-			aSwappableContainers: [
-				\'upshrinkHeaderIC\'
-			],
-			aSwapImages: [
-				{
-					sId: \'upshrink_ic\',
-					srcExpanded: smf_images_url + \'/collapse.png\',
-					altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
-					srcCollapsed: smf_images_url + \'/expand.png\',
-					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
-				}
-			],
-			aSwapLinks: [
-				{
-					sId: \'upshrink_link\',
-					msgExpanded: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), ',
-					msgCollapsed: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), '
-				}
-			],
-			oThemeOptions: {
-				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
-				sOptionName: \'collapse_header_ic\',
-				sSessionId: smf_session_id,
-				sSessionVar: smf_session_var,
-			},
-			oCookieOptions: {
-				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
-				sCookieName: \'upshrinkIC\'
-			}
-		});
-	// ]]></script>';
-}
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+function template_main()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	// Show some statistics if stat info is off.
+	if (!$settings['show_stats_index'])
+		echo '
+	<div id="index_common_stats">
+		', $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'], '
+		', ($settings['show_latest_member'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
+	</div>';
+
+	// Show the news fader?  (assuming there are things to show...)
+	if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
+	{
+		echo '
+	<div id="newsfader">
+		<div class="cat_bar">
+			<h3 class="catbg">
+				<img id="newsupshrink" src="', $settings['images_url'], '/collapse.png" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
+				', $txt['news'], '
+			</h3>
+		</div>
+		<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
+
+			foreach ($context['news_lines'] as $news)
+				echo '
+			<li>', $news, '</li>';
+
+	echo '
+		</ul>
+	</div>
+	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
+	<script type="text/javascript"><!-- // --><![CDATA[
+
+		// Create a news fader object.
+		var oNewsFader = new smf_NewsFader({
+			sSelf: \'oNewsFader\',
+			sFaderControlId: \'smfFadeScroller\',
+			sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
+			iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
+		});
+
+		// Create the news fader toggle.
+		var smfNewsFadeToggle = new smc_Toggle({
+			bToggleEnabled: true,
+			bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
+			aSwappableContainers: [
+				\'smfFadeScroller\'
+			],
+			aSwapImages: [
+				{
+					sId: \'newsupshrink\',
+					srcExpanded: smf_images_url + \'/collapse.png\',
+					altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
+					srcCollapsed: smf_images_url + \'/expand.png\',
+					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
+				}
+			],
+			oThemeOptions: {
+				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
+				sOptionName: \'collapse_news_fader\',
+				sSessionVar: smf_session_var,
+				sSessionId: smf_session_id
+			},
+			oCookieOptions: {
+				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
+				sCookieName: \'newsupshrink\'
+			}
+		});
+	// ]]></script>';
+	}
+
+	echo '
+	<div id="boardindex_table" class="boardindex_table">
+		<table class="table_list">';
+
+	/* Each category in categories is made up of:
+	id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
+	new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
+	and boards. (see below.) */
+	foreach ($context['categories'] as $category)
+	{
+		// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
+		if (empty($category['boards']) && !$category['is_collapsed'])
+			continue;
+
+		echo '
+			<tbody class="header" id="category_', $category['id'], '">
+				<tr>
+					<td colspan="4">
+						<div class="cat_bar">
+							<h3 class="catbg">';
+
+		// If this category even can collapse, show a link to collapse it.
+		if ($category['can_collapse'])
+			echo '
+								<a class="collapse" href="', $category['collapse_href'], '" title="' ,$category['is_collapsed'] ? $txt['show'] : $txt['hide'] ,'">', $category['collapse_image'], '</a>';
+
+		if (!$context['user']['is_guest'] && !empty($category['show_unread']))
+			echo '
+								<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
+
+		echo '
+								', $category['link'], '
+							</h3>
+						</div>
+					</td>
+				</tr>
+			</tbody>';
+
+		// Assuming the category hasn't been collapsed...
+		if (!$category['is_collapsed'])
+		{
+
+		echo '
+			<tbody class="content" id="category_', $category['id'], '_boards">';
+			/* Each board in each category's boards has:
+			new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
+			children (see below.), link_children (easier to use.), children_new (are they new?),
+			topics (# of), posts (# of), link, href, and last_post. (see below.) */
+			foreach ($category['boards'] as $board)
+			{
+				echo '
+				<tr id="board_', $board['id'], '" class="windowbg2">
+					<td class="windowbg icon"', !empty($board['children']) ? ' rowspan="2"' : '', '>
+						<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
+
+				// If the board or children is new, show an indicator.
+				if ($board['new'] || $board['children_new'])
+					echo '
+							<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
+				// Is it a redirection board?
+				elseif ($board['is_redirect'])
+					echo '
+							<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
+				// No new posts at all! The agony!!
+				else
+					echo '
+							<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
+
+				echo '
+						</a>
+					</td>
+					<td class="info">
+						<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
+
+				// Has it outstanding posts for approval?
+				if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
+					echo '
+						<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>';
+
+				echo '
+
+						<p>', $board['description'] , '</p>';
+
+				// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
+				if (!empty($board['moderators']))
+					echo '
+						<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
+
+				// Show some basic information about the number of posts, etc.
+					echo '
+					</td>
+					<td class="windowbg stats">
+						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
+						', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
+						</p>
+					</td>
+					<td class="lastpost">';
+
+				if (!empty($board['last_post']['id']))
+					echo '
+						<p>', $board['last_post']['last_post_message'], '</p>';
+				echo '
+					</td>
+				</tr>';
+				// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
+				if (!empty($board['children']))
+				{
+					// Sort the links into an array with new boards bold so it can be imploded.
+					$children = array();
+					/* Each child in each board's children has:
+							id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
+					foreach ($board['children'] as $child)
+					{
+						if (!$child['is_redirect'])
+							$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_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']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
+						else
+							$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
+
+						// Has it posts awaiting approval?
+						if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
+							$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>';
+
+						$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
+					}
+
+				echo '
+					<tr id="board_', $board['id'], '_children" class="windowbg2">
+						<td colspan="3" class="windowbg children">
+							<p><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</p>
+						</td>
+					</tr>';
+				}
+			}
+		echo '
+			</tbody>';
+		}
+		echo '
+			<tbody class="divider">
+				<tr>
+					<td colspan="4"></td>
+				</tr>
+			</tbody>';
+	}
+	echo '
+		</table>
+	</div>';
+
+	if ($context['user']['is_logged'])
+	{
+		echo '
+	<div id="posting_icons" class="floatleft">';
+
+		echo '
+		<ul class="reset">
+			<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
+			<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
+			<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
+		</ul>
+	</div>';
+
+		// Show the mark all as read button?
+		if ($settings['show_mark_read'] && !empty($context['categories']))
+			echo '<div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>';
+	}
+	else
+	{
+		echo '
+	<div id="posting_icons" class="flow_hidden">
+		<ul class="reset">
+			<li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
+			<li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
+		</ul>
+	</div>';
+	}
+
+	template_info_center();
+}
+
+function template_info_center()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	// Here's where the "Info Center" starts...
+	echo '
+	<span class="clear upperframe"><span></span></span>
+	<div class="roundframe" id="info_center"><div class="innerframe">
+		<div class="cat_bar">
+			<h3 class="catbg">
+				<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
+				<a href="#" id="upshrink_link">', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '</a>
+			</h3>
+		</div>
+		<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
+
+	// This is the "Recent Posts" bar.
+	if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
+	{
+		echo '
+			<div class="title_barIC">
+				<h4 class="titlebg">
+					<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.png" alt="" />', $txt['recent_posts'], '</a>
+				</h4>
+			</div>
+			<div class="hslice" id="recent_posts_content">
+				<div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
+				<div class="entry-content" style="display: none;">
+					<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
+				</div>';
+
+		// Only show one post.
+		if ($settings['number_recent_posts'] == 1)
+		{
+			// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
+			echo '
+				<p id="infocenter_onepost" class="inline">
+					<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>&nbsp;&quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
+				</p>';
+		}
+		// Show lots of posts.
+		elseif (!empty($context['latest_posts']))
+		{
+			echo '
+				<dl id="ic_recentposts">';
+
+			/* Each post in latest_posts has:
+					board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
+					subject, short_subject (shortened with...), time, link, and href. */
+			foreach ($context['latest_posts'] as $post)
+				echo '
+					<dt>
+						<strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')
+					</dt>
+					<dd>', $post['time'], '</dd>';
+			echo '
+				</dl>';
+		}
+		echo '
+			</div>';
+	}
+
+	// Show information about events, birthdays, and holidays on the calendar.
+	if ($context['show_calendar'])
+	{
+		echo '
+			<div class="title_barIC">
+				<h4 class="titlebg">
+					<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.png', '" alt="" />', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '</a>
+				</h4>
+			</div>';
+
+		// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
+		if (!empty($context['calendar_holidays']))
+			echo '
+				<p class="inline holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</p>';
+
+		// People's birthdays. Like mine. And yours, I guess. Kidding.
+		if (!empty($context['calendar_birthdays']))
+		{
+			echo '
+				<p class="inline">
+					<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>';
+			// Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) 
+			foreach ($context['calendar_birthdays'] as $member)
+				echo '
+					<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
+			echo '
+				</p>';
+		}
+		
+		// Events like community get-togethers.
+		if (!empty($context['calendar_events']))
+		{
+			echo '
+				<p class="inline">
+					<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
+			
+			// Each event in calendar_events should have:
+			//		title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
+			foreach ($context['calendar_events'] as $event)
+				echo '
+					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" class="centericon" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
+			echo '
+				</p>';
+		}
+	}
+
+	// Show statistical style information...
+	if ($settings['show_stats_index'])
+	{
+		echo '
+			<div class="title_barIC">
+				<h4 class="titlebg">
+					<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.png" alt="" />', $txt['forum_stats'], '</a>
+				</h4>
+			</div>
+			<p class="inline">
+				', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - '. $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
+				', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
+				<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '&nbsp;&nbsp;&nbsp;<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
+			</p>';
+	}
+
+	// "Users online" - in order of activity.
+	echo '
+			<div class="title_barIC">
+				<h4 class="titlebg">
+						', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.png', '" alt="" />', $txt['online_users'], '', $context['show_who'] ? '</a>' : '', '
+					</h4>
+			</div>
+			<p class="inline">
+				', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<strong>', $txt['online'], ': </strong>', 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'];
+
+	// Handle hidden users and buddies.
+	$bracketList = array();
+	if ($context['show_buddies'])
+		$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
+	if (!empty($context['num_spiders']))
+		$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
+	if (!empty($context['num_users_hidden']))
+		$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
+
+	if (!empty($bracketList))
+		echo ' (' . implode(', ', $bracketList) . ')';
+
+	echo $context['show_who'] ? '</a>' : '', '<br />';
+
+	// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
+	if (!empty($context['users_online']))
+	{
+		echo '
+				', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']);
+
+		// Showing membergroups?
+		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
+			echo '
+				<span class="membergroups">[' . implode(',&nbsp;', $context['membergroups']). ']</span>';
+	}
+
+	echo '
+			</p>
+			<p class="last">
+				', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
+				', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
+			</p>';
+
+	// If they are logged in, but statistical information is off... show a personal message bar.
+	if ($context['user']['is_logged'] && !$settings['show_stats_index'])
+	{
+		echo '
+			<div class="title_barIC">
+				<h4 class="titlebg">
+					', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.png" alt="" />', $txt['personal_message'], '', $context['allow_pm'] ? '</a>' : '', '
+				</h4>
+			</div>
+			<p class="pminfo">
+					', $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'], '
+			</p>';
+	}
+
+	echo '
+		</div>
+	</div></div>
+	<span class="lowerframe"><span></span></span>';
+
+	// Info center collapse object.
+	echo '
+	<script type="text/javascript"><!-- // --><![CDATA[
+		var oInfoCenterToggle = new smc_Toggle({
+			bToggleEnabled: true,
+			bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
+			aSwappableContainers: [
+				\'upshrinkHeaderIC\'
+			],
+			aSwapImages: [
+				{
+					sId: \'upshrink_ic\',
+					srcExpanded: smf_images_url + \'/collapse.png\',
+					altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
+					srcCollapsed: smf_images_url + \'/expand.png\',
+					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
+				}
+			],
+			aSwapLinks: [
+				{
+					sId: \'upshrink_link\',
+					msgExpanded: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), ',
+					msgCollapsed: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), '
+				}
+			],
+			oThemeOptions: {
+				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
+				sOptionName: \'collapse_header_ic\',
+				sSessionId: smf_session_id,
+				sSessionVar: smf_session_var,
+			},
+			oCookieOptions: {
+				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
+				sCookieName: \'upshrinkIC\'
+			}
+		});
+	// ]]></script>';
+}
 ?>

+ 804 - 816
Themes/default/Calendar.template.php

@@ -1,817 +1,805 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-// The main calendar - January, for example.
-function template_main()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	echo '
-		<div id="calendar">
-			<div id="month_grid">
-				', template_show_month_grid('prev'), '
-				', template_show_month_grid('current'), '
-				', template_show_month_grid('next'), '
-			</div>
-			<div id="main_grid" style="', isBrowser('is_ie') && !isBrowser('is_ie8') ? 'float: ' . ($context['right_to_left'] ? 'right; padding-right' : 'left; padding-left') . ': 20px;' : 'margin-' . ($context['right_to_left'] ? 'right' : 'left') . ': 220px; ', '">
-				', $context['view_week'] ? template_show_week_grid('main') : template_show_month_grid('main');
-
-	template_button_strip($context['calendar_buttons'], 'right');
-
-	// Show some controls to allow easy calendar navigation.
-	echo '
-				<form id="calendar_navigation" action="', $scripturl, '?action=calendar" method="post" accept-charset="', $context['character_set'], '">
-					<select name="month">';
-
-	// Show a select box with all the months.
-	foreach ($txt['months'] as $number => $month)
-		echo '
-						<option value="', $number, '"', $number == $context['current_month'] ? ' selected="selected"' : '', '>', $month, '</option>';
-	echo '
-					</select>
-					<select name="year">';
-
-	// Show a link for every year.....
-	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
-		echo '
-						<option value="', $year, '"', $year == $context['current_year'] ? ' selected="selected"' : '', '>', $year, '</option>';
-	echo '
-					</select>
-					<input type="submit" class="button_submit" value="', $txt['view'], '" />';
-
-	echo '
-				</form>
-				<br class="clear_right" />
-			</div>
-		</div>';
-}
-
-// Template for posting a calendar event.
-function template_event_post()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	// Start the javascript for drop down boxes...
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
-			function generateDays()
-			{
-				var days = 0, selected = 0;
-				var dayElement = document.getElementById("day"), yearElement = document.getElementById("year"), monthElement = document.getElementById("month");
-
-				monthLength[1] = 28;
-				if (yearElement.options[yearElement.selectedIndex].value % 4 == 0)
-					monthLength[1] = 29;
-
-				selected = dayElement.selectedIndex;
-				while (dayElement.options.length)
-					dayElement.options[0] = null;
-
-				days = monthLength[monthElement.value - 1];
-
-				for (i = 1; i <= days; i++)
-					dayElement.options[dayElement.length] = new Option(i, i);
-
-				if (selected < days)
-					dayElement.selectedIndex = selected;
-			}
-		// ]]></script>
-
-		<form action="', $scripturl, '?action=calendar;sa=post" method="post" name="postevent" accept-charset="', $context['character_set'], '" onsubmit="submitonce(this);smc_saveEntities(\'postevent\', [\'evtitle\']);" style="margin: 0;">';
-
-	if (!empty($context['event']['new']))
-		echo '
-			<input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />';
-
-	// Start the main table.
-	echo '
-		<div id="post_event">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					', $context['page_title'], '
-				</h3>
-			</div>';
-
-	if (!empty($context['post_error']['messages']))
-	{
-		echo '
-			<div class="errorbox">
-				<dl class="event_error">
-					<dt>
-						', $context['error_type'] == 'serious' ? '<strong>' . $txt['error_while_submitting'] . '</strong>' : '', '
-					</dt>
-					<dt class="error">
-						', implode('<br />', $context['post_error']['messages']), '
-					</dt>
-				</dl>
-			</div>';
-	}
-
-	echo '
-			<div class="windowbg">
-				<span class="upperframe"><span></span></span>
-				<div class="roundframe">
-					<fieldset id="event_main">
-						<legend><span', isset($context['post_error']['no_event']) ? ' class="error"' : '', '>', $txt['calendar_event_title'], '</span></legend>
-						<input type="text" name="evtitle" maxlength="255" size="70" value="', $context['event']['title'], '" class="input_text" />
-						<div class="smalltext" style="white-space: nowrap;">
-							<input type="hidden" name="calendar" value="1" />', $txt['calendar_year'], '
-							<select name="year" id="year" onchange="generateDays();">';
-
-	// Show a list of all the years we allow...
-	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
-		echo '
-								<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '&nbsp;</option>';
-
-	echo '
-							</select>
-							', $txt['calendar_month'], '
-							<select name="month" id="month" onchange="generateDays();">';
-
-	// There are 12 months per year - ensure that they all get listed.
-	for ($month = 1; $month <= 12; $month++)
-		echo '
-								<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '&nbsp;</option>';
-
-	echo '
-							</select>
-							', $txt['calendar_day'], '
-							<select name="day" id="day">';
-
-	// This prints out all the days in the current month - this changes dynamically as we switch months.
-	for ($day = 1; $day <= $context['event']['last_day']; $day++)
-		echo '
-								<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
-
-	echo '
-							</select>
-						</div>
-					</fieldset>';
-
-	if (!empty($modSettings['cal_allowspan']) || $context['event']['new'])
-		echo '
-					<fieldset id="event_options">
-						<legend>', $txt['calendar_event_options'], '</legend>
-						<div class="event_options smalltext">
-							<ul class="event_options">';
-
-	// If events can span more than one day then allow the user to select how long it should last.
-	if (!empty($modSettings['cal_allowspan']))
-	{
-		echo '
-								<li>
-									', $txt['calendar_numb_days'], '
-									<select name="span">';
-
-		for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++)
-			echo '
-										<option value="', $days, '"', $context['event']['span'] == $days ? ' selected="selected"' : '', '>', $days, '&nbsp;</option>';
-
-		echo '
-									</select>
-								</li>';
-	}
-
-	// If this is a new event let the user specify which board they want the linked post to be put into.
-	if ($context['event']['new'])
-	{
-		echo '
-								<li>
-									', $txt['calendar_link_event'], '
-									<input type="checkbox" style="vertical-align: middle;" class="input_check" name="link_to_board" checked="checked" onclick="toggleLinked(this.form);" />
-								</li>
-								<li>
-									', $txt['calendar_post_in'], '
-									<select id="board" name="board" onchange="this.form.submit();">';
-		foreach ($context['event']['categories'] as $category)
-		{
-			echo '
-										<optgroup label="', $category['name'], '">';
-			foreach ($category['boards'] as $board)
-				echo '
-											<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
-			echo '
-										</optgroup>';
-		}
-		echo '
-									</select>
-								</li>';
-	}
-
-	if (!empty($modSettings['cal_allowspan']) || $context['event']['new'])
-		echo '
-							</ul>
-						</div>
-					</fieldset>';
-
-	echo '
-						<input type="submit" value="', empty($context['event']['new']) ? $txt['save'] : $txt['post'], '" class="button_submit" />';
-	// Delete button?
-	if (empty($context['event']['new']))
-		echo '
-						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['calendar_confirm_delete'], '\');" class="button_submit" />';
-
-	echo '
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />
-						<br class="clear" />
-				</div>
-				<span class="lowerframe"><span></span></span>
-			</div>
-		</div>
-		</form>';
-}
-
-// Display a monthly calendar grid.
-function template_show_month_grid($grid_name)
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings, $smcFunc;
-
-	if (!isset($context['calendar_grid_' . $grid_name]))
-		return false;
-
-	$calendar_data = &$context['calendar_grid_' . $grid_name];
-	$colspan = !empty($calendar_data['show_week_links']) ? 8 : 7;
-
-	if (empty($calendar_data['disable_title']))
-	{
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg centertext" style="font-size: ', $calendar_data['size'] == 'large' ? 'large' : 'small', ';">';
-
-		if (empty($calendar_data['previous_calendar']['disabled']) && $calendar_data['show_next_prev'])
-			echo '
-					<span class="floatleft"><a href="', $calendar_data['previous_calendar']['href'], '">&#171;</a></span>';
-
-		if (empty($calendar_data['next_calendar']['disabled']) && $calendar_data['show_next_prev'])
-			echo '
-					<span class="floatright"><a href="', $calendar_data['next_calendar']['href'], '">&#187;</a></span>';
-
-		if ($calendar_data['show_next_prev'])
-			echo '
-					', $txt['months_titles'][$calendar_data['current_month']], ' ', $calendar_data['current_year'];
-		else
-			echo '
-					<a href="', $scripturl, '?action=calendar;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], '">', $txt['months_titles'][$calendar_data['current_month']], ' ', $calendar_data['current_year'], '</a>';
-
-		echo '
-				</h3>
-			</div>';
-	}
-
-	echo '
-				<table cellspacing="1" class="calendar_table">';
-
-	// Show each day of the week.
-	if (empty($calendar_data['disable_day_titles']))
-	{
-		echo '
-					<tr class="titlebg2">';
-
-		if (!empty($calendar_data['show_week_links']))
-			echo '
-						<th>&nbsp;</th>';
-
-		foreach ($calendar_data['week_days'] as $day)
-		{
-			echo '
-						<th class="days" scope="col" ', $calendar_data['size'] == 'small' ? 'style="font-size: x-small;"' : '', '>', !empty($calendar_data['short_day_titles']) ? ($smcFunc['substr']($txt['days'][$day], 0, 1)) : $txt['days'][$day], '</th>';
-		}
-		echo '
-					</tr>';
-	}
-
-	/* Each week in weeks contains the following:
-		days (a list of days), number (week # in the year.) */
-	foreach ($calendar_data['weeks'] as $week)
-	{
-		echo '
-					<tr>';
-
-		if (!empty($calendar_data['show_week_links']))
-			echo '
-						<td class="windowbg2 weeks">
-							<a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $week['days'][0]['day'], '">&#187;</a>
-						</td>';
-
-		/* Every day has the following:
-			day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?),
-			holidays, events, birthdays. (last three are lists.) */
-		foreach ($week['days'] as $day)
-		{
-			// If this is today, make it a different color and show a border.
-			echo '
-						<td style="height: ', $calendar_data['size'] == 'small' ? '20' : '100', 'px; padding: 2px;', $calendar_data['size'] == 'small' ? 'font-size: x-small;' : '', '" class="', $day['is_today'] ? 'calendar_today' : 'windowbg', ' days">';
-
-			// Skip it if it should be blank - it's not a day if it has no number.
-			if (!empty($day['day']))
-			{
-				// Should the day number be a link?
-				if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
-					echo '
-							<a href="', $scripturl, '?action=calendar;sa=post;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';day=', $day['day'], ';', $context['session_var'], '=', $context['session_id'], '">', $day['day'], '</a>';
-				else
-					echo '
-							', $day['day'];
-
-				// Is this the first day of the week? (and are we showing week numbers?)
-				if ($day['is_first_day'] && $calendar_data['size'] != 'small')
-					echo '<span class="smalltext"> - <a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $day['day'], '">', $txt['calendar_week'], ' ', $week['number'], '</a></span>';
-
-				// Are there any holidays?
-				if (!empty($day['holidays']))
-					echo '
-							<div class="smalltext holiday">', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), '</div>';
-
-				// Show any birthdays...
-				if (!empty($day['birthdays']))
-				{
-					echo '
-							<div class="smalltext">
-								<span class="birthday">', $txt['birthdays'], '</span>';
-
-					/* Each of the birthdays has:
-						id, name (person), age (if they have one set?), and is_last. (last in list?) */
-					$use_js_hide = empty($context['show_all_birthdays']) && count($day['birthdays']) > 15;
-					$count = 0;
-					foreach ($day['birthdays'] as $member)
-					{
-						echo '
-									<a href="', $scripturl, '?action=profile;u=', $member['id'], '"><span class="fix_rtl_names">', $member['name'], '</span>', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] || ($count == 10 && $use_js_hide)? '' : ', ';
-
-						// Stop at ten?
-						if ($count == 10 && $use_js_hide)
-							echo '<span class="hidelink" id="bdhidelink_', $day['day'], '">...<br /><a href="', $scripturl, '?action=calendar;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';showbd" onclick="document.getElementById(\'bdhide_', $day['day'], '\').style.display = \'\'; document.getElementById(\'bdhidelink_', $day['day'], '\').style.display = \'none\'; return false;">(', sprintf($txt['calendar_click_all'], count($day['birthdays'])), ')</a></span><span id="bdhide_', $day['day'], '" style="display: none;">, ';
-
-						$count++;
-					}
-					if ($use_js_hide)
-						echo '
-								</span>';
-
-					echo '
-							</div>';
-				}
-
-				// Any special posted events?
-				if (!empty($day['events']))
-				{
-					echo '
-							<div class="smalltext lefttext">
-								<span class="event">', $txt['events'], '</span><br />';
-
-					/* The events are made up of:
-						title, href, is_last, can_edit (are they allowed to?), and modify_href. */
-					foreach ($day['events'] as $event)
-					{
-						// If they can edit the event, show an icon they can click on....
-						if ($event['can_edit'])
-							echo '
-								<a class="modify_event" href="', $event['modify_href'], '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" title="' . $txt['modify'] . '" /></a>';
-						
-						if ($event['can_export'])
-							echo '
-								<a class="modify_event" href="', $event['export_href'], '"><img src="' . $settings['images_url'] . '/icons/calendar_export.png" alt=">" title="' . $txt['save'] . '"/></a>';
-
-								
-						echo '
-								', $event['link'], $event['is_last'] ? '' : '<br />';
-					}
-
-					echo '
-							</div>';
-				}
-			}
-
-			echo '
-						</td>';
-		}
-
-		echo '
-					</tr>';
-	}
-
-	echo '
-				</table>';
-}
-
-// Or show a weekly one?
-function template_show_week_grid($grid_name)
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	if (!isset($context['calendar_grid_' . $grid_name]))
-		return false;
-
-	$calendar_data = &$context['calendar_grid_' . $grid_name];
-
-	// Loop through each month (At least one) and print out each day.
-	foreach ($calendar_data['months'] as $month_data)
-	{
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg weekly">';
-
-		if (empty($calendar_data['previous_calendar']['disabled']) && $calendar_data['show_next_prev'] && empty($done_title))
-			echo '
-					<span class="floatleft"><a href="', $calendar_data['previous_week']['href'], '">&#171;</a></span>';
-
-		if (empty($calendar_data['next_calendar']['disabled']) && $calendar_data['show_next_prev'] && empty($done_title))
-			echo '
-					<span class="floatright"><a href="', $calendar_data['next_week']['href'], '">&#187;</a></span>';
-
-		echo '
-					<a href="', $scripturl, '?action=calendar;month=', $month_data['current_month'], ';year=', $month_data['current_year'], '">', $txt['months_titles'][$month_data['current_month']], ' ', $month_data['current_year'], '</a>', empty($done_title) && !empty($calendar_data['week_number']) ? (' - ' . $txt['calendar_week'] . ' ' . $calendar_data['week_number']) : '', '
-				</h3>
-			</div>';
-
-		$done_title = true;
-
-		echo '
-				<table width="100%" class="calendar_table weeklist" cellspacing="1" cellpadding="0">';
-
-		foreach ($month_data['days'] as $day)
-		{
-			echo '
-					<tr>
-						<td colspan="2">
-							<div class="title_bar">
-								<h4 class="titlebg">', $txt['days'][$day['day_of_week']], '</h4>
-							</div>
-						</td>
-					</tr>
-					<tr>
-						<td class="windowbg">';
-
-			// Should the day number be a link?
-			if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
-				echo '
-							<a href="', $scripturl, '?action=calendar;sa=post;month=', $month_data['current_month'], ';year=', $month_data['current_year'], ';day=', $day['day'], ';', $context['session_var'], '=', $context['session_id'], '">', $day['day'], '</a>';
-			else
-				echo '
-							', $day['day'];
-
-			echo '
-						</td>
-						<td class="', $day['is_today'] ? 'calendar_today' : 'windowbg2', ' weekdays">';
-
-			// Are there any holidays?
-			if (!empty($day['holidays']))
-				echo '
-							<div class="smalltext holiday">', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), '</div>';
-
-			// Show any birthdays...
-			if (!empty($day['birthdays']))
-			{
-				echo '
-							<div class="smalltext">
-								<span class="birthday">', $txt['birthdays'], '</span>';
-
-				/* Each of the birthdays has:
-					id, name (person), age (if they have one set?), and is_last. (last in list?) */
-				foreach ($day['birthdays'] as $member)
-					echo '
-								<a href="', $scripturl, '?action=profile;u=', $member['id'], '"><span class="fix_rtl_names">', $member['name'], '</span>', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
-				echo '
-							</div>';
-			}
-
-			// Any special posted events?
-			if (!empty($day['events']))
-			{
-				echo '
-							<div class="smalltext">
-								<span class="event">', $txt['events'], '</span>';
-
-				/* The events are made up of:
-					title, href, is_last, can_edit (are they allowed to?), and modify_href. */
-				foreach ($day['events'] as $event)
-				{
-					// If they can edit the event, show a star they can click on....
-					if ($event['can_edit'])
-						echo '
-								<a href="', $event['modify_href'], '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" /></a> ';
-
-					echo '
-								', $event['link'], $event['is_last'] ? '' : ', ';
-				}
-
-				echo '
-							</div>';
-			}
-
-			echo '
-						</td>
-					</tr>';
-		}
-
-		echo '
-				</table>';
-	}
-}
-
-function template_bcd()
-{
-	global $context, $scripturl;
-
-	echo '
-	<table cellpadding="0" cellspacing="1" align="center">
-		<caption class="titlebg">BCD Clock</caption>
-		<tr class="windowbg">';
-
-	$alt = false;
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		echo '
-			<td style="padding-', $alt ? 'right' : 'left', ': 1.5em;" valign="bottom">';
-
-		foreach ($v as $i)
-			echo '
-				<img src="', $context['offimg'], '" alt="" id="', $t, '_', $i, '" /><br />';
-
-		echo '
-			</td>';
-
-		$alt = !$alt;
-	}
-
-	echo '
-		</tr>
-	</table>
-	<p align="center"><a href="', $scripturl, '?action=clock;rb">Are you hardcore?</a></p>
-
-		<script type="text/javascript"><!-- // --><![CDATA[
-		var icons = new Object();';
-
-		foreach ($context['clockicons'] as $t => $v)
-		{
-			foreach ($v as $i)
-				echo '
-			icons[\'', $t, '_', $i, '\'] = document.getElementById(\'', $t, '_', $i, '\');';
-		}
-
-		echo '
-		function update()
-		{
-			// Get the current time
-			var time = new Date();
-			var hour = time.getHours();
-			var min = time.getMinutes();
-			var sec = time.getSeconds();
-
-			// Break it up into individual digits
-			var h1 = parseInt(hour / 10);
-			var h2 = hour % 10;
-			var m1 = parseInt(min / 10);
-			var m2 = min % 10;
-			var s1 = parseInt(sec / 10);
-			var s2 = sec % 10;
-
-			// For each digit figure out which ones to turn off and which ones to turn on
-			var turnon = new Array();';
-
-		foreach ($context['clockicons'] as $t => $v)
-		{
-			foreach ($v as $i)
-				echo '
-			if (', $t, ' >= ', $i, ')
-			{
-				turnon.push("', $t, '_', $i, '");
-				', $t, ' -= ', $i, ';
-			}';
-		}
-
-		echo '
-			for (var i in icons)
-				if (!in_array(i, turnon))
-					icons[i].src = "', $context['offimg'], '";
-				else
-					icons[i].src = "', $context['onimg'], '";
-
-			window.setTimeout("update();", 500);
-		}
-		// Checks for variable in theArray.
-		function in_array(variable, theArray)
-		{
-			for (var i = 0; i < theArray.length; i++)
-			{
-				if (theArray[i] == variable)
-					return true;
-			}
-			return false;
-		}
-
-		update();
-		// ]]></script>';
-}
-
-function template_hms()
-{
-	global $context, $scripturl;
-
-	echo '
-<table cellpadding="0" cellspacing="1" align="center">
-	<caption class="titlebg">Binary Clock</caption>';
-	$alt = false;
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		echo '
-	<tr class="', $alt ? 'windowbg2' : 'windowbg', '">
-		<td align="right">';
-		foreach ($v as $i)
-			echo '
-			<img src="', $context['offimg'], '" alt="" id="', $t, '_', $i, '" />';
-		echo '
-		</td>';
-		$alt = !$alt;
-	}
-
-	echo '
-	</tr>
-	<tr class="', $alt ? 'windowbg2' : 'windowbg', '"><td colspan="6" align="center"><a href="', $scripturl, '?action=clock">Too tough for you?</a></td></tr>
-</table>';
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-	var icons = new Object();';
-
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		foreach ($v as $i)
-			echo '
-		icons[\'', $t, '_', $i, '\'] = document.getElementById(\'', $t, '_', $i, '\');';
-	}
-
-	echo '
-	function update()
-	{
-		// Get the current time
-		var time = new Date();
-		var h = time.getHours();
-		var m = time.getMinutes();
-		var s = time.getSeconds();
-
-		// For each digit figure out which ones to turn off and which ones to turn on
-		var turnon = new Array();';
-
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		foreach ($v as $i)
-			echo '
-		if (', $t, ' >= ', $i, ')
-		{
-			turnon.push("', $t, '_', $i, '");
-			', $t, ' -= ', $i, ';
-		}';
-	}
-
-	echo '
-		for (var i in icons)
-			if (!in_array(i, turnon))
-				icons[i].src = "', $context['offimg'], '";
-			else
-				icons[i].src = "', $context['onimg'], '";
-
-		window.setTimeout("update();", 500);
-	}
-	// Checks for variable in theArray.
-	function in_array(variable, theArray)
-	{
-		for (var i = 0; i < theArray.length; i++)
-		{
-			if (theArray[i] == variable)
-				return true;
-		}
-		return false;
-	}
-
-	update();
-	// ]]></script>';
-}
-
-function template_omfg()
-{
-	global $context, $scripturl;
-
-	echo '
-<table cellpadding="0" cellspacing="1" align="center">
-	<caption class="titlebg">OMFG Binary Clock</caption>';
-	$alt = false;
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		echo '
-	<tr class="', $alt ? 'windowbg2' : 'windowbg', '">
-		<td align="right">';
-		foreach ($v as $i)
-			echo '
-			<img src="', $context['offimg'], '" alt="" id="', $t, '_', $i, '" />';
-		echo '
-		</td>';
-		$alt = !$alt;
-	}
-
-	echo '
-	</tr>
-</table>';
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-	var icons = new Object();';
-
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		foreach ($v as $i)
-			echo '
-		icons[\'', $t, '_', $i, '\'] = document.getElementById(\'', $t, '_', $i, '\');';
-	}
-
-	echo '
-	function update()
-	{
-		// Get the current time
-		var time = new Date();
-		var month = time.getMonth() + 1;
-		var day = time.getDate();
-		var year = time.getFullYear();
-		year = year % 100;
-		var hour = time.getHours();
-		var min = time.getMinutes();
-		var sec = time.getSeconds();
-
-		// For each digit figure out which ones to turn off and which ones to turn on
-		var turnon = new Array();';
-
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		foreach ($v as $i)
-		echo '
-		if (', $t, ' >= ', $i, ')
-		{
-			turnon.push("', $t, '_', $i, '");
-			', $t, ' -= ', $i, ';
-		}';
-	}
-
-	echo '
-		for (var i in icons)
-			if (!in_array(i, turnon))
-				icons[i].src = "', $context['offimg'], '";
-			else
-				icons[i].src = "', $context['onimg'], '";
-
-		window.setTimeout("update();", 500);
-	}
-	// Checks for variable in theArray.
-	function in_array(variable, theArray)
-	{
-		for (var i = 0; i < theArray.length; i++)
-		{
-			if (theArray[i] == variable)
-				return true;
-		}
-		return false;
-	}
-
-	update();
-	// ]]></script>';
-}
-
-function template_thetime()
-{
-	global $context, $scripturl;
-
-	echo '
-<table cellpadding="0" cellspacing="0" border="1" align="center">
-	<caption>The time you requested</caption>';
-	$alt = false;
-	foreach ($context['clockicons'] as $t => $v)
-	{
-		echo '
-	<tr class="', $alt ? 'windowbg2' : 'windowbg', '">
-		<td align="right">';
-		foreach ($v as $i)
-			echo '
-			<img src="', $i ? $context['onimg'] : $context['offimg'], '" alt="" />';
-		echo '
-		</td>';
-		$alt = !$alt;
-	}
-
-	echo '
-	</tr>
-</table>';
-
-}
-
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+// The main calendar - January, for example.
+function template_main()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	echo '
+		<div id="calendar">
+			<div id="month_grid">
+				', template_show_month_grid('prev'), '
+				', template_show_month_grid('current'), '
+				', template_show_month_grid('next'), '
+			</div>
+			<div id="main_grid">
+				', $context['view_week'] ? template_show_week_grid('main') : template_show_month_grid('main');
+
+	template_button_strip($context['calendar_buttons'], 'right');
+
+	// Show some controls to allow easy calendar navigation.
+	echo '
+				<form id="calendar_navigation" action="', $scripturl, '?action=calendar" method="post" accept-charset="', $context['character_set'], '">
+					<select name="month">';
+
+	// Show a select box with all the months.
+	foreach ($txt['months'] as $number => $month)
+		echo '
+						<option value="', $number, '"', $number == $context['current_month'] ? ' selected="selected"' : '', '>', $month, '</option>';
+	echo '
+					</select>
+					<select name="year">';
+
+	// Show a link for every year.....
+	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
+		echo '
+						<option value="', $year, '"', $year == $context['current_year'] ? ' selected="selected"' : '', '>', $year, '</option>';
+	echo '
+					</select>
+					<input type="submit" class="button_submit" value="', $txt['view'], '" />';
+
+	echo '
+				</form>
+			</div>
+		</div>';
+}
+
+// Template for posting a calendar event.
+function template_event_post()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	// Start the javascript for drop down boxes...
+	echo '
+		<script type="text/javascript"><!-- // --><![CDATA[
+			var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+
+			function generateDays()
+			{
+				var days = 0, selected = 0;
+				var dayElement = document.getElementById("day"), yearElement = document.getElementById("year"), monthElement = document.getElementById("month");
+
+				monthLength[1] = 28;
+				if (yearElement.options[yearElement.selectedIndex].value % 4 == 0)
+					monthLength[1] = 29;
+
+				selected = dayElement.selectedIndex;
+				while (dayElement.options.length)
+					dayElement.options[0] = null;
+
+				days = monthLength[monthElement.value - 1];
+
+				for (i = 1; i <= days; i++)
+					dayElement.options[dayElement.length] = new Option(i, i);
+
+				if (selected < days)
+					dayElement.selectedIndex = selected;
+			}
+		// ]]></script>
+
+		<form action="', $scripturl, '?action=calendar;sa=post" method="post" name="postevent" accept-charset="', $context['character_set'], '" onsubmit="submitonce(this);smc_saveEntities(\'postevent\', [\'evtitle\']);" style="margin: 0;">';
+
+	if (!empty($context['event']['new']))
+		echo '
+			<input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />';
+
+	// Start the main table.
+	echo '
+		<div id="post_event">
+			<div class="cat_bar">
+				<h3 class="catbg">
+					', $context['page_title'], '
+				</h3>
+			</div>';
+
+	if (!empty($context['post_error']['messages']))
+	{
+		echo '
+			<div class="errorbox">
+				<dl class="event_error">
+					<dt>
+						', $context['error_type'] == 'serious' ? '<strong>' . $txt['error_while_submitting'] . '</strong>' : '', '
+					</dt>
+					<dt class="error">
+						', implode('<br />', $context['post_error']['messages']), '
+					</dt>
+				</dl>
+			</div>';
+	}
+
+	echo '
+			<div class="roundframe">
+				<fieldset id="event_main">
+					<legend><span', isset($context['post_error']['no_event']) ? ' class="error"' : '', '>', $txt['calendar_event_title'], '</span></legend>
+					<input type="text" name="evtitle" maxlength="255" size="70" value="', $context['event']['title'], '" class="input_text" />
+					<div class="smalltext" style="white-space: nowrap;">
+						<input type="hidden" name="calendar" value="1" />', $txt['calendar_year'], '
+						<select name="year" id="year" onchange="generateDays();">';
+
+	// Show a list of all the years we allow...
+	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
+		echo '
+							<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '&nbsp;</option>';
+
+	echo '
+						</select>
+						', $txt['calendar_month'], '
+						<select name="month" id="month" onchange="generateDays();">';
+
+	// There are 12 months per year - ensure that they all get listed.
+	for ($month = 1; $month <= 12; $month++)
+		echo '
+							<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '&nbsp;</option>';
+
+	echo '
+						</select>
+						', $txt['calendar_day'], '
+						<select name="day" id="day">';
+
+	// This prints out all the days in the current month - this changes dynamically as we switch months.
+	for ($day = 1; $day <= $context['event']['last_day']; $day++)
+		echo '
+							<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
+
+	echo '
+						</select>
+					</div>
+				</fieldset>';
+
+	if (!empty($modSettings['cal_allowspan']) || $context['event']['new'])
+		echo '
+				<fieldset id="event_options">
+					<legend>', $txt['calendar_event_options'], '</legend>
+					<div class="event_options smalltext">
+						<ul class="event_options">';
+
+	// If events can span more than one day then allow the user to select how long it should last.
+	if (!empty($modSettings['cal_allowspan']))
+	{
+		echo '
+							<li>
+								', $txt['calendar_numb_days'], '
+								<select name="span">';
+
+		for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++)
+			echo '
+									<option value="', $days, '"', $context['event']['span'] == $days ? ' selected="selected"' : '', '>', $days, '&nbsp;</option>';
+
+		echo '
+								</select>
+							</li>';
+	}
+
+	// If this is a new event let the user specify which board they want the linked post to be put into.
+	if ($context['event']['new'])
+	{
+		echo '
+							<li>
+								', $txt['calendar_link_event'], '
+								<input type="checkbox" style="vertical-align: middle;" class="input_check" name="link_to_board" checked="checked" onclick="toggleLinked(this.form);" />
+							</li>
+							<li>
+								', $txt['calendar_post_in'], '
+								<select id="board" name="board" onchange="this.form.submit();">';
+		foreach ($context['event']['categories'] as $category)
+		{
+			echo '
+									<optgroup label="', $category['name'], '">';
+			foreach ($category['boards'] as $board)
+				echo '
+										<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
+			echo '
+									</optgroup>';
+		}
+		echo '
+								</select>
+							</li>';
+	}
+
+	if (!empty($modSettings['cal_allowspan']) || $context['event']['new'])
+		echo '
+						</ul>
+					</div>
+				</fieldset>';
+
+	echo '
+				<input type="submit" value="', empty($context['event']['new']) ? $txt['save'] : $txt['post'], '" class="button_submit" />';
+	// Delete button?
+	if (empty($context['event']['new']))
+		echo '
+				<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['calendar_confirm_delete'], '\');" class="button_submit" />';
+
+	echo '
+				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+				<input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />
+
+			</div>
+		</div>
+		</form>';
+}
+
+// Display a monthly calendar grid.
+function template_show_month_grid($grid_name)
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings, $smcFunc;
+
+	if (!isset($context['calendar_grid_' . $grid_name]))
+		return false;
+
+	$calendar_data = &$context['calendar_grid_' . $grid_name];
+	$colspan = !empty($calendar_data['show_week_links']) ? 8 : 7;
+
+	if (empty($calendar_data['disable_title']))
+	{
+		echo '
+			<div class="cat_bar">
+				<h3 class="catbg centertext" style="font-size: ', $calendar_data['size'] == 'large' ? 'large' : 'small', ';">';
+
+		if (empty($calendar_data['previous_calendar']['disabled']) && $calendar_data['show_next_prev'])
+			echo '
+					<span class="floatleft"><a href="', $calendar_data['previous_calendar']['href'], '">&#171;</a></span>';
+
+		if (empty($calendar_data['next_calendar']['disabled']) && $calendar_data['show_next_prev'])
+			echo '
+					<span class="floatright"><a href="', $calendar_data['next_calendar']['href'], '">&#187;</a></span>';
+
+		if ($calendar_data['show_next_prev'])
+			echo '
+					', $txt['months_titles'][$calendar_data['current_month']], ' ', $calendar_data['current_year'];
+		else
+			echo '
+					<a href="', $scripturl, '?action=calendar;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], '">', $txt['months_titles'][$calendar_data['current_month']], ' ', $calendar_data['current_year'], '</a>';
+
+		echo '
+				</h3>
+			</div>';
+	}
+
+	echo '
+				<table cellspacing="1" class="calendar_table">';
+
+	// Show each day of the week.
+	if (empty($calendar_data['disable_day_titles']))
+	{
+		echo '
+					<tr class="titlebg2">';
+
+		if (!empty($calendar_data['show_week_links']))
+			echo '
+						<th>&nbsp;</th>';
+
+		foreach ($calendar_data['week_days'] as $day)
+		{
+			echo '
+						<th class="days" scope="col" ', $calendar_data['size'] == 'small' ? 'style="font-size: x-small;"' : '', '>', !empty($calendar_data['short_day_titles']) ? ($smcFunc['substr']($txt['days'][$day], 0, 1)) : $txt['days'][$day], '</th>';
+		}
+		echo '
+					</tr>';
+	}
+
+	/* Each week in weeks contains the following:
+		days (a list of days), number (week # in the year.) */
+	foreach ($calendar_data['weeks'] as $week)
+	{
+		echo '
+					<tr>';
+
+		if (!empty($calendar_data['show_week_links']))
+			echo '
+						<td class="windowbg2 weeks">
+							<a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $week['days'][0]['day'], '">&#187;</a>
+						</td>';
+
+		/* Every day has the following:
+			day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?),
+			holidays, events, birthdays. (last three are lists.) */
+		foreach ($week['days'] as $day)
+		{
+			// If this is today, make it a different color and show a border.
+			echo '
+						<td style="height: ', $calendar_data['size'] == 'small' ? '20' : '100', 'px; padding: 2px;', $calendar_data['size'] == 'small' ? 'font-size: x-small;' : '', '" class="', $day['is_today'] ? 'calendar_today' : 'windowbg', ' days">';
+
+			// Skip it if it should be blank - it's not a day if it has no number.
+			if (!empty($day['day']))
+			{
+				// Should the day number be a link?
+				if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
+					echo '
+							<a href="', $scripturl, '?action=calendar;sa=post;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';day=', $day['day'], ';', $context['session_var'], '=', $context['session_id'], '">', $day['day'], '</a>';
+				else
+					echo '
+							', $day['day'];
+
+				// Is this the first day of the week? (and are we showing week numbers?)
+				if ($day['is_first_day'] && $calendar_data['size'] != 'small')
+					echo '<span class="smalltext"> - <a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $day['day'], '">', $txt['calendar_week'], ' ', $week['number'], '</a></span>';
+
+				// Are there any holidays?
+				if (!empty($day['holidays']))
+					echo '
+							<div class="smalltext holiday">', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), '</div>';
+
+				// Show any birthdays...
+				if (!empty($day['birthdays']))
+				{
+					echo '
+							<div class="smalltext">
+								<span class="birthday">', $txt['birthdays'], '</span>';
+
+					/* Each of the birthdays has:
+						id, name (person), age (if they have one set?), and is_last. (last in list?) */
+					$use_js_hide = empty($context['show_all_birthdays']) && count($day['birthdays']) > 15;
+					$count = 0;
+					foreach ($day['birthdays'] as $member)
+					{
+						echo '
+									<a href="', $scripturl, '?action=profile;u=', $member['id'], '"><span class="fix_rtl_names">', $member['name'], '</span>', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] || ($count == 10 && $use_js_hide)? '' : ', ';
+
+						// Stop at ten?
+						if ($count == 10 && $use_js_hide)
+							echo '<span class="hidelink" id="bdhidelink_', $day['day'], '">...<br /><a href="', $scripturl, '?action=calendar;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';showbd" onclick="document.getElementById(\'bdhide_', $day['day'], '\').style.display = \'\'; document.getElementById(\'bdhidelink_', $day['day'], '\').style.display = \'none\'; return false;">(', sprintf($txt['calendar_click_all'], count($day['birthdays'])), ')</a></span><span id="bdhide_', $day['day'], '" style="display: none;">, ';
+
+						$count++;
+					}
+					if ($use_js_hide)
+						echo '
+								</span>';
+
+					echo '
+							</div>';
+				}
+
+				// Any special posted events?
+				if (!empty($day['events']))
+				{
+					echo '
+							<div class="smalltext lefttext">
+								<span class="event">', $txt['events'], '</span><br />';
+
+					/* The events are made up of:
+						title, href, is_last, can_edit (are they allowed to?), and modify_href. */
+					foreach ($day['events'] as $event)
+					{
+						// If they can edit the event, show an icon they can click on....
+						if ($event['can_edit'])
+							echo '
+								<a class="modify_event" href="', $event['modify_href'], '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" title="' . $txt['modify'] . '" /></a>';
+						
+						if ($event['can_export'])
+							echo '
+								<a class="modify_event" href="', $event['export_href'], '"><img src="' . $settings['images_url'] . '/icons/calendar_export.png" alt=">" title="' . $txt['save'] . '"/></a>';
+
+								
+						echo '
+								', $event['link'], $event['is_last'] ? '' : '<br />';
+					}
+
+					echo '
+							</div>';
+				}
+			}
+
+			echo '
+						</td>';
+		}
+
+		echo '
+					</tr>';
+	}
+
+	echo '
+				</table>';
+}
+
+// Or show a weekly one?
+function template_show_week_grid($grid_name)
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	if (!isset($context['calendar_grid_' . $grid_name]))
+		return false;
+
+	$calendar_data = &$context['calendar_grid_' . $grid_name];
+
+	// Loop through each month (At least one) and print out each day.
+	foreach ($calendar_data['months'] as $month_data)
+	{
+		echo '
+			<div class="cat_bar">
+				<h3 class="catbg weekly">';
+
+		if (empty($calendar_data['previous_calendar']['disabled']) && $calendar_data['show_next_prev'] && empty($done_title))
+			echo '
+					<span class="floatleft"><a href="', $calendar_data['previous_week']['href'], '">&#171;</a></span>';
+
+		if (empty($calendar_data['next_calendar']['disabled']) && $calendar_data['show_next_prev'] && empty($done_title))
+			echo '
+					<span class="floatright"><a href="', $calendar_data['next_week']['href'], '">&#187;</a></span>';
+
+		echo '
+					<a href="', $scripturl, '?action=calendar;month=', $month_data['current_month'], ';year=', $month_data['current_year'], '">', $txt['months_titles'][$month_data['current_month']], ' ', $month_data['current_year'], '</a>', empty($done_title) && !empty($calendar_data['week_number']) ? (' - ' . $txt['calendar_week'] . ' ' . $calendar_data['week_number']) : '', '
+				</h3>
+			</div>';
+
+		$done_title = true;
+
+		echo '
+				<ul class="weeklist">';
+
+		foreach ($month_data['days'] as $day)
+		{
+			echo '
+					<li class="windowbg">
+						<h4>';
+
+			// Should the day number be a link?
+			if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
+				echo '
+							<a href="', $scripturl, '?action=calendar;sa=post;month=', $month_data['current_month'], ';year=', $month_data['current_year'], ';day=', $day['day'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['days'][$day['day_of_week']], ' - ', $day['day'], '</a>';
+			else
+				echo '
+							', $txt['days'][$day['day_of_week']], ' - ', $day['day'];
+
+			echo '
+						</h4>
+						<div class="', $day['is_today'] ? 'calendar_today' : 'windowbg2', ' weekdays">';
+
+			// Are there any holidays?
+			if (!empty($day['holidays']))
+				echo '
+							<div class="smalltext holiday">', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), '</div>';
+
+			// Show any birthdays...
+			if (!empty($day['birthdays']))
+			{
+				echo '
+							<div class="smalltext">
+								<span class="birthday">', $txt['birthdays'], '</span>';
+
+				/* Each of the birthdays has:
+					id, name (person), age (if they have one set?), and is_last. (last in list?) */
+				foreach ($day['birthdays'] as $member)
+					echo '
+								<a href="', $scripturl, '?action=profile;u=', $member['id'], '"><span class="fix_rtl_names">', $member['name'], '</span>', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
+				echo '
+							</div>';
+			}
+
+			// Any special posted events?
+			if (!empty($day['events']))
+			{
+				echo '
+							<div class="smalltext">
+								<span class="event">', $txt['events'], '</span>';
+
+				/* The events are made up of:
+					title, href, is_last, can_edit (are they allowed to?), and modify_href. */
+				foreach ($day['events'] as $event)
+				{
+					// If they can edit the event, show a star they can click on....
+					if ($event['can_edit'])
+						echo '
+								<a href="', $event['modify_href'], '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" /></a> ';
+
+					echo '
+								', $event['link'], $event['is_last'] ? '' : ', ';
+				}
+
+				echo '
+							</div>';
+			}
+
+			echo '
+						</div>
+					</li>';
+		}
+
+		echo '
+				</ul>';
+	}
+}
+
+function template_bcd()
+{
+	global $context, $scripturl;
+
+	echo '
+	<table cellpadding="0" cellspacing="1" align="center">
+		<caption class="titlebg">BCD Clock</caption>
+		<tr class="windowbg">';
+
+	$alt = false;
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		echo '
+			<td style="padding-', $alt ? 'right' : 'left', ': 1.5em;" valign="bottom">';
+
+		foreach ($v as $i)
+			echo '
+				<img src="', $context['offimg'], '" alt="" id="', $t, '_', $i, '" /><br />';
+
+		echo '
+			</td>';
+
+		$alt = !$alt;
+	}
+
+	echo '
+		</tr>
+	</table>
+	<p align="center"><a href="', $scripturl, '?action=clock;rb">Are you hardcore?</a></p>
+
+		<script type="text/javascript"><!-- // --><![CDATA[
+		var icons = new Object();';
+
+		foreach ($context['clockicons'] as $t => $v)
+		{
+			foreach ($v as $i)
+				echo '
+			icons[\'', $t, '_', $i, '\'] = document.getElementById(\'', $t, '_', $i, '\');';
+		}
+
+		echo '
+		function update()
+		{
+			// Get the current time
+			var time = new Date();
+			var hour = time.getHours();
+			var min = time.getMinutes();
+			var sec = time.getSeconds();
+
+			// Break it up into individual digits
+			var h1 = parseInt(hour / 10);
+			var h2 = hour % 10;
+			var m1 = parseInt(min / 10);
+			var m2 = min % 10;
+			var s1 = parseInt(sec / 10);
+			var s2 = sec % 10;
+
+			// For each digit figure out which ones to turn off and which ones to turn on
+			var turnon = new Array();';
+
+		foreach ($context['clockicons'] as $t => $v)
+		{
+			foreach ($v as $i)
+				echo '
+			if (', $t, ' >= ', $i, ')
+			{
+				turnon.push("', $t, '_', $i, '");
+				', $t, ' -= ', $i, ';
+			}';
+		}
+
+		echo '
+			for (var i in icons)
+				if (!in_array(i, turnon))
+					icons[i].src = "', $context['offimg'], '";
+				else
+					icons[i].src = "', $context['onimg'], '";
+
+			window.setTimeout("update();", 500);
+		}
+		// Checks for variable in theArray.
+		function in_array(variable, theArray)
+		{
+			for (var i = 0; i < theArray.length; i++)
+			{
+				if (theArray[i] == variable)
+					return true;
+			}
+			return false;
+		}
+
+		update();
+		// ]]></script>';
+}
+
+function template_hms()
+{
+	global $context, $scripturl;
+
+	echo '
+<table cellpadding="0" cellspacing="1" align="center">
+	<caption class="titlebg">Binary Clock</caption>';
+	$alt = false;
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		echo '
+	<tr class="', $alt ? 'windowbg2' : 'windowbg', '">
+		<td align="right">';
+		foreach ($v as $i)
+			echo '
+			<img src="', $context['offimg'], '" alt="" id="', $t, '_', $i, '" />';
+		echo '
+		</td>';
+		$alt = !$alt;
+	}
+
+	echo '
+	</tr>
+	<tr class="', $alt ? 'windowbg2' : 'windowbg', '"><td colspan="6" align="center"><a href="', $scripturl, '?action=clock">Too tough for you?</a></td></tr>
+</table>';
+
+	echo '
+	<script type="text/javascript"><!-- // --><![CDATA[
+	var icons = new Object();';
+
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		foreach ($v as $i)
+			echo '
+		icons[\'', $t, '_', $i, '\'] = document.getElementById(\'', $t, '_', $i, '\');';
+	}
+
+	echo '
+	function update()
+	{
+		// Get the current time
+		var time = new Date();
+		var h = time.getHours();
+		var m = time.getMinutes();
+		var s = time.getSeconds();
+
+		// For each digit figure out which ones to turn off and which ones to turn on
+		var turnon = new Array();';
+
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		foreach ($v as $i)
+			echo '
+		if (', $t, ' >= ', $i, ')
+		{
+			turnon.push("', $t, '_', $i, '");
+			', $t, ' -= ', $i, ';
+		}';
+	}
+
+	echo '
+		for (var i in icons)
+			if (!in_array(i, turnon))
+				icons[i].src = "', $context['offimg'], '";
+			else
+				icons[i].src = "', $context['onimg'], '";
+
+		window.setTimeout("update();", 500);
+	}
+	// Checks for variable in theArray.
+	function in_array(variable, theArray)
+	{
+		for (var i = 0; i < theArray.length; i++)
+		{
+			if (theArray[i] == variable)
+				return true;
+		}
+		return false;
+	}
+
+	update();
+	// ]]></script>';
+}
+
+function template_omfg()
+{
+	global $context, $scripturl;
+
+	echo '
+<table cellpadding="0" cellspacing="1" align="center">
+	<caption class="titlebg">OMFG Binary Clock</caption>';
+	$alt = false;
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		echo '
+	<tr class="', $alt ? 'windowbg2' : 'windowbg', '">
+		<td align="right">';
+		foreach ($v as $i)
+			echo '
+			<img src="', $context['offimg'], '" alt="" id="', $t, '_', $i, '" />';
+		echo '
+		</td>';
+		$alt = !$alt;
+	}
+
+	echo '
+	</tr>
+</table>';
+
+	echo '
+	<script type="text/javascript"><!-- // --><![CDATA[
+	var icons = new Object();';
+
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		foreach ($v as $i)
+			echo '
+		icons[\'', $t, '_', $i, '\'] = document.getElementById(\'', $t, '_', $i, '\');';
+	}
+
+	echo '
+	function update()
+	{
+		// Get the current time
+		var time = new Date();
+		var month = time.getMonth() + 1;
+		var day = time.getDate();
+		var year = time.getFullYear();
+		year = year % 100;
+		var hour = time.getHours();
+		var min = time.getMinutes();
+		var sec = time.getSeconds();
+
+		// For each digit figure out which ones to turn off and which ones to turn on
+		var turnon = new Array();';
+
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		foreach ($v as $i)
+		echo '
+		if (', $t, ' >= ', $i, ')
+		{
+			turnon.push("', $t, '_', $i, '");
+			', $t, ' -= ', $i, ';
+		}';
+	}
+
+	echo '
+		for (var i in icons)
+			if (!in_array(i, turnon))
+				icons[i].src = "', $context['offimg'], '";
+			else
+				icons[i].src = "', $context['onimg'], '";
+
+		window.setTimeout("update();", 500);
+	}
+	// Checks for variable in theArray.
+	function in_array(variable, theArray)
+	{
+		for (var i = 0; i < theArray.length; i++)
+		{
+			if (theArray[i] == variable)
+				return true;
+		}
+		return false;
+	}
+
+	update();
+	// ]]></script>';
+}
+
+function template_thetime()
+{
+	global $context, $scripturl;
+
+	echo '
+<table cellpadding="0" cellspacing="0" border="1" align="center">
+	<caption>The time you requested</caption>';
+	$alt = false;
+	foreach ($context['clockicons'] as $t => $v)
+	{
+		echo '
+	<tr class="', $alt ? 'windowbg2' : 'windowbg', '">
+		<td align="right">';
+		foreach ($v as $i)
+			echo '
+			<img src="', $i ? $context['onimg'] : $context['offimg'], '" alt="" />';
+		echo '
+		</td>';
+		$alt = !$alt;
+	}
+
+	echo '
+	</tr>
+</table>';
+
+}
+
 ?>

+ 918 - 919
Themes/default/Display.template.php

@@ -1,920 +1,919 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-function template_main()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	// Let them know, if their report was a success!
-	if ($context['report_sent'])
-	{
-		echo '
-			<div class="infobox">
-				', $txt['report_sent'], '
-			</div>';
-	}
-
-	// Show the anchor for the top and for the first message. If the first message is new, say so.
-	echo '
-			<a id="top"></a>
-			<a id="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a id="new"></a>' : '';
-
-	// Is this topic also a poll?
-	if ($context['is_poll'])
-	{
-		echo '
-			<div id="poll">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.png" alt="" class="icon" /> ', $txt['poll'], '</span>
-					</h3>
-				</div>
-				<div class="windowbg">
-					<span class="topslice"><span></span></span>
-					<div class="content" id="poll_options">
-						<h4 id="pollquestion">
-							', $context['poll']['question'], '
-						</h4>';
-
-		// Are they not allowed to vote but allowed to view the options?
-		if ($context['poll']['show_results'] || !$context['allow_vote'])
-		{
-			echo '
-					<dl class="options">';
-
-			// Show each option with its corresponding percentage bar.
-			foreach ($context['poll']['options'] as $option)
-			{
-				echo '
-						<dt class="middletext', $option['voted_this'] ? ' voted' : '', '">', $option['option'], '</dt>
-						<dd class="middletext statsbar', $option['voted_this'] ? ' voted' : '', '">';
-
-				if ($context['allow_poll_view'])
-					echo '
-							', $option['bar_ndt'], '
-							<span class="percentage">', $option['votes'], ' (', $option['percent'], '%)</span>';
-
-				echo '
-						</dd>';
-			}
-
-			echo '
-					</dl>';
-
-			if ($context['allow_poll_view'])
-				echo '
-						<p><strong>', $txt['poll_total_voters'], ':</strong> ', $context['poll']['total_votes'], '</p>';
-		}
-		// They are allowed to vote! Go to it!
-		else
-		{
-			echo '
-						<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '">';
-
-			// Show a warning if they are allowed more than one option.
-			if ($context['poll']['allowed_warning'])
-				echo '
-							<p class="smallpadding">', $context['poll']['allowed_warning'], '</p>';
-
-			echo '
-							<ul class="reset options">';
-
-			// Show each option with its button - a radio likely.
-			foreach ($context['poll']['options'] as $option)
-				echo '
-								<li class="middletext">', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
-
-			echo '
-							</ul>
-							<div class="submitbutton">
-								<input type="submit" value="', $txt['poll_vote'], '" class="button_submit" />
-								<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-							</div>
-						</form>';
-		}
-
-		// Is the clock ticking?
-		if (!empty($context['poll']['expire_time']))
-			echo '
-						<p><strong>', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ':</strong> ', $context['poll']['expire_time'], '</p>';
-
-		echo '
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>
-			<div id="pollmoderation">';
-
-		template_button_strip($context['poll_buttons']);
-
-		echo '
-			</div>';
-	}
-
-	// Does this topic have some events linked to it?
-	if (!empty($context['linked_calendar_events']))
-	{
-		echo '
-			<div class="linked_events">
-				<div class="title_bar">
-					<h3 class="titlebg headerpadding">', $txt['calendar_linked_events'], '</h3>
-				</div>
-				<div class="windowbg">
-					<span class="topslice"><span></span></span>
-					<div class="content">
-						<ul class="reset">';
-
-		foreach ($context['linked_calendar_events'] as $event)
-			echo '
-							<li>
-								', ($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'] : ''), '
-							</li>';
-
-		echo '
-						</ul>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>';
-	}
-
-	// Show the page index... "Pages: [1]".
-	echo '
-			<div class="pagesection">
-				<div class="nextlinks">', $context['previous_next'], '</div>', template_button_strip($context['normal_buttons'], 'right'), '
-				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#lastPost"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
-			</div>';
-
-	// Show the topic information - icon, subject, etc.
-	echo '
-			<div id="forumposts">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<img src="', $settings['images_url'], '/topic/', $context['class'], '.png" align="bottom" alt="" />
-						<span id="author">', $txt['author'], '</span>
-						', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')
-					</h3>
-				</div>';
-
-	if (!empty($settings['display_who_viewing']))
-	{
-		echo '
-				<p id="whoisviewing" class="smalltext">';
-
-		// Show just numbers...?
-		if ($settings['display_who_viewing'] == 1)
-				echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
-		// Or show the actual people viewing the topic?
-		else
-			echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
-
-		// Now show how many guests are here too.
-		echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '
-				</p>';
-	}
-
-	echo '
-				<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">';
-
-	$ignoredMsgs = array();
-	$removableMessageIDs = array();
-	$alternate = false;
-
-	// Get all the messages...
-	while ($message = $context['get_message']())
-	{
-		$ignoring = false;
-		$alternate = !$alternate;
-		if ($message['can_remove'])
-			$removableMessageIDs[] = $message['id'];
-
-		// Are we ignoring this message?
-		if (!empty($message['is_ignored']))
-		{
-			$ignoring = true;
-			$ignoredMsgs[] = $message['id'];
-		}
-
-		// Show the message anchor and a "new" anchor if this message is new.
-		if ($message['id'] != $context['first_message'])
-			echo '
-				<a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';
-
-		echo '
-				<div class="', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', '">
-					<span class="topslice"><span></span></span>
-					<div class="post_wrapper">';
-
-		// Show information about the poster of this message.
-		echo '
-						<div class="poster">
-							<h4>';
-
-		// Show online and offline buttons?
-		if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
-			echo '
-								', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['text'], '" />', $context['can_send_pm'] ? '</a>' : '';
-
-		// Show a link to the member's profile.
-		echo '
-								', $message['member']['link'], '
-							</h4>
-							<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';
-
-		// Show the member's custom title, if they have one.
-		if (!empty($message['member']['title']))
-			echo '
-								<li class="title">', $message['member']['title'], '</li>';
-
-		// Show the member's primary group (like 'Administrator') if they have one.
-		if (!empty($message['member']['group']))
-			echo '
-								<li class="membergroup">', $message['member']['group'], '</li>';
-
-		// Don't show these things for guests.
-		if (!$message['member']['is_guest'])
-		{
-			// 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.
-			if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
-				echo '
-								<li class="postgroup">', $message['member']['post_group'], '</li>';
-			echo '
-								<li class="icons">', $message['member']['group_icons'], '</li>';
-
-			// Show avatars, images, etc.?
-			if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
-				echo '
-								<li class="avatar">
-									<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
-										', $message['member']['avatar']['image'], '
-									</a>
-								</li>';
-
-			// Show how many posts they have made.
-			if (!isset($context['disabled_fields']['posts']))
-				echo '
-								<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
-
-			// Is karma display enabled?  Total or +/-?
-			if ($modSettings['karmaMode'] == '1')
-				echo '
-								<li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
-			elseif ($modSettings['karmaMode'] == '2')
-				echo '
-								<li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
-
-			// Is this user allowed to modify this member's karma?
-			if ($message['member']['karma']['allow'])
-				echo '
-								<li class="karma_allow">
-									<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>
-									<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>
-								</li>';
-
-			// Show the member's gender icon?
-			if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
-				echo '
-								<li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
-
-			// Show their personal text?
-			if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
-				echo '
-								<li class="blurb">', $message['member']['blurb'], '</li>';
-
-			// Any custom fields to show as icons?
-			if (!empty($message['member']['custom_fields']))
-			{
-				$shown = false;
-				foreach ($message['member']['custom_fields'] as $custom)
-				{
-					if ($custom['placement'] != 1 || empty($custom['value']))
-						continue;
-					if (empty($shown))
-					{
-						$shown = true;
-						echo '
-								<li class="im_icons">
-									<ul>';
-					}
-					echo '
-										<li>', $custom['value'], '</li>';
-				}
-				if ($shown)
-					echo '
-									</ul>
-								</li>';
-			}
-
-			// This shows the popular messaging icons.
-			if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
-				echo '
-								<li class="im_icons">
-									<ul>
-										', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
-										', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
-										', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
-										', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
-									</ul>
-								</li>';
-
-			// Show the profile, website, email address, and personal message buttons.
-			if ($message['member']['show_profile_buttons'])
-			{
-				echo '
-								<li class="profile">
-									<ul>';
-				// Don't show the profile button if you're not allowed to view the profile.
-				if ($message['member']['can_view_profile'])
-					echo '
-										<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';
-
-				// Don't show an icon if they haven't specified a website.
-				if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
-					echo '
-										<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>';
-
-				// Don't show the email address if they want it hidden.
-				if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email'])
-					echo '
-										<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>';
-
-				// Since we know this person isn't a guest, you *can* message them.
-				if ($context['can_send_pm'])
-					echo '
-										<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.png" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';
-
-				echo '
-									</ul>
-								</li>';
-			}
-
-			// Any custom fields for standard placement?
-			if (!empty($message['member']['custom_fields']))
-			{
-				foreach ($message['member']['custom_fields'] as $custom)
-					if (empty($custom['placement']) || empty($custom['value']))
-						echo '
-								<li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
-			}
-
-			// Are we showing the warning status?
-			if ($message['member']['can_see_warning'])
-				echo '
-								<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>';
-		}
-		// Otherwise, show the guest's email.
-		elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email'])
-			echo '
-								<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>';
-
-		// Done with the information about the poster... on to the post itself.
-		echo '
-							</ul>
-						</div>
-						<div class="postarea">
-							<div class="flow_hidden">
-								<div class="keyinfo">
-									<div class="messageicon">
-										<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
-									</div>
-									<h5 id="subject_', $message['id'], '">
-										<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
-									</h5>
-									<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
-									<div id="msg_', $message['id'], '_quick_mod"></div>
-								</div>';
-
-		// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
-		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
-			echo '
-								<ul class="reset smalltext quickbuttons">';
-
-		// Maybe we can approve it, maybe we should?
-		if ($message['can_approve'])
-			echo '
-									<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>';
-
-		// Can they reply? Have they turned on quick reply?
-		if ($context['can_quote'] && !empty($options['display_quick_reply']))
-			echo '
-									<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>';
-
-		// So... quick reply is off, but they *can* reply?
-		elseif ($context['can_quote'])
-			echo '
-									<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>';
-
-		// Can the user modify the contents of this post?
-		if ($message['can_modify'])
-			echo '
-									<li><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '" class="modify_button">', $txt['modify'], '</a></li>';
-
-		// How about... even... remove it entirely?!
-		if ($message['can_remove'])
-			echo '
-									<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>';
-
-		// What about splitting it off the rest of the topic?
-		if ($context['can_split'] && !empty($context['real_num_replies']))
-			echo '
-									<li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '" class="split_button">', $txt['split'], '</a></li>';
-
-		// Can we restore topics?
-		if ($context['can_restore_msg'])
-			echo '
-									<li><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" class="restore_button">', $txt['restore_message'], '</a></li>';
-
-		// Show a checkbox for quick moderation?
-		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
-			echo '
-									<li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';
-
-		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
-			echo '
-								</ul>';
-
-		echo '
-							</div>';
-
-		// Ignoring this user? Hide the post.
-		if ($ignoring)
-			echo '
-							<div id="msg_', $message['id'], '_ignored_prompt">
-								', $txt['ignoring_user'], '
-								<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
-							</div>';
-
-		// Show the post itself, finally!
-		echo '
-							<div class="post">';
-
-		if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
-			echo '
-								<div class="approve_post">
-									', $txt['post_awaiting_approval'], '
-								</div>';
-		echo '
-								<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
-							</div>';
-
-		// Can the user modify the contents of this post?  Show the modify inline image.
-		if ($message['can_modify'])
-			echo '
-							<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;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';
-
-		// Assuming there are attachments...
-		if (!empty($message['attachment']))
-		{
-			echo '
-							<div id="msg_', $message['id'], '_footer" class="attachments smalltext">
-								<div style="overflow: ', isBrowser('is_firefox') ? 'visible' : 'auto', ';">';
-
-			$last_approved_state = 1;
-			$attachments_per_line = 4;
-			$i = 0;
-			
-			foreach ($message['attachment'] as $attachment)
-			{
-				// Show a special box for unapproved attachments...
-				if ($attachment['is_approved'] != $last_approved_state)
-				{
-					$last_approved_state = 0;
-					echo '
-											<fieldset>
-												<legend>', $txt['attach_awaiting_approve'];
-
-					if ($context['can_approve'])
-						echo '
-												&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
-
-					echo '
-												</legend>';
-				}
-				
-				echo '
-									<div class="floatleft padding">
-										<div class="attachments_top">';
-
-				if ($attachment['is_image'])
-				{
-					if ($attachment['thumbnail']['has_thumb'])
-						echo '
-											<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" /></a><br />';
-					else
-						echo '
-											<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/><br />';
-				}
-				
-				echo '
-										</div>
-										<div class="attachments_bot">
-											<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.png" class="centericon" alt="*" />&nbsp;' . $attachment['name'] . '</a> ';
-
-				if (!$attachment['is_approved'] && $context['can_approve'])
-					echo '
-											[<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>] ';
-				echo '
-											<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'] . '
-										</div>';
-				
-				echo '
-									</div>';
-				
-				// Next attachment line ?
-				if (++$i % $attachments_per_line === 0)
-					echo '
-									<br class="clear" />';
-			}
-
-			// no more attachments, clear the float if its open
-			if ($i % $attachments_per_line !== 0)
-				echo '
-									<br class="clear" />';
-			
-			// If we had unapproved attachments clean up.
-			if ($last_approved_state == 0)
-				echo '
-											</fieldset>';
-
-			echo '
-								</div>
-							</div>';
-		}
-
-		echo '
-						</div>
-						<div class="moderatorbar">
-							<div class="smalltext modified" id="modified_', $message['id'], '">';
-
-		// Show "<< Last Edit: Time by Person >>" if this post was edited.
-		if ($settings['show_modify'] && !empty($message['modified']['name']))
-			echo '
-								&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';
-
-		echo '
-							</div>
-							<div class="smalltext reportlinks">';
-
-		// Maybe they want to report this post to the moderator(s)?
-		if ($context['can_report_moderator'])
-			echo '
-								<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> &nbsp;';
-
-		// Can we issue a warning because of this post?  Remember, we can't give guests warnings.
-		if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
-			echo '
-								<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>';
-		echo '
-								<img class="centericon" src="', $settings['images_url'], '/ip.png" alt="" />';
-
-		// Show the IP to this user for this post - because you can moderate?
-		if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
-			echo '
-								<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 reqWin(this.href);" class="help">(?)</a>';
-		// Or, should we show it because this is you?
-		elseif ($message['can_see_ip'])
-			echo '
-								<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
-		// Okay, are you at least logged in?  Then we can show something about why IPs are logged...
-		elseif (!$context['user']['is_guest'])
-			echo '
-								<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
-		// Otherwise, you see NOTHING!
-		else
-			echo '
-								', $txt['logged'];
-
-		echo '
-							</div>';
-
-		// Are there any custom profile fields for above the signature?
-		if (!empty($message['member']['custom_fields']))
-		{
-			$shown = false;
-			foreach ($message['member']['custom_fields'] as $custom)
-			{
-				if ($custom['placement'] != 2 || empty($custom['value']))
-					continue;
-				if (empty($shown))
-				{
-					$shown = true;
-					echo '
-							<div class="custom_fields_above_signature">
-								<ul class="reset nolist">';
-				}
-				echo '
-									<li>', $custom['value'], '</li>';
-			}
-			if ($shown)
-				echo '
-								</ul>
-							</div>';
-		}
-
-		// Show the member's signature?
-		if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
-			echo '
-							<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';
-
-		echo '
-						</div>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-				<hr class="post_separator" />';
-	}
-
-	echo '
-				</form>
-			</div>
-			<a id="lastPost"></a>';
-
-	// Show the page index... "Pages: [1]".
-	echo '
-			<div class="pagesection">
-				', template_button_strip($context['normal_buttons'], 'right'), '
-				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
-				<div class="nextlinks_bottom">', $context['previous_next'], '</div>
-			</div>';
-
-	// Show the lower breadcrumbs.
-	theme_linktree();
-
-	echo '
-			<div id="moderationbuttons">', template_button_strip($context['mod_buttons'], 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';
-
-	// Show the jumpto box, or actually...let Javascript do it.
-	echo '
-			<div class="plainbox" id="display_jump_to">&nbsp;</div>';
-
-	if ($context['can_reply'] && !empty($options['display_quick_reply']))
-	{
-		echo '
-			<a id="quickreply"></a>
-			<div class="tborder" id="quickreplybox">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<span class="ie6_header floatright">
-							<a href="javascript:oQuickReply.swap();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] > 1 ? 'collapse' : 'expand', '.png" alt="+" id="quickReplyExpand" class="icon" /></a>
-						</span>
-						<span>
-							<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
-						</span>
-					</h3>
-				</div>
-				<div id="quickReplyOptions"', $options['display_quick_reply'] > 1 ? '' : ' style="display: none"', '>
-					<span class="upperframe"><span></span></span>
-					<div class="roundframe">
-						<p class="smalltext lefttext">', $txt['quick_reply_desc'], '</p>
-						', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
-						$context['oldTopicError'] ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
-						', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
-						', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '', '
-						<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;">
-							<input type="hidden" name="topic" value="', $context['current_topic'], '" />
-							<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
-							<input type="hidden" name="icon" value="xx" />
-							<input type="hidden" name="from_qr" value="1" />
-							<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
-							<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
-							<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
-							<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />
-							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-							<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />';
-
-		// Guests just need more.
-		if ($context['user']['is_guest'])
-			echo '
-							<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
-							<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
-
-		// Is visual verification enabled?
-		if ($context['require_verification'])
-			echo '
-							<strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
-
-		if ($options['display_quick_reply'] < 3)
-		{
-			echo '
-							<div class="quickReplyContent">
-								<textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea>
-							</div>';
-		}
-		else
-		{
-			// Show the actual posting area...
-			if ($context['show_bbc'])
-			{
-				echo '
-							<div id="bbcBox_message"></div>';
-			}
-
-			// What about smileys?
-			if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
-				echo '
-							<div id="smileyBox_message"></div>';
-
-			echo '
-							', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
-							<script type="text/javascript"><!-- // --><![CDATA[
-								function insertQuoteFast(messageid)
-								{
-									if (window.XMLHttpRequest)
-										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);
-									else
-										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);
-									return false;
-								}
-								function onDocReceived(XMLDoc)
-								{
-									var text = \'\';
-									for (var i = 0, n = XMLDoc.getElementsByTagName(\'quote\')[0].childNodes.length; i < n; i++)
-										text += XMLDoc.getElementsByTagName(\'quote\')[0].childNodes[i].nodeValue;
-									oEditorHandle_', $context['post_box_name'], '.insertText(text, false, true);
-
-									ajax_indicator(false);
-								}
-							// ]]></script>';
-
-		}
-		echo '
-							<div class="padding">
-								<hr class="hrcolor" />
-								<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
-								<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';
-
-		if ($context['show_spellchecking'])
-			echo '
-								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
-
-		echo '
-								<br class="clear_right" />
-							</div>
-						</form>
-					</div>
-					<span class="lowerframe"><span></span></span>
-				</div>
-			</div>';
-	}
-	else
-		echo '
-		<br class="clear" />';
-
-	if ($context['show_spellchecking'])
-		echo '
-			<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>
-				<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/spellcheck.js"></script>';
-
-	echo '
-				<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
-				<script type="text/javascript"><!-- // --><![CDATA[';
-
-	if (!empty($options['display_quick_reply']))
-		echo '
-					var oQuickReply = new QuickReply({
-						bDefaultCollapsed: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] > 1 ? 'false' : 'true', ',
-						iTopicId: ', $context['current_topic'], ',
-						iStart: ', $context['start'], ',
-						sScriptUrl: smf_scripturl,
-						sImagesUrl: smf_images_url,
-						sContainerId: "quickReplyOptions",
-						sImageId: "quickReplyExpand",
-						sImageCollapsed: "collapse.png",
-						sImageExpanded: "expand.png",
-						sJumpAnchor: "quickreply",
-						bIsFull: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] > 2 ? 'true' : 'false', '
-					});';
-
-	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
-		echo '
-					var oInTopicModeration = new InTopicModeration({
-						sSelf: \'oInTopicModeration\',
-						sCheckboxContainerMask: \'in_topic_mod_check_\',
-						aMessageIds: [\'', implode('\', \'', $removableMessageIDs), '\'],
-						sSessionId: smf_session_id,
-						sSessionVar: smf_session_var,
-						sButtonStrip: \'moderationbuttons\',
-						sButtonStripDisplay: \'moderationbuttons_strip\',
-						bUseImageButton: false,
-						bCanRemove: ', $context['can_remove_post'] ? 'true' : 'false', ',
-						sRemoveButtonLabel: \'', $txt['quickmod_delete_selected'], '\',
-						sRemoveButtonImage: \'delete_selected.png\',
-						sRemoveButtonConfirm: \'', $txt['quickmod_confirm'], '\',
-						bCanRestore: ', $context['can_restore_msg'] ? 'true' : 'false', ',
-						sRestoreButtonLabel: \'', $txt['quick_mod_restore'], '\',
-						sRestoreButtonImage: \'restore_selected.png\',
-						sRestoreButtonConfirm: \'', $txt['quickmod_confirm'], '\',
-						bCanSplit: ', $context['can_split'] ? 'true' : 'false', ',
-						sSplitButtonLabel: \'', $txt['quickmod_split_selected'], '\',
-						sSplitButtonImage: \'split_selected.png\',
-						sSplitButtonConfirm: \'', $txt['quickmod_confirm'], '\',
-						sFormId: \'quickModForm\'
-					});';
-
-	echo '
-					if (\'XMLHttpRequest\' in window)
-					{
-						var oQuickModify = new QuickModify({
-							sScriptUrl: smf_scripturl,
-							bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
-							iTopicId: ', $context['current_topic'], ',
-							sTemplateBodyEdit: ', JavaScriptEscape('
-								<div id="quick_edit_body_container" style="width: 90%">
-									<div id="error_box" style="padding: 4px;" class="error"></div>
-									<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 />
-									<input type="hidden" name="\' + smf_session_var + \'" value="\' + smf_session_id + \'" />
-									<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
-									<input type="hidden" name="msg" value="%msg_id%" />
-									<div class="righttext">
-										<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" />
-									</div>
-								</div>'), ',
-							sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',
-							sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
-							sTemplateSubjectNormal: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
-							sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;(' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')'), ',
-							sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), '
-						});
-
-						aJumpTo[aJumpTo.length] = new JumpTo({
-							sContainerId: "display_jump_to",
-							sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
-							iCurBoardId: ', $context['current_board'], ',
-							iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
-							sCurBoardName: "', $context['jump_to']['board_name'], '",
-							sBoardChildLevelIndicator: "==",
-							sBoardPrefix: "=> ",
-							sCatSeparator: "-----------------------------",
-							sCatPrefix: "",
-							sGoButtonLabel: "', $txt['go'], '"
-						});
-
-						aIconLists[aIconLists.length] = new IconList({
-							sBackReference: "aIconLists[" + aIconLists.length + "]",
-							sIconIdPrefix: "msg_icon_",
-							sScriptUrl: smf_scripturl,
-							bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
-							iBoardId: ', $context['current_board'], ',
-							iTopicId: ', $context['current_topic'], ',
-							sSessionId: smf_session_id,
-							sSessionVar: smf_session_var,
-							sLabelIconList: "', $txt['message_icon'], '",
-							sBoxBackground: "transparent",
-							sBoxBackgroundHover: "#ffffff",
-							iBoxBorderWidthHover: 1,
-							sBoxBorderColorHover: "#adadad" ,
-							sContainerBackground: "#ffffff",
-							sContainerBorder: "1px solid #adadad",
-							sItemBorder: "1px solid #ffffff",
-							sItemBorderHover: "1px dotted gray",
-							sItemBackground: "transparent",
-							sItemBackgroundHover: "#e0e0f0"
-						});
-					}';
-
-	if (!empty($ignoredMsgs))
-	{
-		echo '
-					var aIgnoreToggles = new Array();';
-
-		foreach ($ignoredMsgs as $msgid)
-		{
-			echo '
-					aIgnoreToggles[', $msgid, '] = new smc_Toggle({
-						bToggleEnabled: true,
-						bCurrentlyCollapsed: true,
-						aSwappableContainers: [
-							\'msg_', $msgid, '_extra_info\',
-							\'msg_', $msgid, '\',
-							\'msg_', $msgid, '_footer\',
-							\'msg_', $msgid, '_quick_mod\',
-							\'modify_button_', $msgid, '\',
-							\'msg_', $msgid, '_signature\'
-
-						],
-						aSwapLinks: [
-							{
-								sId: \'msg_', $msgid, '_ignored_link\',
-								msgExpanded: \'\',
-								msgCollapsed: ', JavaScriptEscape($txt['show_ignore_user_post']), '
-							}
-						]
-					});';
-		}
-	}
-
-	echo '
-				// ]]></script>';
-	
-}
-
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+function template_main()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	// Let them know, if their report was a success!
+	if ($context['report_sent'])
+	{
+		echo '
+			<div class="infobox">
+				', $txt['report_sent'], '
+			</div>';
+	}
+
+	// Show the anchor for the top and for the first message. If the first message is new, say so.
+	echo '
+			
+			<a id="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a id="new"></a>' : '';
+
+	// Is this topic also a poll?
+	if ($context['is_poll'])
+	{
+		echo '
+			<div id="poll">
+				<div class="cat_bar">
+					<h3 class="catbg">
+						<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.png" alt="" class="icon" /> ', $txt['poll'], '</span>
+					</h3>
+				</div>
+				<div class="windowbg">
+					<span class="topslice"><span></span></span>
+					<div class="content" id="poll_options">
+						<h4 id="pollquestion">
+							', $context['poll']['question'], '
+						</h4>';
+
+		// Are they not allowed to vote but allowed to view the options?
+		if ($context['poll']['show_results'] || !$context['allow_vote'])
+		{
+			echo '
+					<dl class="options">';
+
+			// Show each option with its corresponding percentage bar.
+			foreach ($context['poll']['options'] as $option)
+			{
+				echo '
+						<dt class="middletext', $option['voted_this'] ? ' voted' : '', '">', $option['option'], '</dt>
+						<dd class="middletext statsbar', $option['voted_this'] ? ' voted' : '', '">';
+
+				if ($context['allow_poll_view'])
+					echo '
+							', $option['bar_ndt'], '
+							<span class="percentage">', $option['votes'], ' (', $option['percent'], '%)</span>';
+
+				echo '
+						</dd>';
+			}
+
+			echo '
+					</dl>';
+
+			if ($context['allow_poll_view'])
+				echo '
+						<p><strong>', $txt['poll_total_voters'], ':</strong> ', $context['poll']['total_votes'], '</p>';
+		}
+		// They are allowed to vote! Go to it!
+		else
+		{
+			echo '
+						<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '">';
+
+			// Show a warning if they are allowed more than one option.
+			if ($context['poll']['allowed_warning'])
+				echo '
+							<p class="smallpadding">', $context['poll']['allowed_warning'], '</p>';
+
+			echo '
+							<ul class="reset options">';
+
+			// Show each option with its button - a radio likely.
+			foreach ($context['poll']['options'] as $option)
+				echo '
+								<li class="middletext">', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
+
+			echo '
+							</ul>
+							<div class="submitbutton">
+								<input type="submit" value="', $txt['poll_vote'], '" class="button_submit" />
+								<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+							</div>
+						</form>';
+		}
+
+		// Is the clock ticking?
+		if (!empty($context['poll']['expire_time']))
+			echo '
+						<p><strong>', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ':</strong> ', $context['poll']['expire_time'], '</p>';
+
+		echo '
+					</div>
+					<span class="botslice"><span></span></span>
+				</div>
+			</div>
+			<div id="pollmoderation">';
+
+		template_button_strip($context['poll_buttons']);
+
+		echo '
+			</div>';
+	}
+
+	// Does this topic have some events linked to it?
+	if (!empty($context['linked_calendar_events']))
+	{
+		echo '
+			<div class="linked_events">
+				<div class="title_bar">
+					<h3 class="titlebg headerpadding">', $txt['calendar_linked_events'], '</h3>
+				</div>
+				<div class="windowbg">
+					<span class="topslice"><span></span></span>
+					<div class="content">
+						<ul class="reset">';
+
+		foreach ($context['linked_calendar_events'] as $event)
+			echo '
+							<li>
+								', ($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'] : ''), '
+							</li>';
+
+		echo '
+						</ul>
+					</div>
+					<span class="botslice"><span></span></span>
+				</div>
+			</div>';
+	}
+
+	// Show the page index... "Pages: [1]".
+	echo '
+			<div class="pagesection">
+				<div class="nextlinks">', $context['previous_next'], '</div>', template_button_strip($context['normal_buttons'], 'right'), '
+				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
+			</div>';
+
+	// Show the topic information - icon, subject, etc.
+	echo '
+			<div id="forumposts">
+				<div class="cat_bar">
+					<h3 class="catbg">
+						<img src="', $settings['images_url'], '/topic/', $context['class'], '.png" align="bottom" alt="" />
+						<span id="author">', $txt['author'], '</span>
+						', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')
+					</h3>
+				</div>';
+
+	if (!empty($settings['display_who_viewing']))
+	{
+		echo '
+				<p id="whoisviewing" class="smalltext">';
+
+		// Show just numbers...?
+		if ($settings['display_who_viewing'] == 1)
+				echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
+		// Or show the actual people viewing the topic?
+		else
+			echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
+
+		// Now show how many guests are here too.
+		echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '
+				</p>';
+	}
+
+	echo '
+				<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">';
+
+	$ignoredMsgs = array();
+	$removableMessageIDs = array();
+	$alternate = false;
+
+	// Get all the messages...
+	while ($message = $context['get_message']())
+	{
+		$ignoring = false;
+		$alternate = !$alternate;
+		if ($message['can_remove'])
+			$removableMessageIDs[] = $message['id'];
+
+		// Are we ignoring this message?
+		if (!empty($message['is_ignored']))
+		{
+			$ignoring = true;
+			$ignoredMsgs[] = $message['id'];
+		}
+
+		// Show the message anchor and a "new" anchor if this message is new.
+		if ($message['id'] != $context['first_message'])
+			echo '
+				<a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';
+
+		echo '
+				<div class="', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', '">
+					<span class="topslice"><span></span></span>
+					<div class="post_wrapper">';
+
+		// Show information about the poster of this message.
+		echo '
+						<div class="poster">
+							<h4>';
+
+		// Show online and offline buttons?
+		if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
+			echo '
+								', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['text'], '" />', $context['can_send_pm'] ? '</a>' : '';
+
+		// Show a link to the member's profile.
+		echo '
+								', $message['member']['link'], '
+							</h4>
+							<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';
+
+		// Show the member's custom title, if they have one.
+		if (!empty($message['member']['title']))
+			echo '
+								<li class="title">', $message['member']['title'], '</li>';
+
+		// Show the member's primary group (like 'Administrator') if they have one.
+		if (!empty($message['member']['group']))
+			echo '
+								<li class="membergroup">', $message['member']['group'], '</li>';
+
+		// Don't show these things for guests.
+		if (!$message['member']['is_guest'])
+		{
+			// 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.
+			if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
+				echo '
+								<li class="postgroup">', $message['member']['post_group'], '</li>';
+			echo '
+								<li class="icons">', $message['member']['group_icons'], '</li>';
+
+			// Show avatars, images, etc.?
+			if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
+				echo '
+								<li class="avatar">
+									<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
+										', $message['member']['avatar']['image'], '
+									</a>
+								</li>';
+
+			// Show how many posts they have made.
+			if (!isset($context['disabled_fields']['posts']))
+				echo '
+								<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
+
+			// Is karma display enabled?  Total or +/-?
+			if ($modSettings['karmaMode'] == '1')
+				echo '
+								<li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
+			elseif ($modSettings['karmaMode'] == '2')
+				echo '
+								<li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
+
+			// Is this user allowed to modify this member's karma?
+			if ($message['member']['karma']['allow'])
+				echo '
+								<li class="karma_allow">
+									<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>
+									<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>
+								</li>';
+
+			// Show the member's gender icon?
+			if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
+				echo '
+								<li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
+
+			// Show their personal text?
+			if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
+				echo '
+								<li class="blurb">', $message['member']['blurb'], '</li>';
+
+			// Any custom fields to show as icons?
+			if (!empty($message['member']['custom_fields']))
+			{
+				$shown = false;
+				foreach ($message['member']['custom_fields'] as $custom)
+				{
+					if ($custom['placement'] != 1 || empty($custom['value']))
+						continue;
+					if (empty($shown))
+					{
+						$shown = true;
+						echo '
+								<li class="im_icons">
+									<ul>';
+					}
+					echo '
+										<li>', $custom['value'], '</li>';
+				}
+				if ($shown)
+					echo '
+									</ul>
+								</li>';
+			}
+
+			// This shows the popular messaging icons.
+			if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
+				echo '
+								<li class="im_icons">
+									<ul>
+										', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
+										', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
+										', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
+										', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
+									</ul>
+								</li>';
+
+			// Show the profile, website, email address, and personal message buttons.
+			if ($message['member']['show_profile_buttons'])
+			{
+				echo '
+								<li class="profile">
+									<ul>';
+				// Don't show the profile button if you're not allowed to view the profile.
+				if ($message['member']['can_view_profile'])
+					echo '
+										<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';
+
+				// Don't show an icon if they haven't specified a website.
+				if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
+					echo '
+										<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>';
+
+				// Don't show the email address if they want it hidden.
+				if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email'])
+					echo '
+										<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>';
+
+				// Since we know this person isn't a guest, you *can* message them.
+				if ($context['can_send_pm'])
+					echo '
+										<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.png" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';
+
+				echo '
+									</ul>
+								</li>';
+			}
+
+			// Any custom fields for standard placement?
+			if (!empty($message['member']['custom_fields']))
+			{
+				foreach ($message['member']['custom_fields'] as $custom)
+					if (empty($custom['placement']) || empty($custom['value']))
+						echo '
+								<li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
+			}
+
+			// Are we showing the warning status?
+			if ($message['member']['can_see_warning'])
+				echo '
+								<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>';
+		}
+		// Otherwise, show the guest's email.
+		elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email'])
+			echo '
+								<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>';
+
+		// Done with the information about the poster... on to the post itself.
+		echo '
+							</ul>
+						</div>
+						<div class="postarea">
+							<div class="flow_hidden">
+								<div class="keyinfo">
+									<div class="messageicon">
+										<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
+									</div>
+									<h5 id="subject_', $message['id'], '">
+										<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
+									</h5>
+									<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
+									<div id="msg_', $message['id'], '_quick_mod"></div>
+								</div>';
+
+		// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
+		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
+			echo '
+								<ul class="reset smalltext quickbuttons">';
+
+		// Maybe we can approve it, maybe we should?
+		if ($message['can_approve'])
+			echo '
+									<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>';
+
+		// Can they reply? Have they turned on quick reply?
+		if ($context['can_quote'] && !empty($options['display_quick_reply']))
+			echo '
+									<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>';
+
+		// So... quick reply is off, but they *can* reply?
+		elseif ($context['can_quote'])
+			echo '
+									<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>';
+
+		// Can the user modify the contents of this post?
+		if ($message['can_modify'])
+			echo '
+									<li><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '" class="modify_button">', $txt['modify'], '</a></li>';
+
+		// How about... even... remove it entirely?!
+		if ($message['can_remove'])
+			echo '
+									<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>';
+
+		// What about splitting it off the rest of the topic?
+		if ($context['can_split'] && !empty($context['real_num_replies']))
+			echo '
+									<li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '" class="split_button">', $txt['split'], '</a></li>';
+
+		// Can we restore topics?
+		if ($context['can_restore_msg'])
+			echo '
+									<li><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" class="restore_button">', $txt['restore_message'], '</a></li>';
+
+		// Show a checkbox for quick moderation?
+		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
+			echo '
+									<li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';
+
+		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
+			echo '
+								</ul>';
+
+		echo '
+							</div>';
+
+		// Ignoring this user? Hide the post.
+		if ($ignoring)
+			echo '
+							<div id="msg_', $message['id'], '_ignored_prompt">
+								', $txt['ignoring_user'], '
+								<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
+							</div>';
+
+		// Show the post itself, finally!
+		echo '
+							<div class="post">';
+
+		if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
+			echo '
+								<div class="approve_post">
+									', $txt['post_awaiting_approval'], '
+								</div>';
+		echo '
+								<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
+							</div>';
+
+		// Can the user modify the contents of this post?  Show the modify inline image.
+		if ($message['can_modify'])
+			echo '
+							<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;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';
+
+		// Assuming there are attachments...
+		if (!empty($message['attachment']))
+		{
+			echo '
+							<div id="msg_', $message['id'], '_footer" class="attachments smalltext">
+								<div style="overflow: ', isBrowser('is_firefox') ? 'visible' : 'auto', ';">';
+
+			$last_approved_state = 1;
+			$attachments_per_line = 4;
+			$i = 0;
+			
+			foreach ($message['attachment'] as $attachment)
+			{
+				// Show a special box for unapproved attachments...
+				if ($attachment['is_approved'] != $last_approved_state)
+				{
+					$last_approved_state = 0;
+					echo '
+											<fieldset>
+												<legend>', $txt['attach_awaiting_approve'];
+
+					if ($context['can_approve'])
+						echo '
+												&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
+
+					echo '
+												</legend>';
+				}
+				
+				echo '
+									<div class="floatleft padding">
+										<div class="attachments_top">';
+
+				if ($attachment['is_image'])
+				{
+					if ($attachment['thumbnail']['has_thumb'])
+						echo '
+											<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" /></a><br />';
+					else
+						echo '
+											<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/><br />';
+				}
+				
+				echo '
+										</div>
+										<div class="attachments_bot">
+											<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.png" class="centericon" alt="*" />&nbsp;' . $attachment['name'] . '</a> ';
+
+				if (!$attachment['is_approved'] && $context['can_approve'])
+					echo '
+											[<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>] ';
+				echo '
+											<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'] . '
+										</div>';
+				
+				echo '
+									</div>';
+				
+				// Next attachment line ?
+				if (++$i % $attachments_per_line === 0)
+					echo '
+									<br class="clear" />';
+			}
+
+			// no more attachments, clear the float if its open
+			if ($i % $attachments_per_line !== 0)
+				echo '
+									<br class="clear" />';
+			
+			// If we had unapproved attachments clean up.
+			if ($last_approved_state == 0)
+				echo '
+											</fieldset>';
+
+			echo '
+								</div>
+							</div>';
+		}
+
+		echo '
+						</div>
+						<div class="moderatorbar">
+							<div class="smalltext modified" id="modified_', $message['id'], '">';
+
+		// Show "<< Last Edit: Time by Person >>" if this post was edited.
+		if ($settings['show_modify'] && !empty($message['modified']['name']))
+			echo '
+								&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';
+
+		echo '
+							</div>
+							<div class="smalltext reportlinks">';
+
+		// Maybe they want to report this post to the moderator(s)?
+		if ($context['can_report_moderator'])
+			echo '
+								<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> &nbsp;';
+
+		// Can we issue a warning because of this post?  Remember, we can't give guests warnings.
+		if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
+			echo '
+								<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>';
+		echo '
+								<img class="centericon" src="', $settings['images_url'], '/ip.png" alt="" />';
+
+		// Show the IP to this user for this post - because you can moderate?
+		if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
+			echo '
+								<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 reqWin(this.href);" class="help">(?)</a>';
+		// Or, should we show it because this is you?
+		elseif ($message['can_see_ip'])
+			echo '
+								<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
+		// Okay, are you at least logged in?  Then we can show something about why IPs are logged...
+		elseif (!$context['user']['is_guest'])
+			echo '
+								<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
+		// Otherwise, you see NOTHING!
+		else
+			echo '
+								', $txt['logged'];
+
+		echo '
+							</div>';
+
+		// Are there any custom profile fields for above the signature?
+		if (!empty($message['member']['custom_fields']))
+		{
+			$shown = false;
+			foreach ($message['member']['custom_fields'] as $custom)
+			{
+				if ($custom['placement'] != 2 || empty($custom['value']))
+					continue;
+				if (empty($shown))
+				{
+					$shown = true;
+					echo '
+							<div class="custom_fields_above_signature">
+								<ul class="reset nolist">';
+				}
+				echo '
+									<li>', $custom['value'], '</li>';
+			}
+			if ($shown)
+				echo '
+								</ul>
+							</div>';
+		}
+
+		// Show the member's signature?
+		if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
+			echo '
+							<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';
+
+		echo '
+						</div>
+					</div>
+					<span class="botslice"><span></span></span>
+				</div>
+				<hr class="post_separator" />';
+	}
+
+	echo '
+				</form>
+			</div>';
+
+	// Show the page index... "Pages: [1]".
+	echo '
+			<div class="pagesection">
+				', template_button_strip($context['normal_buttons'], 'right'), '
+				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
+				<div class="nextlinks_bottom">', $context['previous_next'], '</div>
+			</div>';
+
+	// Show the lower breadcrumbs.
+	theme_linktree();
+
+	echo '
+			<div id="moderationbuttons">', template_button_strip($context['mod_buttons'], 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';
+
+	// Show the jumpto box, or actually...let Javascript do it.
+	echo '
+			<div class="plainbox" id="display_jump_to">&nbsp;</div>';
+
+	if ($context['can_reply'] && !empty($options['display_quick_reply']))
+	{
+		echo '
+			<a id="quickreply"></a>
+			<div class="tborder" id="quickreplybox">
+				<div class="cat_bar">
+					<h3 class="catbg">
+						<span class="ie6_header floatright">
+							<a href="javascript:oQuickReply.swap();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] > 1 ? 'collapse' : 'expand', '.png" alt="+" id="quickReplyExpand" class="icon" /></a>
+						</span>
+						<span>
+							<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
+						</span>
+					</h3>
+				</div>
+				<div id="quickReplyOptions"', $options['display_quick_reply'] > 1 ? '' : ' style="display: none"', '>
+					<span class="upperframe"><span></span></span>
+					<div class="roundframe">
+						<p class="smalltext lefttext">', $txt['quick_reply_desc'], '</p>
+						', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
+						$context['oldTopicError'] ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
+						', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
+						', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '', '
+						<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;">
+							<input type="hidden" name="topic" value="', $context['current_topic'], '" />
+							<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
+							<input type="hidden" name="icon" value="xx" />
+							<input type="hidden" name="from_qr" value="1" />
+							<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
+							<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
+							<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
+							<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />
+							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+							<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />';
+
+		// Guests just need more.
+		if ($context['user']['is_guest'])
+			echo '
+							<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
+							<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
+
+		// Is visual verification enabled?
+		if ($context['require_verification'])
+			echo '
+							<strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
+
+		if ($options['display_quick_reply'] < 3)
+		{
+			echo '
+							<div class="quickReplyContent">
+								<textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea>
+							</div>';
+		}
+		else
+		{
+			// Show the actual posting area...
+			if ($context['show_bbc'])
+			{
+				echo '
+							<div id="bbcBox_message"></div>';
+			}
+
+			// What about smileys?
+			if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
+				echo '
+							<div id="smileyBox_message"></div>';
+
+			echo '
+							', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
+							<script type="text/javascript"><!-- // --><![CDATA[
+								function insertQuoteFast(messageid)
+								{
+									if (window.XMLHttpRequest)
+										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);
+									else
+										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);
+									return false;
+								}
+								function onDocReceived(XMLDoc)
+								{
+									var text = \'\';
+									for (var i = 0, n = XMLDoc.getElementsByTagName(\'quote\')[0].childNodes.length; i < n; i++)
+										text += XMLDoc.getElementsByTagName(\'quote\')[0].childNodes[i].nodeValue;
+									oEditorHandle_', $context['post_box_name'], '.insertText(text, false, true);
+
+									ajax_indicator(false);
+								}
+							// ]]></script>';
+
+		}
+		echo '
+							<div class="padding">
+								<hr class="hrcolor" />
+								<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
+								<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';
+
+		if ($context['show_spellchecking'])
+			echo '
+								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
+
+		echo '
+								<br class="clear_right" />
+							</div>
+						</form>
+					</div>
+					<span class="lowerframe"><span></span></span>
+				</div>
+			</div>';
+	}
+	else
+		echo '
+		<br class="clear" />';
+
+	if ($context['show_spellchecking'])
+		echo '
+			<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>
+				<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/spellcheck.js"></script>';
+
+	echo '
+				<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
+				<script type="text/javascript"><!-- // --><![CDATA[';
+
+	if (!empty($options['display_quick_reply']))
+		echo '
+					var oQuickReply = new QuickReply({
+						bDefaultCollapsed: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] > 1 ? 'false' : 'true', ',
+						iTopicId: ', $context['current_topic'], ',
+						iStart: ', $context['start'], ',
+						sScriptUrl: smf_scripturl,
+						sImagesUrl: smf_images_url,
+						sContainerId: "quickReplyOptions",
+						sImageId: "quickReplyExpand",
+						sImageCollapsed: "collapse.png",
+						sImageExpanded: "expand.png",
+						sJumpAnchor: "quickreply",
+						bIsFull: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] > 2 ? 'true' : 'false', '
+					});';
+
+	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
+		echo '
+					var oInTopicModeration = new InTopicModeration({
+						sSelf: \'oInTopicModeration\',
+						sCheckboxContainerMask: \'in_topic_mod_check_\',
+						aMessageIds: [\'', implode('\', \'', $removableMessageIDs), '\'],
+						sSessionId: smf_session_id,
+						sSessionVar: smf_session_var,
+						sButtonStrip: \'moderationbuttons\',
+						sButtonStripDisplay: \'moderationbuttons_strip\',
+						bUseImageButton: false,
+						bCanRemove: ', $context['can_remove_post'] ? 'true' : 'false', ',
+						sRemoveButtonLabel: \'', $txt['quickmod_delete_selected'], '\',
+						sRemoveButtonImage: \'delete_selected.png\',
+						sRemoveButtonConfirm: \'', $txt['quickmod_confirm'], '\',
+						bCanRestore: ', $context['can_restore_msg'] ? 'true' : 'false', ',
+						sRestoreButtonLabel: \'', $txt['quick_mod_restore'], '\',
+						sRestoreButtonImage: \'restore_selected.png\',
+						sRestoreButtonConfirm: \'', $txt['quickmod_confirm'], '\',
+						bCanSplit: ', $context['can_split'] ? 'true' : 'false', ',
+						sSplitButtonLabel: \'', $txt['quickmod_split_selected'], '\',
+						sSplitButtonImage: \'split_selected.png\',
+						sSplitButtonConfirm: \'', $txt['quickmod_confirm'], '\',
+						sFormId: \'quickModForm\'
+					});';
+
+	echo '
+					if (\'XMLHttpRequest\' in window)
+					{
+						var oQuickModify = new QuickModify({
+							sScriptUrl: smf_scripturl,
+							bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
+							iTopicId: ', $context['current_topic'], ',
+							sTemplateBodyEdit: ', JavaScriptEscape('
+								<div id="quick_edit_body_container" style="width: 90%">
+									<div id="error_box" style="padding: 4px;" class="error"></div>
+									<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 />
+									<input type="hidden" name="\' + smf_session_var + \'" value="\' + smf_session_id + \'" />
+									<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
+									<input type="hidden" name="msg" value="%msg_id%" />
+									<div class="righttext">
+										<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" />
+									</div>
+								</div>'), ',
+							sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',
+							sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
+							sTemplateSubjectNormal: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
+							sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;(' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')'), ',
+							sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), '
+						});
+
+						aJumpTo[aJumpTo.length] = new JumpTo({
+							sContainerId: "display_jump_to",
+							sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
+							iCurBoardId: ', $context['current_board'], ',
+							iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
+							sCurBoardName: "', $context['jump_to']['board_name'], '",
+							sBoardChildLevelIndicator: "==",
+							sBoardPrefix: "=> ",
+							sCatSeparator: "-----------------------------",
+							sCatPrefix: "",
+							sGoButtonLabel: "', $txt['go'], '"
+						});
+
+						aIconLists[aIconLists.length] = new IconList({
+							sBackReference: "aIconLists[" + aIconLists.length + "]",
+							sIconIdPrefix: "msg_icon_",
+							sScriptUrl: smf_scripturl,
+							bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
+							iBoardId: ', $context['current_board'], ',
+							iTopicId: ', $context['current_topic'], ',
+							sSessionId: smf_session_id,
+							sSessionVar: smf_session_var,
+							sLabelIconList: "', $txt['message_icon'], '",
+							sBoxBackground: "transparent",
+							sBoxBackgroundHover: "#ffffff",
+							iBoxBorderWidthHover: 1,
+							sBoxBorderColorHover: "#adadad" ,
+							sContainerBackground: "#ffffff",
+							sContainerBorder: "1px solid #adadad",
+							sItemBorder: "1px solid #ffffff",
+							sItemBorderHover: "1px dotted gray",
+							sItemBackground: "transparent",
+							sItemBackgroundHover: "#e0e0f0"
+						});
+					}';
+
+	if (!empty($ignoredMsgs))
+	{
+		echo '
+					var aIgnoreToggles = new Array();';
+
+		foreach ($ignoredMsgs as $msgid)
+		{
+			echo '
+					aIgnoreToggles[', $msgid, '] = new smc_Toggle({
+						bToggleEnabled: true,
+						bCurrentlyCollapsed: true,
+						aSwappableContainers: [
+							\'msg_', $msgid, '_extra_info\',
+							\'msg_', $msgid, '\',
+							\'msg_', $msgid, '_footer\',
+							\'msg_', $msgid, '_quick_mod\',
+							\'modify_button_', $msgid, '\',
+							\'msg_', $msgid, '_signature\'
+
+						],
+						aSwapLinks: [
+							{
+								sId: \'msg_', $msgid, '_ignored_link\',
+								msgExpanded: \'\',
+								msgCollapsed: ', JavaScriptEscape($txt['show_ignore_user_post']), '
+							}
+						]
+					});';
+		}
+	}
+
+	echo '
+				// ]]></script>';
+	
+}
+
 ?>

+ 173 - 185
Themes/default/Help.template.php

@@ -1,186 +1,174 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-function template_popup()
-{
-	global $context, $settings, $options, $txt;
-
-	// Since this is a popup of its own we need to start the html, etc.
-	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
-		<meta name="robots" content="noindex" />
-		<title>', $context['page_title'], '</title>
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
-	</head>
-	<body id="help_popup">
-		<div class="windowbg description">
-			', $context['help_text'], '<br />
-			<br />
-			<a href="javascript:self.close();">', $txt['close_window'], '</a>
-		</div>
-	</body>
-</html>';
-}
-
-function template_find_members()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
-	<head>
-		<title>', $txt['find_members'], '</title>
-		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
-		<meta name="robots" content="noindex" />
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var membersAdded = [];
-			function addMember(name)
-			{
-				var theTextBox = window.opener.document.getElementById("', $context['input_box_name'], '");
-
-				if (name in membersAdded)
-					return;
-
-				// If we only accept one name don\'t remember what is there.
-				if (', JavaScriptEscape($context['delimiter']), ' != \'null\')
-					membersAdded[name] = true;
-
-				if (theTextBox.value.length < 1 || ', JavaScriptEscape($context['delimiter']), ' == \'null\')
-					theTextBox.value = ', $context['quote_results'] ? '"\"" + name + "\""' : 'name', ';
-				else
-					theTextBox.value += ', JavaScriptEscape($context['delimiter']), ' + ', $context['quote_results'] ? '"\"" + name + "\""' : 'name', ';
-
-				window.focus();
-			}
-		// ]]></script>
-	</head>
-	<body id="help_popup">
-		<form action="', $scripturl, '?action=findmember;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '" class="padding description">
-			<span class="upperframe"><span></span></span>
-			<div class="roundframe">
-				<div class="innerframe">
-					<div class="cat_bar">
-						<h3 class="catbg">', $txt['find_members'], '</h3>
-					</div>
-					<div class="padding">
-						<strong>', $txt['find_username'], ':</strong><br />
-						<input type="text" name="search" id="search" value="', isset($context['last_search']) ? $context['last_search'] : '', '" style="margin-top: 4px; width: 96%;" class="input_text" /><br />
-						<span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br />';
-
-	// Only offer to search for buddies if we have some!
-	if (!empty($context['show_buddies']))
-		echo '
-						<span class="smalltext"><label for="buddies"><input type="checkbox" class="input_check" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked="checked"' : '', ' /> ', $txt['find_buddies'], '</label></span><br />';
-
-	echo '
-						<div class="padding righttext">
-							<input type="submit" value="', $txt['search'], '" class="button_submit" />
-							<input type="button" value="', $txt['find_close'], '" onclick="window.close();" class="button_submit" />
-						</div>
-					</div>
-				</div>
-			</div>
-			<span class="lowerframe"><span></span></span>
-			<br />
-			<span class="upperframe"><span></span></span>
-			<div class="roundframe">
-				<div class="innerframe">
-					<div class="cat_bar">
-						<h3 class="catbg">', $txt['find_results'], '</h3>
-					</div>';
-
-	if (empty($context['results']))
-		echo '
-					<p class="error">', $txt['find_no_results'], '</p>';
-	else
-	{
-		echo '
-					<ul class="reset padding">';
-
-		$alternate = true;
-		foreach ($context['results'] as $result)
-		{
-			echo '
-						<li class="', $alternate ? 'windowbg2' : 'windowbg', '">
-							<a href="', $result['href'], '" target="_blank" class="new_win"><img src="', $settings['images_url'], '/icons/profile_sm.png" alt="', $txt['view_profile'], '" title="', $txt['view_profile'], '" /></a>
-							<a href="javascript:void(0);" onclick="addMember(this.innerHTML); return false;">', $result['name'], '</a>
-						</li>';
-
-			$alternate = !$alternate;
-		}
-
-		echo '
-					</ul>
-					<div class="pagesection">
-						', $txt['pages'], ': ', $context['page_index'], '
-					</div>';
-	}
-
-	echo '
-				</div>
-			</div>
-			<span class="lowerframe"><span></span></span>
-			<input type="hidden" name="input" value="', $context['input_box_name'], '" />
-			<input type="hidden" name="delim" value="', $context['delimiter'], '" />
-			<input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '" />
-		</form>';
-
-	if (empty($context['results']))
-		echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			document.getElementById("search").focus();
-		// ]]></script>';
-
-	echo '
-	</body>
-</html>';
-}
-
-// The main help page.
-function template_manual()
-{
-	global $context, $scripturl, $txt;
-
-	echo '
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['manual_smf_user_help'], '</h3>
-			</div>
-			<div id="help_container">
-				<div class="windowbg2">
-					<span class="topslice"><span></span></span>
-					<div id="helpmain" class="content">
-						<p>', sprintf($txt['manual_welcome'], $context['forum_name']), '</p>
-						<p>', $txt['manual_introduction'], '</p>
-						<ul>';
-
-	foreach ($context['manual_sections'] as $section_id => $wiki_id)
-	{
-		echo '
-							<li><a href="', $context['wiki_url'], '/', $wiki_id, ($txt['lang_dictionary'] != 'en' ? '/' . $txt['lang_dictionary'] : ''), '" target="_blank" class="new_win">', $txt['manual_section_' . $section_id . '_title'], '</a> - ', $txt['manual_section_' . $section_id . '_desc'], '</li>';
-	}
-
-	echo '
-						</ul>
-						<p>', sprintf($txt['manual_docs_and_credits'], $context['wiki_url'], $scripturl . '?action=credits'), '</p>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>
-			<br class="clear" />';
-}
-
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+function template_popup()
+{
+	global $context, $settings, $options, $txt;
+
+	// Since this is a popup of its own we need to start the html, etc.
+	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
+		<meta name="robots" content="noindex" />
+		<title>', $context['page_title'], '</title>
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />
+		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
+	</head>
+	<body id="help_popup">
+		<div class="windowbg description">
+			', $context['help_text'], '<br />
+			<br />
+			<a href="javascript:self.close();">', $txt['close_window'], '</a>
+		</div>
+	</body>
+</html>';
+}
+
+function template_find_members()
+{
+	global $context, $settings, $options, $scripturl, $modSettings, $txt;
+
+	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
+	<head>
+		<title>', $txt['find_members'], '</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
+		<meta name="robots" content="noindex" />
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />
+		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
+		<script type="text/javascript"><!-- // --><![CDATA[
+			var membersAdded = [];
+			function addMember(name)
+			{
+				var theTextBox = window.opener.document.getElementById("', $context['input_box_name'], '");
+
+				if (name in membersAdded)
+					return;
+
+				// If we only accept one name don\'t remember what is there.
+				if (', JavaScriptEscape($context['delimiter']), ' != \'null\')
+					membersAdded[name] = true;
+
+				if (theTextBox.value.length < 1 || ', JavaScriptEscape($context['delimiter']), ' == \'null\')
+					theTextBox.value = ', $context['quote_results'] ? '"\"" + name + "\""' : 'name', ';
+				else
+					theTextBox.value += ', JavaScriptEscape($context['delimiter']), ' + ', $context['quote_results'] ? '"\"" + name + "\""' : 'name', ';
+
+				window.focus();
+			}
+		// ]]></script>
+	</head>
+	<body id="help_popup">
+		<form action="', $scripturl, '?action=findmember;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '" class="padding description">
+			<div class="roundframe">
+				<div class="cat_bar">
+					<h3 class="catbg">', $txt['find_members'], '</h3>
+				</div>
+				<div class="padding">
+					<strong>', $txt['find_username'], ':</strong><br />
+					<input type="text" name="search" id="search" value="', isset($context['last_search']) ? $context['last_search'] : '', '" style="margin-top: 4px; width: 96%;" class="input_text" /><br />
+					<span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br />';
+
+	// Only offer to search for buddies if we have some!
+	if (!empty($context['show_buddies']))
+		echo '
+					<span class="smalltext"><label for="buddies"><input type="checkbox" class="input_check" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked="checked"' : '', ' /> ', $txt['find_buddies'], '</label></span><br />';
+
+	echo '
+					<div class="padding righttext">
+						<input type="submit" value="', $txt['search'], '" class="button_submit" />
+						<input type="button" value="', $txt['find_close'], '" onclick="window.close();" class="button_submit" />
+					</div>
+				</div>
+			</div>
+			<br />
+			<div class="roundframe">
+				<div class="cat_bar">
+					<h3 class="catbg">', $txt['find_results'], '</h3>
+				</div>';
+
+	if (empty($context['results']))
+		echo '
+				<p class="error">', $txt['find_no_results'], '</p>';
+	else
+	{
+		echo '
+				<ul class="reset padding">';
+
+		$alternate = true;
+		foreach ($context['results'] as $result)
+		{
+			echo '
+					<li class="', $alternate ? 'windowbg2' : 'windowbg', '">
+						<a href="', $result['href'], '" target="_blank" class="new_win"><img src="', $settings['images_url'], '/icons/profile_sm.png" alt="', $txt['view_profile'], '" title="', $txt['view_profile'], '" /></a>
+						<a href="javascript:void(0);" onclick="addMember(this.innerHTML); return false;">', $result['name'], '</a>
+					</li>';
+
+			$alternate = !$alternate;
+		}
+
+		echo '
+				</ul>
+				<div class="pagesection">
+					', $txt['pages'], ': ', $context['page_index'], '
+				</div>';
+	}
+
+	echo '
+
+			</div>
+			<input type="hidden" name="input" value="', $context['input_box_name'], '" />
+			<input type="hidden" name="delim" value="', $context['delimiter'], '" />
+			<input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '" />
+		</form>';
+
+	if (empty($context['results']))
+		echo '
+		<script type="text/javascript"><!-- // --><![CDATA[
+			document.getElementById("search").focus();
+		// ]]></script>';
+
+	echo '
+	</body>
+</html>';
+}
+
+// The main help page.
+function template_manual()
+{
+	global $context, $scripturl, $txt;
+
+	echo '
+			<div class="cat_bar">
+				<h3 class="catbg">', $txt['manual_smf_user_help'], '</h3>
+			</div>
+			<div id="help_container">
+				<div id="helpmain" class="windowbg2 content">
+					<p>', sprintf($txt['manual_welcome'], $context['forum_name']), '</p>
+					<p>', $txt['manual_introduction'], '</p>
+					<ul>';
+
+	foreach ($context['manual_sections'] as $section_id => $wiki_id)
+	{
+		echo '
+						<li><a href="', $context['wiki_url'], '/', $wiki_id, ($txt['lang_dictionary'] != 'en' ? '/' . $txt['lang_dictionary'] : ''), '" target="_blank" class="new_win">', $txt['manual_section_' . $section_id . '_title'], '</a> - ', $txt['manual_section_' . $section_id . '_desc'], '</li>';
+	}
+
+	echo '
+					</ul>
+					<p>', sprintf($txt['manual_docs_and_credits'], $context['wiki_url'], $scripturl . '?action=credits'), '</p>
+				</div>
+			</div>';
+}
+
 ?>

+ 427 - 415
Themes/default/MessageIndex.template.php

@@ -1,416 +1,428 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-function template_main()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	echo '
-	<a id="top"></a>';
-
-	if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
-	{
-		echo '
-	<div class="tborder childboards" id="board_', $context['current_board'], '_childboards">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['parent_boards'], '</h3>
-		</div>
-		<div class="table_frame">
-			<table class="table_list">
-				<tbody id="board_', $context['current_board'], '_children" class="content">';
-
-		foreach ($context['boards'] as $board)
-		{
-			echo '
-				<tr id="board_', $board['id'], '" class="windowbg2">
-					<td class="icon"', !empty($board['children']) ? ' rowspan="2"' : '', '>
-						<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
-
-			// If the board or children is new, show an indicator.
-			if ($board['new'] || $board['children_new'])
-				echo '
-							<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
-			// Is it a redirection board?
-			elseif ($board['is_redirect'])
-				echo '
-							<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
-			// No new posts at all! The agony!!
-			else
-				echo '
-							<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
-
-			echo '
-						</a>
-					</td>
-					<td class="info">
-						<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
-
-			// Has it outstanding posts for approval?
-			if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
-				echo '
-						<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>';
-
-			echo '
-
-						<p>', $board['description'] , '</p>';
-
-			// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
-			if (!empty($board['moderators']))
-				echo '
-						<p class="moderators">', count($board['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
-
-			// Show some basic information about the number of posts, etc.
-			echo '
-					</td>
-					<td class="stats windowbg">
-						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
-						', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
-						</p>
-					</td>
-					<td class="lastpost">';
-
-			if (!empty($board['last_post']['id']))
-				echo '
-						<p>', $board['last_post']['last_post_message'], '</p>';
-
-			echo '
-					</td>
-				</tr>';
-
-			// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
-			if (!empty($board['children']))
-			{
-				// Sort the links into an array with new boards bold so it can be imploded.
-				$children = array();
-				/* Each child in each board's children has:
-						id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
-				foreach ($board['children'] as $child)
-				{
-					if (!$child['is_redirect'])
-						$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_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  ' . ($child['new'] ? 'class="new_posts" ' : '') . 'href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
-					else
-						$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
-
-					// Has it posts awaiting approval?
-					if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
-						$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>';
-
-					$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
-				}
-				echo '
-				<tr id="board_', $board['id'], '_children"><td colspan="3" class="children windowbg"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td></tr>';
-			}
-		}
-		echo '
-				</tbody>
-			</table>
-		</div>
-	</div>';
-	}
-
-	if (!empty($options['show_board_desc']) && $context['description'] != '')
-		echo '
-	<p class="description_board">', $context['description'], '</p>';
-
-	// They can only mark read if they are logged in and it's enabled!
-	if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
-		unset($context['normal_buttons']['markread']);
-
-	if (!$context['no_topic_listing'])
-	{
-		echo '
-	<div class="pagesection">
-		<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
-		', template_button_strip($context['normal_buttons'], 'right'), '
-	</div>';
-
-		// If Quick Moderation is enabled start the form.
-		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
-			echo '
-	<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">';
-
-		echo '
-	<div class="tborder topic_table" id="messageindex">
-		<table class="table_grid" cellspacing="0">
-			<thead>
-				<tr class="catbg">';
-
-		// Are there actually any topics to show?
-		if (!empty($context['topics']))
-		{
-			echo '
-					<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
-					<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'],  $context['sort_by'] == 'starter' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
-					<th scope="col" width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
-			// Show a "select all" box for quick moderation?
-			if (empty($context['can_quick_mod']))
-				echo '
-					<th scope="col" class="lefttext last_th" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
-			else
-				echo '
-					<th scope="col" class="lefttext" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
-
-			// Show a "select all" box for quick moderation?
-			if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)
-				echo '
-					<th scope="col" class="last_th" width="24"><input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" /></th>';
-
-			// If it's on in "image" mode, don't show anything but the column.
-			elseif (!empty($context['can_quick_mod']))
-				echo '
-					<th class="last_th" width="4%">&nbsp;</th>';
-		}
-		// No topics.... just say, "sorry bub".
-		else
-			echo '
-					<th scope="col" class="first_th" width="8%">&nbsp;</th>
-					<th colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>
-					<th scope="col" class="last_th" width="8%">&nbsp;</th>';
-
-		echo '
-				</tr>
-			</thead>
-			<tbody>';
-
-		if (!empty($settings['display_who_viewing']))
-		{
-			echo '
-				<tr class="windowbg2 whos_viewing">
-					<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '" class="smalltext">';
-			if ($settings['display_who_viewing'] == 1)
-				echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
-			else
-				echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
-			echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
-					</td>
-				</tr>';
-		}
-
-		// If this person can approve items and we have some awaiting approval tell them.
-		if (!empty($context['unapproved_posts_message']))
-		{
-			echo '
-				<tr class="windowbg2">
-					<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '">
-						<span class="alert">!</span> ', $context['unapproved_posts_message'], '
-					</td>
-				</tr>';
-		}
-
-		foreach ($context['topics'] as $topic)
-		{
-			// Is this topic pending approval, or does it have any posts pending approval?
-			if ($context['can_approve_posts'] && $topic['unapproved_posts'])
-				$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
-			// We start with locked and sticky topics.
-			elseif ($topic['is_sticky'] && $topic['is_locked'])
-				$color_class = 'stickybg locked_sticky';
-			// Sticky topics should get a different color, too.
-			elseif ($topic['is_sticky'])
-				$color_class = 'stickybg';
-			// Locked topics get special treatment as well.
-			elseif ($topic['is_locked'])
-				$color_class = 'lockedbg';
-			// Last, but not least: regular topics.
-			else
-				$color_class = 'windowbg';
-
-			// Some columns require a different shade of the color class.
-			$alternate_class = $color_class . '2';
-
-			echo '
-				<tr>
-					<td class="icon1 ', $color_class, '">
-						<img src="', $settings['images_url'], '/topic/', $topic['class'], '.png" alt="" />
-					</td>
-					<td class="icon2 ', $color_class, '">
-						<img src="', $topic['first_post']['icon_url'], '" alt="" />
-					</td>
-					<td class="subject ', $alternate_class, '">
-						<div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : ''), '>
-							', $topic['is_sticky'] ? '<strong>' : '', '<span class="preview" title="', $topic[(empty($settings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], ($context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span></span>', $topic['is_sticky'] ? '</strong>' : '';
-
-			// Is this topic new? (assuming they are logged in!)
-			if ($topic['new'] && $context['user']['is_logged'])
-					echo '
-							<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>';
-
-			echo '
-							<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
-								<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
-							</p>
-						</div>
-					</td>
-					<td class="stats ', $color_class, '">
-						', $topic['replies'], ' ', $txt['replies'], '
-						<br />
-						', $topic['views'], ' ', $txt['views'], '
-					</td>
-					<td class="lastpost ', $alternate_class, '">
-						<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
-						', $topic['last_post']['time'], '<br />
-						', $txt['by'], ' ', $topic['last_post']['member']['link'], '
-					</td>';
-
-			// Show the quick moderation options?
-			if (!empty($context['can_quick_mod']))
-			{
-				echo '
-					<td class="moderation ', $color_class, '" align="center">';
-				if ($options['display_quick_mod'] == 1)
-					echo '
-						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />';
-				else
-				{
-					// Check permissions on each and show only the ones they are allowed to use.
-					if ($topic['quick_mod']['remove'])
-						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.png" width="16" alt="', $txt['remove_topic'], '" title="', $txt['remove_topic'], '" /></a>';
-
-					if ($topic['quick_mod']['lock'])
-						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.png" width="16" alt="', $txt['set_lock'], '" title="', $txt['set_lock'], '" /></a>';
-
-					if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
-						echo '<br />';
-
-					if ($topic['quick_mod']['sticky'])
-						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.png" width="16" alt="', $txt['set_sticky'], '" title="', $txt['set_sticky'], '" /></a>';
-
-					if ($topic['quick_mod']['move'])
-						echo '<a href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.png" width="16" alt="', $txt['move_topic'], '" title="', $txt['move_topic'], '" /></a>';
-				}
-				echo '
-					</td>';
-			}
-			echo '
-				</tr>';
-		}
-
-		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
-		{
-			echo '
-				<tr class="titlebg">
-					<td colspan="6" align="right">
-						<select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
-							<option value="">--------</option>', $context['can_remove'] ? '
-							<option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', $context['can_lock'] ? '
-							<option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', $context['can_sticky'] ? '
-							<option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', $context['can_move'] ? '
-							<option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', $context['can_merge'] ? '
-							<option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', $context['can_restore'] ? '
-							<option value="restore">' . $txt['quick_mod_restore'] . '</option>' : '', $context['can_approve'] ? '
-							<option value="approve">' . $txt['quick_mod_approve'] . '</option>' : '', $context['user']['is_logged'] ? '
-							<option value="markread">' . $txt['quick_mod_markread'] . '</option>' : '', '
-						</select>';
-
-			// Show a list of boards they can move the topic to.
-			if ($context['can_move'])
-			{
-					echo '
-						<select class="qaction" id="moveItTo" name="move_to" disabled="disabled">';
-
-					foreach ($context['move_to_boards'] as $category)
-					{
-						echo '
-							<optgroup label="', $category['name'], '">';
-						foreach ($category['boards'] as $board)
-								echo '
-								<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
-						echo '
-							</optgroup>';
-					}
-					echo '
-						</select>';
-			}
-
-			echo '
-						<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" class="button_submit qaction" />
-					</td>
-				</tr>';
-		}
-
-		echo '
-			</tbody>
-		</table>
-	</div>
-	<a id="bot"></a>';
-
-		// Finish off the form - again.
-		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
-			echo '
-	<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
-	</form>';
-
-		echo '
-	<div class="pagesection">
-		', template_button_strip($context['normal_buttons'], 'right'), '
-		<div class="pagelinks">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
-	</div>';
-	}
-
-	// Show breadcrumbs at the bottom too.
-	theme_linktree();
-
-	echo '
-	<div class="tborder" id="topic_icons">
-		<div class="description">
-			<p class="floatright" id="message_index_jump_to">&nbsp;</p>';
-
-	if (!$context['no_topic_listing'])
-		echo '
-			<p class="floatleft smalltext">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
-				<img src="' . $settings['images_url'] . '/topic/my_normal_post.png" alt="" class="centericon" /> ' . $txt['participation_caption'] . '<br />' : '', '
-				<img src="' . $settings['images_url'] . '/topic/normal_post.png" alt="" class="centericon" /> ' . $txt['normal_topic'] . '<br />
-				<img src="' . $settings['images_url'] . '/topic/hot_post.png" alt="" class="centericon" /> ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '<br />
-				<img src="' . $settings['images_url'] . '/topic/veryhot_post.png" alt="" class="centericon" /> ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '
-			</p>
-			<p class="smalltext">
-				<img src="' . $settings['images_url'] . '/icons/quick_lock.png" alt="" class="centericon" /> ' . $txt['locked_topic'] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
-				<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="" class="centericon" /> ' . $txt['sticky_topic'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
-				<img src="' . $settings['images_url'] . '/topic/normal_poll.png" alt="" class="centericon" /> ' . $txt['poll'] : '') . '
-			</p>';
-
-	echo '
-			<script type="text/javascript"><!-- // --><![CDATA[
-				if (typeof(window.XMLHttpRequest) != "undefined")
-					aJumpTo[aJumpTo.length] = new JumpTo({
-						sContainerId: "message_index_jump_to",
-						sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
-						iCurBoardId: ', $context['current_board'], ',
-						iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
-						sCurBoardName: "', $context['jump_to']['board_name'], '",
-						sBoardChildLevelIndicator: "==",
-						sBoardPrefix: "=> ",
-						sCatSeparator: "-----------------------------",
-						sCatPrefix: "",
-						sGoButtonLabel: "', $txt['quick_mod_go'], '"
-					});
-			// ]]></script>
-			<br class="clear" />
-		</div>
-	</div>';
-
-	// Javascript for inline editing.
-	echo '
-<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
-<script type="text/javascript"><!-- // --><![CDATA[
-
-	// Hide certain bits during topic edit.
-	hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");
-
-	// Use it to detect when we\'ve stopped editing.
-	document.onclick = modify_topic_click;
-
-	var mouse_on_div;
-// ]]></script>';
-}
-
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+function template_main()
+{
+	global $context, $settings, $options, $scripturl, $modSettings, $txt;
+
+	if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
+	{
+		echo '
+	<div id="board_', $context['current_board'], '_childboards" class="boardindex_table">
+		<table class="table_list">
+			<tbody class="header">
+				<tr>
+					<td colspan="4">
+						<div class="cat_bar">
+							<h3 class="catbg">', $txt['parent_boards'], '</h3>
+						</div>
+					</td>
+				</tr>
+			</tbody>
+			<tbody id="board_', $context['current_board'], '_children" class="content">';
+
+		foreach ($context['boards'] as $board)
+		{
+			echo '
+				<tr id="board_', $board['id'], '" class="windowbg2">
+					<td class="windowbg icon"', !empty($board['children']) ? ' rowspan="2"' : '', '>
+						<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
+
+			// If the board or children is new, show an indicator.
+			if ($board['new'] || $board['children_new'])
+				echo '
+							<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
+			// Is it a redirection board?
+			elseif ($board['is_redirect'])
+				echo '
+							<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
+			// No new posts at all! The agony!!
+			else
+				echo '
+							<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
+
+			echo '
+						</a>
+					</td>
+					<td class="info">
+						<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
+
+			// Has it outstanding posts for approval?
+			if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
+				echo '
+						<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>';
+
+			echo '
+
+						<p>', $board['description'] , '</p>';
+
+			// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
+			if (!empty($board['moderators']))
+				echo '
+						<p class="moderators">', count($board['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
+
+			// Show some basic information about the number of posts, etc.
+			echo '
+					</td>
+					<td class="windowbg stats">
+						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
+						', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
+						</p>
+					</td>
+					<td class="lastpost">';
+
+			if (!empty($board['last_post']['id']))
+				echo '
+						<p>', $board['last_post']['last_post_message'], '</p>';
+			echo '
+					</td>
+				</tr>';
+
+			// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
+			if (!empty($board['children']))
+			{
+				// Sort the links into an array with new boards bold so it can be imploded.
+				$children = array();
+				/* Each child in each board's children has:
+						id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
+				foreach ($board['children'] as $child)
+				{
+					if (!$child['is_redirect'])
+						$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_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  ' . ($child['new'] ? 'class="new_posts" ' : '') . 'href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
+					else
+						$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
+
+					// Has it posts awaiting approval?
+					if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
+						$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>';
+
+					$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
+				}
+
+			echo '
+				<tr id="board_', $board['id'], '_children" class="windowbg2">
+					<td colspan="3" class="windowbg children">
+						<p><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</p>
+					</td>
+				</tr>';
+			}
+		}
+		echo '
+			</tbody>
+		</table>
+	</div>';
+	}
+
+	if (!empty($options['show_board_desc']) && $context['description'] != '')
+		echo '
+	<p class="description_board">', $context['description'], '</p>';
+
+	// They can only mark read if they are logged in and it's enabled!
+	if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
+		unset($context['normal_buttons']['markread']);
+
+	if (!$context['no_topic_listing'])
+	{
+		echo '
+	<div class="pagesection">
+		<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
+		', template_button_strip($context['normal_buttons'], 'right'), '
+	</div>';
+
+		// If Quick Moderation is enabled start the form.
+		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
+			echo '
+	<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">';
+
+		echo '
+	<div class="tborder topic_table" id="messageindex">
+		<table class="table_grid" cellspacing="0">
+			<thead>
+				<tr class="catbg">';
+
+		// Are there actually any topics to show?
+		// [WIP] There is trial code here to hide the topic icon column. Colspan can be cleaned up later.
+		if (!empty($context['topics']))
+		{
+			echo '
+					<th scope="col" class="first_th" width="6%" colspan="1">&nbsp;</th>
+					<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'],  $context['sort_by'] == 'starter' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
+					<th scope="col" width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
+			// Show a "select all" box for quick moderation?
+			if (empty($context['can_quick_mod']))
+				echo '
+					<th scope="col" class="lefttext last_th" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
+			else
+				echo '
+					<th scope="col" class="lefttext" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? '<img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
+
+			// Show a "select all" box for quick moderation?
+			if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)
+				echo '
+					<th scope="col" class="last_th" width="24"><input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" /></th>';
+
+			// If it's on in "image" mode, don't show anything but the column.
+			elseif (!empty($context['can_quick_mod']))
+				echo '
+					<th class="last_th" width="4%">&nbsp;</th>';
+		}
+		// No topics.... just say, "sorry bub".
+		else
+			echo '
+					<th scope="col" class="first_th" width="8%">&nbsp;</th>
+					<th colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>
+					<th scope="col" class="last_th" width="8%">&nbsp;</th>';
+
+		echo '
+				</tr>
+			</thead>
+			<tbody>';
+
+		if (!empty($settings['display_who_viewing']))
+		{
+			echo '
+				<tr class="windowbg2 whos_viewing">
+					<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '" class="smalltext">';
+			if ($settings['display_who_viewing'] == 1)
+				echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
+			else
+				echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
+			echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
+					</td>
+				</tr>';
+		}
+
+		// If this person can approve items and we have some awaiting approval tell them.
+		if (!empty($context['unapproved_posts_message']))
+		{
+			echo '
+				<tr class="windowbg2">
+					<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '">
+						<span class="alert">!</span> ', $context['unapproved_posts_message'], '
+					</td>
+				</tr>';
+		}
+
+		foreach ($context['topics'] as $topic)
+		{
+			// Is this topic pending approval, or does it have any posts pending approval?
+			if ($context['can_approve_posts'] && $topic['unapproved_posts'])
+				$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
+			// We start with locked and sticky topics.
+			elseif ($topic['is_sticky'] && $topic['is_locked'])
+				$color_class = 'stickybg locked_sticky';
+			// Sticky topics should get a different color, too.
+			elseif ($topic['is_sticky'])
+				$color_class = 'stickybg';
+			// Locked topics get special treatment as well.
+			elseif ($topic['is_locked'])
+				$color_class = 'lockedbg';
+			// Last, but not least: regular topics.
+			else
+				$color_class = 'windowbg';
+
+			// Some columns require a different shade of the color class.
+			$alternate_class = $color_class . '2';
+
+			// [WIP] There is trial code here to hide the topic icon column. Hardly anyone will miss it.
+			// [WIP] Markup can be cleaned up later. CSS can go in the CSS files later.
+			echo '
+				<tr>
+					<td class="icon1 ', $color_class, '" style="display: none;">
+						<img src="', $settings['images_url'], '/topic/', $topic['class'], '.png" alt="" />
+					</td>
+					<td class="icon2 ', $color_class, '">
+						<div style="position: relative; width: 40px; margin: auto;">
+							<img src="', $topic['first_post']['icon_url'], '" alt="" />
+							', $topic['is_posted_in'] ? '<img src="'. $settings['images_url']. '/icons/profile_sm.png" alt="" style="position: absolute; z-index: 5; right: 4px; bottom: -3px;" />' : '','
+						</div>
+					</td>
+					<td class="subject ', $alternate_class, '">
+						<div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : ''), '>';
+
+			// [WIP] MEthinks the orange icons look better if they aren't all over the page.
+			// Is this topic new? (assuming they are logged in!)
+			if ($topic['new'] && $context['user']['is_logged'])
+					echo '
+							<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>';
+
+			echo '
+							', $topic['is_sticky'] ? '<strong>' : '', '<span class="preview" title="', $topic[(empty($settings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], ($context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span></span>', $topic['is_sticky'] ? '</strong>' : '', '
+
+							<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
+								<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
+							</p>
+						</div>
+					</td>
+					<td class="stats ', $color_class, '">
+						', $topic['replies'], ' ', $txt['replies'], '
+						<br />
+						', $topic['views'], ' ', $txt['views'], '
+					</td>
+					<td class="lastpost ', $alternate_class, '">
+						<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
+						', $topic['last_post']['time'], '<br />
+						', $txt['by'], ' ', $topic['last_post']['member']['link'], '
+					</td>';
+
+			// Show the quick moderation options?
+			if (!empty($context['can_quick_mod']))
+			{
+				echo '
+					<td class="moderation ', $color_class, '" align="center">';
+				if ($options['display_quick_mod'] == 1)
+					echo '
+						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />';
+				else
+				{
+					// Check permissions on each and show only the ones they are allowed to use.
+					if ($topic['quick_mod']['remove'])
+						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.png" width="16" alt="', $txt['remove_topic'], '" title="', $txt['remove_topic'], '" /></a>';
+
+					if ($topic['quick_mod']['lock'])
+						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.png" width="16" alt="', $txt['set_lock'], '" title="', $txt['set_lock'], '" /></a>';
+
+					if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
+						echo '<br />';
+
+					if ($topic['quick_mod']['sticky'])
+						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.png" width="16" alt="', $txt['set_sticky'], '" title="', $txt['set_sticky'], '" /></a>';
+
+					if ($topic['quick_mod']['move'])
+						echo '<a href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.png" width="16" alt="', $txt['move_topic'], '" title="', $txt['move_topic'], '" /></a>';
+				}
+				echo '
+					</td>';
+			}
+			echo '
+				</tr>';
+		}
+
+		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
+		{
+			echo '
+				<tr class="titlebg">
+					<td colspan="6" align="right">
+						<select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
+							<option value="">--------</option>', $context['can_remove'] ? '
+							<option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', $context['can_lock'] ? '
+							<option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', $context['can_sticky'] ? '
+							<option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', $context['can_move'] ? '
+							<option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', $context['can_merge'] ? '
+							<option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', $context['can_restore'] ? '
+							<option value="restore">' . $txt['quick_mod_restore'] . '</option>' : '', $context['can_approve'] ? '
+							<option value="approve">' . $txt['quick_mod_approve'] . '</option>' : '', $context['user']['is_logged'] ? '
+							<option value="markread">' . $txt['quick_mod_markread'] . '</option>' : '', '
+						</select>';
+
+			// Show a list of boards they can move the topic to.
+			if ($context['can_move'])
+			{
+					echo '
+						<select class="qaction" id="moveItTo" name="move_to" disabled="disabled">';
+
+					foreach ($context['move_to_boards'] as $category)
+					{
+						echo '
+							<optgroup label="', $category['name'], '">';
+						foreach ($category['boards'] as $board)
+								echo '
+								<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
+						echo '
+							</optgroup>';
+					}
+					echo '
+						</select>';
+			}
+
+			echo '
+						<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" class="button_submit qaction" />
+					</td>
+				</tr>';
+		}
+
+		echo '
+			</tbody>
+		</table>
+	</div>';
+
+		// Finish off the form - again.
+		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
+			echo '
+	<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
+	</form>';
+
+		echo '
+	<div class="pagesection">
+		', template_button_strip($context['normal_buttons'], 'right'), '
+		<div class="pagelinks">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
+	</div>';
+	}
+
+	// Show breadcrumbs at the bottom too.
+	theme_linktree();
+
+	echo '
+	<div class="tborder" id="topic_icons">
+		<div class="description">
+			<p class="floatright" id="message_index_jump_to">&nbsp;</p>';
+
+	if (!$context['no_topic_listing'])
+		echo '
+			<p class="floatleft smalltext">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
+				<img src="' . $settings['images_url'] . '/topic/my_normal_post.png" alt="" class="centericon" /> ' . $txt['participation_caption'] . '<br />' : '', '
+				<img src="' . $settings['images_url'] . '/topic/normal_post.png" alt="" class="centericon" /> ' . $txt['normal_topic'] . '<br />
+				<img src="' . $settings['images_url'] . '/topic/hot_post.png" alt="" class="centericon" /> ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '<br />
+				<img src="' . $settings['images_url'] . '/topic/veryhot_post.png" alt="" class="centericon" /> ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '
+			</p>
+			<p class="smalltext">
+				<img src="' . $settings['images_url'] . '/icons/quick_lock.png" alt="" class="centericon" /> ' . $txt['locked_topic'] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
+				<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="" class="centericon" /> ' . $txt['sticky_topic'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
+				<img src="' . $settings['images_url'] . '/topic/normal_poll.png" alt="" class="centericon" /> ' . $txt['poll'] : '') . '
+			</p>';
+
+	echo '
+			<script type="text/javascript"><!-- // --><![CDATA[
+				if (typeof(window.XMLHttpRequest) != "undefined")
+					aJumpTo[aJumpTo.length] = new JumpTo({
+						sContainerId: "message_index_jump_to",
+						sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
+						iCurBoardId: ', $context['current_board'], ',
+						iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
+						sCurBoardName: "', $context['jump_to']['board_name'], '",
+						sBoardChildLevelIndicator: "==",
+						sBoardPrefix: "=> ",
+						sCatSeparator: "-----------------------------",
+						sCatPrefix: "",
+						sGoButtonLabel: "', $txt['quick_mod_go'], '"
+					});
+			// ]]></script>
+			<br class="clear" />
+		</div>
+	</div>';
+
+	// Javascript for inline editing.
+	echo '
+<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
+<script type="text/javascript"><!-- // --><![CDATA[
+
+	// Hide certain bits during topic edit.
+	hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");
+
+	// Use it to detect when we\'ve stopped editing.
+	document.onclick = modify_topic_click;
+
+	var mouse_on_div;
+// ]]></script>';
+}
+
 ?>

+ 422 - 404
Themes/default/Recent.template.php

@@ -1,405 +1,423 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-function template_main()
-{
-	global $context, $settings, $options, $txt, $scripturl;
-
-	echo '
-	<div id="recent" class="main_section">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/post/xx.png" alt="" class="icon" />',$txt['recent_posts'],'</span>
-			</h3>
-		</div>
-		<div class="pagesection">
-			<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-		</div>';
-
-	foreach ($context['posts'] as $post)
-	{
-		echo '
-			<div class="', $post['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
-				<span class="topslice"><span></span></span>
-				<div class="content">
-					<div class="counter">', $post['counter'], '</div>
-					<div class="topic_details">
-						<h5>', $post['board']['link'], ' / ', $post['link'], '</h5>
-						<span class="smalltext">&#171;&nbsp;', $txt['last_post'], ' ', $txt['by'], ' <strong>', $post['poster']['link'], ' </strong> ', $txt['on'], '<em> ', $post['time'], '</em>&nbsp;&#187;</span>
-					</div>
-					<div class="list_posts">', $post['message'], '</div>
-				</div>';
-
-		if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
-			echo '
-				<div class="quickbuttons_wrap">
-					<ul class="reset smalltext quickbuttons">';
-
-		// If they *can* reply?
-		if ($post['can_reply'])
-			echo '
-						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '" class="reply_button"><span>', $txt['reply'], '</span></a></li>';
-
-		// If they *can* quote?
-		if ($post['can_quote'])
-			echo '
-						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '" class="quote_button"><span>', $txt['quote'], '</span></a></li>';
-
-		// Can we request notification of topics?
-		if ($post['can_mark_notify'])
-			echo '
-						<li><a href="', $scripturl, '?action=notify;topic=', $post['topic'], '.', $post['start'], '" class="notify_button"><span>', $txt['notify'], '</span></a></li>';
-
-		// How about... even... remove it entirely?!
-		if ($post['can_delete'])
-			echo '
-						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');" class="remove_button"><span>', $txt['remove'], '</span></a></li>';
-
-		if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
-			echo '
-					</ul>
-				</div>';
-
-		echo '
-				<span class="botslice clear"><span></span></span>
-			</div>';
-
-	}
-
-	echo '
-		<div class="pagesection">
-			<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-		</div>
-	</div>';
-}
-
-function template_unread()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	echo '
-	<div id="recent" class="main_content">';
-
-	if ($context['showCheckboxes'])
-		echo '
-		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="qaction" value="markread" />
-			<input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
-
-	if (!empty($context['topics']))
-	{
-		echo '
-			<div class="pagesection">';
-
-		if (!empty($context['recent_buttons']) && !empty($settings['use_tabs']))
-			template_button_strip($context['recent_buttons'], 'right');
-
-		echo '
-				<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-			</div>';
-
-		echo '
-			<div class="tborder topic_table" id="unread">
-				<table class="table_grid" cellspacing="0">
-					<thead>
-						<tr class="catbg">
-							<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
-							<th scope="col">
-								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>
-							<th scope="col" width="14%" align="center">
-								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>';
-
-		// Show a "select all" box for quick moderation?
-		if ($context['showCheckboxes'])
-			echo '
-							<th scope="col" width="22%">
-								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>
-							<th class="last_th">
-								<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
-							</th>';
-		else
-			echo '
-							<th scope="col" class="smalltext last_th" width="22%">
-								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>';
-		echo '
-						</tr>
-					</thead>
-					<tbody>';
-
-		foreach ($context['topics'] as $topic)
-		{
-			// Calculate the color class of the topic.
-			$color_class = '';
-			if (strpos($topic['class'], 'sticky') !== false)
-				$color_class = 'stickybg';
-			if (strpos($topic['class'], 'locked') !== false)
-				$color_class .= 'lockedbg';
-
-			$color_class2 = !empty($color_class) ? $color_class . '2' : '';
-
-			echo '
-						<tr>
-							<td class="', $color_class, ' icon1 windowbg">
-								<img src="', $settings['images_url'], '/topic/', $topic['class'], '.png" alt="" />
-							</td>
-							<td class="', $color_class, ' icon2 windowbg">
-								<img src="', $topic['first_post']['icon_url'], '" alt="" />
-							</td>
-							<td class="subject ', $color_class2, ' windowbg2">
-								<div>
-									', $topic['is_sticky'] ? '<strong>' : '', '<span title="', $topic[(empty($settings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</strong>' : '', '
-									<a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><span class="new_posts">' . $txt['new'] . '</span></a>
-									<p>
-										', $topic['first_post']['started_by'], '
-										<small id="pages', $topic['first_post']['id'], '">', $topic['pages'], '</small>
-									</p>
-								</div>
-							</td>
-							<td class="', $color_class, ' stats windowbg">
-								', $topic['replies'], ' ', $txt['replies'], '
-								<br />
-								', $topic['views'], ' ', $txt['views'], '
-							</td>
-							<td class="', $color_class2, ' lastpost windowbg2">
-								<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" class="floatright" /></a>
-								', $topic['last_post']['time'], '<br />
-								', $txt['by'], ' ', $topic['last_post']['member']['link'], '
-							</td>';
-
-			if ($context['showCheckboxes'])
-				echo '
-							<td class="' . (!empty($color_class) ? $color_class : 'windowbg2') . '" valign="middle" align="center">
-								<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
-							</td>';
-			echo '
-						</tr>';
-		}
-
-		if (empty($settings['use_tabs']) && !empty($context['recent_buttons']))
-			echo '
-						<tr class="catbg">
-							<td colspan="', $context['showCheckboxes'] ? '6' : '5', '" align="right">
-								', template_button_strip($context['recent_buttons'], 'top'), '
-							</td>
-						</tr>';
-
-		if (empty($context['topics']))
-			echo '
-					<tr style="display: none;"><td></td></tr>';
-
-		echo '
-					</tbody>
-				</table>
-			</div>
-			<div class="pagesection" id="readbuttons">';
-
-		if (!empty($settings['use_tabs']) && !empty($context['recent_buttons']))
-			template_button_strip($context['recent_buttons'], 'right');
-
-		echo '
-				<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-			</div>';
-	}
-	else
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg centertext">
-					', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
-				</h3>
-			</div>';
-
-	if ($context['showCheckboxes'])
-		echo '
-		</form>';
-
-	echo '
-		<div class="description " id="topic_icons">
-			<p class="smalltext floatleft">
-				', !empty($modSettings['enableParticipation']) ? '
-				<img src="' . $settings['images_url'] . '/topic/my_normal_post.png" alt="" class="centericon" /> ' . $txt['participation_caption'] . '<br />' : '', '
-				<img src="', $settings['images_url'], '/topic/normal_post.png" alt="" class="centericon" /> ', $txt['normal_topic'], '<br />
-				<img src="', $settings['images_url'], '/topic/hot_post.png" alt="" class="centericon" /> ', sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']), '<br />
-				<img src="', $settings['images_url'], '/topic/veryhot_post.png" alt="" class="centericon" /> ', sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']), '
-			</p>
-			<p class="smalltext para2">
-				<img src="', $settings['images_url'], '/icons/quick_lock.png" alt="" class="centericon" /> ', $txt['locked_topic'], '<br />', ($modSettings['enableStickyTopics'] == '1' ? '
-				<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="" class="centericon" /> ' . $txt['sticky_topic'] . '<br />' : ''), ($modSettings['pollMode'] == '1' ? '
-				<img src="' . $settings['images_url'] . '/topic/normal_poll.png" alt="" class="centericon" /> ' . $txt['poll'] : ''), '
-			</p>
-		</div>
-	</div>';
-}
-
-function template_replies()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	echo '
-	<div id="recent">';
-
-	if ($context['showCheckboxes'])
-		echo '
-		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="qaction" value="markread" />
-			<input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
-
-	if (!empty($context['topics']))
-	{
-		echo '
-			<div class="pagesection">';
-
-		if (!empty($context['recent_buttons']) && !empty($settings['use_tabs']))
-			template_button_strip($context['recent_buttons'], 'right');
-
-		echo '
-				<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-			</div>';
-
-		echo '
-			<div class="tborder topic_table" id="unreadreplies">
-				<table class="table_grid" cellspacing="0">
-					<thead>
-						<tr class="catbg">
-							<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
-							<th scope="col">
-								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] === 'subject' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] === 'subject' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>
-							<th scope="col" width="14%" align="center">
-								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] === 'replies' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] === 'replies' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>';
-
-		// Show a "select all" box for quick moderation?
-		if ($context['showCheckboxes'])
-				echo '
-							<th scope="col" width="22%">
-								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>
-							<th class="last_th">
-								<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
-							</th>';
-		else
-			echo '
-							<th scope="col" class="last_th" width="22%">
-								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
-							</th>';
-		echo '
-						</tr>
-					</thead>
-					<tbody>';
-
-		foreach ($context['topics'] as $topic)
-		{
-			// Calculate the color class of the topic.
-			$color_class = '';
-			if (strpos($topic['class'], 'sticky') !== false)
-				$color_class = 'stickybg';
-			if (strpos($topic['class'], 'locked') !== false)
-				$color_class .= 'lockedbg';
-
-			$color_class2 = !empty($color_class) ? $color_class . '2' : '';
-
-			echo '
-						<tr>
-							<td class="', $color_class, ' icon1 windowbg">
-								<img src="', $settings['images_url'], '/topic/', $topic['class'], '.png" alt="" />
-							</td>
-							<td class="', $color_class, ' icon2 windowbg">
-								<img src="', $topic['first_post']['icon_url'], '" alt="" />
-							</td>
-							<td class="subject ', $color_class2, ' windowbg2">
-								<div>
-									', $topic['is_sticky'] ? '<strong>' : '', '<span title="', $topic[(empty($settings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</strong>' : '', '
-									<a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><span class="new_posts">' . $txt['new'] . '</span></a>
-									<p>
-										', $topic['first_post']['started_by'], '
-										<small id="pages', $topic['first_post']['id'], '">', $topic['pages'], '</small>
-									</p>
-								</div>
-							</td>
-							<td class="', $color_class, ' stats windowbg">
-								', $topic['replies'], ' ', $txt['replies'], '
-								<br />
-								', $topic['views'], ' ', $txt['views'], '
-							</td>
-							<td class="', $color_class2, ' lastpost windowbg2">
-								<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" class="floatright" /></a>
-								', $topic['last_post']['time'], '<br />
-								', $txt['by'], ' ', $topic['last_post']['member']['link'], '
-							</td>';
-
-			if ($context['showCheckboxes'])
-				echo '
-							<td class="' . (!empty($color_class) ? $color_class : 'windowbg2') . '" valign="middle" align="center">
-								<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
-							</td>';
-			echo '
-						</tr>';
-		}
-
-		if (empty($settings['use_tabs']) && !empty($context['recent_buttons']))
-			echo '
-						<tr class="catbg">
-							<td colspan="', $context['showCheckboxes'] ? '6' : '5', '" align="right">
-								', template_button_strip($context['recent_buttons'], 'top'), '
-							</td>
-						</tr>';
-
-		echo '
-					</tbody>
-				</table>
-			</div>
-			<div class="pagesection">';
-
-		if (!empty($settings['use_tabs']) && !empty($context['recent_buttons']))
-			template_button_strip($context['recent_buttons'], 'right');
-
-		echo '
-				<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-			</div>';
-	}
-	else
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg centertext">
-					', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
-				</h3>
-			</div>';
-
-	if ($context['showCheckboxes'])
-		echo '
-		</form>';
-
-	echo '
-		<div class="description flow_auto" id="topic_icons">
-			<p class="smalltext floatleft">
-				', !empty($modSettings['enableParticipation']) ? '
-				<img src="' . $settings['images_url'] . '/topic/my_normal_post.png" alt="" class="centericon" /> ' . $txt['participation_caption'] . '<br />' : '', '
-				<img src="', $settings['images_url'], '/topic/normal_post.png" alt="" class="centericon" /> ', $txt['normal_topic'], '<br />
-				<img src="', $settings['images_url'], '/topic/hot_post.png" alt="" class="centericon" /> ', sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']), '<br />
-				<img src="', $settings['images_url'], '/topic/veryhot_post.png" alt="" class="centericon" /> ', sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']), '
-			</p>
-			<p class="smalltext para2">
-				<img src="', $settings['images_url'], '/icons/quick_lock.png" alt="" class="centericon" /> ', $txt['locked_topic'], '<br />', ($modSettings['enableStickyTopics'] == '1' ? '
-				<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="" class="centericon" /> ' . $txt['sticky_topic'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
-				<img src="' . $settings['images_url'] . '/topic/normal_poll.png" alt="" class="centericon" /> ' . $txt['poll'] : '') . '
-			</p>
-		</div>
-	</div>';
-}
-
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+function template_main()
+{
+	global $context, $settings, $options, $txt, $scripturl;
+
+	echo '
+	<div id="recent" class="main_section">
+		<div class="cat_bar">
+			<h3 class="catbg">
+				<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/post/xx.png" alt="" class="icon" />',$txt['recent_posts'],'</span>
+			</h3>
+		</div>
+		<div class="pagesection">
+			<span>', $txt['pages'], ': ', $context['page_index'], '</span>
+		</div>';
+
+	foreach ($context['posts'] as $post)
+	{
+		echo '
+			<div class="', $post['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
+				<span class="topslice"><span></span></span>
+				<div class="content">
+					<div class="counter">', $post['counter'], '</div>
+					<div class="topic_details">
+						<h5>', $post['board']['link'], ' / ', $post['link'], '</h5>
+						<span class="smalltext">&#171;&nbsp;', $txt['last_post'], ' ', $txt['by'], ' <strong>', $post['poster']['link'], ' </strong> ', $txt['on'], '<em> ', $post['time'], '</em>&nbsp;&#187;</span>
+					</div>
+					<div class="list_posts">', $post['message'], '</div>
+				</div>';
+
+		if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
+			echo '
+				<div class="quickbuttons_wrap">
+					<ul class="reset smalltext quickbuttons">';
+
+		// If they *can* reply?
+		if ($post['can_reply'])
+			echo '
+						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '" class="reply_button"><span>', $txt['reply'], '</span></a></li>';
+
+		// If they *can* quote?
+		if ($post['can_quote'])
+			echo '
+						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '" class="quote_button"><span>', $txt['quote'], '</span></a></li>';
+
+		// Can we request notification of topics?
+		if ($post['can_mark_notify'])
+			echo '
+						<li><a href="', $scripturl, '?action=notify;topic=', $post['topic'], '.', $post['start'], '" class="notify_button"><span>', $txt['notify'], '</span></a></li>';
+
+		// How about... even... remove it entirely?!
+		if ($post['can_delete'])
+			echo '
+						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');" class="remove_button"><span>', $txt['remove'], '</span></a></li>';
+
+		if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
+			echo '
+					</ul>
+				</div>';
+
+		echo '
+				<span class="botslice clear"><span></span></span>
+			</div>';
+
+	}
+
+	echo '
+		<div class="pagesection">
+			<span>', $txt['pages'], ': ', $context['page_index'], '</span>
+		</div>
+	</div>';
+}
+
+function template_unread()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	echo '
+	<div id="recent" class="main_content">';
+
+	if ($context['showCheckboxes'])
+		echo '
+		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
+			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+			<input type="hidden" name="qaction" value="markread" />
+			<input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
+
+	if (!empty($context['topics']))
+	{
+		echo '
+			<div class="pagesection">';
+
+		if (!empty($context['recent_buttons']) && !empty($settings['use_tabs']))
+			template_button_strip($context['recent_buttons'], 'right');
+
+		echo '
+				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
+			</div>';
+
+		// [WIP] There is trial code here to hide the topic icon column. Colspan can be cleaned up later.
+		echo '
+			<div class="tborder topic_table" id="unread">
+				<table class="table_grid" cellspacing="0">
+					<thead>
+						<tr class="catbg">
+							<th scope="col" class="first_th" width="8%" colspan="1">&nbsp;</th>
+							<th scope="col">
+								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>
+							<th scope="col" width="14%" align="center">
+								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>';
+
+		// Show a "select all" box for quick moderation?
+		if ($context['showCheckboxes'])
+			echo '
+							<th scope="col" width="22%">
+								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>
+							<th class="last_th">
+								<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
+							</th>';
+		else
+			echo '
+							<th scope="col" class="smalltext last_th" width="22%">
+								<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>';
+		echo '
+						</tr>
+					</thead>
+					<tbody>';
+
+		foreach ($context['topics'] as $topic)
+		{
+			// Calculate the color class of the topic.
+			$color_class = '';
+			if (strpos($topic['class'], 'sticky') !== false)
+				$color_class = 'stickybg';
+			if (strpos($topic['class'], 'locked') !== false)
+				$color_class .= 'lockedbg';
+
+			$color_class2 = !empty($color_class) ? $color_class . '2' : '';
+
+			// [WIP] There is trial code here to hide the topic icon column. Hardly anyone will miss it.
+			// [WIP] Markup can be cleaned up later. CSS can go in the CSS files later.
+			echo '
+						<tr>
+							<td class="', $color_class, ' icon1 windowbg" style="display: none;">
+								<img src="', $settings['images_url'], '/topic/', $topic['class'], '.png" alt="" />
+							</td>
+							<td class="', $color_class, ' icon2 windowbg">
+								<div style="position: relative; width: 40px; margin: auto;">
+									<img src="', $topic['first_post']['icon_url'], '" alt="" />
+									', $topic['is_posted_in'] ? '<img src="'. $settings['images_url']. '/icons/profile_sm.png" alt="" style="position: absolute; z-index: 5; right: 4px; bottom: -3px;" />' : '','
+								</div>
+							</td>
+							<td class="subject ', $color_class2, ' windowbg2">
+								<div>';
+
+			// [WIP] MEthinks the orange icons look better if they aren't all over the page.
+			echo '
+									<a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><span class="new_posts">' . $txt['new'] . '</span></a>
+									', $topic['is_sticky'] ? '<strong>' : '', '<span title="', $topic[(empty($settings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</strong>' : '', '
+									<p>
+										', $topic['first_post']['started_by'], '
+										<small id="pages', $topic['first_post']['id'], '">', $topic['pages'], '</small>
+									</p>
+								</div>
+							</td>
+							<td class="', $color_class, ' stats windowbg">
+								', $topic['replies'], ' ', $txt['replies'], '
+								<br />
+								', $topic['views'], ' ', $txt['views'], '
+							</td>
+							<td class="', $color_class2, ' lastpost windowbg2">
+								<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" class="floatright" /></a>
+								', $topic['last_post']['time'], '<br />
+								', $txt['by'], ' ', $topic['last_post']['member']['link'], '
+							</td>';
+
+			if ($context['showCheckboxes'])
+				echo '
+							<td class="' . (!empty($color_class) ? $color_class : 'windowbg2') . ' moderation" valign="middle" align="center">
+								<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
+							</td>';
+			echo '
+						</tr>';
+		}
+
+		if (empty($settings['use_tabs']) && !empty($context['recent_buttons']))
+			echo '
+						<tr class="catbg">
+							<td colspan="', $context['showCheckboxes'] ? '6' : '5', '" align="right">
+								', template_button_strip($context['recent_buttons'], 'top'), '
+							</td>
+						</tr>';
+
+		if (empty($context['topics']))
+			echo '
+					<tr style="display: none;"><td></td></tr>';
+
+		echo '
+					</tbody>
+				</table>
+			</div>
+			<div class="pagesection" id="readbuttons">';
+
+		if (!empty($settings['use_tabs']) && !empty($context['recent_buttons']))
+			template_button_strip($context['recent_buttons'], 'right');
+
+		echo '
+				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
+			</div>';
+	}
+	else
+		echo '
+			<div class="cat_bar">
+				<h3 class="catbg centertext">
+					', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
+				</h3>
+			</div>';
+
+	if ($context['showCheckboxes'])
+		echo '
+		</form>';
+
+	echo '
+		<div class="description " id="topic_icons">
+			<p class="smalltext floatleft">
+				', !empty($modSettings['enableParticipation']) ? '
+				<img src="' . $settings['images_url'] . '/topic/my_normal_post.png" alt="" class="centericon" /> ' . $txt['participation_caption'] . '<br />' : '', '
+				<img src="', $settings['images_url'], '/topic/normal_post.png" alt="" class="centericon" /> ', $txt['normal_topic'], '<br />
+				<img src="', $settings['images_url'], '/topic/hot_post.png" alt="" class="centericon" /> ', sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']), '<br />
+				<img src="', $settings['images_url'], '/topic/veryhot_post.png" alt="" class="centericon" /> ', sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']), '
+			</p>
+			<p class="smalltext para2">
+				<img src="', $settings['images_url'], '/icons/quick_lock.png" alt="" class="centericon" /> ', $txt['locked_topic'], '<br />', ($modSettings['enableStickyTopics'] == '1' ? '
+				<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="" class="centericon" /> ' . $txt['sticky_topic'] . '<br />' : ''), ($modSettings['pollMode'] == '1' ? '
+				<img src="' . $settings['images_url'] . '/topic/normal_poll.png" alt="" class="centericon" /> ' . $txt['poll'] : ''), '
+			</p>
+		</div>
+	</div>';
+}
+
+function template_replies()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	echo '
+	<div id="recent">';
+
+	if ($context['showCheckboxes'])
+		echo '
+		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
+			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+			<input type="hidden" name="qaction" value="markread" />
+			<input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
+
+	if (!empty($context['topics']))
+	{
+		echo '
+			<div class="pagesection">';
+
+		if (!empty($context['recent_buttons']) && !empty($settings['use_tabs']))
+			template_button_strip($context['recent_buttons'], 'right');
+
+		echo '
+				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
+			</div>';
+
+		// [WIP] There is trial code here to hide the topic icon column. Colspan can be cleaned up later.
+		echo '
+			<div class="tborder topic_table" id="unreadreplies">
+				<table class="table_grid" cellspacing="0">
+					<thead>
+						<tr class="catbg">
+							<th scope="col" class="first_th" width="8%" colspan="1">&nbsp;</th>
+							<th scope="col">
+								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] === 'subject' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] === 'subject' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>
+							<th scope="col" width="14%" align="center">
+								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] === 'replies' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] === 'replies' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>';
+
+		// Show a "select all" box for quick moderation?
+		if ($context['showCheckboxes'])
+				echo '
+							<th scope="col" width="22%">
+								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>
+							<th class="last_th">
+								<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
+							</th>';
+		else
+			echo '
+							<th scope="col" class="last_th" width="22%">
+								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img class="sort" src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a>
+							</th>';
+		echo '
+						</tr>
+					</thead>
+					<tbody>';
+
+		foreach ($context['topics'] as $topic)
+		{
+			// Calculate the color class of the topic.
+			$color_class = '';
+			if (strpos($topic['class'], 'sticky') !== false)
+				$color_class = 'stickybg';
+			if (strpos($topic['class'], 'locked') !== false)
+				$color_class .= 'lockedbg';
+
+			$color_class2 = !empty($color_class) ? $color_class . '2' : '';
+
+			// [WIP] There is trial code here to hide the topic icon column. Hardly anyone will miss it.
+			// [WIP] Markup can be cleaned up later. CSS can go in the CSS files later.
+			echo '
+						<tr>
+							<td class="', $color_class, ' icon1 windowbg" style="display: none;">
+								<img src="', $settings['images_url'], '/topic/', $topic['class'], '.png" alt="" />
+							</td>
+							<td class="', $color_class, ' icon2 windowbg">
+								<div style="position: relative; width: 40px; margin: auto;">
+									<img src="', $topic['first_post']['icon_url'], '" alt="" />
+									', $topic['is_posted_in'] ? '<img src="'. $settings['images_url']. '/icons/profile_sm.png" alt="" style="position: absolute; z-index: 5; right: 4px; bottom: -3px;" />' : '','
+								</div>
+							</td>
+							<td class="subject ', $color_class2, ' windowbg2">
+								<div>';
+
+			// [WIP] MEthinks the orange icons look better if they aren't all over the page.
+			echo '
+									<a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><span class="new_posts">' . $txt['new'] . '</span></a>
+									', $topic['is_sticky'] ? '<strong>' : '', '<span title="', $topic[(empty($settings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</strong>' : '', '
+									<p>
+										', $topic['first_post']['started_by'], '
+										<small id="pages', $topic['first_post']['id'], '">', $topic['pages'], '</small>
+									</p>
+								</div>
+							</td>
+							<td class="', $color_class, ' stats windowbg">
+								', $topic['replies'], ' ', $txt['replies'], '
+								<br />
+								', $topic['views'], ' ', $txt['views'], '
+							</td>
+							<td class="', $color_class2, ' lastpost windowbg2">
+								<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" class="floatright" /></a>
+								', $topic['last_post']['time'], '<br />
+								', $txt['by'], ' ', $topic['last_post']['member']['link'], '
+							</td>';
+
+			if ($context['showCheckboxes'])
+				echo '
+							<td class="' . (!empty($color_class) ? $color_class : 'windowbg2') . ' moderation" valign="middle" align="center">
+								<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
+							</td>';
+			echo '
+						</tr>';
+		}
+
+		if (empty($settings['use_tabs']) && !empty($context['recent_buttons']))
+			echo '
+						<tr class="catbg">
+							<td colspan="', $context['showCheckboxes'] ? '6' : '5', '" align="right">
+								', template_button_strip($context['recent_buttons'], 'top'), '
+							</td>
+						</tr>';
+
+		echo '
+					</tbody>
+				</table>
+			</div>
+			<div class="pagesection">';
+
+		if (!empty($settings['use_tabs']) && !empty($context['recent_buttons']))
+			template_button_strip($context['recent_buttons'], 'right');
+
+		echo '
+				<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
+ 			</div>';
+	}
+	else
+		echo '
+			<div class="cat_bar">
+				<h3 class="catbg centertext">
+					', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
+				</h3>
+			</div>';
+
+	if ($context['showCheckboxes'])
+		echo '
+		</form>';
+
+	echo '
+		<div class="description flow_auto" id="topic_icons">
+			<p class="smalltext floatleft">
+				', !empty($modSettings['enableParticipation']) ? '
+				<img src="' . $settings['images_url'] . '/topic/my_normal_post.png" alt="" class="centericon" /> ' . $txt['participation_caption'] . '<br />' : '', '
+				<img src="', $settings['images_url'], '/topic/normal_post.png" alt="" class="centericon" /> ', $txt['normal_topic'], '<br />
+				<img src="', $settings['images_url'], '/topic/hot_post.png" alt="" class="centericon" /> ', sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']), '<br />
+				<img src="', $settings['images_url'], '/topic/veryhot_post.png" alt="" class="centericon" /> ', sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']), '
+			</p>
+			<p class="smalltext para2">
+				<img src="', $settings['images_url'], '/icons/quick_lock.png" alt="" class="centericon" /> ', $txt['locked_topic'], '<br />', ($modSettings['enableStickyTopics'] == '1' ? '
+				<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="" class="centericon" /> ' . $txt['sticky_topic'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
+				<img src="' . $settings['images_url'] . '/topic/normal_poll.png" alt="" class="centericon" /> ' . $txt['poll'] : '') . '
+			</p>
+		</div>
+	</div>';
+}
+
 ?>

+ 432 - 472
Themes/default/Stats.template.php

@@ -1,473 +1,433 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-function template_main()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	echo '
-	<div id="statistics" class="main_section">
-		<div class="cat_bar">
-			<h3 class="catbg">', $context['page_title'], '</h3>
-		</div>
-		<div class="title_bar">
-			<h4 class="titlebg">
-				<span class="ie6_header floatleft">
-					<img src="', $settings['images_url'], '/stats_info.png" class="icon" alt="" /> ', $txt['general_stats'], '
-				</span>
-			</h4>
-		</div>
-		<div class="flow_hidden">
-			<div id="stats_left">
-				<div class="windowbg2">
-					<span class="topslice"><span></span></span>
-					<div class="content top_row">
-						<dl class="stats">
-							<dt>', $txt['total_members'], ':</dt>
-							<dd>', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $context['num_members'] . '</a>' : $context['num_members'], '</dd>
-							<dt>', $txt['total_posts'], ':</dt>
-							<dd>', $context['num_posts'], '</dd>
-							<dt>', $txt['total_topics'], ':</dt>
-							<dd>', $context['num_topics'], '</dd>
-							<dt>', $txt['total_cats'], ':</dt>
-							<dd>', $context['num_categories'], '</dd>
-							<dt>', $txt['users_online'], ':</dt>
-							<dd>', $context['users_online'], '</dd>
-							<dt>', $txt['most_online'], ':</dt>
-							<dd>', $context['most_members_online']['number'], ' - ', $context['most_members_online']['date'], '</dd>
-							<dt>', $txt['users_online_today'], ':</dt>
-							<dd>', $context['online_today'], '</dd>';
-
-	if (!empty($modSettings['hitStats']))
-		echo '
-							<dt>', $txt['num_hits'], ':</dt>
-							<dd>', $context['num_hits'], '</dd>';
-
-	echo '
-						</dl>
-						<div class="clear"></div>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>
-			<div id="stats_right">
-				<div class="windowbg2">
-					<span class="topslice"><span></span></span>
-					<div class="content top_row">
-						<dl class="stats">
-							<dt>', $txt['average_members'], ':</dt>
-							<dd>', $context['average_members'], '</dd>
-							<dt>', $txt['average_posts'], ':</dt>
-							<dd>', $context['average_posts'], '</dd>
-							<dt>', $txt['average_topics'], ':</dt>
-							<dd>', $context['average_topics'], '</dd>
-							<dt>', $txt['total_boards'], ':</dt>
-							<dd>', $context['num_boards'], '</dd>
-							<dt>', $txt['latest_member'], ':</dt>
-							<dd>', $context['common_stats']['latest_member']['link'], '</dd>
-							<dt>', $txt['average_online'], ':</dt>
-							<dd>', $context['average_online'], '</dd>
-							<dt>', $txt['gender_ratio'], ':</dt>
-							<dd>', $context['gender']['ratio'], '</dd>';
-
-	if (!empty($modSettings['hitStats']))
-		echo '
-							<dt>', $txt['average_hits'], ':</dt>
-							<dd>', $context['average_hits'], '</dd>';
-
-	echo '
-						</dl>
-						<div class="clear"></div>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>
-		</div>
-		<div class="flow_hidden">
-			<div id="top_posters">
-				<div class="title_bar">
-					<h4 class="titlebg">
-						<span class="ie6_header floatleft">
-							<img src="', $settings['images_url'], '/stats_posters.png" class="icon" alt="" /> ', $txt['top_posters'], '
-						</span>
-					</h4>
-				</div>
-					<div class="windowbg2">
-						<span class="topslice"><span></span></span>
-						<div class="content">
-							<dl class="stats">';
-
-	foreach ($context['top_posters'] as $poster)
-	{
-		echo '
-								<dt>
-									', $poster['link'], '
-								</dt>
-								<dd class="statsbar">';
-
-		if (!empty($poster['post_percent']))
-			echo '
-									<div class="bar" style="width: ', $poster['post_percent'] + 4, 'px;">
-										<div style="width: ', $poster['post_percent'], 'px;"></div>
-									</div>';
-
-		echo '
-									<span class="righttext">', $poster['num_posts'], '</span>
-								</dd>';
-	}
-
-	echo '
-							</dl>
-							<div class="clear"></div>
-						</div>
-						<span class="botslice"><span></span></span>
-					</div>
-			</div>
-			<div id="top_boards">
-				<div class="title_bar">
-					<h4 class="titlebg">
-						<span class="ie6_header floatleft">
-							<img src="', $settings['images_url'], '/stats_board.png" class="icon" alt="" /> ', $txt['top_boards'], '
-						</span>
-					</h4>
-				</div>
-					<div class="windowbg2">
-						<span class="topslice"><span></span></span>
-						<div class="content">
-							<dl class="stats">';
-
-	foreach ($context['top_boards'] as $board)
-	{
-		echo '
-								<dt>
-									', $board['link'], '
-								</dt>
-								<dd class="statsbar">';
-
-		if (!empty($board['post_percent']))
-			echo '
-									<div class="bar" style="width: ', $board['post_percent'] + 4, 'px;">
-										<div style="width: ', $board['post_percent'], 'px;"></div>
-									</div>';
-		echo '
-									<span class="righttext">', $board['num_posts'], '</span>
-								</dd>';
-	}
-
-	echo '
-							</dl>
-							<div class="clear"></div>
-						</div>
-						<span class="botslice"><span></span></span>
-					</div>
-			</div>
-		</div>
-		<div class="flow_hidden">
-			<div id="top_topics_replies">
-				<div class="title_bar">
-					<h4 class="titlebg">
-						<span class="ie6_header floatleft">
-							<img src="', $settings['images_url'], '/stats_replies.png" class="icon" alt="" /> ', $txt['top_topics_replies'], '
-						</span>
-					</h4>
-				</div>
-					<div class="windowbg2">
-						<span class="topslice"><span></span></span>
-						<div class="content">
-							<dl class="stats">';
-
-	foreach ($context['top_topics_replies'] as $topic)
-	{
-		echo '
-								<dt>
-									', $topic['link'], '
-								</dt>
-								<dd class="statsbar">';
-		if (!empty($topic['post_percent']))
-			echo '
-									<div class="bar" style="width: ', $topic['post_percent'] + 4, 'px;">
-										<div style="width: ', $topic['post_percent'], 'px;"></div>
-									</div>';
-
-		echo '
-									<span class="righttext">' . $topic['num_replies'] . '</span>
-								</dd>';
-	}
-	echo '
-							</dl>
-							<div class="clear"></div>
-						</div>
-						<span class="botslice"><span></span></span>
-					</div>
-			</div>
-
-			<div id="top_topics_views">
-				<div class="title_bar">
-					<h4 class="titlebg">
-						<span class="ie6_header floatleft">
-							<img src="', $settings['images_url'], '/stats_views.png" class="icon" alt="" /> ', $txt['top_topics_views'], '
-						</span>
-					</h4>
-				</div>
-				<div class="windowbg2">
-					<span class="topslice"><span></span></span>
-					<div class="content">
-						<dl class="stats">';
-
-	foreach ($context['top_topics_views'] as $topic)
-	{
-		echo '
-							<dt>', $topic['link'], '</dt>
-							<dd class="statsbar">';
-
-		if (!empty($topic['post_percent']))
-			echo '
-								<div class="bar" style="width: ', $topic['post_percent'] + 4, 'px;">
-									<div style="width: ', $topic['post_percent'], 'px;"></div>
-								</div>';
-
-		echo '
-								<span class="righttext">' . $topic['num_views'] . '</span>
-							</dd>';
-	}
-
-	echo '
-						</dl>
-						<div class="clear"></div>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>
-		</div>
-		<div class="flow_hidden">
-			<div id="top_topics_starter">
-				<div class="title_bar">
-					<h4 class="titlebg">
-						<span class="ie6_header floatleft">
-							<img src="', $settings['images_url'], '/stats_replies.png" class="icon" alt="" /> ', $txt['top_starters'], '
-						</span>
-					</h4>
-				</div>
-				<div class="windowbg2">
-					<span class="topslice"><span></span></span>
-					<div class="content">
-						<dl class="stats">';
-
-	foreach ($context['top_starters'] as $poster)
-	{
-		echo '
-							<dt>
-								', $poster['link'], '
-							</dt>
-							<dd class="statsbar">';
-
-		if (!empty($poster['post_percent']))
-			echo '
-								<div class="bar" style="width: ', $poster['post_percent'] + 4, 'px;">
-									<div style="width: ', $poster['post_percent'], 'px;"></div>
-								</div>';
-
-		echo '
-								<span class="righttext">', $poster['num_topics'], '</span>
-							</dd>';
-	}
-
-	echo '
-						</dl>
-						<div class="clear"></div>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>
-			<div id="most_online">
-				<div class="title_bar">
-					<h4 class="titlebg">
-						<span class="ie6_header floatleft">
-							<img src="', $settings['images_url'], '/stats_views.png" class="icon" alt="" /> ', $txt['most_time_online'], '
-						</span>
-					</h4>
-				</div>
-				<div class="windowbg2">
-					<span class="topslice"><span></span></span>
-					<div class="content">
-						<dl class="stats">';
-
-	foreach ($context['top_time_online'] as $poster)
-	{
-		echo '
-							<dt>
-								', $poster['link'], '
-							</dt>
-							<dd class="statsbar">';
-
-		if (!empty($poster['time_percent']))
-			echo '
-								<div class="bar" style="width: ', $poster['time_percent'] + 4, 'px;">
-									<div style="width: ', $poster['time_percent'], 'px;"></div>
-								</div>';
-
-		echo '
-								<span>', $poster['time_online'], '</span>
-							</dd>';
-	}
-
-	echo '
-						</dl>
-						<div class="clear"></div>
-					</div>
-					<span class="botslice"><span></span></span>
-				</div>
-			</div>
-		</div>
-		<br class="clear" />
-		<div class="flow_hidden">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<span class="ie6_header floatleft">
-						<img src="', $settings['images_url'], '/stats_history.png" class="icon" alt="" /> ', $txt['forum_history'], '
-					</span>
-				</h3>
-			</div>';
-
-	if (!empty($context['yearly']))
-	{
-		echo '
-		<table border="0" width="100%" cellspacing="1" cellpadding="4" class="table_grid" id="stats">
-			<thead>
-				<tr class="titlebg" valign="middle" align="center">
-					<th class="first_th lefttext" width="25%">', $txt['yearly_summary'], '</th>
-					<th width="15%">', $txt['stats_new_topics'], '</th>
-					<th width="15%">', $txt['stats_new_posts'], '</th>
-					<th width="15%">', $txt['stats_new_members'], '</th>
-					<th', empty($modSettings['hitStats']) ? ' class="last_th"' : '', ' width="15%">', $txt['most_online'], '</th>';
-
-		if (!empty($modSettings['hitStats']))
-			echo '
-					<th class="last_th">', $txt['page_views'], '</th>';
-
-		echo '
-				</tr>
-			</thead>
-			<tbody>';
-
-		foreach ($context['yearly'] as $id => $year)
-		{
-			echo '
-				<tr class="windowbg2" valign="middle" align="center" id="year_', $id, '">
-					<th class="lefttext" width="25%">
-						<img id="year_img_', $id, '" src="', $settings['images_url'], '/selected_open.png" alt="*" /> <a href="#year_', $id, '" id="year_link_', $id, '">', $year['year'], '</a>
-					</th>
-					<th width="15%">', $year['new_topics'], '</th>
-					<th width="15%">', $year['new_posts'], '</th>
-					<th width="15%">', $year['new_members'], '</th>
-					<th width="15%">', $year['most_members_online'], '</th>';
-
-			if (!empty($modSettings['hitStats']))
-				echo '
-					<th>', $year['hits'], '</th>';
-
-			echo '
-				</tr>';
-
-			foreach ($year['months'] as $month)
-			{
-				echo '
-				<tr class="windowbg2" valign="middle" align="center" id="tr_month_', $month['id'], '">
-					<th class="stats_month">
-						<img src="', $settings['images_url'], '/', $month['expanded'] ? 'selected_open.png' : 'selected.png', '" alt="" id="img_', $month['id'], '" /> <a id="m', $month['id'], '" href="', $month['href'], '" onclick="return doingExpandCollapse;">', $month['month'], ' ', $month['year'], '</a>
-					</th>
-					<th width="15%">', $month['new_topics'], '</th>
-					<th width="15%">', $month['new_posts'], '</th>
-					<th width="15%">', $month['new_members'], '</th>
-					<th width="15%">', $month['most_members_online'], '</th>';
-
-				if (!empty($modSettings['hitStats']))
-					echo '
-					<th>', $month['hits'], '</th>';
-
-				echo '
-				</tr>';
-
-				if ($month['expanded'])
-				{
-					foreach ($month['days'] as $day)
-					{
-						echo '
-				<tr class="windowbg2" valign="middle" align="center" id="tr_day_', $day['year'], '-', $day['month'], '-', $day['day'], '">
-					<td class="stats_day">', $day['year'], '-', $day['month'], '-', $day['day'], '</td>
-					<td>', $day['new_topics'], '</td>
-					<td>', $day['new_posts'], '</td>
-					<td>', $day['new_members'], '</td>
-					<td>', $day['most_members_online'], '</td>';
-
-						if (!empty($modSettings['hitStats']))
-							echo '
-					<td>', $day['hits'], '</td>';
-
-						echo '
-				</tr>';
-					}
-				}
-			}
-		}
-
-		echo '
-			</tbody>
-		</table>
-		</div>
-	</div>
-	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/stats.js"></script>
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var oStatsCenter = new smf_StatsCenter({
-			sTableId: \'stats\',
-
-			reYearPattern: /year_(\d+)/,
-			sYearImageCollapsed: \'selected.png\',
-			sYearImageExpanded: \'selected_open.png\',
-			sYearImageIdPrefix: \'year_img_\',
-			sYearLinkIdPrefix: \'year_link_\',
-
-			reMonthPattern: /tr_month_(\d+)/,
-			sMonthImageCollapsed: \'selected.png\',
-			sMonthImageExpanded: \'selected_open.png\',
-			sMonthImageIdPrefix: \'img_\',
-			sMonthLinkIdPrefix: \'m\',
-
-			reDayPattern: /tr_day_(\d+-\d+-\d+)/,
-			sDayRowClassname: \'windowbg2\',
-			sDayRowIdPrefix: \'tr_day_\',
-
-			aCollapsedYears: [';
-
-		foreach ($context['collapsed_years'] as $id => $year)
-		{
-			echo '
-				\'', $year, '\'', $id != count($context['collapsed_years']) - 1 ? ',' : '';
-		}
-
-		echo '
-			],
-
-			aDataCells: [
-				\'date\',
-				\'new_topics\',
-				\'new_posts\',
-				\'new_members\',
-				\'most_members_online\'', empty($modSettings['hitStats']) ? '' : ',
-				\'hits\'', '
-			]
-		});
-	// ]]></script>';
-	}
-}
-
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+function template_main()
+{
+	global $context, $settings, $options, $txt, $scripturl, $modSettings;
+
+	echo '
+	<div id="statistics" class="main_section">
+		<div class="cat_bar">
+			<h3 class="catbg">', $context['page_title'], '</h3>
+		</div>
+		<div class="title_bar">
+			<h4 class="titlebg">
+				<img src="', $settings['images_url'], '/stats_info.png" class="icon" alt="" /> ', $txt['general_stats'], '
+			</h4>
+		</div>
+		<div class="flow_hidden">
+			<div id="stats_left">
+				<div class="windowbg2">
+					<div class="content top_row">
+						<dl class="stats">
+							<dt>', $txt['total_members'], ':</dt>
+							<dd>', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $context['num_members'] . '</a>' : $context['num_members'], '</dd>
+							<dt>', $txt['total_posts'], ':</dt>
+							<dd>', $context['num_posts'], '</dd>
+							<dt>', $txt['total_topics'], ':</dt>
+							<dd>', $context['num_topics'], '</dd>
+							<dt>', $txt['total_cats'], ':</dt>
+							<dd>', $context['num_categories'], '</dd>
+							<dt>', $txt['users_online'], ':</dt>
+							<dd>', $context['users_online'], '</dd>
+							<dt>', $txt['most_online'], ':</dt>
+							<dd>', $context['most_members_online']['number'], ' - ', $context['most_members_online']['date'], '</dd>
+							<dt>', $txt['users_online_today'], ':</dt>
+							<dd>', $context['online_today'], '</dd>';
+
+	if (!empty($modSettings['hitStats']))
+		echo '
+							<dt>', $txt['num_hits'], ':</dt>
+							<dd>', $context['num_hits'], '</dd>';
+
+	echo '
+						</dl>
+					</div>
+				</div>
+			</div>
+			<div id="stats_right">
+				<div class="windowbg2">
+					<div class="content top_row">
+						<dl class="stats">
+							<dt>', $txt['average_members'], ':</dt>
+							<dd>', $context['average_members'], '</dd>
+							<dt>', $txt['average_posts'], ':</dt>
+							<dd>', $context['average_posts'], '</dd>
+							<dt>', $txt['average_topics'], ':</dt>
+							<dd>', $context['average_topics'], '</dd>
+							<dt>', $txt['total_boards'], ':</dt>
+							<dd>', $context['num_boards'], '</dd>
+							<dt>', $txt['latest_member'], ':</dt>
+							<dd>', $context['common_stats']['latest_member']['link'], '</dd>
+							<dt>', $txt['average_online'], ':</dt>
+							<dd>', $context['average_online'], '</dd>
+							<dt>', $txt['gender_ratio'], ':</dt>
+							<dd>', $context['gender']['ratio'], '</dd>';
+
+	if (!empty($modSettings['hitStats']))
+		echo '
+							<dt>', $txt['average_hits'], ':</dt>
+							<dd>', $context['average_hits'], '</dd>';
+
+	echo '
+						</dl>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="flow_hidden">
+			<div id="top_posters">
+				<div class="title_bar">
+					<h4 class="titlebg">
+						<img src="', $settings['images_url'], '/stats_posters.png" class="icon" alt="" /> ', $txt['top_posters'], '
+					</h4>
+				</div>
+					<div class="windowbg2">
+						<div class="content">
+							<dl class="stats">';
+
+	foreach ($context['top_posters'] as $poster)
+	{
+		echo '
+								<dt>
+									', $poster['link'], '
+								</dt>
+								<dd class="statsbar">';
+
+		if (!empty($poster['post_percent']))
+			echo '
+									<div class="bar" style="width: ', $poster['post_percent'] + 4, 'px;">
+										<div style="width: ', $poster['post_percent'], 'px;"></div>
+									</div>';
+
+		echo '
+									<span class="righttext">', $poster['num_posts'], '</span>
+								</dd>';
+	}
+
+	echo '
+							</dl>
+						</div>
+					</div>
+			</div>
+			<div id="top_boards">
+				<div class="title_bar">
+					<h4 class="titlebg">
+						<img src="', $settings['images_url'], '/stats_board.png" class="icon" alt="" /> ', $txt['top_boards'], '
+					</h4>
+				</div>
+					<div class="windowbg2">
+						<div class="content">
+							<dl class="stats">';
+
+	foreach ($context['top_boards'] as $board)
+	{
+		echo '
+								<dt>
+									', $board['link'], '
+								</dt>
+								<dd class="statsbar">';
+
+		if (!empty($board['post_percent']))
+			echo '
+									<div class="bar" style="width: ', $board['post_percent'] + 4, 'px;">
+										<div style="width: ', $board['post_percent'], 'px;"></div>
+									</div>';
+		echo '
+									<span class="righttext">', $board['num_posts'], '</span>
+								</dd>';
+	}
+
+	echo '
+							</dl>
+						</div>
+					</div>
+			</div>
+		</div>
+		<div class="flow_hidden">
+			<div id="top_topics_replies">
+				<div class="title_bar">
+					<h4 class="titlebg">
+						<img src="', $settings['images_url'], '/stats_replies.png" class="icon" alt="" /> ', $txt['top_topics_replies'], '
+					</h4>
+				</div>
+					<div class="windowbg2">
+						<div class="content">
+							<dl class="stats">';
+
+	foreach ($context['top_topics_replies'] as $topic)
+	{
+		echo '
+								<dt>
+									', $topic['link'], '
+								</dt>
+								<dd class="statsbar">';
+		if (!empty($topic['post_percent']))
+			echo '
+									<div class="bar" style="width: ', $topic['post_percent'] + 4, 'px;">
+										<div style="width: ', $topic['post_percent'], 'px;"></div>
+									</div>';
+
+		echo '
+									<span class="righttext">' . $topic['num_replies'] . '</span>
+								</dd>';
+	}
+	echo '
+							</dl>
+						</div>
+					</div>
+			</div>
+
+			<div id="top_topics_views">
+				<div class="title_bar">
+					<h4 class="titlebg">
+						<img src="', $settings['images_url'], '/stats_views.png" class="icon" alt="" /> ', $txt['top_topics_views'], '
+					</h4>
+				</div>
+				<div class="windowbg2">
+					<div class="content">
+						<dl class="stats">';
+
+	foreach ($context['top_topics_views'] as $topic)
+	{
+		echo '
+							<dt>', $topic['link'], '</dt>
+							<dd class="statsbar">';
+
+		if (!empty($topic['post_percent']))
+			echo '
+								<div class="bar" style="width: ', $topic['post_percent'] + 4, 'px;">
+									<div style="width: ', $topic['post_percent'], 'px;"></div>
+								</div>';
+
+		echo '
+								<span class="righttext">' . $topic['num_views'] . '</span>
+							</dd>';
+	}
+
+	echo '
+						</dl>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="flow_hidden">
+			<div id="top_topics_starter">
+				<div class="title_bar">
+					<h4 class="titlebg">
+						<img src="', $settings['images_url'], '/stats_replies.png" class="icon" alt="" /> ', $txt['top_starters'], '
+					</h4>
+				</div>
+				<div class="windowbg2">
+					<div class="content">
+						<dl class="stats">';
+
+	foreach ($context['top_starters'] as $poster)
+	{
+		echo '
+							<dt>
+								', $poster['link'], '
+							</dt>
+							<dd class="statsbar">';
+
+		if (!empty($poster['post_percent']))
+			echo '
+								<div class="bar" style="width: ', $poster['post_percent'] + 4, 'px;">
+									<div style="width: ', $poster['post_percent'], 'px;"></div>
+								</div>';
+
+		echo '
+								<span class="righttext">', $poster['num_topics'], '</span>
+							</dd>';
+	}
+
+	echo '
+						</dl>
+					</div>
+				</div>
+			</div>
+			<div id="most_online">
+				<div class="title_bar">
+					<h4 class="titlebg">
+						<img src="', $settings['images_url'], '/stats_views.png" class="icon" alt="" /> ', $txt['most_time_online'], '
+					</h4>
+				</div>
+				<div class="windowbg2">
+					<div class="content">
+						<dl class="stats">';
+
+	foreach ($context['top_time_online'] as $poster)
+	{
+		echo '
+							<dt>
+								', $poster['link'], '
+							</dt>
+							<dd class="statsbar">';
+
+		if (!empty($poster['time_percent']))
+			echo '
+								<div class="bar" style="width: ', $poster['time_percent'] + 4, 'px;">
+									<div style="width: ', $poster['time_percent'], 'px;"></div>
+								</div>';
+
+		echo '
+								<span>', $poster['time_online'], '</span>
+							</dd>';
+	}
+
+	echo '
+						</dl>
+					</div>
+				</div>
+			</div>
+		</div>
+		<br class="clear" />
+		<div class="flow_hidden">
+			<div class="cat_bar">
+				<h3 class="catbg">
+					<img src="', $settings['images_url'], '/stats_history.png" class="icon" alt="" /> ', $txt['forum_history'], '
+				</h3>
+			</div>';
+
+	if (!empty($context['yearly']))
+	{
+		echo '
+		<table border="0" width="100%" cellspacing="1" cellpadding="4" class="table_grid" id="stats">
+			<thead>
+				<tr class="titlebg" valign="middle" align="center">
+					<th class="first_th lefttext" width="25%">', $txt['yearly_summary'], '</th>
+					<th width="15%">', $txt['stats_new_topics'], '</th>
+					<th width="15%">', $txt['stats_new_posts'], '</th>
+					<th width="15%">', $txt['stats_new_members'], '</th>
+					<th', empty($modSettings['hitStats']) ? ' class="last_th"' : '', ' width="15%">', $txt['most_online'], '</th>';
+
+		if (!empty($modSettings['hitStats']))
+			echo '
+					<th class="last_th">', $txt['page_views'], '</th>';
+
+		echo '
+				</tr>
+			</thead>
+			<tbody>';
+
+		foreach ($context['yearly'] as $id => $year)
+		{
+			echo '
+				<tr class="windowbg2" valign="middle" align="center" id="year_', $id, '">
+					<th class="lefttext" width="25%">
+						<img id="year_img_', $id, '" src="', $settings['images_url'], '/selected_open.png" alt="*" /> <a href="#year_', $id, '" id="year_link_', $id, '">', $year['year'], '</a>
+					</th>
+					<th width="15%">', $year['new_topics'], '</th>
+					<th width="15%">', $year['new_posts'], '</th>
+					<th width="15%">', $year['new_members'], '</th>
+					<th width="15%">', $year['most_members_online'], '</th>';
+
+			if (!empty($modSettings['hitStats']))
+				echo '
+					<th>', $year['hits'], '</th>';
+
+			echo '
+				</tr>';
+
+			foreach ($year['months'] as $month)
+			{
+				echo '
+				<tr class="windowbg2" valign="middle" align="center" id="tr_month_', $month['id'], '">
+					<th class="stats_month">
+						<img src="', $settings['images_url'], '/', $month['expanded'] ? 'selected_open.png' : 'selected.png', '" alt="" id="img_', $month['id'], '" /> <a id="m', $month['id'], '" href="', $month['href'], '" onclick="return doingExpandCollapse;">', $month['month'], ' ', $month['year'], '</a>
+					</th>
+					<th width="15%">', $month['new_topics'], '</th>
+					<th width="15%">', $month['new_posts'], '</th>
+					<th width="15%">', $month['new_members'], '</th>
+					<th width="15%">', $month['most_members_online'], '</th>';
+
+				if (!empty($modSettings['hitStats']))
+					echo '
+					<th>', $month['hits'], '</th>';
+
+				echo '
+				</tr>';
+
+				if ($month['expanded'])
+				{
+					foreach ($month['days'] as $day)
+					{
+						echo '
+				<tr class="windowbg2" valign="middle" align="center" id="tr_day_', $day['year'], '-', $day['month'], '-', $day['day'], '">
+					<td class="stats_day">', $day['year'], '-', $day['month'], '-', $day['day'], '</td>
+					<td>', $day['new_topics'], '</td>
+					<td>', $day['new_posts'], '</td>
+					<td>', $day['new_members'], '</td>
+					<td>', $day['most_members_online'], '</td>';
+
+						if (!empty($modSettings['hitStats']))
+							echo '
+					<td>', $day['hits'], '</td>';
+
+						echo '
+				</tr>';
+					}
+				}
+			}
+		}
+
+		echo '
+			</tbody>
+		</table>
+		</div>
+	</div>
+	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/stats.js"></script>
+	<script type="text/javascript"><!-- // --><![CDATA[
+		var oStatsCenter = new smf_StatsCenter({
+			sTableId: \'stats\',
+
+			reYearPattern: /year_(\d+)/,
+			sYearImageCollapsed: \'selected.png\',
+			sYearImageExpanded: \'selected_open.png\',
+			sYearImageIdPrefix: \'year_img_\',
+			sYearLinkIdPrefix: \'year_link_\',
+
+			reMonthPattern: /tr_month_(\d+)/,
+			sMonthImageCollapsed: \'selected.png\',
+			sMonthImageExpanded: \'selected_open.png\',
+			sMonthImageIdPrefix: \'img_\',
+			sMonthLinkIdPrefix: \'m\',
+
+			reDayPattern: /tr_day_(\d+-\d+-\d+)/,
+			sDayRowClassname: \'windowbg2\',
+			sDayRowIdPrefix: \'tr_day_\',
+
+			aCollapsedYears: [';
+
+		foreach ($context['collapsed_years'] as $id => $year)
+		{
+			echo '
+				\'', $year, '\'', $id != count($context['collapsed_years']) - 1 ? ',' : '';
+		}
+
+		echo '
+			],
+
+			aDataCells: [
+				\'date\',
+				\'new_topics\',
+				\'new_posts\',
+				\'new_members\',
+				\'most_members_online\'', empty($modSettings['hitStats']) ? '' : ',
+				\'hits\'', '
+			]
+		});
+	// ]]></script>';
+	}
+}
+
 ?>

+ 542 - 531
Themes/default/css/admin.css

@@ -1,531 +1,542 @@
-/* Styles for the admin quick search.
-------------------------------------------------------- */
-
-h3.catbg #quick_search form {
-	padding: .8em;
-	line-height: 0.9em;
-	font-size: 0.8em !important;
-}
-h3.catbg #quick_search form select {
-	height: 1.65em;
-	line-height: 0.9em;
-	font-size: 1em;
-	margin: 0 0.2em 0 0;
-}
-ol.search_results {
-	margin-top: 0;
-	padding-top: 0;
-}
-ol.search_results li {
-	padding-top: 1em;
-	border-bottom: 1px solid #ccc;
-}
-
-/* Styles for the core features screen.
-------------------------------------------------------- */
-.features {
-	padding: 0 1em !important;
-	overflow: auto;
-}
-.features_image {
-	float: left;
-	margin: 0 2em 0.5em 1em;
-}
-.features_switch {
-	margin: 0.2em 1em 1em 1em;
-	float: right;
-}
-.features h4 {
-	padding: 1em 0 0.5em 0.5em;
-	margin: 0;
-	font-size: 1.1em;
-}
-.features p {
-	padding: 0 1em;
-	margin: 0;
-}
-
-/* Styles for the admin home screen bar.
-------------------------------------------------------- */
-#admin_main_section {
-	overflow: hidden;
-	margin: 1em 0;
-}
-#admincenter .content {
-	padding: 1em;
-}
-
-#live_news {
-	width: 64%;
-}
-#live_news div.content {
-	padding: 0;
-	font-size: 0.85em;
-}
-#live_news div.content dl {
-	padding: 0.5em 0 0 0.5em;
-}
-
-#supportVersionsTable {
-	width: 34%;
-}
-#version_details {
-	overflow: auto;
-	height: 12em;
-}
-#smfAnnouncements {
-	height: 16.5em;
-	padding: 0 0.5em;
-	overflow: auto;
-}
-#smfAnnouncements dt {
-	border-bottom: 1px dashed #000;
-}
-#smfAnnouncements dd {
-	padding: 0;
-	margin: 0 0 1em 1.5em;
-}
-#update_section {
-	margin: 0.5em 0 0;
-}
-
-#quick_tasks, #quick_tasks ul {
-	margin: 0;
-	padding: 0;
-}
-#quick_tasks li {
-	float: left;
-	list-style-type: none;
-	margin: 0;
-	padding: 0.5em 0;
-	width: 49.5%;
-	height: 4.5em;
-}
-.quick_task {
-	display: block;
-	width: 100%;
-	margin: 0 1em;
-	padding: 0;
-}
-.home_image {
-	float: left;
-	margin: 0 1em 1em 1em;
-}
-
-/* Common admin center classes.
-------------------------------------------------------- */
-hr.hrcolor {
-	margin: 10px 0;
-}
-h3.titlebg form {
-	font-size: 80%;
-}
-.windowbg.nopadding {
-	margin: 0.3em 0 0 0;
-	padding: 0;
-}
-.windowbg ol {
-	margin-top: 0;
-	margin-bottom: 0;
-}
-
-.table_caption, tr.table_caption td {
-	color: #000;
-	font-size: 10px;
-	font-weight: bold;
-}
-.additional_row div.floatleft {
-	padding: 0 0.8em;
-}
-fieldset {
-	margin-bottom: 0.5em;
-	border: 1px solid #cacdd3;
-	padding: 0.5em;
-}
-fieldset dl {
-	margin: 0;
-}
-legend {
-	font-weight: bold;
-	color: #000;
-}
-.information a {
-	font-weight: bold;
-}
-
-/* Styles for the package manager.
-------------------------------------------------- */
-#package_list .tborder {
-	margin: .25em 0 .25em 26px;
-}
-#package_list ol, #package_list ol li {
-	list-style: decimal;
-	margin-left: 50px;
-	border: none;
-}
-#package_list ol ul, #package_list ol ul li {
-	margin-left: 0;
-	list-style: none;
-}
-#package_list {
-	list-style-type: none;
-}
-#package_list li {
-	border: 1px solid #cacdd3;
-	padding: 0.2em;
-	margin: 1px;
-}
-.description {
-	max-height: 15em;
-	overflow: auto;
-	padding-bottom: .5em;
-}
-.information {
-	max-height: 15em;
-	overflow: auto;
-	padding-bottom: .5em;
-}
-.package_section {
-	border: 1px solid #cacdd3;
-}
-ul.packages li {
-	border: none !important;
-	list-style: none;
-}
-code#find_code, code#replace_code {
-	display: block;
-	font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
-	font-size: x-small;
-	background: #eef;
-	line-height: 1.5em;
-	padding: 3px 1em;
-	overflow: auto;
-	white-space: pre;
-	/* Show a scrollbar after about 24 lines. */
-	max-height: 24em;
-}
-span.package_server {
-	padding: 0 3em;
-}
-ul.package_servers {
-	margin: 0;
-	padding: 0;
-}
-ul.package_servers li {
-	list-style-type: none;
-}
-pre.file_content {
-	overflow: auto;
-	width: 100%;
-	padding-bottom: 1em;
-}
-.operation {
-	padding: 0 1em;
-}
-
-/* Styles for the file permissions section.
-------------------------------------------------- */
-.filepermissions {
-	font-size: 0.8em;
-	white-space: nowrap;
-}
-.fperm {
-	display: block;
-	width: 35%;
-	text-align: center;
-}
-.perm_read {
-	background-color: #d1f7bf;
-}
-.perm_write {
-	background-color: #ffbbbb;
-}
-.perm_execute {
-	background-color: #fdd7af;
-}
-.perm_custom {
-	background-color: #c2c6c0;
-}
-.perm_nochange {
-	background-color: #eee;
-}
-
-/* Styles for the BBC permissions
-------------------------------------------------- */
-.list_bbc {
-	width: 33%;
-}
-
-/* Styles for the manage boards section.
-------------------------------------------------- */
-#manage_boards ul {
-	padding: 0;
-	margin: 0 0 0.6em 0;
-	max-height: 30em;
-	overflow: auto;
-}
-#manage_boards li {
-	list-style-type: none;
-	border: 1px solid #cacdd3;
-	padding: 0.2em;
-	margin: 1px;
-	clear: right;
-}
-#manage_boards li img {
-	vertical-align: middle;
-	padding-bottom: 3px;
-}
-#manage_boards li#recycle_board {
-	background-color: #dee;
-}
-.move_links {
-	padding: 0 13px 0 0;
-}
-.modify_boards {
-	padding: 0 0.5em;
-}
-#manage_boards span.post_group, #manage_boards span.regular_members {
-	border-bottom: 1px dotted #000;
-	cursor: help;
-}
-.select_all_box {
-	display:none;
-}
-
-/* Styles for the manage members section.
-------------------------------------------------- */
-.msearch_details {
-	display: block;
-	width: 49%;
-}
-dl.right dt {
-	padding-right: 10px;
-}
-
-/* Styles for the manage maintenance section.
-------------------------------------------------- */
-.maintenance_finished, #task_completed {
-	background:#B7FCA7 url(../images/warning_watch.png) center no-repeat;
-	background-position:8px 50%;
-	text-align:left;
-	border-top:1px solid green;
-	border-bottom:1px solid green;
-	padding:4px 10px 2px 30px;
-	margin-bottom: 1em;
-}
-/* Styles for the manage calendar section.
-------------------------------------------------- */
-dl.settings dt.small_caption {
-	width: 20%;
-}
-dl.settings dd.small_caption {
-	width: 79%;
-}
-/* Styles for the manage permissions section.
-------------------------------------------------- */
-dl.admin_permissions dt {
-	width: 35%;
-}
-dl.admin_permissions dd {
-	width: 64%;
-}
-
-/* Styles for the manage search section.
-------------------------------------------------- */
-dl.settings dt.large_caption {
-	width: 70%;
-}
-dl.settings dd.large_caption {
-	width: 29%;
-}
-span.search_weight {
-	width: 40px;
-	padding: 0 0.5em;
-	text-align: right;
-}
-.search_settings {
-	width: 47%;
-}
-
-/* Styles for the manage bans section.
-------------------------------------------------- */
-.ban_restriction {
-	margin: 0.2em 0 0.2em 2.2em;
-}
-.ban_settings {
-	width: 46%;
-}
-#manage_bans dl {
-	margin-bottom: 1em;
-}
-#manage_bans fieldset dl.settings {
-	margin-bottom: 0;
-}
-
-/* Styles for the manage subscriptions section.
-------------------------------------------------- */
-#fixed_area {
-	width: 97%;
-}
-ul.pending_payments {
-	margin: 0;
-	padding: 0;
-}
-ul.pending_payments li {
-	list-style-type: none;
-}
-
-/* Styles for the manage permissions section.
-------------------------------------------------- */
-.perm_name, .perm_profile, .perm_board {
-	display: block;
-	width: 40%;
-}
-.perm_boards {
-	padding: 0;
-	margin: 0 0 0.6em 0;
-}
-.perm_boards li {
-	list-style-type: none;
-	border: 1px solid #cacdd3;
-	padding: 0.2em;
-	margin: 1px;
-}
-.perm_groups {
-	background-color: #fff;
-}
-.perm_classic {
-	margin: 0.2em;
-}
-.permission_groups {
-	padding: 0;
-	margin: 0;
-}
-.permission_groups li {
-	list-style-type: none;
-	padding: 0.2em;
-	margin: 1px;
-}
-.perms {
-	width: 20px;
-	display: inline-block;
-	text-align: center;
-}
-
-/* Styles for the themes section.
-------------------------------------------------- */
-ul.theme_options {
-	padding: 0;
-	margin: 0;
-}
-ul.theme_options li {
-	list-style: none;
-	padding: 0.4em;
-}
-.is_directory {
-	padding-left: 18px;
-	background: url(../images/admin/boards.png) no-repeat;
-}
-.edit_file {
-	width: 96%;
-	font-family: monospace;
-	margin-top: 1ex;
-	white-space: pre;
-}
-
-dl.themes_list {
-	margin: 0;
-}
-dl.themes_list dt {
-	margin-bottom: 3px;
-}
-dl.themes_list dd {
-	font-style: italic;
-	white-space: nowrap;
-}
-
-/* Styles for the registration center.
-------------------------------------------------- */
-.agreement, .reserved_names {
-	padding: 0;
-}
-#agreement, #reserved {
-	width: 99%;
-}
-
-/* Styles for the moderation center.
-------------------------------------------------- */
-#modcenter {
-	display: block;
-	width: 100%;
-}
-.modblock_left {
-	width: 49%;
-	float: left;
-	clear: right;
-	margin: 0 0 1em 0;
-}
-.modblock_right {
-	width: 49%;
-	float: right;
-	margin: 0 0 1em 0;
-}
-
-.modbox {
-	height: 14em;
-	overflow: auto;
-}
-/* Moderation Notes */
-ul.moderation_notes {
-	margin: 0;
-	padding: 0;
-	list-style: none;
-	overflow: auto;
-	height: 10.2em;
-}
-ul.moderation_notes li {
-	padding: 0.2em;
-	border-bottom: 1px solid #cccccc;
-}
-.notes {
-	margin-top: 0.4em;
-}
-.post_note {
-	width: 85%;
-}
-
-/* Styles for the error log.
-------------------------------------------------- */
-
-h3.grid_header {
-	height: 25px;
-}
-#error_log {
-	width: 100%;
-}
-#error_log tr.windowbg td, #error_log tr.windowbg2 td {
-	padding: 8px;
-	line-height: 160%;
-}
-#error_log td.half_width {
-	width: 50%;
-}
-#error_log td.checkbox_column {
-	width: 15px;
-	vertical-align: top;
-	text-align: center;
-}
-#error_log td div.marginleft {
-	margin: 0 0 0 1ex;
-}
-#manage_boards span.botslice, #manage_maintenance span.botslice, #manage_mail span.botslice {
-	margin-bottom: 4px;
-}
-
-/* Styles for the Report generation 
-------------------------------------------------- */
-#report_buttons {
-    min-height: 2em;
-    padding-left: 0;
-	padding-bottom: 2px;
-}
+/* Styles for the admin quick search.
+------------------------------------------------------- */
+
+h3.catbg #quick_search form {
+	margin: -1px 0 -3px 0;
+	padding: 0;
+	line-height: 0.9em;
+	font-size: 0.8em !important;
+}
+h3.catbg #quick_search form input {
+	padding: 3px 3px 3px 3px;
+}
+h3.catbg #quick_search form select {
+	height: 2.2em; 
+	line-height: 1.2em;
+	font-size: 0.9em;
+	margin: 0 0.2em 0 0;
+	padding: 3px 3px 3px 3px;
+}
+h3.catbg #quick_search form select option {
+	padding: 3px 8px 3px 3px;
+}
+h3.catbg #quick_search form .button_submit {
+	padding: 2px 3px 2px 3px;
+}
+ol.search_results {
+	margin-top: 0;
+	padding-top: 0;
+}
+ol.search_results li {
+	padding-top: 1em;
+	border-bottom: 1px solid #ccc;
+}
+
+/* Styles for the core features screen.
+------------------------------------------------------- */
+.features {
+	padding: 0 1em !important;
+	overflow: auto;
+}
+.features_image {
+	float: left;
+	margin: 0 2em 0.5em 1em;
+}
+.features_switch {
+	margin: 0.2em 1em 1em 1em;
+	float: right;
+}
+.features h4 {
+	padding: 1em 0 0.5em 0.5em;
+	margin: 0;
+	font-size: 1.1em;
+}
+.features p {
+	padding: 0 1em;
+	margin: 0;
+}
+
+/* Styles for the admin home screen bar.
+------------------------------------------------------- */
+#admin_main_section {
+	overflow: hidden;
+	margin: 1em 0;
+}
+#admincenter .content {
+	padding: 1em;
+}
+
+#live_news {
+	width: 64%;
+}
+#live_news div.content {
+	padding: 0;
+	font-size: 0.85em;
+}
+#live_news div.content dl {
+	padding: 0.5em 0 0 0.5em;
+}
+
+#supportVersionsTable {
+	width: 34%;
+}
+#version_details {
+	overflow: auto;
+	height: 12em;
+}
+#smfAnnouncements {
+	height: 16.5em;
+	padding: 0 0.5em;
+	overflow: auto;
+}
+#smfAnnouncements dt {
+	border-bottom: 1px dashed #000;
+}
+#smfAnnouncements dd {
+	padding: 0;
+	margin: 0 0 1em 1.5em;
+}
+#update_section {
+	margin: 0.5em 0 0;
+}
+
+#quick_tasks, #quick_tasks ul {
+	margin: 0;
+	padding: 0;
+}
+#quick_tasks li {
+	float: left;
+	list-style-type: none;
+	margin: 0;
+	padding: 0.5em 0;
+	width: 49.5%;
+	height: 4.5em;
+}
+.quick_task {
+	display: block;
+	width: 100%;
+	margin: 0 1em;
+	padding: 0;
+}
+.home_image {
+	float: left;
+	margin: 0 1em 1em 1em;
+}
+
+/* Common admin center classes.
+------------------------------------------------------- */
+hr.hrcolor {
+	margin: 10px 0;
+}
+h3.titlebg form {
+	font-size: 80%;
+}
+.windowbg.nopadding {
+	margin: 0.3em 0 0 0;
+	padding: 0;
+}
+.windowbg ol {
+	margin-top: 0;
+	margin-bottom: 0;
+}
+
+.table_caption, tr.table_caption td {
+	color: #000;
+	font-size: 10px;
+	font-weight: bold;
+}
+.additional_row div.floatleft {
+	padding: 0 0.8em;
+}
+fieldset {
+	margin-bottom: 0.5em;
+	border: 1px solid #cacdd3;
+	padding: 0.5em;
+}
+fieldset dl {
+	margin: 0;
+}
+legend {
+	font-weight: bold;
+	color: #000;
+}
+.information a {
+	font-weight: bold;
+}
+
+/* Styles for the package manager.
+------------------------------------------------- */
+#package_list .tborder {
+	margin: .25em 0 .25em 26px;
+}
+#package_list ol, #package_list ol li {
+	list-style: decimal;
+	margin-left: 50px;
+	border: none;
+}
+#package_list ol ul, #package_list ol ul li {
+	margin-left: 0;
+	list-style: none;
+}
+#package_list {
+	list-style-type: none;
+}
+#package_list li {
+	border: 1px solid #cacdd3;
+	padding: 0.2em;
+	margin: 1px;
+}
+.description {
+	max-height: 15em;
+	overflow: auto;
+	padding-bottom: .5em;
+}
+.information {
+	max-height: 15em;
+	overflow: auto;
+	padding-bottom: .5em;
+}
+.package_section {
+	border: 1px solid #cacdd3;
+}
+ul.packages li {
+	border: none !important;
+	list-style: none;
+}
+code#find_code, code#replace_code {
+	display: block;
+	font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
+	font-size: x-small;
+	background: #eef;
+	line-height: 1.5em;
+	padding: 3px 1em;
+	overflow: auto;
+	white-space: pre;
+	/* Show a scrollbar after about 24 lines. */
+	max-height: 24em;
+}
+span.package_server {
+	padding: 0 3em;
+}
+ul.package_servers {
+	margin: 0;
+	padding: 0;
+}
+ul.package_servers li {
+	list-style-type: none;
+}
+pre.file_content {
+	overflow: auto;
+	width: 100%;
+	padding-bottom: 1em;
+}
+.operation {
+	padding: 0 1em;
+}
+
+/* Styles for the file permissions section.
+------------------------------------------------- */
+.filepermissions {
+	font-size: 0.8em;
+	white-space: nowrap;
+}
+.fperm {
+	display: block;
+	width: 35%;
+	text-align: center;
+}
+.perm_read {
+	background-color: #d1f7bf;
+}
+.perm_write {
+	background-color: #ffbbbb;
+}
+.perm_execute {
+	background-color: #fdd7af;
+}
+.perm_custom {
+	background-color: #c2c6c0;
+}
+.perm_nochange {
+	background-color: #eee;
+}
+
+/* Styles for the BBC permissions
+------------------------------------------------- */
+.list_bbc {
+	width: 33%;
+}
+
+/* Styles for the manage boards section.
+------------------------------------------------- */
+#manage_boards ul {
+	padding: 0;
+	margin: 0 0 0.6em 0;
+	max-height: 30em;
+	overflow: auto;
+}
+#manage_boards li {
+	list-style-type: none;
+	border: 1px solid #cacdd3;
+	padding: 0.2em;
+	margin: 1px;
+	clear: right;
+}
+#manage_boards li img {
+	vertical-align: middle;
+	padding-bottom: 3px;
+}
+#manage_boards li#recycle_board {
+	background-color: #dee;
+}
+.move_links {
+	padding: 0 13px 0 0;
+}
+.modify_boards {
+	padding: 0 0.5em;
+}
+#manage_boards span.post_group, #manage_boards span.regular_members {
+	border-bottom: 1px dotted #000;
+	cursor: help;
+}
+.select_all_box {
+	display:none;
+}
+
+/* Styles for the manage members section.
+------------------------------------------------- */
+.msearch_details {
+	display: block;
+	width: 49%;
+}
+dl.right dt {
+	padding-right: 10px;
+}
+
+/* Styles for the manage maintenance section.
+------------------------------------------------- */
+.maintenance_finished, #task_completed {
+	background:#B7FCA7 url(../images/warning_watch.png) center no-repeat;
+	background-position:8px 50%;
+	text-align:left;
+	border-top:1px solid green;
+	border-bottom:1px solid green;
+	padding:4px 10px 2px 30px;
+	margin-bottom: 1em;
+}
+/* Styles for the manage calendar section.
+------------------------------------------------- */
+dl.settings dt.small_caption {
+	width: 20%;
+}
+dl.settings dd.small_caption {
+	width: 79%;
+}
+/* Styles for the manage permissions section.
+------------------------------------------------- */
+dl.admin_permissions dt {
+	width: 35%;
+}
+dl.admin_permissions dd {
+	width: 64%;
+}
+
+/* Styles for the manage search section.
+------------------------------------------------- */
+dl.settings dt.large_caption {
+	width: 70%;
+}
+dl.settings dd.large_caption {
+	width: 29%;
+}
+span.search_weight {
+	width: 40px;
+	padding: 0 0.5em;
+	text-align: right;
+}
+.search_settings {
+	width: 47%;
+}
+
+/* Styles for the manage bans section.
+------------------------------------------------- */
+.ban_restriction {
+	margin: 0.2em 0 0.2em 2.2em;
+}
+.ban_settings {
+	width: 46%;
+}
+#manage_bans dl {
+	margin-bottom: 1em;
+}
+#manage_bans fieldset dl.settings {
+	margin-bottom: 0;
+}
+
+/* Styles for the manage subscriptions section.
+------------------------------------------------- */
+#fixed_area {
+	width: 97%;
+}
+ul.pending_payments {
+	margin: 0;
+	padding: 0;
+}
+ul.pending_payments li {
+	list-style-type: none;
+}
+
+/* Styles for the manage permissions section.
+------------------------------------------------- */
+.perm_name, .perm_profile, .perm_board {
+	display: block;
+	width: 40%;
+}
+.perm_boards {
+	padding: 0;
+	margin: 0 0 0.6em 0;
+}
+.perm_boards li {
+	list-style-type: none;
+	border: 1px solid #cacdd3;
+	padding: 0.2em;
+	margin: 1px;
+}
+.perm_groups {
+	background-color: #fff;
+}
+.perm_classic {
+	margin: 0.2em;
+}
+.permission_groups {
+	padding: 0;
+	margin: 0;
+}
+.permission_groups li {
+	list-style-type: none;
+	padding: 0.2em;
+	margin: 1px;
+}
+.perms {
+	width: 20px;
+	display: inline-block;
+	text-align: center;
+}
+
+/* Styles for the themes section.
+------------------------------------------------- */
+ul.theme_options {
+	padding: 0;
+	margin: 0;
+}
+ul.theme_options li {
+	list-style: none;
+	padding: 0.4em;
+}
+.is_directory {
+	padding-left: 18px;
+	background: url(../images/admin/boards.png) no-repeat;
+}
+.edit_file {
+	width: 96%;
+	font-family: monospace;
+	margin-top: 1ex;
+	white-space: pre;
+}
+
+dl.themes_list {
+	margin: 0;
+}
+dl.themes_list dt {
+	margin-bottom: 3px;
+}
+dl.themes_list dd {
+	font-style: italic;
+	white-space: nowrap;
+}
+
+/* Styles for the registration center.
+------------------------------------------------- */
+.agreement, .reserved_names {
+	padding: 0;
+}
+#agreement, #reserved {
+	width: 99%;
+}
+
+/* Styles for the moderation center.
+------------------------------------------------- */
+#modcenter {
+	display: block;
+	width: 100%;
+}
+.modblock_left {
+	width: 49%;
+	float: left;
+	clear: right;
+	margin: 0 0 1em 0;
+}
+.modblock_right {
+	width: 49%;
+	float: right;
+	margin: 0 0 1em 0;
+}
+
+.modbox {
+	height: 14em;
+	overflow: auto;
+}
+/* Moderation Notes */
+ul.moderation_notes {
+	margin: 0;
+	padding: 0;
+	list-style: none;
+	overflow: auto;
+	height: 10.2em;
+}
+ul.moderation_notes li {
+	padding: 0.2em;
+	border-bottom: 1px solid #cccccc;
+}
+.notes {
+	margin-top: 0.4em;
+}
+.post_note {
+	width: 85%;
+}
+
+/* Styles for the error log.
+------------------------------------------------- */
+
+h3.grid_header {
+	height: 25px;
+}
+#error_log {
+	width: 100%;
+}
+#error_log tr.windowbg td, #error_log tr.windowbg2 td {
+	padding: 8px;
+	line-height: 160%;
+}
+#error_log td.half_width {
+	width: 50%;
+}
+#error_log td.checkbox_column {
+	width: 15px;
+	vertical-align: top;
+	text-align: center;
+}
+#error_log td div.marginleft {
+	margin: 0 0 0 1ex;
+}
+#manage_boards span.botslice, #manage_maintenance span.botslice, #manage_mail span.botslice {
+	margin-bottom: 4px;
+}
+
+/* Styles for the Report generation 
+------------------------------------------------- */
+#report_buttons {
+    min-height: 2em;
+    padding-left: 0;
+	padding-bottom: 2px;
+}

+ 3415 - 3278
Themes/default/css/index.css

@@ -1,3278 +1,3415 @@
-/* Styles for the general looks for the Curve theme.
-------------------------------------------------------- */
-
-/* Normal, standard links. */
-a:link, a:visited {
-	color: #346;
-	text-decoration: none;
-}
-a:hover {
-	text-decoration: underline;
-	cursor: pointer;
-}
-
-/* Links that open in a new window. */
-a.new_win:link, a.new_win:visited {
-	color: #346;
-	text-decoration: none;
-}
-a.new_win:hover {
-	text-decoration: underline;
-}
-
-/* Tables should show empty cells. */
-table {
-	empty-cells: show;
-}
-
-/* Set a fontsize that will look the same in all browsers. */
-body {
-	background: #E9EEF2 url(../images/theme/backdrop.png) repeat-x;
-	font: 78%/130% "Verdana", "Arial", "Helvetica", sans-serif;
-	margin: 0 auto;
-	padding: 15px 0;
-}
-
-/* Help popups require a different styling of the body element. */
-body#help_popup {
-	padding: 1em;
-}
-
-/* use dark grey for the text, leaving #000 for headers etc */
-body, td, th, tr {
-	color: #444;
-}
-
-/* This division wraps the entire forum when a forum width is set. */
-div#wrapper {
-	margin: 0 auto;
-	min-width: 764px;
-	max-width: 2300px;
-}
-
-/* lets give all forms zero padding/margins */
-form {
-	padding: 0;
-	margin: 0;
-}
-
-/* We can style the different types of input buttons to be uniform throughout different browsers and their color themes.
-	.button_submit - covers input[type=submit], input[type=button], button[type=submit] and button[type=button] in all browsers
-	.button_link   - covers links to make them look like a submit button
-	.button_reset  - covers input[type=reset] and button[type=reset] throughout all browsers
-	.input_check   - covers input[type=checkbox] throughout all browsers
-	.input_radio   - covers input[type=radio] throughout all browsers
-	.input_text    - covers input[type=text] throughout all browsers
-	.input_file    - covers input[type=file] throughout all browsers
-*/
-input, button, select, textarea, textarea.editor  {
-	background: #fff;
-	outline: none !important;
-	border: 1px solid #bbb;
-	vertical-align: middle;
-	border-radius: 3px;
-	box-shadow: 0 2px 5px rgba(0,0,0,0.05) inset;
-    padding: 3px;
-	font: 95%/115% verdana, Helvetica, sans-serif;
-	color: #000;
-}
-/* The font size of textareas should be just a little bit larger. */
-textarea {
-	font: 100%/130% verdana, Helvetica, sans-serif;
-}
-
-/* Buttons should be styled a bit differently, in order to make them look more button'ish. */
-#frmLogin input.button_submit, #guest_form  input.button_submit, #calendar_navigation input.button_submit {
-	float: none;
-	margin-left: inherit;
-}
-.button_submit, .button_reset, .button_link {
-	background: #cde7ff url(../images/theme/submit_bg.png) no-repeat;
-	border: 1px solid #aaa;
-	cursor: pointer;
-	font-weight: normal;
-	margin-left: 1em;
-	float: right;
-}
-.button_link {
-	padding: 4px 5px 4px 4px;
-	font: 95%/115% verdana, Helvetica, sans-serif;
-	float: right;
-	border-radius: 3px;
-}
-a.button_link {
- 
-	color: #000;
-	margin: 0 !important;
-}
-input:hover, textarea:hover, button:hover, select:hover {
-	outline: none !important;
-	border: 1px solid #999;
-}
-textarea:hover, textarea.editor:hover  {
-	background: #fbfbfb;
-}
-.button_submit:hover, .button_reset:hover, .button_link:hover {
-	border: 1px solid #aaa;
-	background: url(../images/theme/submit_bg.png) no-repeat 0 -140px #cde7ff;
-}
-.button_link:hover {
-	text-decoration: none;
-}
-input:focus, textarea:focus, button:focus, select:focus, textarea.editor:focus {
-	outline:none !important;
-	border: 1px solid #999;
-	box-shadow: 0 2px 5px rgba(0,0,0,0.1) inset;
-}
-select option  {
-	padding: 0em 0.3em 0 0.3em;
-}
-
-/* the new "button" */
-a.new_posts, span.new_posts {
-	color: #fff;
-	font-weight: bold;
-	line-height: 1.1em;
-	border-radius: 2px;
-	background: orange;
-	color: #fff;
-}
-span.new_posts {
-	display: inline;
-	margin: 0 5px 0 -2px;
-	padding: 0 4px 1px 4px;
-	font-size: 9px;
-	box-shadow: 1px 2px 2px rgba(0,0,0,0.1), 0 -2px 4px rgba(0,0,0,0.1) inset;
-}
-a span.new_posts:hover {
-	text-decoration: underline;
-}
-
-/* All input elements that are checkboxes or radio buttons shouldn't have a border around them. */
-input.input_check, input.input_radio {
-	border: none;
-	background: none;
-	vertical-align: top;
-}
-h3.catbg input.input_check {
-	margin: 9px 7px 0 7px;
-}
-
-/* Give disabled text input elements a different background color. */
-input[disabled].input_text {
-	background: #eee;
-}
-
-/* Standard horizontal rule.. ([hr], etc.) */
-hr {
-	height: 1px;
-	border: 0;
-	color: #ccc;
-	background-color: #ccc;
-}
-hr.hrcolor {
-    height: 1px;
-    border: none;
-	color: #ccc;
-	background-color: #ccc;
-    background: -webkit-gradient(linear, 0 0, 100% 0, from(rgba(50, 50, 50, 0.01)), to(rgba(80, 80, 80, 0.01)), color-stop(.5, #c4c4c4));
-    background: -moz-linear-gradient(left, rgba(0, 0 ,0, 0.001) 0%, rgba(201,201,201,1) 50%, rgba(0, 0, 0, 0.001) 100%);
-    background: -ms-linear-gradient(left, hsla(0, 0%, 0%, 0) 0%, hsla(0, 0%, 0%, .75) 50%, hsla(0, 0%, 0%, 0) 100%);
-    background: -o-linear-gradient(left, hsla(0, 0%, 0%, 0) 0%, hsla(0, 0%, 0%, .75) 50%, hsla(0, 0%, 0%, 0) 100%);
-    background: linear-gradient(left, hsla(0, 0%, 0%, 0) 0%, hsla(0, 0%, 0%, .75) 50%, hsla(0, 0%, 0%, 0) 100%);
-}
-
-/* By default set the color on these tags as #000. */
-h1, h2, h3, h4, h5, h6 {
-	color: #000;
-	font-size: 1em;
-	margin: 0;
-	padding: 0;
-}
-
-/* Fieldsets are used to group elements. */
-fieldset {
-	border: 1px solid #c4c4c4;
-	padding: 1.5em;
-	margin: 0 0 0.5em 0;
-    border-radius: 3px;
-}
-fieldset legend {
-	font-weight: bold;
-	color: #555;
-    border-radius: 3px;
-	border: 1px solid #999;
-	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
-    padding: 3px 6px;
-}
-
-/* Define strong as bold, and em as italics */
-strong {
-	font-weight: bold;
-}
-
-em {
-	font-style: italic;
-}
-/* Alternative for u tag */
-.underline {
-	text-decoration: underline;
-}
-
-/* Common classes to easy styling.
-------------------------------------------------------- */
-
-.floatright {
-	float: right;
-}
-.floatleft {
-	float: left;
-}
-
-.flow_auto {
-	overflow: auto;
-}
-.flow_hidden {
-	overflow: hidden;
-}
-.flow_hidden .windowbg, .flow_hidden .windowbg2 {
-	margin-top: 2px;
-}
-.clear {
-	clear: both;
-}
-.clear_left {
-	clear: left;
-}
-.clear_right {
-	clear: right;
-}
-
-/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
-.smalltext, tr.smalltext th {
-	font-size: 0.85em;
-	font-family: verdana, sans-serif;
-}
-.middletext {
-	font-size: 0.9em;
-	line-height: 1em;
-	font-family: verdana, sans-serif;
-}
-.normaltext {
-	font-size: 1em;
-	line-height: 1.2em;
-}
-.largetext {
-	font-size: 1.4em;
-}
-.centertext {
-	margin: 0 auto;
-	text-align: center;
-}
-.righttext {
-	margin-left: auto;
-	margin-right: 0;
-	text-align: right;
-}
-.lefttext {
-	margin-left: 0;
-	margin-right: auto;
-	text-align: left;
-}
-.double_height {
-	line-height: 2em;
-}
-/* some common padding styles */
-.padding {
-	padding: 0.7em;
-}
-.main_section, .lower_padding {
-	padding-bottom: 0.5em;
-}
-/* a quick reset list class. */
-ul.reset, ul.reset li {
-	padding: 0;
-	margin: 0;
-	list-style: none;
-}
-
-/* Some BBC related styles.
-------------------------------------------------------- */
-
-/* A quote, perhaps from another post. */
-.bbc_standard_quote, .bbc_alternate_quote {
-	font-size: x-small;
-	color: #000;
-	line-height: 1.4em;
-	background: url(../images/theme/quote.png) 0.1em 0.1em no-repeat;
-	border-top: 2px solid #99A;
-	border-bottom: 2px solid #99A;
-	padding: 1.1em 1.4em;
-	margin: 0.1em 0 0.3em 0;
-	overflow: auto;
-}
-
-/* Alterate blockquote stylings */
-.bbc_standard_quote {
-	background-color: #d7daec;
-}
-.bbc_alternate_quote {
-	background-color: #e7eafc;
-}
-
-/* A code block - maybe PHP ;). */
-.bbc_code {
-	display: block;
-	font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
-	font-size: x-small;
-	background: #eef;
-	border-top: 2px solid #999;
-	border-bottom: 2px solid #999;
-	line-height: 1.5em;
-	padding: 3px 1em;
-	overflow: auto;
-	white-space: nowrap;
-	/* Show a scrollbar after about 24 lines. */
-	/* This is much better than the old max-height css. */
-	height: 24em;
-	resize: vertical;
-}
-
-/* The "Quote:" and "Code:" header parts... */
-.codeheader, .quoteheader {
-	color: #666;
-	font-size: x-small;
-	font-weight: bold;
-	padding: 0 0.3em;
-}
-
-/* For links to change the code stuff... */
-.codeoperation {
-	font-weight: normal;
-}
-
-/* Styling for BBC tags */
-.bbc_link:link, .bbc_link:visited {
-	border-bottom: 1px solid #A8B6CF;
-}
-.bbc_link:hover {
-	text-decoration: none;
-	border-bottom: 1px solid #346;
-}
-.bbc_size {
-	line-height: 1.4em;
-}
-.bbc_color a {
-	color: inherit;
-}
-.bbc_img {
-	border: 0;
-}
-.bbc_table {
-	font: inherit;
-	color: inherit;
-}
-.bbc_table td {
-	font: inherit;
-	color: inherit;
-	vertical-align: top;
-}
-.bbc_u {
-	text-decoration: underline;
-}
-.bbc_list {
-	text-align: left;
-}
-.bbc_tt {
-	font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
-}
-
-/* No image should have a border when linked. */
-a img {
-	border: 0;
-}
-
-/* Generally, those [?] icons.  This makes your cursor a help icon. */
-.help {
-	cursor: help;
-}
-.help .icon {
-	cursor: help;
-	line-height: 2.5em;
-	opacity: 0.8;
-}
-.help .icon:hover {
-	opacity: 1;
-}
-/* /me uses this a lot. (emote, try typing /me in a post.) */
-.meaction {
-	color: red;
-}
-
-/* Highlighted text - such as search results. */
-.highlight {
-	font-weight: bold;
-	color: #ff7200 !important;
-	font-size: 1.1em;
-}
-
-/* A more discreet highlight color, for selected membergroups etc. */
-.highlight2 {
-	background: #D1E1EF;
-	color: #000 !important;
-}
-
-/* Generic, mostly color-related, classes.
-------------------------------------------------------- */
-
-.titlebg, .titlebg2, tr.titlebg th, tr.titlebg td, tr.titlebg2 td {
-	color: #222;
-	font-family: arial, helvetica, sans-serif;
-	font-size: 1.1em;
-	font-weight: bold;
-	background: #e3e9ef url(../images/theme/main_block.png) no-repeat -10px -380px;
-}
-.catbg, .catbg2, tr.catbg td, tr.catbg2 td, tr.catbg th, tr.catbg2 th {
-	color: #fff;
-	font-family: arial, helvetica, sans-serif;
-	font-size: 1.1em;
-	font-weight: bold;
-	background: #a7b9cd url(../images/theme/main_block.png) no-repeat -10px -280px;
-}
-
-/* adjust the table versions of headers */
-tr.titlebg th, tr.titlebg2 th, td.titlebg, td.titlebg2, tr.catbg th, tr.catbg2 th, td.catbg, td.catbg2 {
-	padding: 0 6px;
-}
-tr.titlebg th a:link, tr.titlebg th a:visited, tr.titlebg2 td a:link, tr.titlebg2 td a:visited {
-	color: #222;
-}
-tr.catbg th a:link, tr.catbg th a:visited, tr.catbg2 td a:link, tr.catbg2 td a:visited {
-	color: #fff;
-}
-.catbg select {
-	height: 2em;
-	font-size: 0.85em;
-	padding: 0;
-}
-
-/* Alternating backgrounds for posts, and several other sections of the forum. */
-.windowbg, #preview_body {
-	color: #000;
-	background-color: #e7eaef;
-}
-.windowbg2 {
-	color: #000;
-	background-color: #f0f4f7;
-}
-.windowbg3 {
-	color: #000;
-	background-color: #cacdd3;
-}
-
-/* the page navigation area */
-.pagesection {
-	font-size: 0.9em;
-	padding: 0.2em;
-	overflow: hidden;
-	margin-bottom: 1px;
-}
-div.pagesection div.floatright input, div.pagesection div.floatright select {
-	margin-top: 3px;
-}
-
-.pagelinks {
-	padding: 0.6em 0 0.4em 0;
-}
-
-/* Colors for background of posts requiring approval */
-.approvebg {
-	color: #000;
-	background: #ffeaea;
-}
-.approvebg2 {
-	color: #000;
-	background: #fff2f2;
-}
-
-/* Color for background of *topics* requiring approval */
-.approvetbg {
-	color: #000;
-	background: #e4a17c;
-}
-.approvetbg2 {
-	color: #000;
-	background: #f3bd9f;
-}
-
-/* Sticky topics get a different background */
-.stickybg {
-	background: #e8d8cf;
-}
-.stickybg2 {
-	background: #f2e3d9;
-}
-
-/* Locked posts get a different shade, too! */
-.lockedbg {
-	background: #d4dce2;
-	font-style: italic;
-}
-.lockedbg2 {
-	background: #d8e1e7;
-	font-style: italic;
-}
-
-/* Posts and personal messages displayed throughout the forum. */
-.post, .personalmessage {
-	overflow: auto;
-	line-height: 1.4em;
-	padding: 0.1em 0;
-}
-
-/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
-.signature, .attachments {
-	width: 98%;
-	overflow: auto;
-	clear: right;
-	padding: 1em 0 3px 0;
-	border-top: 1px solid #aaa;
-	line-height: 1.4em;
-	font-size: 0.85em;
-}
-.custom_fields_above_signature {
-	width: 98%;
-	clear: right;
-	padding: 1em 0 3px 0;
-	border-top: 1px solid #aaa;
-	line-height: 1.4em;
-	font-size: 0.85em;
-}
-
-/* Sometimes there will be an error when you post */
-.error {
-	color: red;
-}
-
-/* Messages that somehow need to attract the attention. */
-.alert {
-	color: red;
-}
-
-/* Calendar colors for birthdays, events and holidays */
-.birthday {
-	color: #920ac4;
-}
-
-.event {
-	color: #078907;
-}
-
-.holiday {
-	color: #000080;
-}
-
-/* Colors for warnings */
-.warn_mute {
-	color: red;
-}
-
-.warn_moderate {
-	color: #ffa500;
-}
-
-.warn_watch, .success {
-	color: green;
-}
-
-a.moderation_link, a.moderation_link:visited {
-	color: red;
-	font-weight: bold;
-}
-
-.openid_login {
-	background: white url(../images/openid.png) no-repeat;
-	padding-left: 18px;
-}
-
-/* a descriptive style */
-.description, .description_board, .plainbox {
-	padding: 0.5em 1em;
-	font-size: 0.9em;
-	line-height: 1.4em;
-	border: 1px solid #bbb;
-	background: #f5f5f0;
-	margin: 0.2em 1px 1em 1px;
-}
-.description_board {
-	margin: 1em 1px 0 1px;
-}
-
-/* an informative style */
-.information {
-	padding: 0.5em 1em;
-	font-size: 0.9em;
-	line-height: 1.3em;
-	border: 1px solid #bbb;
-	background: #f0f6f0;
-	margin: 0.2em 1px 1em 1px;
-}
-.information p {
-	padding: 1em;
-	margin: 0;
-}
-p.para2 {
-	padding: 1em 0 3.5em 0;
-	margin: 0;
-}
-/* AJAX notification bar
-------------------------------------------------------- */
-#ajax_in_progress {
-	background: url(../images/theme/loadingbar.png) repeat-x;
-	color: #f96f00;
-	text-align: center;
-	font-size: 16pt;
-	padding: 8px;
-	width: 100%;
-	height: 66px;
-	line-height: 25px;
-	position: fixed;
-	top: 0;
-	left: 0;
-}
-
-#ajax_in_progress a {
-	color: orange;
-	text-decoration: underline;
-	font-size: smaller;
-	float: right;
-	margin-right: 20px;
-}
-
-/* Lists with settings use these a lot.
-------------------------------------------------------- */
-dl.settings {
-	clear: right;
-	overflow: auto;
-	margin: 0 0 10px 0;
-	padding: 0;
-}
-dl.settings dt {
-	width: 40%;
-	float: left;
-	margin: 0 0 10px 0;
-	padding: 0;
-	clear: both;
-}
-dl.settings dt.settings_title {
-	width: 100%;
-	float: none;
-	margin: 0 0 10px 0;
-	padding: 5px 0 0 0;
-	font-weight: bold;
-	clear: both;
-}
-dl.settings dt.windowbg {
-	width: 98%;
-	float: left;
-	margin: 0 0 3px 0;
-	padding: 0 0 5px 0;
-	clear: both;
-}
-dl.settings dd {
-	width: 56%;
-	float: right;
-	overflow: auto;
-	margin: 0 0 3px 0;
-	padding: 0;
-}
-dl.settings img {
-	margin: 0 10px 0 0;
-	vertical-align: middle;
-}
-/* help icons */
-dl.settings dt a img {
-	position: relative;
-	vertical-align: top;
-}
-
-/* Styles for rounded headers.
-------------------------------------------------------- */
-h3.catbg, h3.catbg2, h3.titlebg, h4.titlebg, h4.catbg {
-	overflow: hidden;
-	height: 38px;
-	line-height: 38px;
-	font-size: 1.2em;
-	font-weight: bold;
-}
-h3.catbg a:link, h3.catbg a:visited, h4.catbg a:link, h4.catbg a:visited, h3.catbg, .table_list tbody.header td, .table_list tbody.header td a {
-	color: #fff;
-}
-h3.catbg2 a, h3.catbg2 {
-	color: #feb;
-}
-h3.catbg a:hover, h4.catbg a:hover, .table_list tbody.header td a:hover {
-	color: #fd9;
-	text-decoration: none;
-}
-h3.catbg2 a:hover {
-	color: #fff;
-	text-decoration: none;
-}
-h3.titlebg a, h3.titlebg, h4.titlebg, h4.titlebg a {
-	color: #222;
-}
-h3.titlebg a:hover, h4.titlebg a:hover {
-	color: #53616f;
-	text-decoration: none;
-}
-h3.catbg img.icon {
-	vertical-align: middle;
-	margin: -2px 5px 0 0;
-}
-h4.catbg a.toggle img {
-	vertical-align: middle;
-	margin: -2px 5px 0 5px;
-}
-h4.catbg, h4.catbg2, h3.catbg, h3.catbg2, .table_list tbody.header td.catbg {
-	background: url(../images/theme/main_block.png) no-repeat 100% -160px;
-	padding-right: 9px;
-}
-h4.titlebg, h3.titlebg {
-	background: url(../images/theme/main_block.png) no-repeat 100% -200px;
-	padding-right: 9px;
-}
-h4.titlebg img.icon {
-	vertical-align: middle;
-	float: left;
-	margin: 10px 8px 0 0;
-}
-div.cat_bar {
-	background: #99abbf url(../images/theme/main_block.png) no-repeat 0 -160px;
-	padding-left: 9px;
-	height: 38px;
-	overflow: hidden;
-	margin-bottom: 1px;
-}
-div.title_bar {
-	background: #e3e9ef url(../images/theme/main_block.png) no-repeat 0 -200px;
-	padding-left: 9px;
-	height: 38px;
-	overflow: hidden;
-	margin-bottom: 1px;
-}
-
-/* rounded bars needs a different background here */
-
-div.roundframe div.cat_bar {
-	background: #99abbf url(../images/theme/main_block.png) no-repeat 0 -240px;
-	margin-bottom: 0;
-}
-div.roundframe div.cat_bar h3.catbg {
-	background: url(../images/theme/main_block.png) no-repeat 100% -240px;
-}
-div.title_barIC {
-	background: #dadfe6 url(../images/theme/main_block.png) no-repeat 0 -120px;
-	padding-left: 9px;
-	height: 38px;
-	overflow: hidden;
-	margin-bottom: 1px;
-}
-div.title_barIC h4.titlebg {
-	background: url(../images/theme/main_block.png) no-repeat 100% -120px;
-}
-#upshrinkHeaderIC p.pminfo {
-	margin: 0;
-	padding: 0.5em;
-}
-img#upshrink_ic, img#newsupshrink, img.panel_toggle, img#quickReplyExpand {
-	float: right;
-	margin: 12px 5px 0 1em;
-}
-table.table_list a.unreadlink, table.table_list a.collapse {
-	float: right;
-}
-table.table_list a.collapse {
-	margin: 12px 5px 0 1em;
-	height: 38px;
-	line-height: 38px;
-}
-
-/* The half-round header bars for some tables. */
-.table_grid tr.catbg, .table_grid tr.titlebg {
-	font-size: 1.05em;
-	border-bottom: 1px solid #fff;
-}
-.table_grid tr.catbg th, .table_grid tr.titlebg th {
-	height: 38px;
-	line-height: 38px;
-}
-tr.catbg th.first_th {
-	background: #a7b9cd url(../images/theme/main_block.png) no-repeat 0 -280px;
-}
-tr.catbg th.last_th {
-	background: #a7b9cd url(../images/theme/main_block.png) no-repeat 100% -280px;
-	margin-right: 1px;
-}
-tr.titlebg th.first_th {
-	background: #e3e9ef url(../images/theme/main_block.png) no-repeat 0 -380px;
-}
-tr.titlebg th.last_th {
-	background: #e3e9ef url(../images/theme/main_block.png) no-repeat 100% -380px;
-}
-.table_grid th.last_th input {
-	margin: 0 2px;
-}
-.table_grid th.lefttext {
-	padding: 0 0.7em;
-}
-
-/* a general table class */
-table.table_grid {
-	border-collapse: collapse;
-	margin-top: 0.1em;
-}
-table.table_grid td {
-	padding: 3px;
-	border-bottom: 1px solid #fff;
-	border-right: 1px solid #fff;
-}
-
-/* GenericList */
-.additional_row {
-	padding: 0.5em 0 0.5em 0;
-}
-table.table_grid thead tr.catbg th {
-	white-space: nowrap;
-}
-img.sort {
-	margin-bottom: -0.25em;
-	margin-left: .3em;
-}
-
-/* table_grid styles for Profile > Show Permissions. */
-#permissions table.table_grid  td {
-	padding: 0.4em 0.8em;
-	cursor: default;
-} 
-
-/* Common styles used to add corners to divisions.
-------------------------------------------------------- */
-.windowbg span.topslice {
-	display: block;
-	padding-left: 20px;
-	background: url(../images/theme/main_block.png) 0 -30px no-repeat;
-}
-.windowbg span.topslice span {
-	display: block;
-	background: url(../images/theme/main_block.png) 100% -30px no-repeat;
-	height: 11px;
-}
-.windowbg span.botslice {
-	display: block;
-	padding-left: 20px;
-	background: url(../images/theme/main_block.png) 0 -40px no-repeat;
-	font-size: 5px;
-	line-height: 5px;
-	margin-bottom: 0.2em;
-}
-.windowbg span.botslice span {
-	display: block;
-	background: url(../images/theme/main_block.png) 100% -40px no-repeat;
-	height: 11px;
-}
-
-.windowbg2 span.topslice {
-	display: block;
-	padding-left: 20px;
-	background: url(../images/theme/main_block.png) 0 -60px no-repeat;
-}
-.windowbg2 span.topslice span {
-	display: block;
-	background: url(../images/theme/main_block.png) 100% -60px no-repeat;
-	height: 11px;
-}
-.windowbg2 span.botslice {
-	display: block;
-	padding-left: 20px;
-	background: url(../images/theme/main_block.png) 0 -71px no-repeat;
-	font-size: 5px;
-	line-height: 5px;
-	margin-bottom: 0.2em;
-}
-.windowbg2 span.botslice span {
-	display: block;
-	background: url(../images/theme/main_block.png) 100% -71px no-repeat;
-	height: 11px;
-}
-.approvebg span.topslice {
-	display: block;
-	padding-left: 20px;
-	background: url(../images/theme/main_block.png) 0 0 no-repeat;
-}
-.approvebg span.topslice span {
-	display: block;
-	background: url(../images/theme/main_block.png) 100% 0 no-repeat;
-	height: 11px;
-}
-.approvebg span.botslice {
-	display: block;
-	padding-left: 20px;
-	background: url(../images/theme/main_block.png) 0 -11px no-repeat;
-	margin-bottom: 0.2em;
-}
-.approvebg span.botslice span {
-	display: block;
-	background: url(../images/theme/main_block.png) 100% -11px no-repeat;
-	height: 11px;
-}
-.postbg {
-	border-left: 1px solid #7f7f7f;
-	border-right: 1px solid #7f7f7f;
-}
-
-/* Used for sections that need somewhat larger corners.
------------------------------------------------------------ */
-.roundframe {
-	padding: 0 10px;
-	background: #f5f5f5;
-	border-left: 1px solid #c5c5c5;
-	border-right: 1px solid #c5c5c5;
-}
-.roundframe dl, .roundframe dt, .roundframe p {
-	margin: 0;
-}
-.roundframe p {
-	padding: 0.5em;
-}
-span.upperframe {
-	padding: 0;
-	display: block;
-	background: url(../images/theme/main_block.png) 0 -90px no-repeat;
-	padding-left: 20px;
-}
-span.upperframe span {
-	padding: 0;
-	height: 12px;
-	display: block;
-	background: url(../images/theme/main_block.png) 100% -90px no-repeat;
-}
-span.lowerframe {
-	padding: 0;
-	display: block;
-	background: url(../images/theme/main_block.png) 0 -102px no-repeat;
-	padding-left: 20px;
-}
-span.lowerframe span {
-	padding: 0;
-	height: 12px;
-	display: block;
-	background: url(../images/theme/main_block.png) 100% -102px no-repeat;
-}
-
-/* The main content area.
-------------------------------------------------------- */
-.content {
-	padding: 0.5em 1.2em;
-	margin: 0;
-	border: none;
-}
-.content p {
-	margin: 0 0 0.5em 0;
-}
-
-/* Styles used by the auto suggest control.
-------------------------------------------------------- */
-.auto_suggest_div {
-	position: absolute;
-	visibility: hidden;
-	border-radius: 3px;
-	outline: none !important;
-	border: 1px solid #bbb;
-}
-.auto_suggest_item {
-	background-color: #ddd;
-	padding: .1em .3em;
-}
-.auto_suggest_item_hover {
-	background-color: #888;
-	cursor: pointer;
-	color: #eee;
-	padding: .1em .3em;
-}
-
-/* Styles for the standard dropdown menus.
-------------------------------------------------------- */
-#main_menu {
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	float: left;
-	width: 100%;
-}
-.dropmenu {
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	float: left;
-}
-/* Level 1 button background. */
-.dropmenu li {
-	margin: 0 2px 0 2px;
-	padding: 0 0 0.4em 0;
-	list-style: none;
-	float: left;
-	font-size: 1em;
-	line-height: 1.9em;
-	position: relative;
-}
-/* Needed for new PM notifications. */
-.dropmenu li strong {
-	color: #000;
-}
-.dropmenu li a {
-	padding: 0 4px 0 4px;
-	margin: 0 0 0 0;
-	display: block;
-	border: 1px solid rgba(255,255,255,0);
-	border-radius: 4px;
-}
-/* Level 1 active button. */
-.dropmenu li a.active {
-	background: orange;
-	color: #fff;
-	font-weight: bold;
-	border: 1px solid rgba(255,255,255,0);
-	box-shadow: 0 -5px 5px rgba(255,255,255,0.1) inset, 0 5px 5px rgba(0,0,0,0.1) inset;
-}
-/* Level 1 hover effects. */
-.dropmenu li a:hover, .dropmenu li a:focus {
-	background: #597b9f;
-	color: #fff;
-	cursor: pointer;
-	text-decoration: none;
-	box-shadow: 0 -4px 4px rgba(255,255,255,0.1) inset, 0 5px 5px rgba(0,0,0,0.13) inset;
-	border: 1px solid /*#9ba1cf*/rgba(255,255,255,0.2);
-}
-/* Level 1 active button. */
-.dropmenu li a.active:hover {
-	background: orange;
-	box-shadow: 0 -5px 5px rgba(255,255,255,0.1) inset, 0 5px 5px rgba(0,0,0,0.1) inset;
-	border: 1px solid #ffa43d;
-	border-top: 1px solid #e07700;
-}
-/* If we feel like styling the active state separately. */
-.dropmenu li a:active {}
-/* Levels 2 and 3 submenu wrapper. */
-.dropmenu li ul {
-	z-index: 90;
-	position: absolute;
-	top: 2.2em;
-	left: -9999px;
-	width: 17em;
-	font-weight: normal;
-
-	background: #fff;
-	border: solid 1px #888;
-	border-left: solid 1px #999;
-	border-top: solid 1px #999;
-	border-radius: 0 5px 0 5px;
-	box-shadow: 2px 2px 2px rgba(0,0,0,0.3), 0 0 16px rgba(99,129,159,0.15) inset;
-	padding: 5px 0 7px 0;
-}
-/* Level 2 link background. */
-.dropmenu li li {
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	position: relative;
-	overflow: visible;
-	border-top: 1px solid rgba(0,0,0,0);
-	border-bottom: 1px solid rgba(0,0,0,0);
-	float: none;
-}
-.dropmenu li li a {
-	padding: 0 0 0 2px;
-	font-size: 0.85em;
-	line-height: 1.7em;
-}
-/* Note: The next two declarations are for keyboard access with js disabled. */
-.dropmenu ul a:focus  {
-	margin-left: 9999px;
-	min-width: 17em;
-	background: #fff;
-	border-radius: 0 0 0 0;
-}
-.dropmenu ul ul a:focus {
-	margin-left: 19950px;
-}
-.dropmenu li:hover li a, .dropmenu li.sfhover li a {
-	margin: 0 0 0 0;
-	padding: 0 5px 0 5px;
-	display: block;
-	border: none;
-	border-radius: 0;
-	/* Necessary to allow highlighting of 1st level while hovering over submenu. */
-	background: none;
-	color: #346;
-	box-shadow: none;
-}
-/* Level 3 submenu wrapper positioning. */
-.dropmenu li ul ul, .dropmenu li.sfhover ul ul {
-	margin: -2.5em 0 0 15.8em;
-}
-/* Level 3 maintains font-size the same as Level 2. */
-.dropmenu li li li a {
-	font-size: 0.85em;
-}
-/* Levels 2 and 3 hover effects. */
-.dropmenu li li:hover, .dropmenu li li:hover>a, .dropmenu li li a:focus, .dropmenu li li.subsections a:focus {
-	background: none;
-	color: #333;
-	text-decoration: none;
-}
-.dropmenu li li:hover {
-	border-top: 1px solid #999;
-	border-bottom: 1px solid #888;
-	box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
-}
-/* If we feel like styling the active state separately. */
-.dropmenu li li a:active, .dropmenu li li:hover>a:active {}
-/* Reposition Level 2 submenu as visible on hover. */
-.dropmenu li:hover ul, .dropmenu li.sfhover ul {
-	left: 0;
-}
-/* Hiding Level 3 submenu off hover. */
-.dropmenu li:hover ul ul, .dropmenu li.sfhover ul ul, .dropmenu li:hover ul ul ul, .dropmenu li.sfhover ul ul ul {
-	left: -9999px;
-}
-/* Reposition as visible on hover. */
-.dropmenu li li:hover ul, .dropmenu li li.sfhover ul {
-	left: auto;
-}
-/* Indicator for additonal levels. Best in the anchor so it stays visible on hover. */
-.dropmenu li li.subsections a {
-	background: url(../images/admin/subsection.png) no-repeat 99% 40%;
-}
-/* For no-js background. */
-.dropmenu li li.subsections a:focus {
-	background: #fff url(../images/admin/subsection.png) no-repeat 99% 40%;
-}
-/* Stops inheritance of indicator icon if there is no fourth level. */
-.dropmenu li li.subsections li a {
-	background: none;
-}
-.dropmenu li li.subsections li a:focus {
-	background: #fff;
-}
-/* Highlighting of current section */
-.dropmenu li li a.chosen {
-	font-weight: bold;
-}
-
-/* The dropdown menu toggle image */
-#menu_toggle {
-	float: right;
-	margin-right: 2px;
-	padding: 7px 9px 4px 9px;
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #aaa;
-	border-radius: 2px;
-	line-height: 1.9em;
-	overflow: visible;
-	box-shadow: 0 5px 10px rgba(244,247,255,1) inset, 0 -4px 8px rgba(0,0,0,0.1) inset, 1px 1px 1px rgba(0,0,0,0.1);
-}
-#menu_toggle:hover {
-	background: #f4f4f4;
-	padding: 8px 9px 4px 9px;
-	border-top: none;
-	border-left: none;
-	border-right: 1px solid #ccc; 
-	border-bottom: 1px solid #ccc; 
-	box-shadow: 1px 2px 6px rgba(14,39,61,0.2) inset, 1px 1px 1px rgba(0,0,0,0.6) inset, -4px -4px 4px rgba(255,255,255,0.8) inset;
-}
-#menu_toggle span {
-	position: relative;
-	right: 5000px;
-}
-.adm_section h4 img {
-	background: #eaeff3;
-	padding: 3px 5px 1px 6px;
-	border: 1px solid #bbb;
-	border-radius: 5px;
-	float: right;
-	margin: 8px 5px; 
-	vertical-align: middle;
-}
-
-/* Styles for the standard button lists.
-------------------------------------------------------- */
-
-.buttonlist ul {
-	z-index: 100;
-	padding: 5px;
-	margin: 0 0.2em 5px 0;
-}
-.buttonlist ul li {
-	margin: 0;
-	padding: 0;
-	list-style: none;
-	float: left;
-}
-.buttonlist ul li a {
-	display: block;
-	font-size: 0.8em;
-	color: #000;
-	background: #e8e8e8 url(../images/theme/menu_gfx.png) no-repeat 0 -60px;
-	padding: 0 0 0 8px;
-	margin-left: 12px;
-	text-transform: uppercase;
-	cursor: pointer;
-}
-.buttonlist ul li a:hover {
-	background: url(../images/theme/menu_gfx.png) no-repeat 0 0;
-	color: #fff;
-	text-decoration: none;
-}
-.buttonlist ul li a span {
-	background: url(../images/theme/menu_gfx.png) no-repeat 100% -60px;
-	display: block;
-	height: 19px;
-	line-height: 19px;
-	padding: 0 8px 0 0;
-}
-.buttonlist ul li a:hover span {
-	background: #fff url(../images/theme/menu_gfx.png) no-repeat 100% 0;
-}
-/* the active one */
-.buttonlist ul li a.active {
-	background: #5a6c85 url(../images/theme/menu_gfx.png) no-repeat 0 -90px;
-	color: #fff;
-	font-weight: bold;
-}
-.buttonlist ul li a.active span {
-	background: url(../images/theme/menu_gfx.png) no-repeat 100% -90px;
-}
-.buttonlist ul li a.active {
-	font-weight: bold;
-}
-.buttonlist ul li a.active:hover {
-	color: #ddf;
-}
-.align_top ul li a, .align_bottom ul li a {
-	margin: 0 12px 0 0;
-}
-
-/* the navigation list */
-ul#navigation {
-	margin: 0;
-	font-size: 0.9em;
-	padding: 1em 0.4em;
-}
-ul#navigation li {
-	float: none;
-	font-size: 0.95em;
-	display: inline;
-}
-
-#adm_submenus {
-	padding-left: 2em;
-	overflow: hidden;
-}
-
-/* Styles for the general looks for the Curve theme.
-------------------------------------------------------- */
-
-/* the framing graphics */
-#header {
-	background: url(../images/theme/main_block.png) #fefefe no-repeat 0 -480px;
-	padding-left: 20px;
-}
-#header div.frame {
-	background: url(../images/theme/main_block.png) no-repeat 100% -480px;
-	display: block;
-	padding: 5px 20px 1em 0;
-}
-/* the content section */
-#content_section {
-	background: #fff url(../images/theme/frame_repeat.png) repeat-y top left;
-	padding: 0 0 1px 20px;
-}
-#content_section div.frame {
-	background: url(../images/theme/frame_repeat.png) repeat-y top right;
-	display: block;
-	padding: 0 20px 0 0;
-}
-#main_content_section {
-	width: 100%;
-	min-height: 200px;
-}
-
-/* the main title, always stay at 45 pixels in height! */
-h1.forumtitle {
-	line-height: 45px;
-	font-size: 1.8em;
-	font-family: Geneva, verdana, sans-serif;
-	margin: 0;
-	padding: 0;
-	float: left;
-}
-/* float these items to the right */
-#siteslogan, img#smflogo {
-	margin: 0;
-	padding: 0;
-	float: right;
-	line-height: 3em;
-}
-h3, h4 {
-	padding-bottom: 3px;
-}
-/* the upshrink image needs some tweaking */
-img#upshrink {
-	float: right;
-	margin: 1em;
-}
-/* ..so does the SMF logo */
-img#smflogo {
-	margin-left: 1em;
-}
-/* the upper_section, float the two each way */
-#upper_section {
-	padding: 5px;
-	margin-bottom: 1.5em;
-}
-#upper_section ul li.greeting {
-	font-size: 1.3em;
-	font-weight: bold;
-	line-height: 1.5em;
-}
-#upper_section div.news {
-	width: 50%;
-	float: right;
-	text-align: right;
-}
-#guest_form {
-	overflow: hidden;
-}
-#guest_form .info {
-	padding: 4px 0 ;
-	line-height: 1.3em;
-}
-div#upper_section div.user {
-	width: 50%;
-	float: left;
-	overflow: auto;
-}
-div#upper_section div.user p {
-	float: left;
-	margin: 0 1em 1em 0;
-	padding: 0;
-}
-div#upper_section div.user ul {
-	margin: 0;
-	padding-left: 10px;
-}
-div#upper_section div.user ul li {
-	margin-bottom: 2px;
-}
-div#upper_section div.news p {
-	display: inline;
-}
-div#upper_section div.news form {
-	padding-bottom: 10px;
-}
-/* clearing the floats */
-#top_section {
-	min-height: 65px;
-	overflow: hidden;
-	margin-bottom: 3px;
-}
-#upper_section {
-	overflow: hidden;
-}
-
-/* The navigation list (i.e. linktree) */
-.navigate_section {
-	padding: 0.5em;
-	margin: 0 0 0 0;
-}
-.navigate_section ul {
-	display: block;
-	margin: 0;
-	font-size: 0.9em;
-	padding: 1em 0 0.5em 0;
-	border-top: 1px solid #ccc;
-	overflow: hidden;
-	list-style: none;
-	clear: both;
-	width: 100%;
-}
-.navigate_section ul li {
-	float: left;
-	padding: 0 0.5em 0 0;
-	font-size: 0.95em;
-}
-.navigate_section ul li a {
-	white-space: pre;
-}
-
-/* The footer wih copyright links etc. */
-#footer_section {
-	text-align: center;
-	background: url(../images/theme/main_block.png) no-repeat 0 -820px;
-	padding-left: 20px;
-}
-#footer_section span.smalltext {
-	font-size: 100%;
-}
-#footer_section div.frame {
-	background: url(../images/theme/main_block.png) no-repeat 100% -820px;
-	display: block;
-	padding: 60px 0 0 0;
-}
-#footer_section ul li, #footer_section p {
-	font-size: 0.8em;
-}
-#footer_section ul li {
-	display: inline;
-	padding-right: 5px;
-}
-#footer_section ul li.copyright {
-	display: block;
-}
-select.qaction, input.qaction {
-	font-size: 0.85em;
-	padding: 0;
-}
-#mlist table tbody td.windowbg2 {
-	text-align: center;
-}
-
-/* Styles for a typical table.
-------------------------------------------------------- */
-table.table_list {
-	width: 100%;
-}
-table.table_list p {
-	padding: 0;
-	margin: 0;
-}
-table.table_list td, table.table_list th {
-	padding: 5px;
-}
-table.table_list tbody.header td {
-	padding: 0;
-}
-table.table_list tbody.content td.stats {
-	font-size: 90%;
-	width: 15%;
-	text-align: center;
-}
-table.table_list tbody.content td.lastpost {
-	line-height: 1.3em;
-	font-size: 85%;
-	width: 24%;
-}
-table.table_list tbody.content td.icon {
-	text-align: center;
-	width: 6%;
-	color: #000;
-	background-color: #ecedf3;
-}
-
-/* Styles for the board index.
-------------------------------------------------- */
-
-/* the board title! */
-.table_list tbody.content td.info a.subject {
-	font-weight: bold;
-	font-size: 110%;
-	color: #d97b33;
-}
-.table_list tbody.content td.children {
-	color: #555;
-	font-size: 85%;
-}
-p.moderators {
-	font-size: 0.8em;
-	font-family: verdana, sans-serif;
-}
-/* hide the table header/footer parts - but its here for those needing to style it */
-#boardindex_table .table_list thead, #boardindex_table .table_list tfoot {
-	display: none;
-}
-
-/* the posting icons */
-#posting_icons {
-	padding: 0 1em 0.5em 1em;
-	margin: 0 0 1em 0;
-	line-height: 1em;
-}
-#posting_icons ul {
-	font-size: 0.8em;
-}
-#posting_icons img {
-	vertical-align: middle;
-	margin: 0 0 0 4ex;
-}
-#postbuttons_upper ul li a span {
-	line-height: 19px;
-	padding: 0 0 0 6px;
-}
-.nextlinks {
-	text-align: right;
-	margin-top: -1px;
-}
-.nextlinks_bottom {
-	clear: right;
-	text-align: right;
-}
-.mark_read {
-	padding: 0 0.5em;
-}
-
-/* the newsfader */
-#newsfader {
-	margin: 0 2px;
-}
-#smfFadeScroller {
-	text-align: center;
-	padding: 0 2em;
-	overflow: auto;
-	margin: 1em 0;
-	color: #575757; /* shouldn't be shorthand style due to a JS bug in IE! */
-}
-
-/* Styles for the info center on the board index.
----------------------------------------------------- */
-
-#upshrinkHeaderIC {
-	margin-top: 4px;
-}
-dl#ic_recentposts {
-	margin: 0 0 0.5em 0;
-	padding: 0.5em;
-	line-height: 1.3em;
-}
-dl#ic_recentposts dt {
-	float: left;
-}
-dl#ic_recentposts dd {
-	text-align: right;
-}
-#upshrinkHeaderIC p {
-	margin: 0 0 0.5em 0;
-	padding: 0.5em;
-}
-#upshrinkHeaderIC p.last {
-	margin: 0;
-	padding: 0.5em;
-	border-top: 2px dotted #bbb;
-}
-#upshrinkHeaderIC p.inline {
-	border: none;
-	margin: 0;
-	padding: 0.2em 0.5em 0.2em 0.5em;
-}
-#upshrinkHeaderIC p.stats {
-	font-size: 1.1em;
-	padding-top: 8px;
-}
-/* the small stats */
-#index_common_stats {
-	margin: -28px 0 0.5em 0;
-	float: right;
-	font-size: 0.9em;
-	line-height: 1.3em;
-}
-
-img.new_posts {
-	padding: 0 0.1em;
-}
-
-.fix_rtl_names {
-	display:inline-block;
-}
-
-/* Styles for the message (topic) index.
----------------------------------------------------- */
-div.table_frame .table_list {
-	border-collapse: collapse;
-	margin: 2px 0;
-}
-.table_frame .table_list td.icon, .table_frame .table_list td.info, .table_frame .table_list td.stats {
-	border-right: 2px solid white;
-}
-#messageindex {
-	clear: both;
-}
-/* the page navigation area */
-.childboards {
-	margin-bottom: 0.2em;
-}
-#childboards h3 {
-	padding-bottom: 0;
-}
-#childboards .table_list thead {
-	display: none;
-}
-#childboards .table_list {
-	margin-bottom: 1em;
-}
-.lastpost img {
-	float: right;
-	padding: 4px;
-}
-
-/* Styles for the display template (topic view).
----------------------------------------------------- */
-
-#postbuttons div.buttons {
-	padding: 0.5em;
-	width: 40%;
-	float: right;
-}
-#postbuttons div.middletext {
-	width: 60%;
-}
-#postbuttons span {
-	display: block;
-	text-align: right;
-}
-#postbuttons span.lower {
-	clear: right;
-}
-#postbuttons .buttonlist {
-	float: right;
-}
-#postbuttons #pagelinks {
-	padding-top: 1em;
-}
-#moderationbuttons {
-	overflow: hidden;
-}
-/* Events */
-.linked_events {
-	padding: 1em 0;
-}
-.edit_event {
-	margin: 0 .8em;
-	vertical-align: top;
-}
-/* Poll question */
-#poll {
-	overflow: hidden;
-}
-#poll .content {
-	padding: 0 1em;
-}
-h4#pollquestion {
-	padding: 0 0 0.5em 2em;
-}
-
-/* Poll vote options */
-#poll_options ul.options {
-	border-top: 1px solid #9999aa;
-	padding: 1em 2.5em 0 2em;
-	margin: 0 0 1em 0;
-}
-#poll_options div.submitbutton {
-	border-bottom: 1px solid #9999aa;
-	clear: both;
-	padding: 0 0 1em 2em;
-	margin: 0 0 1em 0;
-}
-
-/* Poll results */
-#poll_options dl.options {
-	border: solid #9999aa;
-	border-width: 1px 0;
-	padding: 1em 2.5em 1em 2em;
-	margin: 0 1em 1em 0;
-	line-height: 1.1em !important;
-}
-
-#poll_options dl.options dt {
-	padding: 0.3em 0;
-	width: 30%;
-	float: left;
-	margin: 0;
-	clear: left;
-}
-
-#poll_options dl.options .voted {
-	font-weight: bold;
-}
-
-#poll_options dl.options dd {
-	margin: 0 0 0 2em;
-	padding: 0.1em 0 0 0;
-	width: 60%;
-	max-width: 450px;
-	float: left;
-}
-
-#poll_options dl.options .percentage {
-	display: block;
-	float: right;
-	padding: 0.2em 0 0.3em 0;
-}
-
-/* Poll notices */
-#poll_options p {
-	margin: 0 1.5em 0.2em 1.5em;
-	padding: 0 0.5em 0.5em 0.5em;
-}
-
-div#pollmoderation {
-	margin: 0;
-	padding: 0;
-	overflow: auto;
-}
-
-/* onto the posts */
-#forumposts {
-	clear: both;
-}
-#forumposts .cat_bar {
-	margin: 0 0 2px 0;
-}
-/* author and topic information */
-#forumposts h3 span#author {
-	margin: 0 7.7em 0 0;
-}
-#forumposts h3 img {
-	float: left;
-	margin: 10px 0.5em 0 0;
-}
-#forumposts h3.catbg {
-	margin-bottom: 3px;
-}
-p#whoisviewing {
-	margin: 0;
-	padding: 0.5em;
-}
-/* poster and postarea + moderation area underneath */
-.post_wrapper {
-	float: left;
-	width: 100%;
-}
-.poster {
-	float: left;
-	width: 15em;
-	word-wrap: break-word;
-	overflow: hidden;
-}
-.postarea, .moderatorbar {
-	margin: 0 0 0 16em;
-}
-.postarea div.flow_hidden {
-	width: 100%;
-}
-.poster img {
-	vertical-align: middle;
-}
-
-.moderatorbar {
-	clear: right;
-}
-/* poster details and list of items */
-.poster h4, .poster ul {
-	padding: 0;
-	margin: 0 1em 0 1.5em;
-}
-.poster h4 {
-	margin: 0.2em 0 0.4em 1.1em;
-	font-size: 120%;
-}
-.poster h4, .poster h4 a {
-	color: #c06002;
-}
-.poster ul ul {
-	margin: 0.3em 1em 0 0;
-	padding: 0;
-}
-.poster ul ul li {
-	display: inline;
-}
-.poster li.icons, .poster li.avatar, .poster li.blurb, li.postcount, li.im_icons ul {
-	margin-top: 0.5em;
-}
-.poster li.avatar {
-	overflow: hidden;
-}
-.poster li.warning {
-	line-height: 1.2em;
-	padding-top: 1em;
-}
-.poster li.warning a img {
-	vertical-align: bottom;
-	padding: 0 0.2em;
-}
-.messageicon {
-	float: left;
-	margin: 0 0.5em 0 0;
-}
-.messageicon img {
-	padding: 6px 3px;
-}
-.keyinfo {
-	float: left;
-	width: 50%;
-}
-.modifybutton {
-	clear: right;
-	float: right;
-	margin: 6px 20px 10px 0;
-	text-align: right;
-	font: bold 0.85em arial, sans-serif;
-	color: #334466;	
-}
-
-/* The quick buttons */
-div.quickbuttons_wrap {
-	padding: 0.2em 0;
-	width: 100%;
-	float: left;
-}
-
-ul.quickbuttons {
-	margin: 0.9em 11px 0 0;
-	clear: right;
-	float: right;
-	text-align: right;
-	font: bold 0.85em arial, sans-serif;
-}
-ul.quickbuttons li {
-	float: left;
-	display: inline;
-	margin: 0 0 0 11px;
-}
-ul.quickbuttons li a {
-	padding: 0 0 0 20px;
-	display: block;
-	height: 20px;
-	line-height: 18px;
-	float: left;
-}
-ul.quickbuttons a:hover {
-	color: #a70;
-}
-ul.quickbuttons li a.quote_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 0;
-}
-ul.quickbuttons li a.remove_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -30px;
-}
-ul.quickbuttons li a.modify_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -60px;
-}
-ul.quickbuttons li a.approve_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -90px;
-}
-ul.quickbuttons li a.restore_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -120px;
-}
-ul.quickbuttons li a.split_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -150px;
-}
-ul.quickbuttons li a.reply_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
-}
-ul.quickbuttons li a.reply_all_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
-}
-ul.quickbuttons li a.notify_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
-}
-ul.quickbuttons li.inline_mod_check {
-	margin: 0 0 0 5px;
-}
-
-.post {
-	margin-top: 0.5em;
-	clear: right;
-}
-.inner {
-	padding: 1em 1em 2px 0;
-	margin: 0 1em 0 0;
-	border-top: 1px solid #99a;
-}
-img.smiley {
-	vertical-align: bottom;
-}
-#forumposts .modified {
-	float: left;
-	color: #333;
-}
-#forumposts .reportlinks {
-	margin-right: 1.5em;
-	text-align: right;
-	clear: right;
-}
-#forumposts .signature, .post .signature {
-	margin: 1em 0 0 0;
-}
-#forumposts span.botslice {
-	clear: both;
-}
-.attachments hr {
-	clear: both;
-	margin: 1em 0 1em 0;
-}
-.attachments {
-	padding: 1em 0 2em 0;
-}
-.attachments div {
-	padding: 0 0.5em;
-}
-.attachments_top  {
-	margin: 0 auto;
-	text-align: center;
-}
-.attachments_bot  {
-	font-size: 0.85em;
-	font-family: verdana, sans-serif;
-	color: #000;
-}
-
-/* Styles for the quick reply area.
----------------------------------------------------- */
-
-#quickreplybox {
-	padding-bottom: 1px;
-}
-#quickReplyOptions .roundframe {
-	padding: 0 10%;
-}
-#quickReplyOptions form textarea {
-	height: 100px;
-	width: 635px;
-	max-width: 100%;
-	min-width: 100%;
-}
-/* The jump to box */
-#display_jump_to {
-	clear: both;
-	padding: 5px;
-	margin-top: 6px;
-	text-align: right;
-}
-
-/* Separator of posts. More useful in the print stylesheet. */
-#forumposts .post_separator {
-	display: none;
-}
-
-/* Styles for edit post section
----------------------------------------------------- */
-form#postmodify .roundframe {
-	padding: 0 12%;
-}
-#post_header, .postbox {
-	padding: 0.5em;
-	overflow: hidden;
-}
-#post_header dt, .postbox dt {
-	float: left;
-	padding: 0;
-	width: 15%;
-	margin: .5em 0 0 0;
-	font-weight: bold;
-}
-#post_header dd, .postbox dd {
-	float: left;
-	padding: 0;
-	width: 83%;
-	margin: .3em 0;
-}
-#post_header img {
-	vertical-align: middle;
-}
-ul.post_options {
-	margin: 0 0 0 1em;
-	padding: 0;
-	list-style: none;
-	overflow: hidden;
-}
-ul.post_options li {
-	margin: 0.2em 0;
-	width: 49%;
-	float: left;
-}
-#postAdditionalOptionsHeader {
-	margin-top: 1em;
-}
-#postMoreOptions {
-	border-bottom: 1px solid #cacdd3;
-	padding: 0.5em;
-}
-#postAttachment, #postAttachment2 {
-	overflow: hidden;
-	margin: .5em 0;
-	padding: 0;
-	padding: 0.5em;
-}
-#postAttachment dd, #postAttachment2 dd {
-	margin: .3em 0 .3em 1em;
-}
-#postAttachment dt, #postAttachment2 dt {
-	font-weight: bold;
-}
-#postAttachment3 {
-	margin-left: 1em;
-}
-#post_confirm_strip, #shortcuts {
-	padding: 1em 0 0 0;
-}
-.post_verification {
-	margin-top: .5em;
-}
-.post_verification #verification_control {
-	margin: .3em 0 .3em 1em;
-}
-/* The BBC buttons */
-#bbcBox_message {
-	margin: 0.75em 0.5em;
-}
-#bbcBox_message div {
-	margin: 0.2em 0;
-	vertical-align: top;
-}
-#bbcBox_message div img {
-	margin: 0 1px 0 0;
-	vertical-align: top;
-}
-#bbcBox_message select {
-	margin: 0 2px;
-}
-/* The smiley strip */
-#smileyBox_message {
-	margin: 0.5em;
-}
-
-/* Styles for edit event section
----------------------------------------------------- */
-#post_event .roundframe {
-	padding: 0 12%;
-}
-#post_event fieldset {
-	padding: 0.5em;
-	clear: both;
-}
-#post_event #event_main input {
-	margin: 0 0 1em 0;
-	float: left;
-}
-#post_event #event_main div.smalltext {
-	width: 33em;
-	float: right;
-}
-#post_event div.event_options {
-	float: right;
-}
-#post_event ul.event_main, ul.event_options {
-	padding: 0;
-	overflow: hidden;
-}
-#post_event ul.event_main li {
-	list-style-type: none;
-	margin: 0.2em 0;
-	width: 49%;
-	float: left;
-}
-#post_event ul.event_options {
-	margin: 0;
-	padding: 0 0 .7em .7em;
-}
-#post_event ul.event_options li {
-	list-style-type: none;
-	margin: 0;
-	float: left;
-}
-#post_event #event_main select, #post_event ul.event_options li select, #post_event ul.event_options li .input_check {
-	margin: 0 1em 0 0;
-}
-
-/* Styles for edit poll section.
----------------------------------------------------- */
-
-#edit_poll {
-	overflow: hidden;
-}
-#edit_poll fieldset {
-	padding: 0.5em;
-	clear: both;
-	overflow: hidden;
-}
-#edit_poll fieldset input {
-	margin-left: 8.1em;
-}
-#edit_poll ul.poll_main li {
-	padding-left: 1em;
-}
-#edit_poll ul.poll_main input {
-	margin-left: 1em;
-}
-#edit_poll ul.poll_main, dl.poll_options {
-	overflow: hidden;
-	padding: 0 0 .7em .7em;
-	list-style: none;
-}
-#edit_poll ul.poll_main li {
-	margin: 0.2em 0;
-}
-#edit_poll dl.poll_options dt {
-	width: 33%;
-	padding: 0 0 0 1em;
-}
-#edit_poll dl.poll_options dd {
-	width: 65%;
-}
-#edit_poll dl.poll_options dd input {
-	margin-left: 0; 
-}
-
-/* Styles for the recent messages section.
----------------------------------------------------- */
-
-#readbuttons_top .pagelinks, #readbuttons .pagelinks {
-	padding-bottom: 1em;
-	width: 60%;
-}
-#readbuttons .pagelinks {
-	padding-top: 1em;
-}
-#recent {
-	clear: both;
-}
-
-/* Styles for the move topic section.
----------------------------------------------------- */
-
-#move_topic dl {
-	margin-bottom: 0;
-}
-#move_topic dl.settings dt {
-	width: 40%;
-}
-#move_topic dl.settings dd {
-	width: 59%;
-}
-.move_topic {
-	width: 710px;
-	margin: auto;
-	text-align: left;
-}
-div.move_topic fieldset {
-	padding: 0.5em;
-}
-
-/* Styles for the send topic section.
----------------------------------------------------- */
-
-fieldset.send_topic {
-	border: none;
-	padding: 0.5em;
-}
-dl.send_topic {
-	margin-bottom: 0;
-}
-dl.send_mail dt {
-	width: 35%;
-}
-dl.send_mail dd {
-	width: 64%;
-}
-
-/* Styles for the report topic section.
----------------------------------------------------- */
-
-#report_topic dl {
-	margin-bottom: 0;
-}
-#report_topic dl.settings dt {
-	width: 20%;
-}
-#report_topic dl.settings dd {
-	width: 79%;
-}
-
-/* Styles for the split topic section.
----------------------------------------------------- */
-
-div#selected, div#not_selected {
-	width: 49%;
-}
-ul.split_messages li.windowbg, ul.split_messages li.windowbg2 {
-	margin: 1px;
-}
-ul.split_messages li a.split_icon {
-	padding: 0 0.5em;
-}
-ul.split_messages div.post {
-	padding: 1em 0 0 0;
-	border-top: 1px solid #fff;
-}
-
-/* Styles for the merge topic section.
----------------------------------------------------- */
-ul.merge_topics li {
-	list-style-type: none;
-}
-dl.merge_topic dt {
-	width: 25%;
-}
-dl.merge_topic dd {
-	width: 74%;
-}
-fieldset.merge_options {
-	clear: both;
-}
-.custom_subject {
-	margin: 0.5em 0;
-}
-
-/* Styles for the login areas.
-------------------------------------------------------- */
-.login {
-	width: 540px;
-	margin: 0 auto;
-}
-.login dl {
-	overflow: auto;
-	clear: right;
-}
-.login dt, .login dd {
-	margin: 0 0 0.4em 0;
-	width: 44%;
-	padding: 0.1em;
-}
-.login dt {
-	float: left;
-	clear: both;
-	text-align: right;
-	font-weight: bold;
-}
-.login dd {
-	width: 54%;
-	float: right;
-	text-align: left;
-}
-.login p {
-	text-align: center;
-}
-
-/* Additional register fields */
-dl.register_form {
-	margin: 0;
-	clear: right;
-}
-
-dl.register_form dt {
-	font-weight: normal;
-	float: left;
-	clear: both;
-	width: 50%;
-	margin: 0.5em 0 0 0;
-}
-
-dl.register_form dt strong {
-	font-weight: bold;
-}
-
-dl.register_form dt span {
-	display: block;
-}
-
-dl.register_form dd {
-	float: left;
-	width: 49%;
-	margin: 0.5em 0 0 0;
-}
-
-#confirm_buttons {
-	text-align: center;
-	padding: 1em 0;
-}
-
-.coppa_contact {
-	padding: 4px;
-	width: 32ex;
-	background: #fff;
-	color: #000;
-	margin-left: 5ex;
-	border: 1px solid #000;
-}
-
-.valid_input {
-	background: #f5fff0;
-}
-.invalid_input {
-	background: #fff0f0;
-}
-
-/* Styles for maintenance mode.
-------------------------------------------------------- */
-#maintenance_mode {
-	width: 75%;
-	min-width: 520px;
-	text-align: left;
-}
-#maintenance_mode img.floatleft {
-	margin-right: 1em;
-}
-
-/* common for all admin sections */
-h3.titlebg img {
-	vertical-align: middle;
-	margin: 12px 5px 0 0;
-}
-tr.titlebg td {
-	padding-left: 0.7em;
-}
-#admin_menu {
-	min-height: 2em;
-	padding-left: 0;
-}
-#admin_content {
-	clear: left;
-	padding-top: 0.5em;
-}
-/* Custom profile fields like to play with us some times. */
-#admin_content .custom_field {
-	margin-bottom: 15px;
-}
-#admin_login .centertext {
-	padding: 1em;
-}
-#admin_login .centertext .error {
-	padding: 0 0 1em 0;
-}
-#admin_login .centertext a.help img {
-	vertical-align: middle;
-}
-
-/* Styles for sidebar menus.
-------------------------------------------------------- */
-.left_admmenu, .left_admmenu ul, .left_admmenu li {
-	padding: 0;
-	margin: 0;
-	list-style: none;
-}
-#left_admsection {
-	width: 160px;
-	float: left;
-	padding-right: 10px;
-}
-.adm_section h4.titlebg {
-	font-size: 95%;
-	margin-bottom: 5px;
-}
-#main_container {
-	position: relative;
-}
-.left_admmenu li {
-	padding: 0 0 0 0.5em;
-}
-.left_admmenu {
-	margin-bottom: 0.5em;
-}
-#main_admsection {
-	position: relative;
-	left: 0;
-	right: 0;
-	overflow: auto;
-}
-
-tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td {
-	padding: 0.3em 0.7em;
-}
-#credits p {
-	padding: 0;
-	font-style: italic;
-	margin: 0;
-}
-
-/* Styles for generic tables.
-------------------------------------------------------- */
-.topic_table table {
-	width: 100%;
-}
-.topic_table .icon1, .topic_table .icon2, .topic_table .stats {
-	text-align: center;
-}
-#topic_icons {
-	margin: 1em 0 0 0;
-}
-#topic_icons .description {
-	margin: 0;
-}
-.topic_table table thead {
-	border-bottom: 1px solid #fff;
-}
-/* the subject column */
-.topic_table td {
-	font-size: 1em;
-}
-.topic_table td.subject p, .topic_table td.stats {
-	font-size: 0.85em;
-	padding: 0;
-	margin: 0;
-}
-.topic_table td.lastpost {
-	font-size: 0.85em;
-	line-height: 1.3em;
-	padding: 4px;
-}
-.topic_table td.stickybg2 {
-	background:  #f2e3d9 url(../images/icons/quick_sticky.png) no-repeat 98% 4px;
-}
-.topic_table td.lockedbg2 {
-	background: #d8e1e7 url(../images/icons/quick_lock.png) no-repeat 98% 4px;
-}
-.topic_table td.locked_sticky2 {
-	background: #f2e3d9 url(../images/icons/quick_sticky_lock.png) no-repeat 98% 4px;
-}
-.topic_table td.lastpost {
-	background-image: none;
-}
-
-/* Styles for (fatal) errors.
-------------------------------------------------- */
-
-#fatal_error {
-	width: 80%;
-	margin: auto;
-}
-.errorbox  {
-	background: #fee url(../images/warning_mute.png) 10px 50% no-repeat;
-	text-align: left;
-	border-top: 2px solid #c34;
-	border-bottom: 2px solid #c34;
-	padding: 7px 10px 7px 35px;
-	margin-bottom: 1em;
-}
-.errorbox h3 {
-	padding: 0;
-	margin: 0;
-	font-size: 1.1em;
-	text-decoration: underline;
-}
-.errorbox p {
-	margin: 1em 0 0 0;
-}
-.errorbox p.alert {
-	padding: 0;
-	margin: 0;
-	float: left;
-	width: 1em;
-	font-size: 1.5em;
-}
-.errorbox span {
-	text-decoration: underline;
-}
-
-/* Styles for info boxes
-------------------------------------------------- */
-
-.noticebox  {
-	color: #666;
-	background: #fff6ca url(../images/warning_moderate.png) 10px 50% no-repeat;
-	text-align: left;
-	border-top: 1px solid #ffd324;
-	border-bottom: 1px solid #ffd324;
-	padding: 7px 10px 7px 35px;
-	margin-bottom: 1em;
-}
-.infobox  {
-	color: #000;
-	background: #efe url(../images/icons/field_valid.png) 10px 50% no-repeat;
-	text-align: left;
-	border-top: 1px solid green;
-	border-bottom: 1px solid green;
-	padding: 7px 10px 7px 35px;
-	margin-bottom: 1em;
-}
-
-/* Styles for the profile section.
-------------------------------------------------- */
-
-dl {
-	overflow: auto;
-	margin: 0;
-	padding: 0;
-}
-
-/* The basic user info on the left */
-#basicinfo {
-	width: 20%;
-	float: left;
-}
-#basicinfo .windowbg .content {
-	padding-left: 20px;
-}
-#detailedinfo {
-	width: 79.5%;
-	float: right;
-}
-#basicinfo h4 {
-	font-size: 135%;
-	font-weight: 100;
-	line-height: 105%;
-	white-space: pre-wrap;
-	overflow: hidden;
-}
-#basicinfo h4 span.position {
-	font-size: 80%;
-	font-weight: 100;
-	display: block;
-}
-#basicinfo img.avatar {
-	display: block;
-	margin: 10px 0 0 0;
-}
-#basicinfo ul {
-	list-style-type: none;
-	margin: 10px 0 0 0;
-}
-#basicinfo ul li {
-	display: block;
-	float: left;
-	margin-right: 5px;
-	height: 20px;
-}
-#basicinfo span#userstatus {
-	display: block;
-	clear: both;
-}
-#basicinfo span#userstatus img {
-	vertical-align: middle;
-}
-#detailedinfo div.content dl, #tracking div.content dl {
-	clear: right;
-	overflow: auto;
-	margin: 0 0 18px 0;
-	padding: 0 0 15px 0;
-	border-bottom: 1px #ccc solid;
-}
-#detailedinfo div.content dt, #tracking div.content dt {
-	width: 35%;
-	float: left;
-	margin: 0 0 3px 0;
-	padding: 0;
-	font-weight: bold;
-	clear: both;
-}
-#detailedinfo div.content dd, #tracking div.content dd {
-	width: 65%;
-	float: left;
-	margin: 0 0 3px 0;
-	padding: 0;
-}
-#detailedinfo div.content dl.noborder {
-	border-bottom: 0;
-}
-#detailedinfo div.content dt.clear {
-	width: 100%;
-}
-.signature, .custom_fields_above_signature {
-	border-top: 1px #ccc solid;
-}
-.signature h5 {
-	font-size: 0.85em;
-	margin-bottom: 10px;
-}
-#personal_picture {
-	display: block;
-	margin-bottom: 0.3em;
-}
-#avatar_server_stored div {
-	float: left;
-}
-#avatar_upload {
-	overflow: auto;
-}
-#main_admsection #basicinfo, #main_admsection #detailedinfo {
-	width: 100%;
-}
-#main_admsection #basicinfo h4 {
-	float: left;
-	width: 35%;
-}
-#main_admsection #basicinfo img.avatar {
-	float: right;
-	vertical-align: top;
-}
-#main_admsection #basicinfo ul {
-	clear: left;
-}
-#main_admsection #basicinfo span#userstatus {
-	clear: left;
-}
-#main_admsection #basicinfo p#infolinks {
-	display: none;
-	clear: both;
-}
-#main_admsection #basicinfo .botslice {
-	clear: both;
-}
-
-/* Profile statistics */
-#generalstats div.content dt {
-	width: 50%;
-	float: left;
-	margin: 0 0 3px 0;
-	padding: 0;
-	font-weight: bold;
-	clear: both;
-}
-#generalstats div.content dd {
-	width: 50%;
-	float: left;
-	margin: 0 0 3px 0;
-	padding: 0;
-}
-
-/* Activity by time */
-#activitytime {
-	margin: 6px 0;
-}
-.activity_stats {
-	margin: 0;
-	padding: 0;
-	list-style: none;
-}
-.activity_stats li {
-	margin: 0;
-	padding: 0;
-	width: 4.16%;
-	float: left;
-}
-.activity_stats li span {
-	display: block;
-	border: solid #000;
-	border-width: 1px 1px 0 0;
-	text-align: center;
-}
-.activity_stats li.last span {
-	border-right: none;
-}
-.activity_stats li div.bar {
-	margin: 0 auto;
-	width: 15px;
-}
-.activity_stats li div.bar div {
-	background: #6294CE;
-}
-.activity_stats li div.bar span {
-	position: absolute;
-	top: -1000em;
-	left: -1000em;
-}
-
-/* Most popular boards by posts and activity */
-#popularposts {
-	width: 49.5%;
-	float: left;
-}
-#popularactivity {
-	width: 49.5%;
-	float: right;
-}
-
-#popularposts div.content dt, #popularactivity div.content dt {
-	width: 65%;
-	float: left;
-	margin: 0 0 3px 0;
-	padding: 0;
-	font-weight: bold;
-	clear: both;
-}
-#popularposts div.content dd, #popularactivity div.content dd {
-	width: 35%;
-	float: left;
-	margin: 0 0 3px 0;
-	padding: 0;
-}
-
-.profile_pie {
-	background: url(../images/stats_pie.png);
-	float: left;
-	height: 20px;
-	width: 20px;
-	margin: 0 1em 0 0;
-	padding: 0;
-	text-indent: -1000em;
-}
-
-/* View posts */
-.topic .time {
-	float: right;
-}
-
-.counter {
-	margin: 0 0 0 0;
-	padding: 0.2em 0.5em 0.1em 0.2em;
-	font-size: 2.2em;
-	font-weight: bold;
-	color: #3f3f3f;
-	float: left;
-}
-.list_posts {
-	border-top: 2px solid #b3b3bf;
-	padding-top: 12px;
-	margin-top: 6px;
-	overflow: auto;
-}
-
-.core_posts {
-	margin-bottom: 3px;
-}
-
-.topic h4 {
-	margin: 3px 0;
-}
-
-.topic .post {
-	margin: 0 1em;
-	min-height: 80px;
-	height: auto !important;
-	height: 80px;
-}
-
-.topic .mod_icons {
-	text-align: right;
-	margin-right: 1em;
-}
-
-#tracking div.content dl {
-	border-bottom: 0;
-	margin: 0;
-	padding: 0;
-}
-
-#creator dl {
-	margin: 0;
-}
-#creator dt {
-	width: 40%;
-	float: left;
-	clear: both;
-	margin: 0 0 10px 0;
-}
-#creator dd {
-	float: right;
-	width: 55%;
-	margin: 0 0 10px 2px;
-	overflow: auto;
-}
-img.centericon {
-	vertical-align: middle;
-}
-.ignoreboards {
-	margin: 0 2%;
-	padding: 0;
-	width: 90%;
-}
-.ignoreboards a {
-	font-weight: bold;
-	border-bottom: 1px solid #c4c4c4;
-	padding: 0.1em 0;
-}
-.ignoreboards a:hover {
-	text-decoration: none;
-	border-bottom: 1px solid #334466;
-}
-.ignoreboards ul {
-	margin: 0;
-	padding: 0;
-}
-.ignoreboards li {
-	list-style: none;
-	float: left;
-	clear: both;
-}
-.ignoreboards li.category {
-	margin: 0.7em 0 0 0;
-	width: 100%;
-}
-.ignoreboards li ul {
-	margin: 0.2em 0 0 0;
-}
-.ignoreboards li.category ul li.board {
-	width: 93%;
-}
-
-#theme_settings {
-	overflow: auto;
-	margin: 0;
-	padding: 0;
-}
-
-#theme_settings li {
-	list-style: none;
-	margin: 10px 0;
-	padding: 0;
-}
-/* Paid Subscriptions */
-#paid_subscription {
-	width: 100%;
-}
-#paid_subscription dl.settings {
-	margin-bottom: 0;
-}
-#paid_subscription dl.settings dd, #paid_subscription dl.settings dt {
-	margin-bottom: 4px;
-}
-/* Pick theme */
-#pick_theme {
-	width: 100%;
-	float: left;
-}
-/*Issue a warning*/
-#warn_body{
-	width: 80%;
-	font-size: 0.9em;
-}
-
-/* Styles for the statistics center.
-------------------------------------------------- */
-#statistics {
-	padding: 0.5em 0;
-}
-#statistics div.title_bar {
-	margin: 4px 0 -2px 0;
-}
-#statistics h3.catbg {
-	text-align: center;
-}
-#statistics div.content {
-	min-height: 210px;
-}
-#statistics div.top_row {
-	min-height: 150px;
-}
-#stats_left, #top_posters, #top_topics_replies, #top_topics_starter {
-	float: left;
-	width: 49.5%;
-}
-#stats_right, #top_boards, #top_topics_views, #most_online {
-	float: right;
-	width: 49.5%;
-}
-dl.stats {
-	clear: both;
-	overflow: hidden;
-	margin: 0;
-	padding: 0;
-}
-dl.stats dt {
-	width: 49%;
-	float: left;
-	margin: 0 0 4px 0;
-	line-height: 16px;
-	padding: 0;
-	clear: both;
-	font-size: 1em;
-}
-dl.stats dd {
-	text-align: right;
-	width: 50%;
-	font-size: 1em;
-	float: right;
-	margin: 0 0 4px 0;
-	line-height: 16px;
-	padding: 0;
-}
-.statsbar div.bar {
-	float: left;
-	background: url(../images/bar_stats.png) no-repeat;
-	display: block;
-	margin: 0 4px;
-	height: 16px;
-}
-.statsbar div.bar div {
-	position: relative;
-	right: -4px;
-	padding: 0 4px 0 0;
-	background: url(../images/bar_stats.png) no-repeat 100%;
-	height: 16px;
-}
-tr.windowbg2 th.stats_month {
-	width: 25%;
-	padding: 0 2em;
-	text-align: left;
-}
-tr.windowbg2 td.stats_day {
-	padding: 0 3.5em;
-	text-align: left;
-}
-
-/* Styles for the personal messages section.
-------------------------------------------------- */
-
-#personal_messages h3 span#author, #personal_messages h3 span#topic_title {
-	float: left;
-}
-#personal_messages h3 span#author {
-	margin: 0 0 0 0.5em;
-}
-#personal_messages h3 span#topic_title {
-	margin: 0 0 0 9em;
-}
-#personal_messages div.labels {
-	padding: 0 1em 0 0;
-}
-#personal_messages .capacity_bar {
-	background: #f0f4f7;
-	display: block;
-	margin: 0.5em 0 0 1em;
-	height: 1em;
-	border: 1px solid #adadad;
-	width: 10em;
-}
-#personal_messages .capacity_bar span {
-	border-right: 1px solid #adadad;
-	display: block;
-	height: 1em;
-}
-#personal_messages .capacity_bar span.empty {
-	background: #a6d69d;
-}
-#personal_messages .capacity_bar span.filled {
-	background: #eea800;
-}
-#personal_messages .capacity_bar span.full {
-	background: #f10909;
-}
-#personal_messages .reportlinks {
-	padding: 0.5em 1.3em;
-}
-#searchLabelsExpand li {
-	padding: 0.3em 0.5em;
-}
-#manrules div.righttext {
-	padding: 0.3em 0.1em;
-}
-dl.addrules dt.floatleft {
-	width: 15em;
-	color: #333;
-	padding: 0 1.25em 0.5em 1.25em;
-}
-#addrule fieldset {
-	clear: both;
-}
-#to_item_list_container div, #bcc_item_list_container div {
-	float:left;
-	margin-right:10px;
-}
-
-/* Styles for the calendar section.
-------------------------------------------------- */
-.calendar_table {
-	margin-bottom: 0.7em;
-}
-
-/* Used to indicate the current day in the grid. */
-.calendar_today {
-	background: #fff;
-	border: 1px solid #bbb;
-	box-shadow: 0 2px 5px rgba(0,0,0,0.05) inset;
-}
-
-#month_grid {
-	width: 200px;
-	text-align: center;
-	float: left;
-}
-#month_grid div.cat_bar {
-	height: 38px;
-}
-#month_grid h3.catbg {
-	height: 38px;
-	line-height: 38px;
-}
-#month_grid table {
-	width: 200px;
-}
-#main_grid table {
-	width: 100%;
-	padding-bottom: 4px;
-}
-#main_grid table h3.catbg {
-	text-align: center;
-	height: 29px;
-	border-top: 2px solid #fff;
-	border-bottom: none;
-}
-#main_grid table.weeklist td.windowbg {
-	text-align: center;
-	height: 49px;
-	width: 25px;
-	font-size: large;
-	padding: 0 7px;
-	border-bottom: 2px solid #fff;
-}
-#main_grid table.weeklist td.weekdays {
-	height: 49px;
-	width: 100%;
-	padding: 4px;
-	text-align: left;
-	vertical-align: middle;
-	border-bottom: 2px solid #fff;
-}
-#main_grid h3.weekly {
-	text-align: center;
-	padding-left: 0;
-	font-size: large;
-	height: 29px;
-}
-#main_grid h3 span.floatleft, #main_grid h3 span.floatright {
-	display: block;
-	font-weight: bold;
-}
-#main_grid table th.days {
-	width: 14%;
-	padding: 4px 0;
-}
-#main_grid table.weeklist h4.titlebg {
-	margin: 0 0 0 0;
-	height: 23px;
-	line-height: 27px;
-}
-#main_grid table td.weeks {
-	vertical-align: middle;
-	text-align: center;
-	font-weight: bold;
-	font-size: large;
-}
-#main_grid table td.days {
-	vertical-align: top;
-	text-align: center;
-}
-
-a.modify_event {
-	color: red;
-}
-
-span.hidelink {
-	font-style: italic;
-}
-
-#calendar_navigation {
-	text-align: center;
-}
-
-/* Styles for the memberlist section.
-------------------------------------------------- */
-#mlist_search {
-	margin: auto;
-	width: 500px;
-}
-
-/* Styles for the basic search section.
-------------------------------------------------- */
-#searchform, #simple_search p {
-	padding: 0.5em;
-	margin: 0;
-}
-#simple_search, #simple_search p, #advanced_search {
-	text-align: center !important;
-	margin: 0;
-}
-#search_error {
-	font-style: italic;
-	padding: 0.3em 1em;
-}
-#search_term_input {
-	font-size: 115%;
-	margin: 0 0 1em;
-}
-
-/* Styles for the advanced search section.
-------------------------------------------------- */
-#searchform fieldset {
-	text-align: left;
-	padding: 0;
-	border: none;
-}
-#advanced_search dl#search_options {
-	margin: 0 auto;
-	width: 600px;
-	padding-top: 1em;
-	overflow: hidden;
-}
-#advanced_search dt {
-	clear: both;
-	float: left;
-	padding: 0.2em;
-	text-align: right;
-	width: 20%;
-}
-#advanced_search dd {
-	width: 75%;
-	float: left;
-	padding: 0.2em;
-	margin: 0 0 0 0.5em;
-	text-align: left;
-}
-#searchform p.clear {
-	clear: both;
-}
-
-/* Styles for the search results page.
-------------------------------------------------- */
-.topic_table td blockquote, .topic_table td .quoteheader {
-	margin: 0.5em;
-}
-.search_results_posts {
-	overflow: hidden;
-}
-.search_results_posts .buttons {
-	padding: 5px 1em 0 0;
-}
-
-/* Styles for the help section.
-------------------------------------------------- */
-
-#help_container {
-	margin: 4px 0 0 0;
-	padding: 0 0 8px 0;
-}
-#helpmain {
-	padding: 0 1em;
-}
-#helpmain p {
-	margin: 0 0 1.5em 0;
-	line-height: 1.5em;
-}
-#helpmain ul {
-	line-height: 1.5em;
-}
-
-/* Styles for print media.
-------------------------------------------------------- */
-@media print {
-	#headerarea
-	{
-		display: none;
-	}
-
-	.tborder
-	{
-		border: none;
-	}
-}
-
-/* Styles for the tooltips
-------------------------------------------------------- */
-.tooltip {
-    position: absolute;
-    z-index: 999;
-    left: -9999px;
-	word-wrap: break-word;
-    max-width: 350px;
-	padding: 6px 9px;
-	color: #333;
-	background: #fff;
-	border: 1px solid #aaa;
-	border-radius: 4px 4px 4px 4px;
-	box-shadow: 1px 2px 4px rgba(0,0,0,0.2), 0 0px 10px rgba(0,0,0,0.05) inset;
-}
-
-/* Styles for popup windows
-------------------------------------------------------- */
-.popup_container
-{
-	display: none;
-	position: fixed;
-	top: 0;
-	left: 0;
-	width: 100%;
-	height: 100%;
-	background: rgba(0,0,0,0.5);
-}
-
-.popup_window
-{
-	position: fixed;
-	width: 480px;
-	z-index: 99;
-	padding: 0;
-	box-shadow: 0 0 8px rgba(0,0,0,0.2);
-	border-radius: 5px;
-	max-height: none!important;
-	overflow: visible!important;
-}
-.popup_content, .popup_heading
-{
-	padding: 12px;
-	margin: 0;
-	border-top-right-radius: 5px;
-	border-top-left-radius: 5px;
-}
-
-.popup_content
-{
-	max-height: 20em;
-	overflow: auto;
-}
-
-.popup_heading .hide_popup
-{
-	display: inline-block;
-	width: 16px;
-	height: 16px;
-	background: url(../images/buttons/delete.png) center center no-repeat;
-	float: right;
-}
-
-.popup_heading .icon
-{
-	vertical-align: middle;
-	margin: -4px 4px 0 0;
-}
-
-/* Styles for the progress bar 
--------------------------------------------------- */
-.progress_bar {
-	height: 15pt;
-	border: 1px solid black;
-	background-color: white;
-	padding: 3px;
-	width: 80%;
-	margin: 0 auto;
-	position: relative;
-	border-radius: 5px;
-	box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
-}
-.progress_bar div.full_bar {
-	padding-top: 1pt;
-	width: 100%;
-	color: black;
-	position: absolute;
-	text-align: center;
-	font-weight: bold;
-	border-radius: 3px;
-	z-index: 2;
-}
-.progress_bar div.green_percent {
-	height: 15pt;
-	background-color: #c1ffc1;
-	background-image: -webkit-linear-gradient(top, #c1ffc1, green);
-	background-image: -moz-linear-gradient(top, #c1ffc1, green);
-	background-image: -ms-linear-gradient(top, #c1ffc1, green);
-	background-image: -o-linear-gradient(top, #c1ffc1, green);
-	background-image: linear-gradient(top, #c1ffc1, green);
-	border-radius: 3px;
-	z-index: 1;
-}
-.progress_bar div.blue_percent {
-	height: 15pt;
-	background-color: #98b8f4;
-	background-image: -webkit-linear-gradient(top, #98b8f4, blue);
-	background-image: -moz-linear-gradient(top, #98b8f4, blue);
-	background-image: -ms-linear-gradient(top, #98b8f4, blue);
-	background-image: -o-linear-gradient(top, #98b8f4, blue);
-	background-image: linear-gradient(top, #98b8f4, blue);
-	border-radius: 3px;
-	z-index: 1;
-}
+/* Styles for the general looks for the Curve theme.
+------------------------------------------------------- */
+
+/* Normal, standard links. */
+a:link, a:visited {
+	color: #346;
+	text-decoration: none;
+}
+a:hover {
+	text-decoration: underline;
+	cursor: pointer;
+}
+
+/* Links that open in a new window. */
+a.new_win:link, a.new_win:visited {
+	color: #346;
+	text-decoration: none;
+}
+a.new_win:hover {
+	text-decoration: underline;
+}
+
+/* Set a fontsize that will look the same in all browsers. */
+body {
+	background: #E9EEF2 url(../images/theme/backdrop.png) repeat-x;
+	font: 78%/130% "Verdana", "Arial", "Helvetica", sans-serif;
+	/* use dark grey for the text. */
+	color: #222;
+	margin: 0 auto;
+	padding: 15px 0;
+	position: relative;
+}
+
+/* Help popups require a different styling of the body element. */
+/* Deprecated? */
+body#help_popup {
+	padding: 12px;
+}
+
+/* use dark grey for the text.
+body, td, th, tr {
+	color: #222;
+} */
+
+/* This division wraps the entire forum when a forum width is set. */
+#wrapper {
+	margin: 0 auto;
+	min-width: 764px;
+}
+
+/* Tables should show empty cells. */
+table {
+	empty-cells: show;
+}
+
+/* Makes sense to default most elements to zero padding and margin. */
+/* <p> is a possible exception for margins. Must test that one a bit. */
+/* Box sizing for the masses. Very handy for stabilising fluid layouts. */
+div, p, ul, ol, li, dl, dd ,dt, fieldset, form {
+	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
+	padding: 0;
+	margin: 0;
+}
+
+/* Set list-style to none by default. Best in most places.*/
+ul, ol, li {
+	list-style: none;
+}
+
+/* I think the reset class can be deprecated. */
+/* Must test interitance thoroughly to be sure. */
+/* A quick reset list class. */
+ul.reset, ul.reset li {
+	padding: 0;
+	margin: 0;
+	list-style: none;
+}
+
+/* We can style the different types of input buttons to be uniform throughout different browsers and their color themes.
+	.button_submit - covers input[type=submit], input[type=button], button[type=submit] and button[type=button] in all browsers
+	.button_link   - covers links to make them look like a submit button
+	.button_reset  - covers input[type=reset] and button[type=reset] throughout all browsers
+	.input_check   - covers input[type=checkbox] throughout all browsers
+	.input_radio   - covers input[type=radio] throughout all browsers
+	.input_text    - covers input[type=text] throughout all browsers
+	.input_file    - covers input[type=file] throughout all browsers
+*/
+/* Thought it made sense to declare box-sizing here too. */
+input, button, select, textarea, textarea.editor {
+	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
+	background: #fff;
+	outline: none !important;
+	border: 1px solid #bbb;
+	vertical-align: middle;
+	border-radius: 3px;
+	box-shadow: 0 2px 5px rgba(0,0,0,0.05) inset;
+	padding: 3px;
+	font: 95%/115% verdana, Helvetica, sans-serif;
+	color: #333;
+}
+/* The font size of textareas should be just a little bit larger. */
+textarea {
+	font: 100%/130% verdana, Helvetica, sans-serif;
+}
+
+/* Buttons should be styled a bit differently, in order to make them look more button'ish. */
+#frmLogin input.button_submit, #guest_form  input.button_submit, #calendar_navigation input.button_submit {
+	float: none;
+	margin-left: inherit;
+}
+.button_submit, .button_reset, .button_link {
+	background: #cde7ff url(../images/theme/submit_bg.png) no-repeat;
+	border: 1px solid #aaa;
+	cursor: pointer;
+	font-weight: normal;
+	margin-left: 12px;
+	float: right;
+}
+.button_link {
+	padding: 4px 5px 4px 4px;
+	font: 95%/115% verdana, Helvetica, sans-serif;
+	float: right;
+	border-radius: 3px;
+}
+a.button_link {
+ 
+	color: #333;
+	margin: 0 !important;
+}
+input:hover, textarea:hover, button:hover, select:hover {
+	outline: none !important;
+	border: 1px solid #999;
+}
+textarea:hover, textarea.editor:hover {
+	background: #fbfbfb;
+}
+.button_submit:hover, .button_reset:hover, .button_link:hover {
+	border: 1px solid #aaa;
+	background: #dceeff url(../images/theme/submit_bg.png) no-repeat 0 -140px;
+}
+.button_link:hover {
+	text-decoration: none;
+}
+input:focus, textarea:focus, button:focus, select:focus, textarea.editor:focus {
+	outline:none !important;
+	border: 1px solid #999;
+	box-shadow: 0 2px 5px rgba(0,0,0,0.1) inset;
+}
+select option  {
+	padding: 0em 4px 0 4px;
+}
+
+/* the new "button" */
+a.new_posts, span.new_posts {
+	color: #fff;
+	font-weight: bold;
+	line-height: 1.12px;
+	border-radius: 2px;
+	background: orange;
+	color: #fff;
+}
+span.new_posts {
+	display: inline;
+	margin: 0 5px 0 -2px;
+	padding: 0 4px 1px 4px;
+	font-size: 9px;
+	box-shadow: 1px 2px 2px rgba(0,0,0,0.1), 0 -2px 4px rgba(0,0,0,0.1) inset;
+}
+a span.new_posts:hover {
+	text-decoration: underline;
+}
+
+/* All input elements that are checkboxes or radio buttons shouldn't have a border around them. */
+input.input_check, input.input_radio {
+	border: none;
+	background: none;
+	vertical-align: top;
+}
+h3.catbg input.input_check {
+	margin: 0 7px 0 7px;
+}
+
+/* Give disabled text input elements a different background color. */
+input[disabled].input_text {
+	background: #eee;
+}
+
+/* Standard horizontal rule.. ([hr], etc.) */
+hr {
+	height: 1px;
+	border: 0;
+	color: #ccc;
+	background-color: #ccc;
+}
+hr.hrcolor {
+	height: 1px;
+	border: none;
+	color: #ccc;
+	background-color: #ccc;
+}
+
+/* Set the color on these tags. */
+h1, h2, h3, h4, h5, h6 {
+	color: #222;
+	font-size: 1em;
+	margin: 0;
+	padding: 0;
+}
+h3, h4 {
+	padding-bottom: 3px;
+}
+
+/* Fieldsets are used to group elements. */
+fieldset {
+	padding: 18px;
+	margin: 0 0 6px 0;
+	border: 1px solid #ccc;
+	border-radius: 3px;
+}
+fieldset legend {
+	font-weight: bold;
+	color: #555;
+}
+
+/* Define strong as bold, and em as italics */
+strong {
+	font-weight: bold;
+	/* Having bold slightly lighter balances apparent darkness. */
+	color: #333;
+}
+em {
+	font-style: italic;
+}
+/* Alternative for u tag */
+.underline {
+	text-decoration: underline;
+}
+
+/* Common classes to easy styling.
+------------------------------------------------------- */
+
+.floatright {
+	float: right;
+}
+.floatleft {
+	float: left;
+}
+
+.flow_auto {
+	overflow: auto;
+}
+.flow_hidden {
+	overflow: hidden;
+}
+.flow_hidden .windowbg, .flow_hidden .windowbg2 {
+	margin-top: 2px;
+}
+.clear {
+	clear: both;
+}
+.clear_left {
+	clear: left;
+}
+.clear_right {
+	clear: right;
+}
+
+/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
+.smalltext, tr.smalltext th {
+	font-size: 0.85em;
+	font-family: verdana, sans-serif;
+}
+.largetext {
+	font-size: 1.4em;
+}
+.centertext {
+	margin: 0 auto;
+	text-align: center;
+}
+.righttext {
+	margin-left: auto;
+	margin-right: 0;
+	text-align: right;
+}
+.lefttext {
+	margin-left: 0;
+	margin-right: auto;
+	text-align: left;
+}
+.double_height {
+	line-height: 2em;
+}
+/* some common padding styles */
+.padding {
+	padding: 8px;
+}
+.main_section, .lower_padding {
+	padding-bottom: 6px;
+}
+
+/* Some BBC related styles.
+------------------------------------------------------- */
+
+/* A quote, perhaps from another post. */
+.bbc_standard_quote, .bbc_alternate_quote {
+	font-size: 0.9em;
+	color: #222;
+	background: url(../images/theme/quote.png) 1px 1px no-repeat;
+	border-top: 2px solid #99A;
+	border-bottom: 2px solid #99A;
+	padding: 10px 18px;
+	margin: 1px 0 6px 0;
+	overflow: auto;
+}
+
+/* Alterate blockquote stylings */
+.bbc_standard_quote {
+	background-color: #d7daec;
+}
+.bbc_alternate_quote {
+	background-color: #e7eafc;
+}
+
+/* A code block - maybe PHP ;). */
+.bbc_code {
+	display: block;
+	font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
+	font-size: 0.9em;
+	background: #eef;
+	border-top: 2px solid #999;
+	border-bottom: 2px solid #999;
+	margin: 1px 0 6px 0;
+	padding: 3px 12px;
+	overflow: auto;
+	white-space: nowrap;
+	/* Show a scrollbar after about 6 lines. */
+	/* This is much better than the old max-height css. */
+	height: 10em;
+	resize: vertical;
+}
+
+/* The "Quote:" and "Code:" header parts... */
+.codeheader, .quoteheader {
+	color: #666;
+	font-size: 0.9em;
+	font-weight: bold;
+	padding: 0 2px;
+}
+
+/* For links to change the code stuff... */
+.codeoperation {
+	font-weight: normal;
+}
+
+/* Let's get a bit more flexibility in font sizes for quotes and code. */
+/* We just need to stop em compounding when elements are nested. */
+.bbc_standard_quote .bbc_alternate_quote, .bbc_alternate_quote .bbc_standard_quote,
+.bbc_standard_quote .bbc_code, .bbc_alternate_quote .bbc_code, .bbc_standard_quote .codeheader,
+.bbc_alternate_quote .codeheader, .bbc_standard_quote .quoteheader, .bbc_alternate_quote .quoteheader {
+	font-size: 1em;
+}
+
+/* Styling for BBC tags */
+.bbc_link:link, .bbc_link:visited {
+	border-bottom: 1px solid #A8B6CF;
+}
+.bbc_link:hover {
+	text-decoration: none;
+	border-bottom: 1px solid #346;
+}
+.bbc_size {
+	line-height: 1.4em;
+}
+.bbc_color a {
+	color: inherit;
+}
+.bbc_img {
+	border: 0;
+}
+.bbc_table {
+	font: inherit;
+	color: inherit;
+}
+.bbc_table td {
+	font: inherit;
+	color: inherit;
+	vertical-align: top;
+}
+.bbc_u {
+	text-decoration: underline;
+}
+.bbc_list {
+	text-align: left;
+}
+.bbc_tt {
+	font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
+}
+
+/* No image should have a border when linked. */
+a img {
+	border: 0;
+}
+
+/* Generally, those [?] icons.  This makes your cursor a help icon. */
+.help {
+	cursor: help;
+}
+.help .icon {
+	margin: 0;
+	cursor: help;
+	/*line-height: 2.5em;*/
+	opacity: 0.8;
+}
+.help .icon:hover {
+	opacity: 1;
+}
+/* /me uses this a lot. (emote, try typing /me in a post.) */
+.meaction {
+	color: red;
+}
+
+/* Highlighted text - such as search results. */
+.highlight {
+	font-weight: bold;
+	color: #ff7200 !important;
+	font-size: 1.1em;
+}
+
+/* A more discreet highlight color, for selected membergroups etc. */
+.highlight2 {
+	background: #D1E1EF;
+	color: #111 !important;
+}
+
+/* Generic, mostly color-related, classes.
+------------------------------------------------------- */
+
+.titlebg, .titlebg2, tr.titlebg th, tr.titlebg td, tr.titlebg2 td {
+	color: #444;
+	font-family: arial, helvetica, sans-serif;
+	font-size: 1.1em;
+	font-weight: bold;
+	background: #c5cfd9 url(../images/theme/bars.png) 0 -340px repeat-x;
+}
+.catbg, .catbg2, tr.catbg td, tr.catbg2 td, tr.catbg th, tr.catbg2 th {
+	color: #fff;
+	font-family: arial, helvetica, sans-serif;
+	font-size: 1.1em;
+	font-weight: bold;
+	background: #99abbf url(../images/theme/bars.png) 0 -170px repeat-x;
+}
+
+/* adjust the table versions of headers */
+tr.titlebg th, tr.titlebg2 th, td.titlebg, td.titlebg2, tr.catbg th, tr.catbg2 th, td.catbg, td.catbg2 {
+	padding: 0 6px;
+}
+tr.titlebg th a:link, tr.titlebg th a:visited, tr.titlebg2 td a:link, tr.titlebg2 td a:visited {
+	color: #444;
+}
+tr.catbg th a:link, tr.catbg th a:visited, tr.catbg2 td a:link, tr.catbg2 td a:visited {
+	color: #fff;
+}
+.catbg select {
+	height: 2em;
+	font-size: 0.85em;
+	padding: 0;
+}
+
+/* Alternating backgrounds for posts, and several other sections of the forum. */
+.windowbg, #preview_body {
+	color: #111;
+	background: #e7eaef;
+}
+.windowbg2 {
+	color: #111;
+	background: #f0f4f7;
+}
+.windowbg3 {
+	color: #111;
+	background: #cacdd3;
+}
+
+/* General code for generic divs. Should make them behave. */
+div.windowbg, div.windowbg2 {
+	border-radius: 5px;
+	overflow: auto;
+	padding: 10px 0;
+	margin-top: 3px;
+}
+
+/* the page navigation area */
+.pagesection {
+	font-size: 0.9em;
+	padding: 2px;
+	overflow: hidden;
+	margin-bottom: 1px;
+}
+div.pagesection div.floatright input, div.pagesection div.floatright select {
+	margin-top: 3px;
+}
+.pagelinks {
+	padding: 8px 0 5px 0;
+}
+.navPages span {
+	text-transform: uppercase;
+}
+
+/* Colors for background of posts requiring approval */
+.approvebg {
+	color: #111;
+	background: #ffeaea;
+}
+.approvebg2 {
+	color: #111;
+	background: #fff2f2;
+}
+
+/* Color for background of *topics* requiring approval */
+.approvetbg {
+	color: #111;
+	background: #e4a17c;
+}
+.approvetbg2 {
+	color: #111;
+	background: #f3bd9f;
+}
+
+/* Sticky topics get a different background */
+.stickybg {
+	background: #e8d8cf;
+}
+.stickybg2 {
+	background: #f2e3d9;
+}
+
+/* Plain locked topics just get the icon. */
+/* Nobody wants them to stand out much. */
+.lockedbg {
+	background: #e7eaef;
+}
+.lockedbg2 {
+	background: #f0f4f7;
+}
+
+/* Posts and personal messages displayed throughout the forum. */
+.post, .personalmessage {
+	overflow: auto;
+	line-height: 1.4em;
+	padding: 1px 0;
+}
+
+/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
+.signature, .attachments {
+	width: 98%;
+	overflow: auto;
+	clear: right;
+	padding: 12px 0 3px 0;
+	border-top: 1px solid #aaa;
+	line-height: 1.4em;
+	font-size: 0.85em;
+}
+.custom_fields_above_signature {
+	width: 98%;
+	clear: right;
+	padding: 12px 0 3px 0;
+	border-top: 1px solid #aaa;
+	line-height: 1.4em;
+	font-size: 0.85em;
+}
+
+/* Sometimes there will be an error when you post */
+.error {
+	color: red;
+}
+
+/* Messages that somehow need to attract the attention. */
+.alert {
+	color: red;
+}
+
+/* Calendar colors for birthdays, events and holidays */
+.birthday {
+	color: #920ac4;
+}
+
+.event {
+	color: #078907;
+}
+
+.holiday {
+	color: #000080;
+}
+
+/* Colors for warnings */
+.warn_mute {
+	color: red;
+}
+
+.warn_moderate {
+	color: #ffa500;
+}
+
+.warn_watch, .success {
+	color: green;
+}
+
+a.moderation_link, a.moderation_link:visited {
+	color: red;
+	font-weight: bold;
+}
+
+.openid_login {
+	background: white url(../images/openid.png) no-repeat;
+	padding-left: 18px;
+}
+
+/* a descriptive style */
+.description, .description_board, .plainbox {
+	padding: 6px 12px;
+	font-size: 0.9em;
+	line-height: 1.4em;
+	border: 1px solid #bbb;
+	background: #f5f5f0;
+	margin: 2px 1px 12px 1px;
+}
+.description_board {
+	margin: 12px 1px 0 1px;
+}
+
+/* an informative style */
+.information {
+	padding: 6px 12px;
+	font-size: 0.9em;
+	line-height: 1.3em;
+	border: 1px solid #bbb;
+	background: #f0f6f0;
+	margin: 2px 1px 12px 1px;
+}
+.information p {
+	padding: 12px;
+	margin: 0;
+}
+p.para2 {
+	padding: 12px 0 44px 0;
+	margin: 0;
+}
+/* AJAX notification bar
+------------------------------------------------------- */
+#ajax_in_progress {
+	background: url(../images/theme/loadingbar.png) repeat-x;
+	color: #f96f00;
+	text-align: center;
+	font-size: 16pt;
+	padding: 8px;
+	width: 100%;
+	height: 66px;
+	line-height: 25px;
+	position: fixed;
+	top: 0;
+	left: 0;
+}
+
+#ajax_in_progress a {
+	color: orange;
+	text-decoration: underline;
+	font-size: smaller;
+	float: right;
+	margin-right: 20px;
+}
+
+/* Lists with settings use these a lot.
+------------------------------------------------------- */
+dl.settings {
+	clear: right;
+	overflow: auto;
+	margin: 0 0 10px 0;
+	padding: 0;
+}
+dl.settings dt {
+	width: 40%;
+	float: left;
+	margin: 0 0 10px 0;
+	padding: 0;
+	clear: both;
+}
+dl.settings dt.settings_title {
+	width: 100%;
+	float: none;
+	margin: 0 0 10px 0;
+	padding: 5px 0 0 0;
+	font-weight: bold;
+	clear: both;
+}
+dl.settings dt.windowbg {
+	width: 98%;
+	float: left;
+	margin: 0 0 3px 0;
+	padding: 0 0 5px 0;
+	clear: both;
+}
+dl.settings dd {
+	width: 56%;
+	float: right;
+	overflow: auto;
+	margin: 0 0 3px 0;
+	padding: 0;
+}
+dl.settings img {
+	margin: 0 10px 0 0;
+	vertical-align: middle;
+}
+/* help icons */
+dl.settings dt a img {
+	position: relative;
+	vertical-align: top;
+}
+
+/* Styles for rounded headers.
+------------------------------------------------------- */
+h3.catbg, h3.catbg2, h3.titlebg, h4.titlebg, h4.catbg {
+	overflow: hidden;
+	font-size: 1.2em;
+	font-weight: bold;
+	line-height: 1.5em;
+	padding: 8px;
+}
+h3.catbg a:link, h3.catbg a:visited, h4.catbg a:link, h4.catbg a:visited, h3.catbg, .table_list tbody.header td, .table_list tbody.header td a {
+	color: #fff;
+}
+h3.catbg2 a, h3.catbg2 {
+	color: #feb;
+}
+h3.catbg a:hover, h4.catbg a:hover, .table_list tbody.header td a:hover {
+	color: #fd9;
+	text-decoration: none;
+}
+h3.catbg2 a:hover {
+	color: #fff;
+	text-decoration: none;
+}
+h3.titlebg a, h3.titlebg, h4.titlebg, h4.titlebg a {
+	color: #444;
+}
+h3.titlebg a:hover, h4.titlebg a:hover {
+	color: #000838;
+	text-decoration: none;
+}
+h3.catbg img.icon {
+	vertical-align: middle;
+	margin: 0 5px 0 0;
+}
+h4.catbg a.toggle img {
+	vertical-align: middle;
+	margin: 0 5px 0 5px;
+}
+h4.catbg, h4.catbg2, h3.catbg, h3.catbg2, .table_list tbody.header td.catbg {
+	background: none;
+}
+h4.titlebg, h3.titlebg {
+	background: none;
+}
+h4.titlebg img.icon {
+	float: left;
+	margin: 0 8px 0 0;
+}
+div.cat_bar {
+	background: #99abbf url(../images/theme/bars.png) 0 -170px repeat-x;
+	margin-bottom: 1px;
+	border-radius: 5px;
+}
+div.title_bar {
+	background: #c5cfd9 url(../images/theme/bars.png) 0 -340px repeat-x;
+	margin-bottom: 1px;
+	border-radius: 5px;
+}
+
+/* Info center title bars are a bit different. */
+div.title_barIC {
+	background: #dde3e9 url(../images/theme/bars.png) 0 0 repeat-x;
+	margin-bottom: 1px;
+	border-radius: 5px;
+}
+div.title_barIC h4.titlebg {
+	background: none;
+}
+
+/* Upshrinks in cat and title bars. */
+#upshrinkHeaderIC p.pminfo {
+	margin: 0;
+	padding: 6px;
+}
+img#upshrink_ic, img#newsupshrink, img.panel_toggle, img#quickReplyExpand {
+	float: right;
+	margin: 0;
+	padding: 4px 4px 0 4px;
+}
+table.table_list a.unreadlink, table.table_list a.collapse {
+	float: right;
+}
+table.table_list a.collapse {
+	padding: 4px 4px 0 8px;
+}
+
+/* Basic icons in cat and title bars. */
+#upshrinkHeaderIC h4.titlebg a img{
+	margin: 0;
+	padding: 2px 6px 0 0;
+}
+
+/* The half-round header bars for some tables. */
+.table_grid tr.catbg, .table_grid tr.titlebg {
+	font-size: 1.05em;
+	border-bottom: 1px solid #fff;
+	background: none;
+}
+.table_grid tr.catbg th, .table_grid tr.titlebg th {
+	line-height: 1.6em;
+	padding: 6px 4px;
+}
+tr.catbg th.first_th {
+	background: #99abbf url(../images/theme/bars.png) 0 -170px repeat-x;
+	border-radius: 5px 0 0 0;
+}
+
+/* Cheat this on a bit to match the cells below it. */
+tr.catbg th.last_th {
+	background: #99abbf url(../images/theme/bars.png) 0 -170px repeat-x;
+	border-right: 1px solid #fff;
+	border-radius: 0 6px 0 0;
+}
+tr.titlebg th.first_th {
+	background: #c5cfd9 url(../images/theme/bars.png) 0 -340px repeat-x;
+	border-radius: 5px 0 0 0;
+}
+
+/* And cheat this on a bit too. */
+tr.titlebg th.last_th {
+	background: #c5cfd9 url(../images/theme/bars.png) 0 -340px repeat-x;
+	border-radius: 0 5px 0 0;
+}
+.table_grid th.last_th input {
+	margin: 0 2px;
+}
+.table_grid th.lefttext {
+	padding: 0 8px;
+}
+
+/* a general table class */
+table.table_grid {
+	border-collapse: collapse;
+	margin-top: 1px;
+}
+table.table_grid td {
+	padding: 3px;
+	border-bottom: 1px solid #fff;
+	border-right: 1px solid #fff;
+}
+
+/* GenericList */
+.additional_row {
+	padding: 6px 0 6px 0;
+}
+table.table_grid thead tr.catbg th {
+	/*white-space: nowrap;*/
+}
+img.sort {
+	margin-bottom: -4px;
+	margin-left: 4px;
+}
+
+/* table_grid styles for Profile > Show Permissions. */
+#permissions table.table_grid  td {
+	padding: 5px 10px;
+	cursor: default;
+} 
+
+.postbg {
+	border-left: 1px solid #7f7f7f;
+	border-right: 1px solid #7f7f7f;
+}
+
+/* Used for sections that need somewhat larger corners.
+----------------------------------------------------------- */
+.roundframe {
+	margin: 2px 0 0 0;
+	padding: 9px;
+	background: #f5f5f5;
+	border: 1px solid #c5c5c5;
+	border-radius: 7px;
+}
+.roundframe dl, .roundframe dt, .roundframe p {
+	margin: 0;
+}
+.roundframe p {
+	padding: 6px;
+}
+
+/* The main content area.
+------------------------------------------------------- */
+.content {
+	padding: 6px 15px;
+	margin: 0;
+	border: none;
+}
+.content p {
+	margin: 0 0 6px 0;
+}
+
+/* Styles used by the auto suggest control.
+------------------------------------------------------- */
+.auto_suggest_div {
+	position: absolute;
+	visibility: hidden;
+	border-radius: 3px;
+	outline: none !important;
+	border: 1px solid #bbb;
+}
+.auto_suggest_item {
+	background: #ddd;
+	padding: 1px 4px;
+}
+.auto_suggest_item_hover {
+	background: #888;
+	cursor: pointer;
+	color: #eee;
+	padding: 1px 4px;
+}
+
+/* Styles for the standard dropdown menus.
+------------------------------------------------------- */
+#main_menu {
+	margin: 0 0 0 0;
+	padding: 8px 0 0 0;
+	float: left;
+	width: 100%;
+}
+.dropmenu {
+	margin: 0 0 0 0;
+	padding: 0 0 0 0;
+	float: left;
+}
+/* Level 1 button background. */
+.dropmenu li {
+	margin: 0 2px 0 2px;
+	padding: 0 0 5px 0;
+	float: left;
+	font-size: 1em;
+	line-height: 1.9em;
+	position: relative;
+}
+/* Needed for new PM notifications. */
+.dropmenu li strong {
+	color: #333;
+}
+.dropmenu li a {
+	padding: 0 7px 0 7px;
+	margin: 0 0 0 0;
+	display: block;
+	border: 1px solid rgba(0,0,0,0);
+	border-radius: 4px;
+}
+/* Level 1 active button. */
+.dropmenu li a.active {
+	background: orange;
+	color: #fff;
+	font-weight: bold;
+	border: 1px solid #f49a3a;
+	box-shadow: 0 5px 5px rgba(255,255,255,0.2) inset;
+	text-shadow: -1px -1px 0 rgba(0,0,0,0.20);
+}
+/* Level 1 hover effects. */
+.dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus {
+	background: #597b9f;
+	border: 1px solid #4a6b8c;
+	color: #fff;
+	cursor: pointer;
+	text-decoration: none;
+	box-shadow: 0 4px 4px rgba(255,255,255,0.1) inset;
+}
+/* Level 1 active button. */
+.dropmenu li a.active:hover, .dropmenu li:hover a.active {
+	background: orange;
+	border: 1px solid #f49a3a;
+	color: #444;
+	box-shadow: 0 5px 5px rgba(255,255,255,0.2) inset;
+	text-shadow: none;
+}
+/* If we feel like styling the active state separately. */
+.dropmenu li a:active {}
+/* Levels 2 and 3 submenu wrapper. */
+.dropmenu li ul {
+	z-index: 90;
+	position: absolute;
+	top: 2.2em;
+	left: -9999px;
+	width: 17em;
+	padding: 5px 0 7px 0;
+	font-weight: normal;
+	background: #fff url(../images/theme/bars.png) 0 -580px repeat-x;
+	border: solid 1px #999;
+	border-left: solid 1px #bbb;
+	border-top: solid 1px #ccc;
+	border-radius: 2px 7px 0 4px;
+	box-shadow: 3px 3px 4px rgba(0,0,0,0.3);
+}
+/* Level 2 link background. */
+.dropmenu li li {
+	margin: 0 0 0 0;
+	padding: 0 0 0 0;
+	position: relative;
+	overflow: visible;
+	border-top: 1px solid rgba(0,0,0,0);
+	border-bottom: 1px solid rgba(0,0,0,0);
+	float: none;
+}
+.dropmenu li li a {
+	font-size: 0.9em;
+	line-height: 2.4em;
+}
+.dropmenu li li a img {
+	vertical-align: middle;
+	padding: 0 2px 0 0;
+}
+/* Note: The next two declarations are for keyboard access with js disabled. */
+.dropmenu ul a:focus  {
+	margin-left: 9999px;
+	min-width: 16em;
+	background: #fff;
+	border-radius: 0 0 0 0;
+}
+.dropmenu ul ul a:focus {
+	margin-left: 19950px;
+}
+.dropmenu li:hover li a, .dropmenu li.sfhover li a {
+	margin: 0 0 0 0;
+	padding: 0 5px 0 9px;
+	display: block;
+	border: none;
+	border-radius: 0;
+	/* Necessary to allow highlighting of 1st level while hovering over submenu. */
+	background: none;
+	color: #346;
+	box-shadow: none;
+}
+/* Level 3 submenu wrapper positioning. */
+.dropmenu li ul ul, .dropmenu li.sfhover ul ul {
+	margin: -2.3em 0 0 16.3em;
+}
+/* Level 3 maintains font-size the same as Level 2. */
+.dropmenu li li li a {
+
+}
+/* Levels 2 and 3 hover effects. */
+.dropmenu li li:hover, .dropmenu li li:hover>a, .dropmenu li li a:focus, .dropmenu li li.subsections a:focus {
+	background: none;
+	color: #333;
+	text-decoration: none;
+}
+.dropmenu li li:hover {
+	border-top: 1px solid #d4dee6;
+	border-bottom: 1px solid #cbdae6;
+	background: #e3e9ef url(../images/theme/lower_section.png) 0 0 repeat-x;
+}
+/* Reposition Level 2 submenu as visible on hover. */
+.dropmenu li:hover ul, .dropmenu li.sfhover ul {
+	left: 0;
+}
+/* Hiding Level 3 submenu off hover. */
+.dropmenu li:hover ul ul, .dropmenu li.sfhover ul ul, .dropmenu li:hover ul ul ul, .dropmenu li.sfhover ul ul ul {
+	left: -9999px;
+}
+/* Reposition as visible on hover. */
+.dropmenu li li:hover ul, .dropmenu li li.sfhover ul {
+	left: -8px;
+}
+/* Indicator for additonal levels. Best in the anchor so it stays visible on hover. */
+.dropmenu li li.subsections a {
+	background: url(../images/admin/subsection.png) no-repeat 99% 40%;
+}
+/* For no-js background. */
+.dropmenu li li.subsections a:focus {
+	background: #fff url(../images/admin/subsection.png) no-repeat 99% 40%;
+}
+/* Stops inheritance of indicator icon if there is no fourth level. */
+.dropmenu li li.subsections li a {
+	background: none;
+}
+.dropmenu li li.subsections li a:focus {
+	background: #fff;
+}
+/* Highlighting of current section */
+.dropmenu li li a.chosen {
+	font-weight: bold;
+}
+
+/* The dropdown menu toggle image */
+#menu_toggle, .adm_section h4 img {
+	float: right;
+	margin: 2px;
+	padding: 5px 9px 2px 9px;
+	background: #e3e9ef url(../images/theme/lower_section.png) 0 100% repeat-x;
+	border: 1px solid #bbb;
+	border-bottom: 1px solid #aaa;
+	border-radius: 4px;
+}
+.adm_section h4 img {
+ 	margin: 0 1px;
+	padding: 3px 7px 0 7px;
+	border: 1px solid #eee;
+}
+#menu_toggle:hover, .adm_section h4 img:hover {
+	background: #fff url(../images/theme/lower_section.png) 0 30% repeat-x;
+}
+
+/* Styles for the standard button lists.
+------------------------------------------------------- */
+
+.buttonlist ul {
+	z-index: 100;
+	padding: 5px;
+	margin: 0 2px 5px 0;
+}
+.buttonlist ul li {
+	margin: 0 0 0 12px;
+	padding: 0;
+	float: left;
+}
+.buttonlist ul li a {
+	display: block;
+	font-size: 0.8em;
+	color: #222;
+	background: #e8e8e8;
+	border-radius: 4px;
+	text-transform: uppercase;
+	cursor: pointer;
+}
+.buttonlist ul li a:hover {
+	background: #ff9400;
+	color: #fff;
+	text-decoration: none;
+}
+.buttonlist ul li a span {
+	display: block;
+	height: 2.2em;
+	line-height: 2.2em;
+	padding: 0 8px;
+}
+/* the active one */
+.buttonlist ul li a.active {
+	background: #5a6c85;
+	color: #fff;
+	font-weight: bold;
+}
+.buttonlist ul li a.active:hover {
+	background: #ff9400;
+}
+.align_top ul li a, .align_bottom ul li a {
+	margin: 0 12px 0 0;
+}
+
+/* the navigation list */
+ul#navigation {
+	margin: 0;
+	font-size: 0.9em;
+	padding: 12px 5px;
+}
+ul#navigation li {
+	float: none;
+	font-size: 0.95em;
+	display: inline;
+}
+
+#adm_submenus {
+	padding-left: 25px;
+	overflow: hidden;
+}
+
+/* Styles for the general looks for the Curve theme.
+------------------------------------------------------- */
+
+/* the framing graphics */
+#header {
+	background: #fff;
+	border: 1px solid #b8b8b8;
+	border-bottom: none;
+	border-radius: 8px 8px 0 0;
+	padding: 2px 2px 0 2px;
+}
+#header .frame {
+	background: url(../images/theme/bars.png) 0 -510px repeat-x;
+	border-radius: 6px 6px 0 0;
+	display: block;
+	padding: 0 0 0 0;
+}
+/* clearing the floats */
+#top_section {
+	min-height: 50px;
+	overflow: hidden;
+	margin: 0;
+	padding: 0 15px;
+}
+#upper_wrap {
+	background: url(../images/theme/upper_section.png) 0 0 repeat-x;
+	border-radius: 6px 6px 0 0;
+	padding: 4px 10px 0 10px;
+	margin: 0 6px 0 6px;
+}
+#upper_section {
+	overflow: hidden;
+	padding: 12px 2px 0 2px;
+	margin: 0 0 0 0;
+}
+
+/* the main title, always stay at 45 pixels in height! */
+h1.forumtitle {
+	font-size: 1.8em;
+	font-family: Geneva, verdana, sans-serif;
+	line-height: 1.2em;
+	margin: 0;
+	padding: 12px 0;
+	float: left;
+}
+
+/* float these items to the right */
+#siteslogan, img#smflogo {
+	margin: 0;
+	padding: 0;
+	float: right;
+	line-height: 50px;	font-size: 1.8em;
+}
+
+/* the upshrink image needs some tweaking */
+img#upshrink {
+	float: right;
+	margin: 16px 4px 0px 8px;
+}
+
+/* ..so does the SMF logo */
+img#smflogo {
+	margin: 6px 0;
+}
+
+/* the upper_section, float the two each way */
+#upper_section .user {
+	width: 50%;
+	float: left;
+	overflow: auto;
+}
+#guest_form {
+	overflow: hidden;
+}
+#guest_form .info {
+	padding: 4px 0 ;
+	line-height: 1.3em;
+}
+#upper_section .user p {
+	float: left;
+	margin: 0 12px 12px 0;
+	padding: 0;
+}
+#upper_section .user ul {
+	margin: 0;
+	padding-left: 10px;
+	font-size: 0.9em;
+}
+#upper_section .user ul li {
+	margin-bottom: 2px;
+}
+#upper_section ul li.greeting {
+	font-size: 1.3em;
+	font-weight: bold;
+	line-height: 1.5em;
+}
+#upper_section .news {
+	width: 50%;
+	float: right;
+	text-align: right;
+	font-size: 0.9em;
+	padding: 0 5px 0 0;
+}
+#upper_section .news p {
+	display: inline;
+}
+#upper_section .news form {
+	padding-bottom: 10px;
+}
+#upper_section .news form .input_text {
+	padding: 4px;
+}
+
+/* the content section */
+#content_section {
+	background: #fff;
+	padding: 1px 16px;
+	border-left: 1px solid #b8b8b8;
+	border-right: 1px solid #b8b8b8;
+}
+#main_content_section {
+	width: 100%;
+	min-height: 200px;
+}
+
+/* The navigation list (i.e. linktree) */
+.navigate_section {
+	padding: 3px;
+	margin: 0 -3px 0 0;
+	overflow: auto;
+}
+#main_content_section .navigate_section {
+	margin: 0 0 0 0;
+}
+.navigate_section ul {
+	margin: 0 0 0 0;
+	font-size: 0.9em;
+	padding: 6px 0 0 0;
+	border-top: 1px solid #ccc;
+	overflow: hidden;
+	clear: both;
+	width: 100%;
+}
+.navigate_section ul li {
+	float: left;
+	padding: 4px 6px 4px 0;
+	font-size: 0.95em;
+}
+.navigate_section ul li a {
+	white-space: pre;
+}
+
+/* "Unread posts" and "New replies" links, accessible with header collapsed. */
+.navigate_section .unread_links {
+	float: right;
+	padding: 4px 0 4px 4px;
+}
+
+/* This markup gives the looks of the Curve theme without huge images. */
+/* The new "Go Down" target is here. Any added content will display globally. */
+#lower_section  {
+	padding: 0 5px 14px 5px;
+	background: #fff url(../images/theme/lower_section.png) 0 100% repeat-x;
+	border: 1px solid #b8b8b8;
+	border-top: none;
+	border-radius: 0 0 8px 8px;
+}
+#lower_section  .frame {
+	padding: 0;
+	background: #fff;
+	min-height: 30px;
+	border: none;
+	border-radius: 0 0 8px 8px;
+}
+
+/* Footer is now full-width by default. Frame inside it will match theme wrapper width automatically. */
+/* The footer wih copyright links etc. */
+#footer_section {
+	margin: 0;
+	padding: 0;
+}
+/* min-width should be equal to #wrapper min-width. */
+#footer_section div.frame {
+	margin: 0 auto;
+	padding: 15px 5px;
+	min-width: 764px;
+	text-align: center;
+}
+#footer_section ul li, #footer_section p {
+	font-size: 0.8em;
+}
+#footer_section ul li {
+	display: inline;
+	padding-right: 5px;
+}
+#footer_section ul li.copyright {
+	display: block;
+}
+
+/* Globally accessible "go up" link. */
+#footer_uplink {
+	display: block;
+	margin: 0 auto 7px auto;
+	width: 25px;
+}
+#footer_uplink img{
+	padding: 4px;
+}
+
+/* [WIP] Why were these placed here? Find a more sensible spot for them. */
+select.qaction, input.qaction {
+	font-size: 0.85em;
+	padding: 0;
+}
+#mlist table tbody td.windowbg2 {
+	text-align: center;
+}
+
+/* Styles for a typical table.
+------------------------------------------------------- */
+table.table_list {
+	width: 100%;
+}
+table.table_list .cat_bar {
+	border-radius: 5px 5px 0 0;
+}
+table.table_list p {
+	padding: 0;
+	margin: 0;
+}
+table.table_list td, table.table_list th {
+	padding: 5px;
+}
+table.table_list tbody.header td {
+	padding: 0;
+}
+table.table_list tbody.content td.stats {
+	font-size: 90%;
+	width: 13%;
+	text-align: center;
+}
+table.table_list tbody.content td.lastpost {
+	line-height: 1.3em;
+	font-size: 85%;
+	width: 24%;
+}
+table.table_list tbody.content td.icon {
+	text-align: center;
+	width: 6%;
+}
+
+/* Styles for the board index.
+------------------------------------------------- */
+
+/* the board title! */
+.table_list tbody.content td.info a.subject {
+	font-weight: bold;
+	font-size: 110%;
+	color: #d97b33;/**/ color: #f56d00; 
+}
+.table_list tbody.content td.children {
+	color: #555;
+	font-size: 85%;
+}
+p.moderators {
+	font-size: 0.8em;
+	font-family: verdana, sans-serif;
+}
+/* hide the table header/footer parts - but its here for those needing to style it */
+#boardindex_table .table_list thead, #boardindex_table .table_list tfoot {
+	display: none;
+}
+
+/* the posting icons */
+#posting_icons {
+	padding: 0 12px 6px 12px;
+	margin: 0 0 12px 0;
+	line-height: 12px;
+}
+#posting_icons ul {
+	font-size: 0.8em;
+}
+#posting_icons img {
+	vertical-align: middle;
+	margin: 0 0 0 12px;
+}
+#postbuttons_upper ul li a span {
+	line-height: 19px;
+	padding: 0 0 0 6px;
+}
+.nextlinks {
+	text-align: right;
+	margin-top: -1px;
+}
+.nextlinks_bottom {
+	clear: right;
+	text-align: right;
+}
+.mark_read {
+	padding: 0 6px;
+}
+
+/* the newsfader */
+#newsfader {
+	margin: 0 2px;
+	/*clear: both; /* Necessary? Check it. */
+}
+#smfFadeScroller {
+	text-align: center;
+	padding: 0 25px;
+	overflow: auto;
+	margin: 12px 0;
+	color: #444444; /* shouldn't be shorthand style due to a JS bug in IE! */
+}
+
+/* Styles for the info center on the board index.
+---------------------------------------------------- */
+#info_center {
+	clear: both;
+	margin: 0 2px;
+}
+#upshrinkHeaderIC {
+	margin-top: 4px;
+}
+dl#ic_recentposts {
+	margin: 0 0 6px 0;
+	padding: 6px;
+	font-size: 0.9em;
+	line-height: 1.6em;
+}
+dl#ic_recentposts dt {
+	float: left;
+	border-bottom: 1px solid #f2f2f2;
+}
+dl#ic_recentposts dd {
+	text-align: right;
+	border-bottom: 1px solid #f2f2f2;
+}
+#upshrinkHeaderIC p.inline {
+	border: none;
+	margin: 0 0 0 0;
+	padding: 2px 6px;
+	font-size: 0.9em;
+}
+#upshrinkHeaderIC p.inline span {
+	margin: 0;
+	padding: 4px 0 0 0;
+}
+#upshrinkHeaderIC span.membergroups {
+	display: block;
+}
+#upshrinkHeaderIC p.last {
+	margin: 2px 0 0 0;
+	padding: 4px 6px 0 6px;
+	border-top: 2px dotted #bbb;
+	font-size: 0.9em;
+}
+/* the small stats */
+#index_common_stats {
+	margin: -4px 8px 6px 8px;
+	padding: 4px 0 0 0;
+	font-size: 0.9em;
+	border-top: 1px solid #ccc;
+}
+
+img.new_posts {
+	padding: 0 1px;
+}
+
+.fix_rtl_names {
+	display:inline-block;
+}
+
+/* Styles for the message (topic) index.
+---------------------------------------------------- */
+div.table_frame .table_list {
+	border-collapse: collapse;
+	margin: 2px 0;
+}
+#messageindex {
+	clear: both;
+}
+/* the page navigation area */
+.childboards {
+	margin-bottom: 2px;
+}
+#childboards h3 {
+	padding-bottom: 0;
+}
+#childboards .table_list thead {
+	display: none;
+}
+#childboards .table_list {
+	margin-bottom: 12px;
+}
+.lastpost img {
+	float: right;
+	padding: 4px;
+}
+
+/* Styles for the display template (topic view).
+---------------------------------------------------- */
+
+#postbuttons div.buttons {
+	padding: 6px;
+	width: 40%;
+	float: right;
+}
+#postbuttons div.middletext {
+	width: 60%;
+}
+#postbuttons span {
+	display: block;
+	text-align: right;
+}
+#postbuttons span.lower {
+	clear: right;
+}
+#postbuttons .buttonlist {
+	float: right;
+}
+#postbuttons #pagelinks {
+	padding-top: 12px;
+}
+#moderationbuttons {
+	overflow: hidden;
+}
+/* Events */
+.linked_events {
+	padding: 12px 0;
+}
+.edit_event {
+	margin: 0 10px;
+	vertical-align: top;
+}
+/* Poll question */
+#poll {
+	overflow: hidden;
+}
+#poll .content {
+	padding: 0 12px;
+}
+h4#pollquestion {
+	padding: 0 0 6px 25px;
+}
+
+/* Poll vote options */
+#poll_options ul.options {
+	border-top: 1px solid #9999aa;
+	padding: 12px 30px 0 25px;
+	margin: 0 0 12px 0;
+}
+#poll_options div.submitbutton {
+	border-bottom: 1px solid #9999aa;
+	clear: both;
+	padding: 0 0 12px 25px;
+	margin: 0 0 12px 0;
+}
+
+/* Poll results */
+#poll_options dl.options {
+	border: solid #9999aa;
+	border-width: 1px 0;
+	padding: 12px 0 12px 25px;
+	margin: 0 0 12px 0;
+	line-height: 1.1em !important;
+}
+#poll_options dl.options dt {
+	padding: 4px 0;
+	width: 30%;
+	max-width: 30em;
+	float: left;
+	margin: 0;
+	clear: left;
+}
+#poll_options dl.options .voted {
+	font-weight: bold;
+}
+#poll_options dl.options dd {
+	margin: 0 0 0 15px;
+	padding: 1px 0 0 0;
+	width: 60%;
+	max-width: 45em;
+	float: left;
+	margin: 0 0 4px 0;
+	padding: 0 4px 0 0;
+	line-height: 1.1em;
+	min-height: 1.1em;
+	background: #fff;
+	border: 1px solid #aaa;
+	border-radius: 2px;
+}
+
+#poll_options dl.options .percentage {
+	display: block;
+	float: right;
+	padding: 2px 0 0 0;
+}
+
+/* Poll notices */
+#poll_options p {
+	margin: 0 18px 2px 18px;
+	padding: 0 6px 6px 6px;
+}
+
+div#pollmoderation {
+	margin: 0;
+	padding: 0;
+	overflow: auto;
+}
+
+#poll_options .submitbutton {
+	float: right;
+	width: 100%;
+}
+
+/* onto the posts */
+#forumposts {
+	clear: both;
+}
+#forumposts .cat_bar {
+	margin: 0 0 2px 0;
+}
+/* author and topic information */
+#forumposts h3 span#author {
+	margin: 0 7.7em 0 0;
+}
+#forumposts h3 img {
+	float: left;
+	margin: 0 6px 0 0;
+}
+#forumposts h3.catbg {
+	margin-bottom: 3px;
+}
+p#whoisviewing {
+	margin: 0;
+	padding: 6px;
+}
+/* poster and postarea + moderation area underneath */
+.post_wrapper {
+	float: left;
+	width: 100%;
+}
+.poster {
+	float: left;
+	width: 15em;
+	word-wrap: break-word;
+	overflow: hidden;
+}
+.postarea, .moderatorbar {
+	margin: 0 0 0 16em;
+}
+.postarea div.flow_hidden {
+	width: 100%;
+}
+.poster img {
+	vertical-align: middle;
+}
+
+.moderatorbar {
+	clear: right;
+}
+/* poster details and list of items */
+.poster h4, .poster ul {
+	padding: 0;
+	margin: 0 12px 0 18px;
+}
+.poster h4 {
+	margin: 2px 0 5px 12px;
+	font-size: 120%;
+}
+.poster h4, .poster h4 a {
+	color: #c06002;
+}
+.poster ul ul {
+	margin: 4px 12px 0 0;
+	padding: 0;
+}
+.poster ul ul li {
+	display: inline;
+}
+.poster li.icons, .poster li.avatar, .poster li.blurb, li.postcount, li.im_icons ul {
+	margin-top: 6px;
+}
+.poster li.avatar {
+	overflow: hidden;
+}
+.poster li.warning {
+	line-height: 1.2em;
+	padding-top: 12px;
+}
+.poster li.warning a img {
+	vertical-align: bottom;
+	padding: 0 2px;
+}
+.messageicon {
+	float: left;
+	margin: 0 6px 0 0;
+}
+.messageicon img {
+	padding: 6px 3px;
+}
+.keyinfo {
+	float: left;
+	width: 50%;
+}
+.modifybutton {
+	clear: right;
+	float: right;
+	margin: 6px 20px 10px 0;
+	text-align: right;
+	font: bold 0.85em arial, sans-serif;
+	color: #334466;	
+}
+
+/* The quick buttons */
+div.quickbuttons_wrap {
+	padding: 2px 0;
+	width: 100%;
+	float: left;
+}
+
+ul.quickbuttons {
+	margin: 11px 11px 0 0;
+	clear: right;
+	float: right;
+	text-align: right;
+	font: bold 0.85em arial, sans-serif;
+}
+ul.quickbuttons li {
+	float: left;
+	display: inline;
+	margin: 0 0 0 11px;
+}
+ul.quickbuttons li a {
+	padding: 0 0 0 20px;
+	display: block;
+	height: 20px;
+	line-height: 18px;
+	float: left;
+}
+ul.quickbuttons a:hover {
+	color: #a70;
+}
+ul.quickbuttons li a.quote_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 0;
+}
+ul.quickbuttons li a.remove_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -30px;
+}
+ul.quickbuttons li a.modify_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -60px;
+}
+ul.quickbuttons li a.approve_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -90px;
+}
+ul.quickbuttons li a.restore_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -120px;
+}
+ul.quickbuttons li a.split_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -150px;
+}
+ul.quickbuttons li a.reply_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
+}
+ul.quickbuttons li a.reply_all_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
+}
+ul.quickbuttons li a.notify_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
+}
+ul.quickbuttons li.inline_mod_check {
+	margin: 0 0 0 5px;
+}
+
+.post {
+	margin-top: 6px;
+	clear: right;
+}
+.inner {
+	padding: 12px 12px 2px 0;
+	margin: 0 12px 0 0;
+	border-top: 1px solid #99a;
+}
+img.smiley {
+	vertical-align: bottom;
+}
+#forumposts .modified {
+	float: left;
+	color: #333;
+}
+#forumposts .reportlinks {
+	margin-right: 18px;
+	text-align: right;
+	clear: right;
+}
+#forumposts .signature, .post .signature {
+	margin: 12px 0 0 0;
+}
+#forumposts span.botslice {
+	clear: both;
+}
+.attachments hr {
+	clear: both;
+	margin: 12px 0 12px 0;
+}
+.attachments {
+	padding: 12px 0 25px 0;
+}
+.attachments div {
+	padding: 0 6px;
+}
+.attachments_top  {
+	margin: 0 auto;
+	text-align: center;
+}
+.attachments_bot  {
+	font-size: 0.85em;
+	font-family: verdana, sans-serif;
+	color: #222;
+}
+
+/* Styles for the quick reply area.
+---------------------------------------------------- */
+
+#quickreplybox {
+	padding-bottom: 1px;
+}
+#quickReplyOptions .roundframe {
+	padding: 0 10%;
+}
+#quickReplyOptions form textarea {
+	height: 100px;
+	width: 635px;
+	max-width: 100%;
+	min-width: 100%;
+}
+/* The jump to box */
+#display_jump_to {
+	clear: both;
+	padding: 5px;
+	margin-top: 6px;
+	text-align: right;
+}
+
+/* Separator of posts. More useful in the print stylesheet. */
+#forumposts .post_separator {
+	display: none;
+}
+
+/* Styles for edit post section
+---------------------------------------------------- */
+form#postmodify .roundframe {
+	padding: 0 12%;
+}
+#post_header, .postbox {
+	padding: 6px;
+	overflow: hidden;
+}
+#post_header dt, .postbox dt {
+	float: left;
+	padding: 0;
+	width: 15%;
+	margin: 6px 0 0 0;
+	font-weight: bold;
+}
+#post_header dd, .postbox dd {
+	float: left;
+	padding: 0;
+	width: 83%;
+	margin: 4px 0;
+}
+#post_header img {
+	vertical-align: middle;
+}
+ul.post_options {
+	margin: 0 0 0 12px;
+	padding: 0;
+	overflow: hidden;
+}
+ul.post_options li {
+	margin: 2px 0;
+	width: 49%;
+	float: left;
+}
+#postAdditionalOptionsHeader {
+	margin-top: 12px;
+}
+#postMoreOptions {
+	border-bottom: 1px solid #cacdd3;
+	padding: 6px;
+}
+#postAttachment, #postAttachment2 {
+	overflow: hidden;
+	margin: 6px 0;
+	padding: 0;
+	padding: 6px;
+}
+#postAttachment dd, #postAttachment2 dd {
+	margin: 4px 0 4px 12px;
+}
+#postAttachment dt, #postAttachment2 dt {
+	font-weight: bold;
+}
+#postAttachment3 {
+	margin-left: 12px;
+}
+#post_confirm_strip, #shortcuts {
+	padding: 12px 0 0 0;
+}
+.post_verification {
+	margin-top: 6px;
+}
+.post_verification #verification_control {
+	margin: 4px 0 4px 12px;
+}
+/* The BBC buttons */
+#bbcBox_message {
+	margin: 10px 6px;
+}
+#bbcBox_message div {
+	margin: 2px 0;
+	vertical-align: top;
+}
+#bbcBox_message div img {
+	margin: 0 1px 0 0;
+	vertical-align: top;
+}
+#bbcBox_message select {
+	margin: 0 2px;
+}
+/* The smiley strip */
+#smileyBox_message {
+	margin: 6px;
+}
+
+/* Styles for edit event section
+---------------------------------------------------- */
+#post_event .roundframe {
+	padding: 12px 12%;
+	overflow: auto;
+}
+#post_event fieldset {
+	padding: 6px;
+	clear: both;
+}
+#post_event #event_main input {
+	margin: 0 0 12px 0;
+	float: left;
+}
+#post_event #event_main div.smalltext {
+	width: 34.6em;
+	float: right;
+}
+#post_event div.event_options {
+	float: right;
+}
+#post_event .event_main, .event_options {
+	padding: 0;
+	overflow: hidden;
+}
+#post_event ul.event_main li {
+	list-style-type: none;
+	margin: 2px 0;
+	width: 49%;
+	float: left;
+}
+#post_event ul.event_options {
+	margin: 0;
+	padding: 0 0 8px 8px;
+}
+#post_event ul.event_options li {
+	list-style-type: none;
+	margin: 0;
+	float: left;
+}
+#post_event #event_main select, #post_event ul.event_options li select, #post_event ul.event_options li .input_check {
+	margin: 0 12px 0 0;
+}
+
+/* Styles for edit poll section.
+---------------------------------------------------- */
+
+#edit_poll {
+	overflow: hidden;
+}
+#edit_poll fieldset {
+	padding: 6px;
+	clear: both;
+	overflow: hidden;
+}
+#edit_poll fieldset input {
+	margin-left: 8.1em;
+}
+#edit_poll ul.poll_main li {
+	padding-left: 12px;
+}
+#edit_poll ul.poll_main input {
+	margin-left: 12px;
+}
+#edit_poll ul.poll_main, dl.poll_options {
+	overflow: hidden;
+	padding: 0 0 8px 8px;
+}
+#edit_poll ul.poll_main li {
+	margin: 2px 0;
+}
+#edit_poll dl.poll_options dt {
+	width: 33%;
+	padding: 0 0 0 12px;
+}
+#edit_poll dl.poll_options dd {
+	width: 65%;
+}
+#edit_poll dl.poll_options dd input {
+	margin-left: 0; 
+}
+
+/* Styles for the recent messages section.
+---------------------------------------------------- */
+
+#readbuttons_top .pagelinks, #readbuttons .pagelinks {
+	padding-bottom: 12px;
+	width: 60%;
+}
+#readbuttons .pagelinks {
+	padding-top: 12px;
+}
+#recent {
+	clear: both;
+}
+
+/* Styles for the move topic section.
+---------------------------------------------------- */
+
+#move_topic dl {
+	margin-bottom: 0;
+}
+#move_topic dl.settings dt {
+	width: 40%;
+}
+#move_topic dl.settings dd {
+	width: 59%;
+}
+.move_topic {
+	width: 710px;
+	margin: auto;
+	text-align: left;
+}
+div.move_topic fieldset {
+	padding: 6px;
+}
+
+/* Styles for the send topic section.
+---------------------------------------------------- */
+
+fieldset.send_topic {
+	border: none;
+	padding: 6px;
+}
+dl.send_topic {
+	margin-bottom: 0;
+}
+dl.send_mail dt {
+	width: 35%;
+}
+dl.send_mail dd {
+	width: 64%;
+}
+
+/* Styles for the report topic section.
+---------------------------------------------------- */
+
+#report_topic dl {
+	margin-bottom: 0;
+}
+#report_topic dl.settings dt {
+	width: 20%;
+}
+#report_topic dl.settings dd {
+	width: 79%;
+}
+
+/* Styles for the split topic section.
+---------------------------------------------------- */
+
+div#selected, div#not_selected {
+	width: 49%;
+}
+ul.split_messages li.windowbg, ul.split_messages li.windowbg2 {
+	margin: 1px;
+}
+ul.split_messages li a.split_icon {
+	padding: 0 6px;
+}
+ul.split_messages div.post {
+	padding: 12px 0 0 0;
+	border-top: 1px solid #fff;
+}
+
+/* Styles for the merge topic section.
+---------------------------------------------------- */
+ul.merge_topics li {
+	list-style-type: none;
+}
+dl.merge_topic dt {
+	width: 25%;
+}
+dl.merge_topic dd {
+	width: 74%;
+}
+fieldset.merge_options {
+	clear: both;
+}
+.custom_subject {
+	margin: 6px 0;
+}
+
+/* Styles for the login areas.
+------------------------------------------------------- */
+.login {
+	width: 540px;
+	margin: 0 auto;
+}
+.login dl {
+	overflow: auto;
+	clear: right;
+}
+.login dt, .login dd {
+	margin: 0 0 5px 0;
+	width: 44%;
+	padding: 1px;
+}
+.login dt {
+	float: left;
+	clear: both;
+	text-align: right;
+	font-weight: bold;
+}
+.login dd {
+	width: 54%;
+	float: right;
+	text-align: left;
+}
+.login p {
+	text-align: center;
+}
+
+/* Additional register fields */
+dl.register_form {
+	margin: 0;
+	clear: right;
+}
+dl.register_form dt {
+	font-weight: normal;
+	float: left;
+	clear: both;
+	width: 50%;
+	margin: 6px 0 0 0;
+}
+dl.register_form dt span {
+	display: block;
+}
+dl.register_form dd {
+	float: left;
+	width: 49%;
+	margin: 6px 0 0 0;
+}
+#confirm_buttons {
+	text-align: center;
+	padding: 12px 0;
+}
+.coppa_contact {
+	padding: 4px;
+	width: 32ex;
+	background: #fff;
+	color: #222;
+	margin-left: 5ex;
+	border: 1px solid #222;
+}
+.valid_input {
+	background: #f5fff0;
+}
+.invalid_input {
+	background: #fff0f0;
+}
+
+/* Styles for maintenance mode.
+------------------------------------------------------- */
+#maintenance_mode {
+	width: 75%;
+	min-width: 520px;
+	text-align: left;
+}
+#maintenance_mode img.floatleft {
+	margin-right: 12px;
+}
+
+/* common for all admin sections */
+h3.titlebg img {
+	vertical-align: middle;
+	margin: 0 5px 0 0;
+}
+tr.titlebg td {
+	padding-left: 8px;
+}
+#admin_menu {
+	min-height: 2em;
+	padding-left: 0;
+}
+#admin_content {
+	clear: left;
+	padding-top: 6px;
+}
+/* Custom profile fields like to play with us some times. */
+#admin_content .custom_field {
+	margin-bottom: 15px;
+}
+#admin_login .centertext {
+	padding: 12px;
+}
+#admin_login .centertext .error {
+	padding: 0 0 12px 0;
+}
+#admin_login .centertext a.help img {
+	vertical-align: middle;
+}
+
+/* Styles for sidebar menus.
+------------------------------------------------------- */
+.left_admmenu, .left_admmenu ul, .left_admmenu li {
+	padding: 0;
+	margin: 0;
+}
+#left_admsection {
+	width: 160px;
+	float: left;
+	padding-right: 10px;
+}
+.adm_section h4.titlebg {
+	font-size: 95%;
+	margin-bottom: 5px;
+}
+#main_container {
+	position: relative;
+}
+.left_admmenu li {
+	padding: 0 0 0 6px;
+}
+.left_admmenu {
+	margin-bottom: 6px;
+}
+#main_admsection {
+	position: relative;
+	left: 0;
+	right: 0;
+	overflow: auto;
+}
+
+tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td {
+	padding: 4px 8px;
+}
+#credits p {
+	padding: 0;
+	font-style: italic;
+	margin: 0;
+}
+
+/* Styles for generic tables.
+------------------------------------------------------- */
+.topic_table table {
+	width: 100%;
+}
+.topic_table .icon1, .topic_table .icon2, .topic_table .stats {
+	text-align: center;
+}
+#topic_icons {
+	margin: 12px 0 0 0;
+}
+#topic_icons .description {
+	margin: 0;
+}
+.topic_table table thead {
+	border-bottom: 1px solid #fff;
+}
+/* the subject column */
+.topic_table td {
+	font-size: 1em;
+}
+.topic_table td.subject p, .topic_table td.stats {
+	font-size: 0.85em;
+	padding: 0;
+	margin: 0;
+}
+.topic_table td.lastpost {
+	font-size: 0.85em;
+	line-height: 1.3em;
+	padding: 4px;
+}
+
+/* Sticky topics get a different background */
+.topic_table td.stickybg {
+	background:  #e8d8cf url(../images/icons/quick_sticky.png) no-repeat 98% 4px;
+}
+.topic_table td.stickybg2 {
+	background:  #f2e3d9 url(../images/icons/quick_sticky.png) no-repeat 98% 4px;
+}
+.topic_table td.locked_sticky, .topic_table td.stickybglockedbg {
+	background: #e8d8cf url(../images/icons/quick_sticky_lock.png) no-repeat 98% 4px;
+}
+.topic_table td.locked_sticky2, .topic_table td.stickybglockedbg2 {
+	background: #f2e3d9 url(../images/icons/quick_sticky_lock.png) no-repeat 98% 4px;
+}
+
+/* Plain locked topics just get the icon. */
+/* Nobody wants them to stand out much. */
+.topic_table td.lockedbg {
+	background: #e7eaef url(../images/icons/quick_lock.png) no-repeat 98% 4px;
+}
+.topic_table td.lockedbg2 {
+	background: #f0f4f7 url(../images/icons/quick_lock.png) no-repeat 98% 4px;
+}
+
+/* Stop those damned icons popping up in every table cell! */
+.topic_table td.icon1, .topic_table td.icon2, .topic_table td.stats,
+.topic_table td.lastpost, .topic_table td.moderation {
+	background-image: none;
+}
+
+/* Styles for (fatal) errors.
+------------------------------------------------- */
+
+#fatal_error {
+	width: 80%;
+	margin: auto;
+}
+.errorbox  {
+	background: #fee url(../images/warning_mute.png) 10px 50% no-repeat;
+	text-align: left;
+	border-top: 2px solid #c34;
+	border-bottom: 2px solid #c34;
+	padding: 7px 10px 7px 35px;
+	margin-bottom: 12px;
+}
+.errorbox h3 {
+	padding: 0;
+	margin: 0;
+	font-size: 1.1em;
+	text-decoration: underline;
+}
+.errorbox p {
+	margin: 12px 0 0 0;
+}
+.errorbox p.alert {
+	padding: 0;
+	margin: 0;
+	float: left;
+	width: 12px;
+	font-size: 1.5em;
+}
+.errorbox span {
+	text-decoration: underline;
+}
+
+/* Styles for info boxes
+------------------------------------------------- */
+
+.noticebox  {
+	color: #666;
+	background: #fff6ca url(../images/warning_moderate.png) 10px 50% no-repeat;
+	text-align: left;
+	border-top: 1px solid #ffd324;
+	border-bottom: 1px solid #ffd324;
+	padding: 7px 10px 7px 35px;
+	margin-bottom: 12px;
+}
+.infobox  {
+	color: #111;
+	background: #efe url(../images/icons/field_valid.png) 10px 50% no-repeat;
+	text-align: left;
+	border-top: 1px solid green;
+	border-bottom: 1px solid green;
+	padding: 7px 10px 7px 35px;
+	margin-bottom: 12px;
+}
+
+/* Styles for the profile section.
+------------------------------------------------- */
+
+dl {
+	overflow: auto;
+	margin: 0;
+	padding: 0;
+}
+
+/* The basic user info on the left */
+#basicinfo {
+	width: 20%;
+	float: left;
+}
+#basicinfo .windowbg .content {
+	padding-left: 20px;
+}
+#detailedinfo {
+	width: 79.5%;
+	float: right;
+}
+#basicinfo h4 {
+	font-size: 135%;
+	font-weight: 100;
+	line-height: 105%;
+	white-space: pre-wrap;
+	overflow: hidden;
+}
+#basicinfo h4 span.position {
+	font-size: 80%;
+	font-weight: 100;
+	display: block;
+}
+#basicinfo img.avatar {
+	display: block;
+	margin: 10px 0 0 0;
+}
+#basicinfo ul {
+	list-style-type: none;
+	margin: 10px 0 0 0;
+}
+#basicinfo ul li {
+	display: block;
+	float: left;
+	margin-right: 5px;
+	height: 20px;
+}
+#basicinfo span#userstatus {
+	display: block;
+	clear: both;
+}
+#basicinfo span#userstatus img {
+	vertical-align: middle;
+}
+#detailedinfo div.content dl, #tracking div.content dl {
+	clear: right;
+	overflow: auto;
+	margin: 0 0 18px 0;
+	padding: 0 0 15px 0;
+	border-bottom: 1px #ccc solid;
+}
+#detailedinfo div.content dt, #tracking div.content dt {
+	width: 35%;
+	float: left;
+	margin: 0 0 3px 0;
+	padding: 0;
+	font-weight: bold;
+	clear: both;
+}
+#detailedinfo div.content dd, #tracking div.content dd {
+	width: 65%;
+	float: left;
+	margin: 0 0 3px 0;
+	padding: 0;
+}
+#detailedinfo div.content dl.noborder {
+	border-bottom: 0;
+}
+#detailedinfo div.content dt.clear {
+	width: 100%;
+}
+.signature, .custom_fields_above_signature {
+	border-top: 1px #ccc solid;
+}
+.signature h5 {
+	font-size: 0.85em;
+	margin-bottom: 10px;
+}
+#personal_picture {
+	display: block;
+	margin-bottom: 4px;
+}
+#avatar_server_stored div {
+	float: left;
+}
+#avatar_upload {
+	overflow: auto;
+}
+#main_admsection #basicinfo, #main_admsection #detailedinfo {
+	width: 100%;
+}
+#main_admsection #basicinfo h4 {
+	float: left;
+	width: 35%;
+}
+#main_admsection #basicinfo img.avatar {
+	float: right;
+	vertical-align: top;
+}
+#main_admsection #basicinfo ul {
+	clear: left;
+}
+#main_admsection #basicinfo span#userstatus {
+	clear: left;
+}
+#main_admsection #basicinfo p#infolinks {
+	display: none;
+	clear: both;
+}
+#main_admsection #basicinfo .botslice {
+	clear: both;
+}
+
+/* Profile statistics */
+#generalstats div.content dt {
+	width: 50%;
+	float: left;
+	margin: 0 0 3px 0;
+	padding: 0;
+	font-weight: bold;
+	clear: both;
+}
+#generalstats div.content dd {
+	width: 50%;
+	float: left;
+	margin: 0 0 3px 0;
+	padding: 0;
+}
+
+/* Activity by time */
+#activitytime {
+	margin: 6px 0;
+}
+.activity_stats {
+	margin: 0;
+	padding: 0;
+}
+.activity_stats li {
+	margin: 0;
+	padding: 0;
+	width: 4.16%;
+	float: left;
+}
+.activity_stats li span {
+	display: block;
+	border: solid #222;
+	border-width: 1px 1px 0 0;
+	text-align: center;
+}
+.activity_stats li.last span {
+	border-right: none;
+}
+.activity_stats li div.bar {
+	margin: 0 auto;
+	width: 15px;
+}
+.activity_stats li div.bar div {
+	background: #6294CE;
+}
+.activity_stats li div.bar span {
+	position: absolute;
+	top: -1000em;
+	left: -1000em;
+}
+
+/* Most popular boards by posts and activity */
+#popularposts {
+	width: 49.5%;
+	float: left;
+}
+#popularactivity {
+	width: 49.5%;
+	float: right;
+}
+
+#popularposts div.content dt, #popularactivity div.content dt {
+	width: 65%;
+	float: left;
+	margin: 0 0 3px 0;
+	padding: 0;
+	font-weight: bold;
+	clear: both;
+}
+#popularposts div.content dd, #popularactivity div.content dd {
+	width: 35%;
+	float: left;
+	margin: 0 0 3px 0;
+	padding: 0;
+}
+
+.profile_pie {
+	background: url(../images/stats_pie.png);
+	float: left;
+	height: 20px;
+	width: 20px;
+	margin: 0 12px 0 0;
+	padding: 0;
+	text-indent: -1000em;
+}
+
+/* View posts */
+.topic .time {
+	float: right;
+}
+
+.counter {
+	margin: 0 0 0 0;
+	padding: 2px 6px 1px 2px;
+	font-size: 2.2em;
+	font-weight: bold;
+	color: #3f3f3f;
+	float: left;
+}
+.list_posts {
+	border-top: 2px solid #b3b3bf;
+	padding-top: 12px;
+	margin-top: 6px;
+	overflow: auto;
+}
+
+.core_posts {
+	margin-bottom: 3px;
+}
+
+.topic h4 {
+	margin: 3px 0;
+}
+
+.topic .post {
+	margin: 0 12px;
+	min-height: 80px;
+	height: auto !important;
+	height: 80px;
+}
+
+.topic .mod_icons {
+	text-align: right;
+	margin-right: 12px;
+}
+
+#tracking div.content dl {
+	border-bottom: 0;
+	margin: 0;
+	padding: 0;
+}
+
+#creator dl {
+	margin: 0;
+}
+#creator dt {
+	width: 40%;
+	float: left;
+	clear: both;
+	margin: 0 0 10px 0;
+}
+#creator dd {
+	float: right;
+	width: 55%;
+	margin: 0 0 10px 2px;
+	overflow: auto;
+}
+img.centericon {
+	vertical-align: middle;
+}
+.ignoreboards {
+	margin: 0 2%;
+	padding: 0;
+	width: 90%;
+}
+.ignoreboards a {
+	font-weight: bold;
+	border-bottom: 1px solid #c4c4c4;
+	padding: 1px 0;
+}
+.ignoreboards a:hover {
+	text-decoration: none;
+	border-bottom: 1px solid #334466;
+}
+.ignoreboards ul {
+	margin: 0;
+	padding: 0;
+}
+.ignoreboards li {
+	float: left;
+	clear: both;
+}
+.ignoreboards li.category {
+	margin: 8px 0 0 0;
+	width: 100%;
+}
+.ignoreboards li ul {
+	margin: 2px 0 0 0;
+}
+.ignoreboards li.category ul li.board {
+	width: 93%;
+}
+
+#theme_settings {
+	overflow: auto;
+	margin: 0;
+	padding: 0;
+}
+
+#theme_settings li {
+	margin: 10px 0;
+	padding: 0;
+}
+/* Paid Subscriptions */
+#paid_subscription {
+	width: 100%;
+}
+#paid_subscription dl.settings {
+	margin-bottom: 0;
+}
+#paid_subscription dl.settings dd, #paid_subscription dl.settings dt {
+	margin-bottom: 4px;
+}
+/* Pick theme */
+#pick_theme {
+	width: 100%;
+	float: left;
+}
+/*Issue a warning*/
+#warn_body{
+	width: 80%;
+	font-size: 0.9em;
+}
+
+/* Styles for the statistics center.
+------------------------------------------------- */
+#statistics {
+	padding: 6px 0;
+}
+#statistics div.title_bar {
+	margin: 4px 0 0 0;
+}
+#statistics .titlebg img {
+	margin: 3px 6px 0 3px;
+}
+#statistics .cat_bar {
+	margin: 4px 0 0 0;
+}
+#statistics h3.catbg {
+	text-align: center;
+}
+#statistics .flow_hidden {
+	background: #f0f4f7;
+	margin: 4px 0;
+	padding: 2px 6px;
+	border-radius: 7px;
+}
+#statistics div.windowbg2 {
+	background: none;
+}
+#stats_left, #top_posters, #top_topics_replies, #top_topics_starter {
+	float: left;
+	width: 50%;
+	padding: 0 3px 0 0; 
+}
+#stats_right, #top_boards, #top_topics_views, #most_online {
+	float: right;
+	width: 50%;
+	padding: 0 0 0 3px; 
+}
+#stats_left{
+	border-right: 2px solid #fff;
+}
+dl.stats {
+	clear: both;
+	overflow: hidden;
+	margin: 0;
+	padding: 0;
+}
+dl.stats dt {
+	width: 50%;
+	float: left;
+	margin: 0 0 4px 0;
+	padding: 0;
+	line-height: 1.5em;
+	clear: both;
+	font-size: 1em;
+}
+dl.stats dd {
+	text-align: right;
+	width: 50%;
+	font-size: 1em;
+	float: right;
+	margin: 0 0 4px 0;
+	padding: 0 4px 0 0;
+	line-height: 1.5em;
+	min-height: 1.5em;
+	background: #fff;
+	border: 1px solid #aaa;
+	border-radius: 2px;
+}
+.top_row dl.stats dd {
+	background: none; border: none;
+}
+.statsbar div.bar {
+	float: left;
+	background: orange;
+	border-right: 1px solid #999;
+	border-radius: 1px 0 0 1px;
+	box-shadow: 4px -4px 8px rgba(0,0,0,0.1) inset, 4px 4px 8px rgba(255,255,255,0.3) inset;
+	display: block;
+	margin: 0 4px 0 0;
+	height: 1.5em;
+}
+#stats {
+	margin: 4px 0;
+}
+#stats th.first_th {
+	padding-left: 8px;
+}
+#stats tr.windowbg2 th.lefttext {
+	border-left: 1px solid #fff;
+}
+#stats tr.windowbg2 th {
+	border-right: 1px solid #fff;
+	border-bottom: 1px solid #fff;
+}
+tr.windowbg2 th.stats_month {
+	width: 25%;
+	padding: 0 2em;
+	text-align: left;
+	border-left: 1px solid #fff;
+}
+tr.windowbg2 td.stats_day {
+	padding: 0 3.5em;
+	text-align: left;
+	border-left: 1px solid #fff;
+}
+
+/* Styles for the personal messages section.
+------------------------------------------------- */
+
+#personal_messages h3 span#author, #personal_messages h3 span#topic_title {
+	float: left;
+}
+#personal_messages h3 span#author {
+	margin: 0 0 0 6px;
+}
+#personal_messages h3 span#topic_title {
+	margin: 0 0 0 9em;
+}
+#personal_messages div.labels {
+	padding: 0 12px 0 0;
+}
+#personal_messages .capacity_bar {
+	background: #f0f4f7;
+	display: block;
+	margin: 6px 0 0 12px;
+	height: 12px;
+	border: 1px solid #adadad;
+	width: 10em;
+}
+#personal_messages .capacity_bar span {
+	border-right: 1px solid #adadad;
+	display: block;
+	height: 12px;
+}
+#personal_messages .capacity_bar span.empty {
+	background: #a6d69d;
+}
+#personal_messages .capacity_bar span.filled {
+	background: #eea800;
+}
+#personal_messages .capacity_bar span.full {
+	background: #f10909;
+}
+#personal_messages .reportlinks {
+	padding: 6px 1.3em;
+}
+#searchLabelsExpand li {
+	padding: 4px 6px;
+}
+#manrules div.righttext {
+	padding: 4px 1px;
+}
+dl.addrules dt.floatleft {
+	width: 15em;
+	color: #333;
+	padding: 0 15px 6px 15px;
+}
+#addrule fieldset {
+	clear: both;
+}
+#to_item_list_container div, #bcc_item_list_container div {
+	float:left;
+	margin-right:10px;
+}
+
+/* Styles for the calendar section.
+------------------------------------------------- */
+#calendar {
+	overflow: hidden;
+}
+
+/* Used to indicate the current day in the grid. */
+.calendar_today {
+	background: #fff;
+	border: 1px solid #bbb;
+	box-shadow: 0 2px 5px rgba(0,0,0,0.05) inset;
+}
+#month_grid {
+	padding: 0 15px 0 0;
+	width: 215px;
+	text-align: center;
+	float: left;
+}
+#month_grid div.cat_bar {
+	border-radius: 5px 5px 0 0;
+	margin: 0 1px 0 0;
+	padding: 0 0 0 0;
+}
+#month_grid h3 a {
+	padding: 0 6px 0 6px;
+}
+#month_grid table {
+	width: 200px;
+	margin-bottom: 12px;
+}
+#main_grid {
+	position: relative;
+	overflow: hidden;
+}
+#main_grid table {
+	width: 100%;
+	margin-bottom: 2px;
+	padding-bottom: 4px;
+}
+#main_grid .cat_bar {
+	border-radius: 5px 5px 0 0;
+	margin: 0 1px;
+}
+#main_grid h3.catbg {
+	padding: 8px 6px 4px 6px;
+}
+#main_grid h3.catbg span {
+	display: block;
+	font-size: 1.5em;
+	margin: -3px 4px 0 4px;
+}
+#main_grid table th.days {
+	width: 14%;
+	padding: 4px 0;
+}
+#main_grid table td.weeks {
+	text-align: center;
+	font-weight: bold;
+	font-size: 1.8em;
+}
+#main_grid table td.weeks a:hover {
+	text-decoration: none;
+}
+#main_grid table td.days {
+	vertical-align: top;
+	text-align: center;
+}
+#main_grid h3.weekly {
+	text-align: center;
+	font-size: 1.44em;
+}
+#main_grid ul.weeklist, #main_grid ul.weeklist li {
+	margin: 0 0 8px 0;
+	padding: 0;
+	float: left;
+	width: 100%;
+	overflow: hidden;
+}
+#main_grid ul.weeklist li {
+	margin: 0 1px 0 1px;
+	border-top: 2px solid #fff;
+}
+#main_grid .weeklist h4 {
+	text-align: center;
+	float: left;
+	width: 10em;
+	font-size: 1.2em;
+	padding: 15px 0;
+}
+#main_grid .weeklist h4 a:hover {
+	text-decoration: none;
+	border-bottom: 1px solid #346;
+}
+/* Use the old one true layout trick here. */
+#main_grid .weeklist .windowbg2 {
+	margin: 0 0 -95px 12em;
+	padding: 8px 8px 100px 8px;
+	border-radius: 0;
+	border-left: 2px solid #fff;
+}
+#main_grid .weeklist .calendar_today {
+	margin: 0 0 -95px 12em;
+	padding: 8px 8px 100px 8px;
+	border: none;
+	background: #fff;
+	box-shadow: none;
+}
+a.modify_event {
+	color: red;
+}
+span.hidelink {
+	font-style: italic;
+}
+/* Add a background that fits with the calendar. */
+#calendar_navigation {
+	margin: -6px 1px 0 1px;
+	padding: 12px 0;
+	text-align: center;
+	float: left;
+	width: 100%;
+	background: #e7eaef;
+}
+/* Cheat and match this to the submit button. */
+#main_grid .buttonlist {
+	position: absolute;
+	bottom: 12px;
+	right: 12px;
+}
+#main_grid .buttonlist a {
+	background: #cde7ff url(../images/theme/submit_bg.png) no-repeat;
+	border: 1px solid #aaa;
+	border-radius: 3px;
+}
+#main_grid .buttonlist a:hover {
+	background: #dceeff url(../images/theme/submit_bg.png) no-repeat 0 -140px;
+	color: #111;
+}
+
+/* Styles for the memberlist section.
+------------------------------------------------- */
+#mlist_search {
+	margin: auto;
+	width: 500px;
+}
+
+/* Styles for the basic search section.
+------------------------------------------------- */
+#searchform, #simple_search p {
+	padding: 6px;
+	margin: 0;
+}
+#simple_search, #simple_search p, #advanced_search {
+	text-align: center !important;
+	margin: 0;
+}
+#search_error {
+	font-style: italic;
+	padding: 4px 12px;
+}
+#search_term_input {
+	font-size: 115%;
+	margin: 0 0 12px;
+}
+
+/* Styles for the advanced search section.
+------------------------------------------------- */
+#searchform fieldset {
+	text-align: left;
+	padding: 0;
+	border: none;
+}
+#advanced_search dl#search_options {
+	margin: 0 auto;
+	width: 600px;
+	padding-top: 12px;
+	overflow: hidden;
+}
+#advanced_search dt {
+	clear: both;
+	float: left;
+	padding: 2px;
+	text-align: right;
+	width: 20%;
+}
+#advanced_search dd {
+	width: 75%;
+	float: left;
+	padding: 2px;
+	margin: 0 0 0 6px;
+	text-align: left;
+}
+#searchform p.clear {
+	clear: both;
+}
+
+/* Styles for the search results page.
+------------------------------------------------- */
+.topic_table td blockquote, .topic_table td .quoteheader {
+	margin: 6px;
+}
+.search_results_posts {
+	overflow: hidden;
+}
+.search_results_posts .buttons {
+	padding: 5px 12px 0 0;
+}
+
+/* Styles for the help section.
+------------------------------------------------- */
+
+#help_container {
+	margin: 0 0 0 0;
+	padding: 0 0 8px 0;
+	overflow: auto;
+}
+#helpmain {
+	padding: 12px;
+}
+#helpmain p {
+	margin: 10px 0;
+	line-height: 1.5em;
+}
+#helpmain ul {
+	line-height: 2em;
+	margin: 0 0 0 25px;
+}
+#helpmain ul li{
+	list-style-type: disc;
+}
+#helpmain ul li a {
+	font-weight: bold;
+}
+
+/* Styles for print media.
+------------------------------------------------------- */
+@media print {
+	#headerarea
+	{
+		display: none;
+	}
+
+	.tborder
+	{
+		border: none;
+	}
+}
+
+/* Styles for the tooltips
+------------------------------------------------------- */
+.tooltip {
+	position: absolute;
+	z-index: 999;
+	left: -9999px;
+	word-wrap: break-word;
+	max-width: 350px;
+	padding: 6px 9px;
+	color: #333;
+	background: #fff;
+	border: 1px solid #aaa;
+	border-radius: 4px 4px 4px 4px;
+	box-shadow: 1px 2px 4px rgba(0,0,0,0.2), 0 0px 10px rgba(0,0,0,0.05) inset;
+}
+
+/* Styles for popup windows
+------------------------------------------------------- */
+.popup_container
+{
+	display: none;
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	background: rgba(0,0,0,0.5);
+}
+.popup_window
+{
+	position: fixed;
+	width: 480px;
+	z-index: 99;
+	padding: 0;
+	box-shadow: 0 0 8px rgba(0,0,0,0.2);
+	border: 1px solid #ccc;
+	border-radius: 5px;
+	max-height: none!important;
+	overflow: visible!important;
+}
+.popup_content, .popup_heading
+{
+	padding: 12px;
+	margin: 0;
+	border-radius: 5px 5px 0 0;
+}
+.popup_heading
+{
+	border-radius: 4px 4px 0 0;
+}
+.popup_content
+{
+	max-height: 20em;
+	overflow: auto;
+}
+.popup_heading .hide_popup
+{
+	display: inline-block;
+	width: 16px;
+	height: 16px;
+	background: url(../images/buttons/delete.png) center center no-repeat;
+	float: right;
+}
+.popup_heading .icon
+{
+	vertical-align: middle;
+	margin: -4px 4px 0 0;
+}
+
+/* Styles for the progress bar 
+-------------------------------------------------- */
+.progress_bar {
+	height: 15pt;
+	border: 1px solid black;
+	background-color: white;
+	padding: 3px;
+	width: 80%;
+	margin: 0 auto;
+	position: relative;
+	border-radius: 5px;
+	box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
+}
+.progress_bar div.full_bar {
+	padding-top: 1pt;
+	width: 100%;
+	color: black;
+	position: absolute;
+	text-align: center;
+	font-weight: bold;
+	border-radius: 3px;
+	z-index: 2;
+}
+.progress_bar div.green_percent {
+	height: 15pt;
+	background-color: #c1ffc1;
+	background-image: -webkit-linear-gradient(top, #c1ffc1, green);
+	background-image: -moz-linear-gradient(top, #c1ffc1, green);
+	background-image: -ms-linear-gradient(top, #c1ffc1, green);
+	background-image: -o-linear-gradient(top, #c1ffc1, green);
+	background-image: linear-gradient(top, #c1ffc1, green);
+	border-radius: 3px;
+	z-index: 1;
+}
+.progress_bar div.blue_percent {
+	height: 15pt;
+	background-color: #98b8f4;
+	background-image: -webkit-linear-gradient(top, #98b8f4, blue);
+	background-image: -moz-linear-gradient(top, #98b8f4, blue);
+	background-image: -ms-linear-gradient(top, #98b8f4, blue);
+	background-image: -o-linear-gradient(top, #98b8f4, blue);
+	background-image: linear-gradient(top, #98b8f4, blue);
+	border-radius: 3px;
+	z-index: 1;
+}
+
+/* Experimental additions. */
+/*-------------------------*/
+
+/* Drop the stats cell from the board index on narrow screens. */
+/* Much more user-friendly IMHO. */
+
+@media screen and (max-width: 1220px) {
+	.table_list td.stats {
+		display: none;
+	}
+	.table_list td.lastpost p {
+		border-left: 2px solid #fff;
+		padding: 1px 5px 2px 10px;
+		margin-top: 1px;
+	}
+
+	.table_grid tbody tr td {
+		background: /*#e7eaef*/ #e8eff5;
+	}
+	.table_grid tbody tr:nth-child(even) td {
+		background: /*#f0f4f7*/ #eaf1f4;
+	}
+}
+
+/* Re-style the old board index with CSS tweaks only. */
+
+.table_list {
+	border-collapse: collapse;
+	margin: 0 2px;
+}
+.table_list .header td {
+	border-bottom: 1px solid #ddd;
+}
+
+/* Firefox seems to like this. Maybe only call for FF. */
+.table_list .cat_bar {
+	margin: 0 0 0 -1px;
+}
+
+.table_list td.icon, .table_list td.info, .table_list td.stats, .table_list td.lastpost {
+	border-top: 2px solid #fff;
+	height: 4.5em;
+}
+.table_list td.icon {
+	min-width: 50px;
+	/*Top aligned is much nicer for the icon. */
+	vertical-align: top;
+	padding-top: 7px;
+	background: none;
+}
+.table_list td.info {
+	padding-left: 1px;
+}
+.table_list td.stats {
+	padding-top: 6px;
+	background: none;
+}
+.table_list td.stats p {
+	border-left: 2px solid #fff;
+	border-right: 2px solid #fff;
+}
+.table_list tbody.content td.lastpost {
+	font-size: 0.9em;
+	min-width: 27em;
+}
+.table_list tbody.content td.lastpost p {
+	font-size: 1em;
+	line-height: 1.5em;
+	padding-top: 3px;
+}
+.table_list td.children {
+	background: none;
+	padding: 0 0 0 0;
+	border-top: 2px solid #fff;
+
+}
+.table_list td.children p {
+	padding: 3px 4px 2px 1px;
+}
+
+/* Clean up the fieldset styling. WTF was that shit? */
+.content fieldset {
+	border: double #ccc;
+}
+fieldset legend {
+	box-shadow: none;
+	border: none;
+}

二进制
Themes/default/images/admin/administration.png


二进制
Themes/default/images/admin/attachment.png


二进制
Themes/default/images/admin/ban.png


二进制
Themes/default/images/admin/boards.png


二进制
Themes/default/images/admin/calendar.png


二进制
Themes/default/images/admin/corefeatures.png


二进制
Themes/default/images/admin/current_theme.png


二进制
Themes/default/images/admin/engines.png


二进制
Themes/default/images/admin/features.png


二进制
Themes/default/images/admin/languages.png


二进制
Themes/default/images/admin/logs.png


二进制
Themes/default/images/admin/mail.png


二进制
Themes/default/images/admin/maintain.png


二进制
Themes/default/images/admin/membergroups.png


二进制
Themes/default/images/admin/members.png


二进制
Themes/default/images/admin/modifications.png


二进制
Themes/default/images/admin/news.png


二进制
Themes/default/images/admin/packages.png


二进制
Themes/default/images/admin/paid.png


二进制
Themes/default/images/admin/permissions.png


二进制
Themes/default/images/admin/posts.png


二进制
Themes/default/images/admin/regcenter.png


二进制
Themes/default/images/admin/reports.png


二进制
Themes/default/images/admin/scheduled.png


二进制
Themes/default/images/admin/search.png


二进制
Themes/default/images/admin/security.png


二进制
Themes/default/images/admin/server.png


二进制
Themes/default/images/admin/smiley.png


二进制
Themes/default/images/admin/support.png


二进制
Themes/default/images/admin/support~.png


二进制
Themes/default/images/admin/themes.png


二进制
Themes/default/images/collapse.png


二进制
Themes/default/images/expand.png


二进制
Themes/default/images/icons/calendar.png


二进制
Themes/default/images/icons/calendar_modify.png


二进制
Themes/default/images/icons/profile_sm.png


二进制
Themes/default/images/icons/profile_sm~.png


二进制
Themes/default/images/post/angry.png


二进制
Themes/default/images/post/cheesy.png


二进制
Themes/default/images/post/clip.png


二进制
Themes/default/images/post/exclamation.png


二进制
Themes/default/images/post/grin.png


二进制
Themes/default/images/post/lamp.png


二进制
Themes/default/images/post/moved.png


二进制
Themes/default/images/post/poll.png


二进制
Themes/default/images/post/question.png


二进制
Themes/default/images/post/recycled.png


二进制
Themes/default/images/post/sad.png


二进制
Themes/default/images/post/smiley.png


二进制
Themes/default/images/post/thumbdown.png


二进制
Themes/default/images/post/thumbup.png


二进制
Themes/default/images/post/wink.png


二进制
Themes/default/images/post/wireless.png


二进制
Themes/default/images/post/xx.png


二进制
Themes/default/images/theme/bars.png


二进制
Themes/default/images/theme/lower_section.png


二进制
Themes/default/images/theme/upper_section.png


二进制
Themes/default/images/upshrink.png


二进制
Themes/default/images/upshrink2.png


+ 629 - 597
Themes/default/index.template.php

@@ -1,598 +1,630 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines
- * @copyright 2011 Simple Machines
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Alpha 1
- */
-
-/*	This template is, perhaps, the most important template in the theme. It
-	contains the main template layer that displays the header and footer of
-	the forum, namely with main_above and main_below. It also contains the
-	menu sub template, which appropriately displays the menu; the init sub
-	template, which is there to set the theme up; (init can be missing.) and
-	the linktree sub template, which sorts out the link tree.
-
-	The init sub template should load any data and set any hardcoded options.
-
-	The main_above sub template is what is shown above the main content, and
-	should contain anything that should be shown up there.
-
-	The main_below sub template, conversely, is shown after the main content.
-	It should probably contain the copyright statement and some other things.
-
-	The linktree sub template should display the link tree, using the data
-	in the $context['linktree'] variable.
-
-	The menu sub template should display all the relevant buttons the user
-	wants and or needs.
-
-	For more information on the templating system, please see the site at:
-	http://www.simplemachines.org/
-*/
-
-/**
- * Initialize the template... mainly little settings.
- */
-function template_init()
-{
-	global $context, $settings, $options, $txt;
-
-	/* Use images from default theme when using templates from the default theme?
-		if this is 'always', images from the default theme will be used.
-		if this is 'defaults', images from the default theme will only be used with default templates.
-		if this is 'never' or isn't set at all, images from the default theme will not be used. */
-	$settings['use_default_images'] = 'never';
-
-	/* What document type definition is being used? (for font size and other issues.)
-		'xhtml' for an XHTML 1.0 document type definition.
-		'html' for an HTML 4.01 document type definition. */
-	$settings['doctype'] = 'xhtml';
-
-	// The version this template/theme is for. This should probably be the version of SMF it was created for.
-	$settings['theme_version'] = '2.0';
-
-	// Set a setting that tells the theme that it can render the tabs.
-	$settings['use_tabs'] = true;
-
-	// Use plain buttons - as opposed to text buttons?
-	$settings['use_buttons'] = true;
-
-	// Show sticky and lock status separate from topic icons?
-	$settings['separate_sticky_lock'] = true;
-
-	// Does this theme use the strict doctype?
-	$settings['strict_doctype'] = false;
-
-	// Set the following variable to true if this theme requires the optional theme strings file to be loaded.
-	$settings['require_theme_strings'] = false;
-}
-
-/**
- * The main sub template above the content.
- */
-function template_html_above()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	// Show right to left and the character set for ease of translating.
-	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
-<head>';
-
-	// The ?alp21 part of this link is just here to make sure browsers don't cache it wrongly.
-	echo '
-	<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />';
-
-	// Some browsers need an extra stylesheet due to bugs/compatibility issues.
-	foreach (array('ie7', 'ie6', 'webkit') as $cssfix)
-		if ($context['browser']['is_' . $cssfix])
-			echo '
-	<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/', $cssfix, '.css" />';
-
-	// RTL languages require an additional stylesheet.
-	if ($context['right_to_left'])
-		echo '
-	<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css" />';
-
-	// load in any css from mods or themes so they can overwrite if wanted
-	template_css();
-
-	// Jquery Librarys
-	if (isset($modSettings['jquery_source']) && $modSettings['jquery_source'] == 'cdn')
-		echo '
-	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>';
-	elseif (isset($modSettings['jquery_source']) && $modSettings['jquery_source'] == 'local')
-		echo '
-	<script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery-1.7.1.min.js"></script>';
-	else
-		echo '
-	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-	<script type="text/javascript"><!-- // --><![CDATA[
-		window.jQuery || document.write(\'<script src="', $settings['theme_url'], '/scripts/jquery-1.7.1.min.js"><\/script>\');
-	// ]]></script>';
-
-	// Note that the Superfish function seems to like being called by the full syntax.
-	// It doesn't appear to like being called by short syntax. Please test if contemplating changes.
-	echo '
-	<script type="text/javascript" src="', $settings['theme_url'], '/scripts/smf_jquery_plugins.js"></script>';
-	
-	// Here comes the JavaScript bits!
-	echo '
-	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?alp21"></script>
-	<script type="text/javascript" src="', $settings['theme_url'], '/scripts/theme.js?alp21"></script>
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var smf_theme_url = "', $settings['theme_url'], '";
-		var smf_default_theme_url = "', $settings['default_theme_url'], '";
-		var smf_images_url = "', $settings['images_url'], '";
-		var smf_scripturl = "', $scripturl, '";
-		var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
-		var smf_charset = "', $context['character_set'], '";
-		var smf_session_id = "', $context['session_id'], '";
-		var smf_session_var = "', $context['session_var'], '";
-		var smf_member_id = "', $context['user']['id'], '";', $context['show_pm_popup'] ? '
-		var fPmPopup = function ()
-		{
-			new smc_Popup({
-				heading: ' . JavaScriptEscape($txt['show_personal_messages_heading']) . ',
-				content: ' . JavaScriptEscape(sprintf($txt['show_personal_messages'], $context['user']['unread_messages'], $scripturl . '?action=pm')) . ',
-				icon: smf_images_url + \'/im_sm_newmsg.png\'
-			});
-		}
-		addLoadEvent(fPmPopup);' : '', '
-		var ajax_notification_text = "', $txt['ajax_in_progress'], '";
-		var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
-		var help_popup_heading_text = "', $txt['help_popup'], '";
-	// ]]></script>';
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		$(document).ready(function() {
-			// menu drop downs
-			$("ul.dropmenu").superfish();
-			
-			// tooltips
-			$(".preview").SMFtooltip();
-
-			// find all nested linked images and turn off the border
-			$("a.bbc_link img.bbc_img").parent().css("border", "0");
-		});
-	// ]]></script>';
-
-	// load in any javascript files from mods and themes
-	template_javascript();
-		
-	echo '
-	<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
-	<meta name="description" content="', $context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
-	<meta name="keywords" content="' . $context['meta_keywords'] . '" />' : '', '
-	<title>', $context['page_title_html_safe'], '</title>';
-
-	// Please don't index these Mr Robot.
-	if (!empty($context['robot_no_index']))
-		echo '
-	<meta name="robots" content="noindex" />';
-
-	// Present a canonical url for search engines to prevent duplicate content in their indices.
-	if (!empty($context['canonical_url']))
-		echo '
-	<link rel="canonical" href="', $context['canonical_url'], '" />';
-
-	// Show all the relative links, such as help, search, contents, and the like.
-	echo '
-	<link rel="help" href="', $scripturl, '?action=help" />
-	<link rel="contents" href="', $scripturl, '" />', ($context['allow_search'] ? '
-	<link rel="search" href="' . $scripturl . '?action=search" />' : '');
-
-	// If RSS feeds are enabled, advertise the presence of one.
-	if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
-		echo '
-	<link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['rss'], '" href="', $scripturl, '?type=rss2;action=.xml" />
-	<link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['atom'], '" href="', $scripturl, '?type=atom;action=.xml" />';
-
-	// If we're viewing a topic, these should be the previous and next topics, respectively.
-	if (!empty($context['current_topic']))
-		echo '
-	<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
-	<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
-
-	// If we're in a board, or a topic for that matter, the index will be the board's index.
-	if (!empty($context['current_board']))
-		echo '
-	<link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';
-
-	// Output any remaining HTML headers. (from mods, maybe?)
-	echo $context['html_headers'];
-
-	echo '
-</head>
-<body id="', $context['browser_body_id'], '" class="action_', !empty($context['current_action']) ? htmlspecialchars($context['current_action']) : (!empty($context['current_board']) ? 'messageindex' : (!empty($context['current_topic']) ? 'display' : 'home')),
-	!empty($context['current_board']) ? ' board_' . htmlspecialchars($context['current_board']) : '',
-	'">';
-}
-
-function template_body_above()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	echo !empty($settings['forum_width']) ? '
-<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
-	<div id="header"><div class="frame">
-		<div id="top_section">
-			<h1 class="forumtitle">
-				<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
-			</h1>';
-
-	// the upshrink image, right-floated
-	echo '
-			<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
-	echo '
-			', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '
-		</div>
-		<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
-			<div class="user">';
-
-	// If the user is logged in, display stuff like their name, new messages, etc.
-	if ($context['user']['is_logged'])
-	{
-		if (!empty($context['user']['avatar']))
-			echo '
-				<p class="avatar">', $context['user']['avatar']['image'], '</p>';
-		echo '
-				<ul class="reset">
-					<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
-					<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
-					<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
-
-		// Is the forum in maintenance mode?
-		if ($context['in_maintenance'] && $context['user']['is_admin'])
-			echo '
-					<li class="notice">', $txt['maintain_mode_on'], '</li>';
-
-		// Are there any members waiting for approval?
-		if (!empty($context['unapproved_members']))
-			echo '
-					<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
-
-		if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
-			echo '
-					<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
-
-		echo '
-					<li>', $context['current_time'], '</li>
-				</ul>';
-	}
-	// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
-	elseif (!empty($context['show_login_bar']))
-	{
-		echo '
-				<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
-				<form id="guest_form" action="', $scripturl, '?action=login2;quicklogin" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
-					<div class="info">', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $scripturl . '?action=login'), '</div>
-					<input type="text" name="user" size="10" class="input_text" />
-					<input type="password" name="passwrd" size="10" class="input_password" />
-					<select name="cookielength">
-						<option value="60">', $txt['one_hour'], '</option>
-						<option value="1440">', $txt['one_day'], '</option>
-						<option value="10080">', $txt['one_week'], '</option>
-						<option value="43200">', $txt['one_month'], '</option>
-						<option value="-1" selected="selected">', $txt['forever'], '</option>
-					</select>
-					<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
-					<div class="info">', $txt['quick_login_dec'], '</div>';
-
-		if (!empty($modSettings['enableOpenID']))
-			echo '
-					<br /><input type="text" name="openid_identifier" size="25" class="input_text openid_login" />';
-
-		echo '
-					<input type="hidden" name="hash_passwrd" value="" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['login_token_var'], '" value="', $context['login_token'], '" />
-				</form>';
-	}
-
-	echo '
-			</div>
-			<div class="news normaltext">';
-	
-	if ($context['allow_search'])
-	{
-		echo '
-			<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
-				<input type="text" name="search" value="" class="input_text" />&nbsp;';
-		
-		// Using the quick search dropdown?
-		if (!empty($modSettings['search_dropdown']))
-		{
-			$selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all');
-			
-			echo '
-				<select name="search_selection">
-					<option value="all"', ($selected == 'all' ? ' selected="selected"' : ''), '>', $txt['search_entireforum'], ' </option>';
-				
-				// Can't limit it to a specific topic if we are not in one
-				if (!empty($context['current_topic']))
-					echo '
-					<option value="topic"', ($selected == 'current_topic' ? ' selected="selected"' : ''), '>', $txt['search_thistopic'], '</option>';
-
-				// Can't limit it to a specific board if we are not in one
-				if (!empty($context['current_board']))
-					echo '
-					<option value="board"', ($selected == 'current_board' ? ' selected="selected"' : ''), '>', $txt['search_thisbrd'], '</option>';
-			echo '
-					<option value="members"', ($selected == 'members' ? ' selected="selected"' : ''), '>', $txt['search_members'], ' </option>
-				</select>';
-		}
-		
-		// Search within current topic?
-		if (!empty($context['current_topic']))
-			echo '
-				<input type="hidden" name="', (!empty($modSettings['search_dropdown']) ? 'sd_topic' : 'topic'), '" value="', $context['current_topic'], '" />';
-		// If we're on a certain board, limit it to this board ;).
-		elseif (!empty($context['current_board']))
-			echo '
-				<input type="hidden" name="', (!empty($modSettings['search_dropdown']) ? 'sd_brd[' : 'brd['), $context['current_board'], ']"', ' value="', $context['current_board'], '" />';
-
-		echo '
-				<input type="submit" name="search2" value="', $txt['search'], '" class="button_submit" />
-				<input type="hidden" name="advanced" value="0" />
-			</form>';	
-	}
-
-	// Show a random news item? (or you could pick one from news_lines...)
-	if (!empty($settings['enable_news']))
-		echo '
-				<h2>', $txt['news'], ': </h2>
-				<p>', $context['random_news_line'], '</p>';
-
-	echo '
-			</div>
-		</div>
-		<br class="clear" />';
-
-	// Define the upper_section toggle in JavaScript.
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var oMainHeaderToggle = new smc_Toggle({
-				bToggleEnabled: true,
-				bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
-				aSwappableContainers: [
-					\'upper_section\'
-				],
-				aSwapImages: [
-					{
-						sId: \'upshrink\',
-						srcExpanded: smf_images_url + \'/upshrink.png\',
-						altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
-						srcCollapsed: smf_images_url + \'/upshrink2.png\',
-						altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
-					}
-				],
-				oThemeOptions: {
-					bUseThemeSettings: smf_member_id == 0 ? false : true,
-					sOptionName: \'collapse_header\',
-					sSessionVar: smf_session_var,
-					sSessionId: smf_session_id
-				},
-				oCookieOptions: {
-					bUseCookie: smf_member_id == 0 ? true : false,
-					sCookieName: \'upshrink\'
-				}
-			});
-		// ]]></script>';
-
-	// Show the menu here, according to the menu sub template.
-	template_menu();
-
-	echo '
-		<br class="clear" />
-	</div></div>';
-
-	// The main content should go here.
-	echo '
-	<div id="content_section"><div class="frame">
-		<div id="main_content_section">';
-
-	// Custom banners and shoutboxes should be placed here, before the linktree.
-
-	// Show the navigation tree.
-	theme_linktree();
-}
-
-function template_body_below()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	echo '
-		</div>
-	</div></div>';
-
-	// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
-	echo '
-	<div id="footer_section"><div class="frame">
-		<ul class="reset">
-			<li class="copyright">', theme_copyright(), '</li>
-			<li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
-			', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
-			<li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
-		</ul>';
-
-	// Show the load time?
-	if ($context['show_load_time'])
-		echo '
-		<p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';
-
-	echo '
-	</div></div>', !empty($settings['forum_width']) ? '
-</div>' : '';
-}
-
-function template_html_below()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	template_javascript(true);
-
-	echo '
-</body></html>';
-}
-
-/**
- * Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
- * @param bool $force_show = false
- */
-function theme_linktree($force_show = false)
-{
-	global $context, $settings, $options, $shown_linktree;
-
-	// If linktree is empty, just return - also allow an override.
-	if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
-		return;
-
-	echo '
-	<div class="navigate_section">
-		<ul>';
-
-	// Each tree item has a URL and name. Some may have extra_before and extra_after.
-	foreach ($context['linktree'] as $link_num => $tree)
-	{
-		echo '
-			<li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';
-
-		// Show something before the link?
-		if (isset($tree['extra_before']))
-			echo $tree['extra_before'];
-
-		// Show the link, including a URL if it should have one.
-		echo $settings['linktree_link'] && isset($tree['url']) ? '
-				<a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] . '</span>';
-
-		// Show something after the link...?
-		if (isset($tree['extra_after']))
-			echo $tree['extra_after'];
-
-		// Don't show a separator for the last one.
-		if ($link_num != count($context['linktree']) - 1)
-			echo ' &#187;';
-
-		echo '
-			</li>';
-	}
-	echo '
-		</ul>
-	</div>';
-
-	$shown_linktree = true;
-}
-
-/**
- * Show the menu up top. Something like [home] [help] [profile] [logout]...
- */
-function template_menu()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-		<div id="main_menu">
-			<ul class="dropmenu" id="menu_nav">';
-
-	// Note: Menu markup has been cleaned up to remove unnecessary spans and classes. 
-	foreach ($context['menu_buttons'] as $act => $button)
-	{
-		echo '
-				<li id="button_', $act, '">
-					<a class="', $button['active_button'] ? 'active' : '', !empty($button['is_last']) ? ' last' : '', '" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
-						', $button['title'], '
-					</a>';
-		if (!empty($button['sub_buttons']))
-		{
-			echo '
-					<ul>';
-
-			foreach ($button['sub_buttons'] as $childbutton)
-			{
-				echo '
-						<li>
-							<a href="', $childbutton['href'], '" ', isset($childbutton['is_last']) ? 'class="last"' : '' , isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
-								', $childbutton['title'], '
-							</a>';
-				// 3rd level menus :)
-				if (!empty($childbutton['sub_buttons']))
-				{
-					echo '
-							<ul>';
-
-					foreach ($childbutton['sub_buttons'] as $grandchildbutton)
-						echo '
-								<li>
-									<a href="', $grandchildbutton['href'], '" ', isset($grandchildbutton['is_last']) ? ' class="last"' : '' , isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
-										', $grandchildbutton['title'], '
-									</a>
-								</li>';
-
-					echo '
-							</ul>';
-				}
-
-				echo '
-						</li>';
-			}
-				echo '
-					</ul>';
-		}
-		echo '
-				</li>';
-	}
-
-	echo '
-			</ul>
-		</div>';
-}
-
-/**
- * Generate a strip of buttons.
- * @param array $button_strip
- * @param string $direction = ''
- * @param array $strip_options = array()
- */
-function template_button_strip($button_strip, $direction = '', $strip_options = array())
-{
-	global $settings, $context, $txt, $scripturl;
-
-	if (!is_array($strip_options))
-		$strip_options = array();
-
-	// List the buttons in reverse order for RTL languages.
-	if ($context['right_to_left'])
-		$button_strip = array_reverse($button_strip, true);
-
-	// Create the buttons...
-	$buttons = array();
-	foreach ($button_strip as $key => $value)
-	{
-		if (!isset($value['test']) || !empty($context[$value['test']]))
-			$buttons[] = '
-				<li><a' . (isset($value['id']) ? ' id="button_strip_' . $value['id'] . '"' : '') . ' class="button_strip_' . $key . (isset($value['active']) ? ' active' : '') . '" href="' . $value['url'] . '"' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a></li>';
-	}
-
-	// No buttons? No button strip either.
-	if (empty($buttons))
-		return;
-
-	// Make the last one, as easy as possible.
-	$buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
-
-	echo '
-		<div class="buttonlist', !empty($direction) ? ' float' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '>
-			<ul>',
-				implode('', $buttons), '
-			</ul>
-		</div>';
-}
-
+<?php
+/**
+ * Simple Machines Forum (SMF)
+ *
+ * @package SMF
+ * @author Simple Machines
+ * @copyright 2011 Simple Machines
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ *
+ * @version 2.1 Alpha 1
+ */
+
+/*	This template is, perhaps, the most important template in the theme. It
+	contains the main template layer that displays the header and footer of
+	the forum, namely with main_above and main_below. It also contains the
+	menu sub template, which appropriately displays the menu; the init sub
+	template, which is there to set the theme up; (init can be missing.) and
+	the linktree sub template, which sorts out the link tree.
+
+	The init sub template should load any data and set any hardcoded options.
+
+	The main_above sub template is what is shown above the main content, and
+	should contain anything that should be shown up there.
+
+	The main_below sub template, conversely, is shown after the main content.
+	It should probably contain the copyright statement and some other things.
+
+	The linktree sub template should display the link tree, using the data
+	in the $context['linktree'] variable.
+
+	The menu sub template should display all the relevant buttons the user
+	wants and or needs.
+
+	For more information on the templating system, please see the site at:
+	http://www.simplemachines.org/
+*/
+
+/**
+ * Initialize the template... mainly little settings.
+ */
+function template_init()
+{
+	global $context, $settings, $options, $txt;
+
+	/* Use images from default theme when using templates from the default theme?
+		if this is 'always', images from the default theme will be used.
+		if this is 'defaults', images from the default theme will only be used with default templates.
+		if this is 'never' or isn't set at all, images from the default theme will not be used. */
+	$settings['use_default_images'] = 'never';
+
+	/* What document type definition is being used? (for font size and other issues.)
+		'xhtml' for an XHTML 1.0 document type definition.
+		'html' for an HTML 4.01 document type definition. */
+	$settings['doctype'] = 'xhtml';
+
+	// The version this template/theme is for. This should probably be the version of SMF it was created for.
+	$settings['theme_version'] = '2.0';
+
+	// Set a setting that tells the theme that it can render the tabs.
+	$settings['use_tabs'] = true;
+
+	// Use plain buttons - as opposed to text buttons?
+	$settings['use_buttons'] = true;
+
+	// Show sticky and lock status separate from topic icons?
+	$settings['separate_sticky_lock'] = true;
+
+	// Does this theme use the strict doctype?
+	$settings['strict_doctype'] = false;
+
+	// Set the following variable to true if this theme requires the optional theme strings file to be loaded.
+	$settings['require_theme_strings'] = false;
+}
+
+/**
+ * The main sub template above the content.
+ */
+function template_html_above()
+{
+	global $context, $settings, $options, $scripturl, $txt, $modSettings;
+
+	// Show right to left and the character set for ease of translating.
+	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
+<head>';
+
+	// The ?alp21 part of this link is just here to make sure browsers don't cache it wrongly.
+	echo '
+	<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index.css?alp21" />';
+
+	// The most efficient way of writing multi themes is to use a master index.css plus variant.css files.
+	if (!empty($context['theme_variant']))
+		echo '
+	<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />';
+
+	// RTL languages require an additional stylesheet.
+	if ($context['right_to_left'])
+	{
+		echo '
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css?alp21" />';
+
+	if (!empty($context['theme_variant']))
+		echo '
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl', $context['theme_variant'], '.css?alp21" />';
+	}
+
+	// load in any css from mods or themes so they can overwrite if wanted
+	template_css();
+
+	// Jquery Librarys
+	if (isset($modSettings['jquery_source']) && $modSettings['jquery_source'] == 'cdn')
+		echo '
+	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>';
+	elseif (isset($modSettings['jquery_source']) && $modSettings['jquery_source'] == 'local')
+		echo '
+	<script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery-1.7.1.min.js"></script>';
+	else
+		echo '
+	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+	<script type="text/javascript"><!-- // --><![CDATA[
+		window.jQuery || document.write(\'<script src="', $settings['theme_url'], '/scripts/jquery-1.7.1.min.js"><\/script>\');
+	// ]]></script>';
+
+	// Note that the Superfish function seems to like being called by the full syntax.
+	// It doesn't appear to like being called by short syntax. Please test if contemplating changes.
+	echo '
+	<script type="text/javascript" src="', $settings['theme_url'], '/scripts/smf_jquery_plugins.js"></script>';
+	
+	// Here comes the JavaScript bits!
+	echo '
+	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?alp21"></script>
+	<script type="text/javascript" src="', $settings['theme_url'], '/scripts/theme.js?alp21"></script>
+	<script type="text/javascript"><!-- // --><![CDATA[
+		var smf_theme_url = "', $settings['theme_url'], '";
+		var smf_default_theme_url = "', $settings['default_theme_url'], '";
+		var smf_images_url = "', $settings['images_url'], '";
+		var smf_scripturl = "', $scripturl, '";
+		var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
+		var smf_charset = "', $context['character_set'], '";
+		var smf_session_id = "', $context['session_id'], '";
+		var smf_session_var = "', $context['session_var'], '";
+		var smf_member_id = "', $context['user']['id'], '";', $context['show_pm_popup'] ? '
+		var fPmPopup = function ()
+		{
+			new smc_Popup({
+				heading: ' . JavaScriptEscape($txt['show_personal_messages_heading']) . ',
+				content: ' . JavaScriptEscape(sprintf($txt['show_personal_messages'], $context['user']['unread_messages'], $scripturl . '?action=pm')) . ',
+				icon: smf_images_url + \'/im_sm_newmsg.png\'
+			});
+		}
+		addLoadEvent(fPmPopup);' : '', '
+		var ajax_notification_text = "', $txt['ajax_in_progress'], '";
+		var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
+		var help_popup_heading_text = "', $txt['help_popup'], '";
+	// ]]></script>';
+
+	echo '
+	<script type="text/javascript"><!-- // --><![CDATA[
+		$(document).ready(function() {
+			// menu drop downs
+			$("ul.dropmenu").superfish();
+			
+			// tooltips
+			$(".preview").SMFtooltip();
+
+			// find all nested linked images and turn off the border
+			$("a.bbc_link img.bbc_img").parent().css("border", "0");
+		});
+	// ]]></script>';
+
+	// load in any javascript files from mods and themes
+	template_javascript();
+		
+	echo '
+	<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
+	<meta name="description" content="', $context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
+	<meta name="keywords" content="' . $context['meta_keywords'] . '" />' : '', '
+	<title>', $context['page_title_html_safe'], '</title>';
+
+	// Please don't index these Mr Robot.
+	if (!empty($context['robot_no_index']))
+		echo '
+	<meta name="robots" content="noindex" />';
+
+	// Present a canonical url for search engines to prevent duplicate content in their indices.
+	if (!empty($context['canonical_url']))
+		echo '
+	<link rel="canonical" href="', $context['canonical_url'], '" />';
+
+	// Show all the relative links, such as help, search, contents, and the like.
+	echo '
+	<link rel="help" href="', $scripturl, '?action=help" />
+	<link rel="contents" href="', $scripturl, '" />', ($context['allow_search'] ? '
+	<link rel="search" href="' . $scripturl . '?action=search" />' : '');
+
+	// If RSS feeds are enabled, advertise the presence of one.
+	if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
+		echo '
+	<link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['rss'], '" href="', $scripturl, '?type=rss2;action=.xml" />
+	<link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['atom'], '" href="', $scripturl, '?type=atom;action=.xml" />';
+
+	// If we're viewing a topic, these should be the previous and next topics, respectively.
+	if (!empty($context['links']['next']))
+		echo '<link rel="next" href="', $context['links']['next'], '" />';
+	else if (!empty($context['current_topic']))
+		echo '<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
+	if (!empty($context['links']['prev']))
+		echo '<link rel="prev" href="', $context['links']['prev'], '" />';
+	else if (!empty($context['current_topic']))
+		echo '<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />';
+
+	// If we're in a board, or a topic for that matter, the index will be the board's index.
+	if (!empty($context['current_board']))
+		echo '
+	<link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';
+
+	// Output any remaining HTML headers. (from mods, maybe?)
+	echo $context['html_headers'];
+
+	echo '
+</head>
+<body id="', $context['browser_body_id'], '" class="action_', !empty($context['current_action']) ? htmlspecialchars($context['current_action']) : (!empty($context['current_board']) ?
+		'messageindex' : (!empty($context['current_topic']) ? 'display' : 'home')), !empty($context['current_board']) ? ' board_' . htmlspecialchars($context['current_board']) : '', '">';
+}
+
+function template_body_above()
+{
+	global $context, $settings, $options, $scripturl, $txt, $modSettings;
+
+	// Wrapper div now echoes permanently for better layout options. h1 a is now target for "Go up" links.
+	echo '
+<div id="wrapper" ', !empty($settings['forum_width']) ? 'style="width: ' . $settings['forum_width'] . '"' : '', '>
+	<div id="header">
+		<div class="frame">
+			<div id="top_section">
+				<h1 class="forumtitle">
+					<a href="', $scripturl, '" id="top">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
+				</h1>';
+
+	// the upshrink image, right-floated
+	echo '
+				<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
+	echo '
+			', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '
+			</div>
+			<div id="upper_wrap">
+				<div id="upper_section" ', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
+					<div class="user">';
+
+	// If the user is logged in, display stuff like their name, new messages, etc.
+	if ($context['user']['is_logged'])
+	{
+		if (!empty($context['user']['avatar']))
+			echo '
+				<p class="avatar"><a href="', $scripturl, '?action=profile">', $context['user']['avatar']['image'], '</a></p>';
+			echo '
+						<ul class="reset">
+							<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
+							<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
+							<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
+
+		// Is the forum in maintenance mode?
+		if ($context['in_maintenance'] && $context['user']['is_admin'])
+			echo '
+							<li class="notice">', $txt['maintain_mode_on'], '</li>';
+
+		// Are there any members waiting for approval?
+		if (!empty($context['unapproved_members']))
+			echo '
+							<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
+
+		if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
+			echo '
+							<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
+
+		echo '
+							<li>', $context['current_time'], '</li>
+						</ul>';
+	}
+	// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
+	elseif (!empty($context['show_login_bar']))
+	{
+		echo '
+					<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
+						<form id="guest_form" action="', $scripturl, '?action=login2;quicklogin" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
+							<div class="info">', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $scripturl . '?action=login'), '</div>
+							<input type="text" name="user" size="10" class="input_text" />
+							<input type="password" name="passwrd" size="10" class="input_password" />
+							<select name="cookielength">
+								<option value="60">', $txt['one_hour'], '</option>
+								<option value="1440">', $txt['one_day'], '</option>
+								<option value="10080">', $txt['one_week'], '</option>
+								<option value="43200">', $txt['one_month'], '</option>
+								<option value="-1" selected="selected">', $txt['forever'], '</option>
+							</select>
+							<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
+							<div class="info">', $txt['quick_login_dec'], '</div>';
+
+		if (!empty($modSettings['enableOpenID']))
+			echo '
+							<br /><input type="text" name="openid_identifier" size="25" class="input_text openid_login" />';
+
+		echo '
+							<input type="hidden" name="hash_passwrd" value="" />
+							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+							<input type="hidden" name="', $context['login_token_var'], '" value="', $context['login_token'], '" />
+						</form>';
+	}
+
+	echo '
+					</div>
+					<div class="news">';
+
+	if ($context['allow_search'])
+	{
+		echo '
+						<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
+							<input type="text" name="search" value="" class="input_text" />&nbsp;';
+
+		// Using the quick search dropdown?
+		if (!empty($modSettings['search_dropdown']))
+		{
+			$selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all');
+
+			echo '
+							<select name="search_selection">
+								<option value="all"', ($selected == 'all' ? ' selected="selected"' : ''), '>', $txt['search_entireforum'], ' </option>';
+
+		// Can't limit it to a specific topic if we are not in one
+		if (!empty($context['current_topic']))
+			echo '
+								<option value="topic"', ($selected == 'current_topic' ? ' selected="selected"' : ''), '>', $txt['search_thistopic'], '</option>';
+
+		// Can't limit it to a specific board if we are not in one
+		if (!empty($context['current_board']))
+			echo '
+								<option value="board"', ($selected == 'current_board' ? ' selected="selected"' : ''), '>', $txt['search_thisbrd'], '</option>';
+			echo '
+								<option value="members"', ($selected == 'members' ? ' selected="selected"' : ''), '>', $txt['search_members'], ' </option>
+							</select>';
+		}
+
+		// Search within current topic?
+		if (!empty($context['current_topic']))
+			echo '
+							<input type="hidden" name="', (!empty($modSettings['search_dropdown']) ? 'sd_topic' : 'topic'), '" value="', $context['current_topic'], '" />';
+		// If we're on a certain board, limit it to this board ;).
+		elseif (!empty($context['current_board']))
+			echo '
+							<input type="hidden" name="', (!empty($modSettings['search_dropdown']) ? 'sd_brd[' : 'brd['), $context['current_board'], ']"', ' value="', $context['current_board'], '" />';
+
+		echo '
+							<input type="submit" name="search2" value="', $txt['search'], '" class="button_submit" />
+							<input type="hidden" name="advanced" value="0" />
+						</form>';
+	}
+
+	// Show a random news item? (or you could pick one from news_lines...)
+	if (!empty($settings['enable_news']))
+		echo '
+						<h2>', $txt['news'], ': </h2>
+						<p>', $context['random_news_line'], '</p>';
+
+	echo '
+					</div>
+				</div>';
+
+	// Define the upper_section toggle in JavaScript.
+	echo '
+		<script type="text/javascript"><!-- // --><![CDATA[
+			var oMainHeaderToggle = new smc_Toggle({
+				bToggleEnabled: true,
+				bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
+				aSwappableContainers: [
+					\'upper_section\'
+				],
+				aSwapImages: [
+					{
+						sId: \'upshrink\',
+						srcExpanded: smf_images_url + \'/upshrink.png\',
+						altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
+						srcCollapsed: smf_images_url + \'/upshrink2.png\',
+						altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
+					}
+				],
+				oThemeOptions: {
+					bUseThemeSettings: smf_member_id == 0 ? false : true,
+					sOptionName: \'collapse_header\',
+					sSessionVar: smf_session_var,
+					sSessionId: smf_session_id
+				},
+				oCookieOptions: {
+					bUseCookie: smf_member_id == 0 ? true : false,
+					sCookieName: \'upshrink\'
+				}
+			});
+		// ]]></script>';
+
+	// Show the menu here, according to the menu sub template.
+	template_menu();
+
+	// Custom banners and shoutboxes should be placed here, before the linktree.
+
+	// Show the navigation tree.
+	theme_linktree();
+
+	echo '
+			</div>
+		</div>
+	</div>';
+
+	// The main content should go here.
+	echo '
+	<div id="content_section">
+		<div id="main_content_section">';
+}
+
+function template_body_below()
+{
+	global $context, $settings, $options, $scripturl, $txt, $modSettings;
+
+	echo '
+		</div>
+	</div>';
+
+	// This markup gives the looks of the Curve theme without huge images.
+	// The new "Go Down" target is here. Any added content will display globally.
+	echo '
+	<div id="lower_section">
+		<div class="frame"><a id="bot"></a></div>
+	</div>
+</div>';
+
+	// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
+	// Footer is now full-width by default. Frame inside it will match theme wrapper width automatically.
+	echo '
+	<div id="footer_section">
+		<div class="frame" ', !empty($settings['forum_width']) ? 'style="width: ' . $settings['forum_width'] . '"' : '', '>';
+
+	// Thee is now a global "Go to top" link above the copyright.
+		echo '
+			<a href="#top" id="footer_uplink"><img src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['go_up'], '" /></a>
+			<ul class="reset">
+				<li class="copyright">', theme_copyright(), '</li>
+				<li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
+				', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
+				<li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
+			</ul>';
+
+	// Show the load time?
+	if ($context['show_load_time'])
+		echo '
+			<p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';
+
+	echo '
+		</div>
+	</div>';
+
+}
+
+function template_html_below()
+{
+	global $context, $settings, $options, $scripturl, $txt, $modSettings;
+
+	template_javascript(true);
+
+	echo '
+</body>
+</html>';
+}
+
+/**
+ * Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
+ * @param bool $force_show = false
+ */
+function theme_linktree($force_show = false)
+{
+	global $context, $settings, $options, $shown_linktree, $scripturl, $txt;
+
+	// If linktree is empty, just return - also allow an override.
+	if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
+		return;
+
+	echo '
+	<div class="navigate_section">
+		<ul>';
+
+	// Each tree item has a URL and name. Some may have extra_before and extra_after.
+	foreach ($context['linktree'] as $link_num => $tree)
+	{
+		echo '
+			<li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';
+
+		// Show something before the link?
+		if (isset($tree['extra_before']))
+			echo $tree['extra_before'];
+
+		// Show the link, including a URL if it should have one.
+		echo $settings['linktree_link'] && isset($tree['url']) ? '
+				<a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] . '</span>';
+
+		// Show something after the link...?
+		if (isset($tree['extra_after']))
+			echo $tree['extra_after'];
+
+		// Don't show a separator for the last one.
+		if ($link_num != count($context['linktree']) - 1)
+			echo ' &#187;';
+
+		echo '
+			</li>';
+	}
+
+	if ($context['user']['is_logged'])
+	echo '
+		<li class="unread_links">
+			<a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a> -
+			<a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a>
+		</li>';
+
+	echo '
+		</ul>
+	</div>';
+
+	$shown_linktree = true;
+}
+
+/**
+ * Show the menu up top. Something like [home] [help] [profile] [logout]...
+ */
+function template_menu()
+{
+	global $context, $settings, $options, $scripturl, $txt;
+
+	echo '
+		<div id="main_menu">
+			<ul class="dropmenu" id="menu_nav">';
+
+	// Note: Menu markup has been cleaned up to remove unnecessary spans and classes. 
+	foreach ($context['menu_buttons'] as $act => $button)
+	{
+		echo '
+				<li id="button_', $act, '">
+					<a class="', $button['active_button'] ? 'active' : '', '" href="', $button['href'], '" ', isset($button['target']) ? 'target="' . $button['target'] . '"' : '', '>
+						', $button['title'], '
+					</a>';
+		if (!empty($button['sub_buttons']))
+		{
+			echo '
+					<ul>';
+
+			foreach ($button['sub_buttons'] as $childbutton)
+			{
+				echo '
+						<li>
+							<a href="', $childbutton['href'], '" ' , isset($childbutton['target']) ? 'target="' . $childbutton['target'] . '"' : '', '>
+								', $childbutton['title'], '
+							</a>';
+				// 3rd level menus :)
+				if (!empty($childbutton['sub_buttons']))
+				{
+					echo '
+							<ul>';
+
+					foreach ($childbutton['sub_buttons'] as $grandchildbutton)
+						echo '
+								<li>
+									<a href="', $grandchildbutton['href'], '" ' , isset($grandchildbutton['target']) ? 'target="' . $grandchildbutton['target'] . '"' : '', '>
+										', $grandchildbutton['title'], '
+									</a>
+								</li>';
+
+					echo '
+							</ul>';
+				}
+
+				echo '
+						</li>';
+			}
+				echo '
+					</ul>';
+		}
+		echo '
+				</li>';
+	}
+
+	echo '
+			</ul>
+		</div>';
+}
+
+/**
+ * Generate a strip of buttons.
+ * @param array $button_strip
+ * @param string $direction = ''
+ * @param array $strip_options = array()
+ */
+function template_button_strip($button_strip, $direction = '', $strip_options = array())
+{
+	global $settings, $context, $txt, $scripturl;
+
+	if (!is_array($strip_options))
+		$strip_options = array();
+
+	// List the buttons in reverse order for RTL languages.
+	if ($context['right_to_left'])
+		$button_strip = array_reverse($button_strip, true);
+
+	// Create the buttons...
+	$buttons = array();
+	foreach ($button_strip as $key => $value)
+	{
+		if (!isset($value['test']) || !empty($context[$value['test']]))
+			$buttons[] = '
+				<li><a' . (isset($value['id']) ? ' id="button_strip_' . $value['id'] . '"' : '') . ' class="button_strip_' . $key . (isset($value['active']) ? ' active' : '') . '" href="' . $value['url'] . '"' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a></li>';
+	}
+
+	// No buttons? No button strip either.
+	if (empty($buttons))
+		return;
+
+	echo '
+		<div class="buttonlist', !empty($direction) ? ' float' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '>
+			<ul>',
+				implode('', $buttons), '
+			</ul>
+		</div>';
+}
+
 ?>

+ 795 - 793
Themes/default/languages/index.english.php

@@ -1,794 +1,796 @@
-<?php
-// Version: 2.0; index
-
-global $forum_copyright, $forum_version, $webmaster_email, $scripturl, $context, $boardurl;
-
-// Locale (strftime, pspell_new) and spelling. (pspell_new, can be left as '' normally.)
-// For more information see:
-//   - http://www.php.net/function.pspell-new
-//   - http://www.php.net/function.setlocale
-// Again, SPELLING SHOULD BE '' 99% OF THE TIME!!  Please read this!
-$txt['lang_locale'] = 'en_US';
-$txt['lang_dictionary'] = 'en';
-$txt['lang_spelling'] = 'american';
-
-// Ensure you remember to use uppercase for character set strings.
-$txt['lang_character_set'] = 'ISO-8859-1';
-// Character set and right to left?
-$txt['lang_rtl'] = false;
-// Capitalize day and month names?
-$txt['lang_capitalize_dates'] = true;
-
-$txt['days'] = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
-$txt['days_short'] = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
-// Months must start with 1 => 'January'. (or translated, of course.)
-$txt['months'] = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
-$txt['months_titles'] = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
-$txt['months_short'] = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
-
-$txt['time_am'] = 'am';
-$txt['time_pm'] = 'pm';
-
-$txt['newmessages0'] = 'is new';
-$txt['newmessages1'] = 'are new';
-$txt['newmessages3'] = 'New';
-$txt['newmessages4'] = ',';
-
-$txt['admin'] = 'Admin';
-$txt['moderate'] = 'Moderate';
-
-$txt['save'] = 'Save';
-
-$txt['modify'] = 'Modify';
-$txt['forum_index'] = '%1$s - Index';
-$txt['members'] = 'Members';
-$txt['board_name'] = 'Board name';
-$txt['posts'] = 'Posts';
-
-$txt['member_postcount'] = 'Posts';
-$txt['no_subject'] = '(No subject)';
-$txt['view_profile'] = 'View Profile';
-$txt['guest_title'] = 'Guest';
-$txt['author'] = 'Author';
-$txt['on'] = 'on';
-$txt['remove'] = 'Remove';
-$txt['start_new_topic'] = 'Start new topic';
-
-$txt['login'] = 'Login';
-// Use numeric entities in the below string.
-$txt['username'] = 'Username';
-$txt['password'] = 'Password';
-
-$txt['username_no_exist'] = 'That username does not exist.';
-$txt['no_user_with_email'] = 'There are no usernames associated with that email.';
-
-$txt['board_moderator'] = 'Board Moderator';
-$txt['remove_topic'] = 'Remove Topic';
-$txt['topics'] = 'Topics';
-$txt['modify_msg'] = 'Modify message';
-$txt['name'] = 'Name';
-$txt['email'] = 'Email';
-$txt['user_email_address'] = 'Email Address';
-$txt['subject'] = 'Subject';
-$txt['message'] = 'Message';
-$txt['redirects'] = 'Redirects';
-$txt['quick_modify'] = 'Modify Inline';
-
-$txt['choose_pass'] = 'Choose password';
-$txt['verify_pass'] = 'Verify password';
-$txt['position'] = 'Position';
-
-$txt['profile_of'] = 'View the profile of';
-$txt['total'] = 'Total';
-$txt['posts_made'] = 'Posts';
-$txt['website'] = 'Website';
-$txt['register'] = 'Register';
-$txt['warning_status'] = 'Warning Status';
-$txt['user_warn_watch'] = 'User is on moderator watch list';
-$txt['user_warn_moderate'] = 'User posts join approval queue';
-$txt['user_warn_mute'] = 'User is banned from posting';
-$txt['warn_watch'] = 'Watched';
-$txt['warn_moderate'] = 'Moderated';
-$txt['warn_mute'] = 'Muted';
-
-$txt['message_index'] = 'Message Index';
-$txt['news'] = 'News';
-$txt['home'] = 'Home';
-$txt['page'] = 'Page';
-$txt['prev'] = 'previous';
-$txt['next'] = 'next';
-
-$txt['lock_unlock'] = 'Lock/Unlock Topic';
-$txt['post'] = 'Post';
-$txt['error_occured'] = 'An Error Has Occurred!';
-$txt['at'] = 'at';
-$txt['logout'] = 'Logout';
-$txt['started_by'] = 'Started by';
-$txt['topic_started_by'] = 'Started by  <strong>%1$s</strong> in <em>%2$s</em>';
-$txt['replies'] = 'Replies';
-$txt['last_post'] = 'Last post';
-$txt['last_post_message'] = '<strong>Last post</strong> by %1$s<br />in %2$s<br />on %3$s';
-$txt['boardindex_total_posts'] = '%1$d Posts in %2$d Topics by %3$d Members.';
-$txt['show'] = 'Show';
-$txt['hide'] = 'Hide';
-
-$txt['admin_login'] = 'Administration Login';
-// Use numeric entities in the below string.
-$txt['topic'] = 'Topic';
-$txt['help'] = 'Help';
-$txt['notify'] = 'Notify';
-$txt['unnotify'] = 'Unnotify';
-$txt['notify_request'] = 'Do you want a notification email if someone replies to this topic?';
-// Use numeric entities in the below string.
-$txt['regards_team'] = "Regards,\nThe " . $context['forum_name'] . ' Team.';
-$txt['notify_replies'] = 'Notify of replies';
-$txt['move_topic'] = 'Move Topic';
-$txt['move_to'] = 'Move to';
-$txt['pages'] = 'Pages';
-$txt['users_active'] = 'Users active in past %1$d minutes';
-$txt['personal_messages'] = 'Personal Messages';
-$txt['reply_quote'] = 'Reply with quote';
-$txt['reply'] = 'Reply';
-$txt['reply_noun'] = 'Reply';
-$txt['approve'] = 'Approve';
-$txt['approve_all'] = 'approve all';
-$txt['awaiting_approval'] = 'Awaiting Approval';
-$txt['attach_awaiting_approve'] = 'Attachments awaiting approval';
-$txt['post_awaiting_approval'] = 'Note: This message is awaiting approval by a moderator.';
-$txt['there_are_unapproved_topics'] = 'There are %1$s topics and %2$s posts awaiting approval in this board. Click <a href="%3$s">here</a> to view them all.';
-
-$txt['msg_alert_none'] = 'No messages...';
-$txt['msg_alert_you_have'] = 'you have';
-$txt['msg_alert_messages'] = 'messages';
-$txt['remove_message'] = 'Remove this message';
-
-$txt['online_users'] = 'Users Online';
-$txt['personal_message'] = 'Personal Message';
-$txt['jump_to'] = 'Jump to';
-$txt['go'] = 'go';
-$txt['are_sure_remove_topic'] = 'Are you sure you want to remove this topic?';
-$txt['yes'] = 'Yes';
-$txt['no'] = 'No';
-
-$txt['search_end_results'] = 'End of results';
-$txt['search_on'] = 'on';
-
-$txt['search'] = 'Search';
-$txt['all'] = 'All';
-$txt['search_entireforum'] = 'Entire Forum';
-$txt['search_thisbrd'] = 'This board';
-$txt['search_thistopic'] = 'This topic';
-$txt['search_members'] = 'Members';
-
-$txt['back'] = 'Back';
-$txt['password_reminder'] = 'Password reminder';
-$txt['topic_started'] = 'Topic started by';
-$txt['title'] = 'Title';
-$txt['post_by'] = 'Post by';
-$txt['memberlist_searchable'] = 'Searchable list of all registered members.';
-$txt['welcome_member'] = 'Please welcome';
-$txt['admin_center'] = 'Administration Center';
-$txt['last_edit'] = 'Last Edit';
-$txt['notify_deactivate'] = 'Would you like to deactivate notification on this topic?';
-
-$txt['recent_posts'] = 'Recent Posts';
-
-$txt['location'] = 'Location';
-$txt['gender'] = 'Gender';
-$txt['date_registered'] = 'Date Registered';
-
-$txt['recent_view'] = 'View the most recent posts on the forum.';
-$txt['recent_updated'] = 'is the most recently updated topic';
-
-$txt['male'] = 'Male';
-$txt['female'] = 'Female';
-
-$txt['error_invalid_characters_username'] = 'Invalid character used in Username.';
-
-$txt['welcome_guest'] = 'Welcome, <strong>%1$s</strong>. Please <a href="%2$s">login</a>.';
-
-$txt['welcome_guest_register'] = 'Welcome, <strong>%1$s</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
-
-$txt['please_login'] = 'Please <a href="' . $scripturl . '?action=login">login</a>.';
-$txt['login_or_register'] = 'Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
-$txt['welcome_guest_activate'] = '<br />Did you miss your <a href="' . $scripturl . '?action=activate">activation email</a>?';
-$txt['hello_member'] = 'Hey,';
-// Use numeric entities in the below string.
-$txt['hello_guest'] = 'Welcome,';
-$txt['welmsg_hey'] = 'Hey,';
-$txt['welmsg_welcome'] = 'Welcome,';
-$txt['welmsg_please'] = 'Please';
-$txt['select_destination'] = 'Please select a destination';
-
-// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'.
-$txt['posted_by'] = 'Posted by';
-
-$txt['icon_smiley'] = 'Smiley';
-$txt['icon_angry'] = 'Angry';
-$txt['icon_cheesy'] = 'Cheesy';
-$txt['icon_laugh'] = 'Laugh';
-$txt['icon_sad'] = 'Sad';
-$txt['icon_wink'] = 'Wink';
-$txt['icon_grin'] = 'Grin';
-$txt['icon_shocked'] = 'Shocked';
-$txt['icon_cool'] = 'Cool';
-$txt['icon_huh'] = 'Huh';
-$txt['icon_rolleyes'] = 'Roll Eyes';
-$txt['icon_tongue'] = 'Tongue';
-$txt['icon_embarrassed'] = 'Embarrassed';
-$txt['icon_lips'] = 'Lips sealed';
-$txt['icon_undecided'] = 'Undecided';
-$txt['icon_kiss'] = 'Kiss';
-$txt['icon_cry'] = 'Cry';
-
-$txt['moderator'] = 'Moderator';
-$txt['moderators'] = 'Moderators';
-
-$txt['mark_board_read'] = 'Mark Topics as Read for this Board';
-$txt['views'] = 'Views';
-$txt['new'] = 'New';
-
-$txt['view_all_members'] = 'View All Members';
-$txt['view'] = 'View';
-
-$txt['viewing_members'] = 'Viewing Members %1$s to %2$s';
-$txt['of_total_members'] = 'of %1$s total members';
-
-$txt['forgot_your_password'] = 'Forgot your password?';
-
-$txt['date'] = 'Date';
-// Use numeric entities in the below string.
-$txt['from'] = 'From';
-$txt['check_new_messages'] = 'Check for new messages';
-$txt['to'] = 'To';
-
-$txt['board_topics'] = 'Topics';
-$txt['members_title'] = 'Members';
-$txt['members_list'] = 'Members List';
-$txt['new_posts'] = 'New Posts';
-$txt['old_posts'] = 'No New Posts';
-$txt['redirect_board'] = 'Redirect Board';
-
-$txt['sendtopic_send'] = 'Send';
-$txt['report_sent'] = 'Your report has been sent successfully.';
-
-$txt['time_offset'] = 'Time Offset';
-$txt['or'] = 'or';
-
-$txt['no_matches'] = 'Sorry, no matches were found';
-
-$txt['notification'] = 'Notification';
-
-$txt['your_ban'] = 'Sorry %1$s, you are banned from using this forum!';
-$txt['your_ban_expires'] = 'This ban is set to expire %1$s.';
-$txt['your_ban_expires_never'] = 'This ban is not set to expire.';
-$txt['ban_continue_browse'] = 'You may continue to browse the forum as a guest.';
-
-$txt['mark_as_read'] = 'Mark ALL messages as read';
-
-$txt['hot_topics'] = 'Hot Topic (More than %1$d replies)';
-$txt['very_hot_topics'] = 'Very Hot Topic (More than %1$d replies)';
-$txt['locked_topic'] = 'Locked Topic';
-$txt['normal_topic'] = 'Normal Topic';
-$txt['participation_caption'] = 'Topic you have posted in';
-
-$txt['go_caps'] = 'GO';
-
-$txt['print'] = 'Print';
-$txt['profile'] = 'Profile';
-$txt['topic_summary'] = 'Topic Summary';
-$txt['not_applicable'] = 'N/A';
-$txt['message_lowercase'] = 'message';
-$txt['name_in_use'] = 'This name is already in use by another member.';
-
-$txt['total_members'] = 'Total Members';
-$txt['total_posts'] = 'Total Posts';
-$txt['total_topics'] = 'Total Topics';
-
-$txt['mins_logged_in'] = 'Minutes to stay logged in';
-
-$txt['preview'] = 'Preview';
-$txt['always_logged_in'] = 'Always stay logged in';
-
-$txt['logged'] = 'Logged';
-// Use numeric entities in the below string.
-$txt['ip'] = 'IP';
-
-$txt['www'] = 'WWW';
-
-$txt['by'] = 'by';
-
-$txt['hours'] = 'hours';
-$txt['minutes'] = 'minutes';
-$txt['seconds'] = 'seconds';
-
-// Used upper case in Paid subscriptions management
-$txt['hour'] = 'Hour';
-$txt['days_word'] = 'days';
-
-$txt['newest_member'] = ', our newest member.';
-
-$txt['search_for'] = 'Search for';
-$txt['search_match'] = 'Match';
-
-$txt['aim'] = 'AIM';
-// In this string, please use +'s for spaces.
-$txt['aim_default_message'] = 'Hi.+Are+you+there?';
-$txt['aim_title'] = 'AOL Instant Messenger';
-$txt['icq'] = 'ICQ';
-$txt['icq_title'] = 'ICQ Messenger';
-$txt['msn'] = 'MSN';
-$txt['msn_title'] = 'MSN Messenger';
-$txt['yim'] = 'YIM';
-$txt['yim_title'] = 'Yahoo Instant Messenger';
-
-$txt['maintain_mode_on'] = 'Remember, this forum is in \'Maintenance Mode\'.';
-
-$txt['read'] = 'Read';
-$txt['times'] = 'times';
-
-$txt['forum_stats'] = 'Forum Stats';
-$txt['latest_member'] = 'Latest Member';
-$txt['total_cats'] = 'Total Categories';
-$txt['latest_post'] = 'Latest Post';
-
-$txt['you_have'] = 'You\'ve got';
-$txt['click'] = 'Click';
-$txt['here'] = 'here';
-$txt['to_view'] = 'to view them.';
-
-$txt['total_boards'] = 'Total Boards';
-
-$txt['print_page'] = 'Print Page';
-
-$txt['valid_email'] = 'This must be a valid email address.';
-
-$txt['geek'] = 'I am a geek!!';
-$txt['info_center_title'] = '%1$s - Info Center';
-
-$txt['send_topic'] = 'Send this topic';
-
-$txt['sendtopic_title'] = 'Send the topic &quot;%1$s&quot; to a friend.';
-$txt['sendtopic_sender_name'] = 'Your name';
-$txt['sendtopic_sender_email'] = 'Your email address';
-$txt['sendtopic_receiver_name'] = 'Recipient\'s name';
-$txt['sendtopic_receiver_email'] = 'Recipient\'s email address';
-$txt['sendtopic_comment'] = 'Add a comment';
-
-$txt['allow_user_email'] = 'Allow users to email me';
-
-$txt['check_all'] = 'Check all';
-
-// Use numeric entities in the below string.
-$txt['database_error'] = 'Database Error';
-$txt['try_again'] = 'Please try again.  If you come back to this error screen, report the error to an administrator.';
-$txt['file'] = 'File';
-$txt['line'] = 'Line';
-// Use numeric entities in the below string.
-$txt['tried_to_repair'] = 'SMF has detected and automatically tried to repair an error in your database.  If you continue to have problems, or continue to receive these emails, please contact your host.';
-$txt['database_error_versions'] = '<strong>Note:</strong> It appears that your database <em>may</em> require an upgrade. Your forum\'s files are currently at version %1$s, while your database is at version %2$s. The above error might possibly go away if you execute the latest version of upgrade.php.';
-$txt['template_parse_error'] = 'Template Parse Error!';
-$txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system.  This problem should only be temporary, so please come back later and try again.  If you continue to see this message, please contact the administrator.<br /><br />You can also try <a href="javascript:location.reload();">refreshing this page</a>.';
-$txt['template_parse_error_details'] = 'There was a problem loading the <tt><strong>%1$s</strong></tt> template or language file.  Please check the syntax and try again - remember, single quotes (<tt>\'</tt>) often have to be escaped with a slash (<tt>\\</tt>).  To see more specific error information from PHP, try <a href="' . $boardurl . '%1$s">accessing the file directly</a>.<br /><br />You may want to try to <a href="javascript:location.reload();">refresh this page</a> or <a href="' . $scripturl . '?theme=1">use the default theme</a>.';
-
-$txt['today'] = '<strong>Today</strong> at ';
-$txt['yesterday'] = '<strong>Yesterday</strong> at ';
-$txt['new_poll'] = 'New poll';
-$txt['poll_question'] = 'Question';
-$txt['poll_vote'] = 'Submit Vote';
-$txt['poll_total_voters'] = 'Total Members Voted';
-$txt['shortcuts'] = 'shortcuts: hit alt+s to submit/post or alt+p to preview';
-$txt['shortcuts_firefox'] = 'shortcuts: hit shift+alt+s to submit/post or shift+alt+p to preview';
-$txt['poll_results'] = 'View results';
-$txt['poll_lock'] = 'Lock Voting';
-$txt['poll_unlock'] = 'Unlock Voting';
-$txt['poll_edit'] = 'Edit Poll';
-$txt['poll'] = 'Poll';
-$txt['one_day'] = '1 Day';
-$txt['one_week'] = '1 Week';
-$txt['two_weeks'] = '2 Weeks';
-$txt['one_month'] = '1 Month';
-$txt['two_months'] = '2 Months';
-$txt['forever'] = 'Forever';
-$txt['quick_login_dec'] = 'Login with username, password and session length';
-$txt['one_hour'] = '1 Hour';
-$txt['moved'] = 'MOVED';
-$txt['moved_why'] = 'Please enter a brief description as to<br />why this topic is being moved.';
-$txt['board'] = 'Board';
-$txt['in'] = 'in';
-$txt['sticky_topic'] = 'Sticky Topic';
-
-$txt['delete'] = 'Delete';
-
-$txt['your_pms'] = 'Your Personal Messages';
-
-$txt['kilobyte'] = 'KB';
-$txt['megabyte'] = 'MB';
-
-$txt['more_stats'] = '[More Stats]';
-
-// Use numeric entities in the below three strings.
-$txt['code'] = 'Code';
-$txt['code_select'] = '[Select]';
-$txt['quote_from'] = 'Quote from';
-$txt['quote'] = 'Quote';
-$txt['fulledit'] = 'Full&nbsp;edit';
-$txt['edit'] = 'Edit';
-$txt['quick_edit'] = 'Quick Edit';
-$txt['post_options'] = 'More...';
-
-$txt['merge_to_topic_id'] = 'ID of target topic';
-$txt['split'] = 'Split Topic';
-$txt['merge'] = 'Merge Topics';
-$txt['subject_new_topic'] = 'Subject For New Topic';
-$txt['split_this_post'] = 'Only split this post.';
-$txt['split_after_and_this_post'] = 'Split topic after and including this post.';
-$txt['select_split_posts'] = 'Select posts to split.';
-$txt['new_topic'] = 'New Topic';
-$txt['split_successful'] = 'Topic successfully split into two topics.';
-$txt['origin_topic'] = 'Origin Topic';
-$txt['please_select_split'] = 'Please select which posts you wish to split.';
-$txt['merge_successful'] = 'Topics successfully merged.';
-$txt['new_merged_topic'] = 'Newly Merged Topic';
-$txt['topic_to_merge'] = 'Topic to be merged';
-$txt['target_board'] = 'Target board';
-$txt['target_topic'] = 'Target topic';
-$txt['merge_confirm'] = 'Are you sure you want to merge';
-$txt['with'] = 'with';
-$txt['merge_desc'] = 'This function will merge the messages of two topics into one topic. The messages will be sorted according to the time of posting. Therefore the earliest posted message will be the first message of the merged topic.';
-
-$txt['set_sticky'] = 'Set topic sticky';
-$txt['set_nonsticky'] = 'Set topic non-sticky';
-$txt['set_lock'] = 'Lock topic';
-$txt['set_unlock'] = 'Unlock topic';
-
-$txt['search_advanced'] = 'Advanced search';
-
-$txt['security_risk'] = 'MAJOR SECURITY RISK:';
-$txt['not_removed'] = 'You have not removed ';
-$txt['not_removed_extra'] = '%1$s is a backup of %2$s that was not generated by SMF. It can be accessed directly and used to gain unauthorised access to your forum. You should delete it immediately.';
-$txt['generic_warning'] = 'Warning';
-$txt['agreement_missing'] = 'Even though you are requiring to accept the registration agreement, the file (agreement.txt) doesn\'t exists!';
-
-$txt['cache_writable'] = 'The cache directory is not writable - this will adversely affect the performance of your forum.';
-
-$txt['page_created'] = 'Page created in ';
-$txt['seconds_with'] = ' seconds with ';
-$txt['queries'] = ' queries.';
-
-$txt['report_to_mod_func'] = 'Use this function to inform the moderators and administrators of an abusive or wrongly posted message.<br /><em>Please note that your email address will be revealed to the moderators if you use this.</em>';
-
-$txt['online'] = 'Online';
-$txt['offline'] = 'Offline';
-$txt['pm_online'] = 'Personal Message (Online)';
-$txt['pm_offline'] = 'Personal Message (Offline)';
-$txt['status'] = 'Status';
-
-$txt['go_up'] = 'Go Up';
-$txt['go_down'] = 'Go Down';
-
-$forum_copyright = '<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">%1$s</a> |
- <a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF &copy; 2011</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>';
-
-$txt['birthdays'] = 'Birthdays:';
-$txt['events'] = 'Events:';
-$txt['birthdays_upcoming'] = 'Upcoming Birthdays:';
-$txt['events_upcoming'] = 'Upcoming Events:';
-// Prompt for holidays in the calendar, leave blank to just display the holiday's name.
-$txt['calendar_prompt'] = '';
-$txt['calendar_month'] = 'Month:';
-$txt['calendar_year'] = 'Year:';
-$txt['calendar_day'] = 'Day:';
-$txt['calendar_event_title'] = 'Event Title';
-$txt['calendar_event_options'] = 'Event Options';
-$txt['calendar_post_in'] = 'Post In:';
-$txt['calendar_edit'] = 'Edit Event';
-$txt['event_delete_confirm'] = 'Delete this event?';
-$txt['event_delete'] = 'Delete Event';
-$txt['calendar_post_event'] = 'Post Event';
-$txt['calendar'] = 'Calendar';
-$txt['calendar_link'] = 'Link to Calendar';
-$txt['calendar_upcoming'] = 'Upcoming Calendar';
-$txt['calendar_today'] = 'Today\'s Calendar';
-$txt['calendar_week'] = 'Week';
-$txt['calendar_week_title'] = 'Week %1$d of %2$d';
-$txt['calendar_numb_days'] = 'Number of Days:';
-$txt['calendar_how_edit'] = 'how do you edit these events?';
-$txt['calendar_link_event'] = 'Link Event To Post:';
-$txt['calendar_confirm_delete'] = 'Are you sure you want to delete this event?';
-$txt['calendar_linked_events'] = 'Linked Events';
-$txt['calendar_click_all'] = 'click to see all %1$s';
-
-$txt['moveTopic1'] = 'Post a redirection topic';
-$txt['moveTopic2'] = 'Change the topic\'s subject';
-$txt['moveTopic3'] = 'New subject';
-$txt['moveTopic4'] = 'Change every message\'s subject';
-$txt['move_topic_unapproved_js'] = 'Warning! This topic has not yet been approved.\\n\\nIt is not recommended that you create a redirection topic unless you intend to approve the post immediately following the move.';
-$txt['movetopic_auto_board'] = '[BOARD]';
-$txt['movetopic_auto_topic'] = '[TOPIC LINK]';
-$txt['movetopic_default'] = 'This topic has been moved to ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic'];
-$txt['movetopic_redirect'] = 'Redirect to the moved topic';
-$txt['movetopic_expires'] = 'Automatically remove the redirection topic';
-
-$txt['theme_template_error'] = 'Unable to load the \'%1$s\' template.';
-$txt['theme_language_error'] = 'Unable to load the \'%1$s\' language file.';
-
-$txt['parent_boards'] = 'Child Boards';
-
-$txt['smtp_no_connect'] = 'Could not connect to SMTP host';
-$txt['smtp_port_ssl'] = 'SMTP port setting incorrect; it should be 465 for SSL servers.';
-$txt['smtp_bad_response'] = 'Couldn\'t get mail server response codes';
-$txt['smtp_error'] = 'Ran into problems sending Mail. Error: ';
-$txt['mail_send_unable'] = 'Unable to send mail to the email address \'%1$s\'';
-
-$txt['mlist_search'] = 'Search For Members';
-$txt['mlist_search_again'] = 'Search again';
-$txt['mlist_search_filter'] = 'Search Options';
-$txt['mlist_search_email'] = 'Search by email address';
-$txt['mlist_search_messenger'] = 'Search by messenger nickname';
-$txt['mlist_search_group'] = 'Search by position';
-$txt['mlist_search_name'] = 'Search by name';
-$txt['mlist_search_website'] = 'Search by website';
-$txt['mlist_search_results'] = 'Search results for';
-$txt['mlist_search_by'] = 'Search by %1$s';
-$txt['mlist_menu_view'] = 'View the memberlist';
-
-$txt['attach_downloaded'] = 'downloaded';
-$txt['attach_viewed'] = 'viewed';
-$txt['attach_times'] = 'times';
-
-$txt['settings'] = 'Settings';
-$txt['never'] = 'Never';
-$txt['more'] = 'more';
-
-$txt['hostname'] = 'Hostname';
-$txt['you_are_post_banned'] = 'Sorry %1$s, you are banned from posting and sending personal messages on this forum.';
-$txt['ban_reason'] = 'Reason';
-
-$txt['tables_optimized'] = 'Database tables optimized';
-
-$txt['add_poll'] = 'Add poll';
-$txt['poll_options6'] = 'You may only select up to %1$s options.';
-$txt['poll_remove'] = 'Remove Poll';
-$txt['poll_remove_warn'] = 'Are you sure you want to remove this poll from the topic?';
-$txt['poll_results_expire'] = 'Results will be shown when voting has closed';
-$txt['poll_expires_on'] = 'Voting closes';
-$txt['poll_expired_on'] = 'Voting closed';
-$txt['poll_change_vote'] = 'Remove Vote';
-$txt['poll_return_vote'] = 'Voting options';
-$txt['poll_cannot_see'] = 'You cannot see the results of this poll at the moment.';
-
-$txt['quick_mod_approve'] = 'Approve selected';
-$txt['quick_mod_remove'] = 'Remove selected';
-$txt['quick_mod_lock'] = 'Lock/Unlock selected';
-$txt['quick_mod_sticky'] = 'Sticky/Unsticky selected';
-$txt['quick_mod_move'] = 'Move selected to';
-$txt['quick_mod_merge'] = 'Merge selected';
-$txt['quick_mod_markread'] = 'Mark selected read';
-$txt['quick_mod_go'] = 'Go!';
-$txt['quickmod_confirm'] = 'Are you sure you want to do this?';
-
-$txt['spell_check'] = 'Spell Check';
-
-$txt['quick_reply'] = 'Quick Reply';
-$txt['quick_reply_desc'] = 'With <em>Quick-Reply</em> you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.';
-$txt['quick_reply_warning'] = 'Warning: this topic is currently locked! Only admins and moderators can reply.';
-$txt['quick_reply_verification'] = 'After submitting your post you will be directed to the regular post page to verify your post %1$s.';
-$txt['quick_reply_verification_guests'] = '(required for all guests)';
-$txt['quick_reply_verification_posts'] = '(required for all users with less than %1$d posts)';
-$txt['wait_for_approval'] = 'Note: this post will not display until it\'s been approved by a moderator.';
-
-$txt['notification_enable_board'] = 'Are you sure you wish to enable notification of new topics for this board?';
-$txt['notification_disable_board'] = 'Are you sure you wish to disable notification of new topics for this board?';
-$txt['notification_enable_topic'] = 'Are you sure you wish to enable notification of new replies for this topic?';
-$txt['notification_disable_topic'] = 'Are you sure you wish to disable notification of new replies for this topic?';
-
-$txt['report_to_mod'] = 'Report to moderator';
-$txt['issue_warning_post'] = 'Issue a warning because of this message';
-
-$txt['unread_topics_visit'] = 'Recent Unread Topics';
-$txt['unread_topics_visit_none'] = 'No unread topics found since your last visit.  <a href="' . $scripturl . '?action=unread;all">Click here to try all unread topics</a>.';
-$txt['unread_topics_all'] = 'All Unread Topics';
-$txt['unread_replies'] = 'Updated Topics';
-
-$txt['who_title'] = 'Who\'s Online';
-$txt['who_and'] = ' and ';
-$txt['who_viewing_topic'] = ' are viewing this topic.';
-$txt['who_viewing_board'] = ' are viewing this board.';
-$txt['who_member'] = 'Member';
-
-// No longer used by default theme, but for backwards compat
-$txt['powered_by_php'] = 'Powered by PHP';
-$txt['powered_by_mysql'] = 'Powered by MySQL';
-$txt['valid_css'] = 'Valid CSS!';
-
-// Current footer strings
-$txt['valid_html'] = 'Valid HTML 4.01!';
-$txt['valid_xhtml'] = 'Valid XHTML 1.0!';
-$txt['wap2'] = 'WAP2';
-$txt['rss'] = 'RSS';
-$txt['atom'] = 'Atom';
-$txt['xhtml'] = 'XHTML';
-$txt['html'] = 'HTML';
-
-$txt['guest'] = 'Guest';
-$txt['guests'] = 'Guests';
-$txt['user'] = 'User';
-$txt['users'] = 'Users';
-$txt['hidden'] = 'Hidden';
-$txt['buddy'] = 'Buddy';
-$txt['buddies'] = 'Buddies';
-$txt['most_online_ever'] = 'Most Online Ever';
-$txt['most_online_today'] = 'Most Online Today';
-
-$txt['merge_select_target_board'] = 'Select the target board of the merged topic';
-$txt['merge_select_poll'] = 'Select which poll the merged topic should have';
-$txt['merge_topic_list'] = 'Select topics to be merged';
-$txt['merge_select_subject'] = 'Select subject of merged topic';
-$txt['merge_custom_subject'] = 'Custom subject';
-$txt['merge_enforce_subject'] = 'Change the subject of all the messages';
-$txt['merge_include_notifications'] = 'Include notifications?';
-$txt['merge_check'] = 'Merge?';
-$txt['merge_no_poll'] = 'No poll';
-
-$txt['response_prefix'] = 'Re: ';
-$txt['current_icon'] = 'Current Icon';
-$txt['message_icon'] = 'Message Icon';
-
-$txt['smileys_current'] = 'Current Smiley Set';
-$txt['smileys_none'] = 'No Smileys';
-$txt['smileys_forum_board_default'] = 'Forum/Board Default';
-
-$txt['search_results'] = 'Search Results';
-$txt['search_no_results'] = 'Sorry, no matches were found';
-
-$txt['totalTimeLogged1'] = 'Total time logged in: ';
-$txt['totalTimeLogged2'] = ' days, ';
-$txt['totalTimeLogged3'] = ' hours and ';
-$txt['totalTimeLogged4'] = ' minutes.';
-$txt['totalTimeLogged5'] = 'd ';
-$txt['totalTimeLogged6'] = 'h ';
-$txt['totalTimeLogged7'] = 'm';
-
-$txt['approve_thereis'] = 'There is';
-$txt['approve_thereare'] = 'There are';
-$txt['approve_member'] = 'one member';
-$txt['approve_members'] = 'members';
-$txt['approve_members_waiting'] = 'awaiting approval.';
-
-$txt['notifyboard_turnon'] = 'Do you want a notification email when someone posts a new topic in this board?';
-$txt['notifyboard_turnoff'] = 'Are you sure you do not want to receive new topic notifications for this board?';
-
-$txt['activate_code'] = 'Your activation code is';
-
-$txt['find_members'] = 'Find Members';
-$txt['find_username'] = 'Name, username, or email address';
-$txt['find_buddies'] = 'Show Buddies Only?';
-$txt['find_wildcards'] = 'Allowed Wildcards: *, ?';
-$txt['find_no_results'] = 'No results found';
-$txt['find_results'] = 'Results';
-$txt['find_close'] = 'Close';
-
-$txt['unread_since_visit'] = 'Show unread posts since last visit.';
-$txt['show_unread_replies'] = 'Show new replies to your posts.';
-
-$txt['change_color'] = 'Change Color';
-
-$txt['quickmod_delete_selected'] = 'Remove Selected';
-$txt['quickmod_split_selected'] = 'Split Selected';
-
-$txt['show_personal_messages_heading'] = 'New messages!';
-$txt['show_personal_messages'] = 'You have <strong>%1$s</strong> unread personal messages in your inbox!<br /><br /><a href="%2$s">Go to your inbox</a>';
-
-$txt['help_popup'] = 'A little lost? Let me explain:';
-
-$txt['previous_next_back'] = '&laquo; previous';
-$txt['previous_next_forward'] = 'next &raquo;';
-
-$txt['upshrink_description'] = 'Shrink or expand the header.';
-
-$txt['mark_unread'] = 'Mark unread';
-
-$txt['ssi_not_direct'] = 'Please don\'t access SSI.php by URL directly; you may want to use the path (%1$s) or add ?ssi_function=something.';
-$txt['ssi_session_broken'] = 'SSI.php was unable to load a session!  This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts!';
-
-// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'.
-$txt['preview_title'] = 'Preview post';
-$txt['preview_fetch'] = 'Fetching preview...';
-$txt['preview_new'] = 'New message';
-$txt['pm_error_while_submitting'] = 'The following error or errors occurred while sending this personal message:';
-$txt['error_while_submitting'] = 'The following error or errors occurred while posting this message:';
-$txt['error_old_topic'] = 'Warning: this topic has not been posted in for at least %1$d days.<br />Unless you\'re sure you want to reply, please consider starting a new topic.';
-
-$txt['split_selected_posts'] = 'Selected posts';
-$txt['split_selected_posts_desc'] = 'The posts below will form a new topic after splitting.';
-$txt['split_reset_selection'] = 'reset selection';
-
-$txt['modify_cancel'] = 'Cancel';
-$txt['mark_read_short'] = 'Mark Read';
-
-$txt['pm_short'] = 'My Messages';
-$txt['pm_menu_read'] = 'Read your messages';
-$txt['pm_menu_send'] = 'Send a message';
-
-$txt['hello_member_ndt'] = 'Hello';
-
-$txt['unapproved_posts'] = 'Unapproved Posts (Topics: %1$d, Posts: %2$d)';
-
-$txt['ajax_in_progress'] = 'Loading...';
-
-$txt['mod_reports_waiting'] = 'There are currently %1$d moderator reports open.';
-
-$txt['view_unread_category'] = 'Unread Posts';
-$txt['verification'] = 'Verification';
-$txt['visual_verification_description'] = 'Type the letters shown in the picture';
-$txt['visual_verification_sound'] = 'Listen to the letters';
-$txt['visual_verification_request_new'] = 'Request another image';
-
-// Sub menu labels
-$txt['summary'] = 'Summary';
-$txt['account'] = 'Account Settings';
-$txt['forumprofile'] = 'Forum Profile';
-
-$txt['modSettings_title'] = 'Features and Options';
-$txt['package'] = 'Package Manager';
-$txt['errlog'] = 'Error Log';
-$txt['edit_permissions'] = 'Permissions';
-$txt['mc_unapproved_attachments'] = 'Unapproved Attachments';
-$txt['mc_unapproved_poststopics'] = 'Unapproved Posts and Topics';
-$txt['mc_reported_posts'] = 'Reported Posts';
-$txt['modlog_view'] = 'Moderation Log';
-$txt['calendar_menu'] = 'View Calendar';
-
-// @todo Send email strings - should move?
-$txt['send_email'] = 'Send Email';
-$txt['send_email_disclosed'] = 'Note this will be visible to the recipient.';
-$txt['send_email_subject'] = 'Email Subject';
-
-$txt['ignoring_user'] = 'You are ignoring this user.';
-$txt['show_ignore_user_post'] = 'Show me the post.';
-
-$txt['spider'] = 'Spider';
-$txt['spiders'] = 'Spiders';
-$txt['openid'] = 'OpenID';
-
-$txt['downloads'] = 'Downloads';
-$txt['filesize'] = 'Filesize';
-$txt['subscribe_webslice'] = 'Subscribe to Webslice';
-
-// Restore topic
-$txt['restore_topic'] = 'Restore Topic';
-$txt['restore_message'] = 'Restore';
-$txt['quick_mod_restore'] = 'Restore Selected';
-
-// Editor prompt.
-$txt['prompt_text_email'] = 'Please enter the email address.';
-$txt['prompt_text_ftp'] = 'Please enter the ftp address.';
-$txt['prompt_text_url'] = 'Please enter the URL you wish to link to.';
-$txt['prompt_text_img'] = 'Enter image location';
-
-// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'.
-$txt['autosuggest_delete_item'] = 'Delete Item';
-
-// Debug related - when $db_show_debug is true.
-$txt['debug_templates'] = 'Templates: ';
-$txt['debug_subtemplates'] = 'Sub templates: ';
-$txt['debug_language_files'] = 'Language files: ';
-$txt['debug_stylesheets'] = 'Style sheets: ';
-$txt['debug_files_included'] = 'Files included: ';
-$txt['debug_kb'] = 'KB.';
-$txt['debug_show'] = 'show';
-$txt['debug_cache_hits'] = 'Cache hits: ';
-$txt['debug_cache_seconds_bytes'] = '%1$ss - %2$s bytes';
-$txt['debug_cache_seconds_bytes_total'] = '%1$ss for %2$s bytes';
-$txt['debug_queries_used'] = 'Queries used: %1$d.';
-$txt['debug_queries_used_and_warnings'] = 'Queries used: %1$d, %2$d warnings.';
-$txt['debug_query_in_line'] = 'in <em>%1$s</em> line <em>%2$s</em>, ';
-$txt['debug_query_which_took'] = 'which took %1$s seconds.';
-$txt['debug_query_which_took_at'] = 'which took %1$s seconds at %2$s into request.';
-$txt['debug_show_queries'] = '[Show Queries]';
-$txt['debug_hide_queries'] = '[Hide Queries]';
-$txt['debug_tokens'] = 'Tokens: ';
-$txt['debug_browser'] = 'Browser ID: ';
-
+<?php
+// Version: 2.0; index
+
+global $forum_copyright, $forum_version, $webmaster_email, $scripturl, $context, $boardurl;
+
+// Locale (strftime, pspell_new) and spelling. (pspell_new, can be left as '' normally.)
+// For more information see:
+//   - http://www.php.net/function.pspell-new
+//   - http://www.php.net/function.setlocale
+// Again, SPELLING SHOULD BE '' 99% OF THE TIME!!  Please read this!
+$txt['lang_locale'] = 'en_US';
+$txt['lang_dictionary'] = 'en';
+$txt['lang_spelling'] = 'american';
+
+// Ensure you remember to use uppercase for character set strings.
+$txt['lang_character_set'] = 'ISO-8859-1';
+// Character set and right to left?
+$txt['lang_rtl'] = false;
+// Capitalize day and month names?
+$txt['lang_capitalize_dates'] = true;
+
+$txt['days'] = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
+$txt['days_short'] = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
+// Months must start with 1 => 'January'. (or translated, of course.)
+$txt['months'] = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
+$txt['months_titles'] = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
+$txt['months_short'] = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
+
+$txt['time_am'] = 'am';
+$txt['time_pm'] = 'pm';
+
+$txt['newmessages0'] = 'is new';
+$txt['newmessages1'] = 'are new';
+$txt['newmessages3'] = 'New';
+$txt['newmessages4'] = ',';
+
+$txt['admin'] = 'Admin';
+$txt['moderate'] = 'Moderate';
+
+$txt['save'] = 'Save';
+
+$txt['modify'] = 'Modify';
+$txt['forum_index'] = '%1$s - Index';
+$txt['members'] = 'Members';
+$txt['board_name'] = 'Board name';
+$txt['posts'] = 'Posts';
+
+$txt['member_postcount'] = 'Posts';
+$txt['no_subject'] = '(No subject)';
+$txt['view_profile'] = 'View Profile';
+$txt['guest_title'] = 'Guest';
+$txt['author'] = 'Author';
+$txt['on'] = 'on';
+$txt['remove'] = 'Remove';
+$txt['start_new_topic'] = 'Start new topic';
+
+$txt['login'] = 'Login';
+// Use numeric entities in the below string.
+$txt['username'] = 'Username';
+$txt['password'] = 'Password';
+
+$txt['username_no_exist'] = 'That username does not exist.';
+$txt['no_user_with_email'] = 'There are no usernames associated with that email.';
+
+$txt['board_moderator'] = 'Board Moderator';
+$txt['remove_topic'] = 'Remove Topic';
+$txt['topics'] = 'Topics';
+$txt['modify_msg'] = 'Modify message';
+$txt['name'] = 'Name';
+$txt['email'] = 'Email';
+$txt['user_email_address'] = 'Email Address';
+$txt['subject'] = 'Subject';
+$txt['message'] = 'Message';
+$txt['redirects'] = 'Redirects';
+$txt['quick_modify'] = 'Modify Inline';
+
+$txt['choose_pass'] = 'Choose password';
+$txt['verify_pass'] = 'Verify password';
+$txt['position'] = 'Position';
+
+$txt['profile_of'] = 'View the profile of';
+$txt['total'] = 'Total';
+$txt['posts_made'] = 'Posts';
+$txt['website'] = 'Website';
+$txt['register'] = 'Register';
+$txt['warning_status'] = 'Warning Status';
+$txt['user_warn_watch'] = 'User is on moderator watch list';
+$txt['user_warn_moderate'] = 'User posts join approval queue';
+$txt['user_warn_mute'] = 'User is banned from posting';
+$txt['warn_watch'] = 'Watched';
+$txt['warn_moderate'] = 'Moderated';
+$txt['warn_mute'] = 'Muted';
+
+$txt['message_index'] = 'Message Index';
+$txt['news'] = 'News';
+$txt['home'] = 'Home';
+$txt['page'] = 'Page';
+$txt['prev'] = 'previous';
+$txt['next'] = 'next';
+
+$txt['lock_unlock'] = 'Lock/Unlock Topic';
+$txt['post'] = 'Post';
+$txt['error_occured'] = 'An Error Has Occurred!';
+$txt['at'] = 'at';
+$txt['logout'] = 'Logout';
+$txt['started_by'] = 'Started by';
+$txt['topic_started_by'] = 'Started by  <strong>%1$s</strong> in <em>%2$s</em>';
+$txt['replies'] = 'Replies';
+$txt['last_post'] = 'Last post';
+//$txt['last_post_message'] = '<strong>Last post</strong> by %1$s<br />in %2$s<br />on %3$s';
+$txt['last_post_message'] = '<strong>Last post: </strong>%3$s<br />%2$s by %1$s';
+$txt['boardindex_total_posts'] = '%1$d Posts in %2$d Topics by %3$d Members';
+$txt['show'] = 'Show';
+$txt['hide'] = 'Hide';
+
+$txt['admin_login'] = 'Administration Login';
+// Use numeric entities in the below string.
+$txt['topic'] = 'Topic';
+$txt['help'] = 'Help';
+$txt['notify'] = 'Notify';
+$txt['unnotify'] = 'Unnotify';
+$txt['notify_request'] = 'Do you want a notification email if someone replies to this topic?';
+// Use numeric entities in the below string.
+$txt['regards_team'] = "Regards,\nThe " . $context['forum_name'] . ' Team.';
+$txt['notify_replies'] = 'Notify of replies';
+$txt['move_topic'] = 'Move Topic';
+$txt['move_to'] = 'Move to';
+$txt['pages'] = 'Pages';
+$txt['users_active'] = 'Users active in past %1$d minutes';
+$txt['personal_messages'] = 'Personal Messages';
+$txt['reply_quote'] = 'Reply with quote';
+$txt['reply'] = 'Reply';
+$txt['reply_noun'] = 'Reply';
+$txt['approve'] = 'Approve';
+$txt['approve_all'] = 'approve all';
+$txt['awaiting_approval'] = 'Awaiting Approval';
+$txt['attach_awaiting_approve'] = 'Attachments awaiting approval';
+$txt['post_awaiting_approval'] = 'Note: This message is awaiting approval by a moderator.';
+$txt['there_are_unapproved_topics'] = 'There are %1$s topics and %2$s posts awaiting approval in this board. Click <a href="%3$s">here</a> to view them all.';
+
+$txt['msg_alert_none'] = 'No messages...';
+$txt['msg_alert_you_have'] = 'you have';
+$txt['msg_alert_messages'] = 'messages';
+$txt['remove_message'] = 'Remove this message';
+
+$txt['online_users'] = 'Users Online';
+$txt['personal_message'] = 'Personal Message';
+$txt['jump_to'] = 'Jump to';
+$txt['go'] = 'Go!';
+$txt['are_sure_remove_topic'] = 'Are you sure you want to remove this topic?';
+$txt['yes'] = 'Yes';
+$txt['no'] = 'No';
+
+$txt['search_end_results'] = 'End of results';
+$txt['search_on'] = 'on';
+
+$txt['search'] = 'Search';
+$txt['all'] = 'All';
+$txt['search_entireforum'] = 'Entire Forum';
+$txt['search_thisbrd'] = 'This board';
+$txt['search_thistopic'] = 'This topic';
+$txt['search_members'] = 'Members';
+
+$txt['back'] = 'Back';
+$txt['password_reminder'] = 'Password reminder';
+$txt['topic_started'] = 'Topic started by';
+$txt['title'] = 'Title';
+$txt['post_by'] = 'Post by';
+$txt['memberlist_searchable'] = 'Searchable list of all registered members.';
+$txt['welcome_member'] = 'Please welcome';
+$txt['admin_center'] = 'Administration Center';
+$txt['last_edit'] = 'Last Edit';
+$txt['notify_deactivate'] = 'Would you like to deactivate notification on this topic?';
+
+$txt['recent_posts'] = 'Recent Posts';
+
+$txt['location'] = 'Location';
+$txt['gender'] = 'Gender';
+$txt['date_registered'] = 'Date Registered';
+
+$txt['recent_view'] = 'View the most recent posts on the forum.';
+$txt['recent_updated'] = 'is the most recently updated topic';
+
+$txt['male'] = 'Male';
+$txt['female'] = 'Female';
+
+$txt['error_invalid_characters_username'] = 'Invalid character used in Username.';
+
+$txt['welcome_guest'] = 'Welcome, <strong>%1$s</strong>. Please <a href="%2$s">login</a>.';
+
+//$txt['welcome_guest_register'] = 'Welcome, <strong>%1$s</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
+$txt['welcome_guest_register'] = 'Welcome to <strong>'. $context['forum_name']. '</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
+
+$txt['please_login'] = 'Please <a href="' . $scripturl . '?action=login">login</a>.';
+$txt['login_or_register'] = 'Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
+$txt['welcome_guest_activate'] = '<br />Did you miss your <a href="' . $scripturl . '?action=activate">activation email</a>?';
+$txt['hello_member'] = 'Hey,';
+// Use numeric entities in the below string.
+$txt['hello_guest'] = 'Welcome,';
+$txt['welmsg_hey'] = 'Hey,';
+$txt['welmsg_welcome'] = 'Welcome,';
+$txt['welmsg_please'] = 'Please';
+$txt['select_destination'] = 'Please select a destination';
+
+// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'.
+$txt['posted_by'] = 'Posted by';
+
+$txt['icon_smiley'] = 'Smiley';
+$txt['icon_angry'] = 'Angry';
+$txt['icon_cheesy'] = 'Cheesy';
+$txt['icon_laugh'] = 'Laugh';
+$txt['icon_sad'] = 'Sad';
+$txt['icon_wink'] = 'Wink';
+$txt['icon_grin'] = 'Grin';
+$txt['icon_shocked'] = 'Shocked';
+$txt['icon_cool'] = 'Cool';
+$txt['icon_huh'] = 'Huh';
+$txt['icon_rolleyes'] = 'Roll Eyes';
+$txt['icon_tongue'] = 'Tongue';
+$txt['icon_embarrassed'] = 'Embarrassed';
+$txt['icon_lips'] = 'Lips sealed';
+$txt['icon_undecided'] = 'Undecided';
+$txt['icon_kiss'] = 'Kiss';
+$txt['icon_cry'] = 'Cry';
+
+$txt['moderator'] = 'Moderator';
+$txt['moderators'] = 'Moderators';
+
+$txt['mark_board_read'] = 'Mark Topics as Read for this Board';
+$txt['views'] = 'Views';
+$txt['new'] = 'New';
+
+$txt['view_all_members'] = 'View All Members';
+$txt['view'] = 'View';
+
+$txt['viewing_members'] = 'Viewing Members %1$s to %2$s';
+$txt['of_total_members'] = 'of %1$s total members';
+
+$txt['forgot_your_password'] = 'Forgot your password?';
+
+$txt['date'] = 'Date';
+// Use numeric entities in the below string.
+$txt['from'] = 'From';
+$txt['check_new_messages'] = 'Check for new messages';
+$txt['to'] = 'To';
+
+$txt['board_topics'] = 'Topics';
+$txt['members_title'] = 'Members';
+$txt['members_list'] = 'Members List';
+$txt['new_posts'] = 'New Posts';
+$txt['old_posts'] = 'No New Posts';
+$txt['redirect_board'] = 'Redirect Board';
+
+$txt['sendtopic_send'] = 'Send';
+$txt['report_sent'] = 'Your report has been sent successfully.';
+
+$txt['time_offset'] = 'Time Offset';
+$txt['or'] = 'or';
+
+$txt['no_matches'] = 'Sorry, no matches were found';
+
+$txt['notification'] = 'Notification';
+
+$txt['your_ban'] = 'Sorry %1$s, you are banned from using this forum!';
+$txt['your_ban_expires'] = 'This ban is set to expire %1$s.';
+$txt['your_ban_expires_never'] = 'This ban is not set to expire.';
+$txt['ban_continue_browse'] = 'You may continue to browse the forum as a guest.';
+
+$txt['mark_as_read'] = 'Mark ALL messages as read';
+
+$txt['hot_topics'] = 'Hot Topic (More than %1$d replies)';
+$txt['very_hot_topics'] = 'Very Hot Topic (More than %1$d replies)';
+$txt['locked_topic'] = 'Locked Topic';
+$txt['normal_topic'] = 'Normal Topic';
+$txt['participation_caption'] = 'Topic you have posted in';
+
+$txt['go_caps'] = 'GO';
+
+$txt['print'] = 'Print';
+$txt['profile'] = 'Profile';
+$txt['topic_summary'] = 'Topic Summary';
+$txt['not_applicable'] = 'N/A';
+$txt['message_lowercase'] = 'message';
+$txt['name_in_use'] = 'This name is already in use by another member.';
+
+$txt['total_members'] = 'Total Members';
+$txt['total_posts'] = 'Total Posts';
+$txt['total_topics'] = 'Total Topics';
+
+$txt['mins_logged_in'] = 'Minutes to stay logged in';
+
+$txt['preview'] = 'Preview';
+$txt['always_logged_in'] = 'Always stay logged in';
+
+$txt['logged'] = 'Logged';
+// Use numeric entities in the below string.
+$txt['ip'] = 'IP';
+
+$txt['www'] = 'WWW';
+
+$txt['by'] = 'by';
+
+$txt['hours'] = 'hours';
+$txt['minutes'] = 'minutes';
+$txt['seconds'] = 'seconds';
+
+// Used upper case in Paid subscriptions management
+$txt['hour'] = 'Hour';
+$txt['days_word'] = 'days';
+
+$txt['newest_member'] = ', our newest member.';
+
+$txt['search_for'] = 'Search for';
+$txt['search_match'] = 'Match';
+
+$txt['aim'] = 'AIM';
+// In this string, please use +'s for spaces.
+$txt['aim_default_message'] = 'Hi.+Are+you+there?';
+$txt['aim_title'] = 'AOL Instant Messenger';
+$txt['icq'] = 'ICQ';
+$txt['icq_title'] = 'ICQ Messenger';
+$txt['msn'] = 'MSN';
+$txt['msn_title'] = 'MSN Messenger';
+$txt['yim'] = 'YIM';
+$txt['yim_title'] = 'Yahoo Instant Messenger';
+
+$txt['maintain_mode_on'] = 'Remember, this forum is in \'Maintenance Mode\'.';
+
+$txt['read'] = 'Read';
+$txt['times'] = 'times';
+
+$txt['forum_stats'] = 'Forum Stats';
+$txt['latest_member'] = 'Latest Member';
+$txt['total_cats'] = 'Total Categories';
+$txt['latest_post'] = 'Latest Post';
+
+$txt['you_have'] = 'You\'ve got';
+$txt['click'] = 'Click';
+$txt['here'] = 'here';
+$txt['to_view'] = 'to view them.';
+
+$txt['total_boards'] = 'Total Boards';
+
+$txt['print_page'] = 'Print Page';
+
+$txt['valid_email'] = 'This must be a valid email address.';
+
+$txt['geek'] = 'I am a geek!!';
+$txt['info_center_title'] = '%1$s - Info Center';
+
+$txt['send_topic'] = 'Send this topic';
+
+$txt['sendtopic_title'] = 'Send the topic &quot;%1$s&quot; to a friend.';
+$txt['sendtopic_sender_name'] = 'Your name';
+$txt['sendtopic_sender_email'] = 'Your email address';
+$txt['sendtopic_receiver_name'] = 'Recipient\'s name';
+$txt['sendtopic_receiver_email'] = 'Recipient\'s email address';
+$txt['sendtopic_comment'] = 'Add a comment';
+
+$txt['allow_user_email'] = 'Allow users to email me';
+
+$txt['check_all'] = 'Check all';
+
+// Use numeric entities in the below string.
+$txt['database_error'] = 'Database Error';
+$txt['try_again'] = 'Please try again.  If you come back to this error screen, report the error to an administrator.';
+$txt['file'] = 'File';
+$txt['line'] = 'Line';
+// Use numeric entities in the below string.
+$txt['tried_to_repair'] = 'SMF has detected and automatically tried to repair an error in your database.  If you continue to have problems, or continue to receive these emails, please contact your host.';
+$txt['database_error_versions'] = '<strong>Note:</strong> It appears that your database <em>may</em> require an upgrade. Your forum\'s files are currently at version %1$s, while your database is at version %2$s. The above error might possibly go away if you execute the latest version of upgrade.php.';
+$txt['template_parse_error'] = 'Template Parse Error!';
+$txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system.  This problem should only be temporary, so please come back later and try again.  If you continue to see this message, please contact the administrator.<br /><br />You can also try <a href="javascript:location.reload();">refreshing this page</a>.';
+$txt['template_parse_error_details'] = 'There was a problem loading the <tt><strong>%1$s</strong></tt> template or language file.  Please check the syntax and try again - remember, single quotes (<tt>\'</tt>) often have to be escaped with a slash (<tt>\\</tt>).  To see more specific error information from PHP, try <a href="' . $boardurl . '%1$s">accessing the file directly</a>.<br /><br />You may want to try to <a href="javascript:location.reload();">refresh this page</a> or <a href="' . $scripturl . '?theme=1">use the default theme</a>.';
+
+$txt['today'] = '<strong>Today</strong> at ';
+$txt['yesterday'] = '<strong>Yesterday</strong> at ';
+$txt['new_poll'] = 'New poll';
+$txt['poll_question'] = 'Question';
+$txt['poll_vote'] = 'Submit Vote';
+$txt['poll_total_voters'] = 'Total Members Voted';
+$txt['shortcuts'] = 'shortcuts: hit alt+s to submit/post or alt+p to preview';
+$txt['shortcuts_firefox'] = 'shortcuts: hit shift+alt+s to submit/post or shift+alt+p to preview';
+$txt['poll_results'] = 'View results';
+$txt['poll_lock'] = 'Lock Voting';
+$txt['poll_unlock'] = 'Unlock Voting';
+$txt['poll_edit'] = 'Edit Poll';
+$txt['poll'] = 'Poll';
+$txt['one_day'] = '1 Day';
+$txt['one_week'] = '1 Week';
+$txt['two_weeks'] = '2 Weeks';
+$txt['one_month'] = '1 Month';
+$txt['two_months'] = '2 Months';
+$txt['forever'] = 'Forever';
+$txt['quick_login_dec'] = 'Login with username, password and session length';
+$txt['one_hour'] = '1 Hour';
+$txt['moved'] = 'MOVED';
+$txt['moved_why'] = 'Please enter a brief description as to<br />why this topic is being moved.';
+$txt['board'] = 'Board';
+$txt['in'] = 'in';
+$txt['sticky_topic'] = 'Sticky Topic';
+
+$txt['delete'] = 'Delete';
+
+$txt['your_pms'] = 'Your Personal Messages';
+
+$txt['kilobyte'] = 'KB';
+$txt['megabyte'] = 'MB';
+
+$txt['more_stats'] = '[More Stats]';
+
+// Use numeric entities in the below three strings.
+$txt['code'] = 'Code';
+$txt['code_select'] = '[Select]';
+$txt['quote_from'] = 'Quote from';
+$txt['quote'] = 'Quote';
+$txt['fulledit'] = 'Full&nbsp;edit';
+$txt['edit'] = 'Edit';
+$txt['quick_edit'] = 'Quick Edit';
+$txt['post_options'] = 'More...';
+
+$txt['merge_to_topic_id'] = 'ID of target topic';
+$txt['split'] = 'Split Topic';
+$txt['merge'] = 'Merge Topics';
+$txt['subject_new_topic'] = 'Subject For New Topic';
+$txt['split_this_post'] = 'Only split this post.';
+$txt['split_after_and_this_post'] = 'Split topic after and including this post.';
+$txt['select_split_posts'] = 'Select posts to split.';
+$txt['new_topic'] = 'New Topic';
+$txt['split_successful'] = 'Topic successfully split into two topics.';
+$txt['origin_topic'] = 'Origin Topic';
+$txt['please_select_split'] = 'Please select which posts you wish to split.';
+$txt['merge_successful'] = 'Topics successfully merged.';
+$txt['new_merged_topic'] = 'Newly Merged Topic';
+$txt['topic_to_merge'] = 'Topic to be merged';
+$txt['target_board'] = 'Target board';
+$txt['target_topic'] = 'Target topic';
+$txt['merge_confirm'] = 'Are you sure you want to merge';
+$txt['with'] = 'with';
+$txt['merge_desc'] = 'This function will merge the messages of two topics into one topic. The messages will be sorted according to the time of posting. Therefore the earliest posted message will be the first message of the merged topic.';
+
+$txt['set_sticky'] = 'Set topic sticky';
+$txt['set_nonsticky'] = 'Set topic non-sticky';
+$txt['set_lock'] = 'Lock topic';
+$txt['set_unlock'] = 'Unlock topic';
+
+$txt['search_advanced'] = 'Advanced search';
+
+$txt['security_risk'] = 'MAJOR SECURITY RISK:';
+$txt['not_removed'] = 'You have not removed ';
+$txt['not_removed_extra'] = '%1$s is a backup of %2$s that was not generated by SMF. It can be accessed directly and used to gain unauthorised access to your forum. You should delete it immediately.';
+$txt['generic_warning'] = 'Warning';
+$txt['agreement_missing'] = 'Even though you are requiring to accept the registration agreement, the file (agreement.txt) doesn\'t exists!';
+
+$txt['cache_writable'] = 'The cache directory is not writable - this will adversely affect the performance of your forum.';
+
+$txt['page_created'] = 'Page created in ';
+$txt['seconds_with'] = ' seconds with ';
+$txt['queries'] = ' queries.';
+
+$txt['report_to_mod_func'] = 'Use this function to inform the moderators and administrators of an abusive or wrongly posted message.<br /><em>Please note that your email address will be revealed to the moderators if you use this.</em>';
+
+$txt['online'] = 'Online';
+$txt['offline'] = 'Offline';
+$txt['pm_online'] = 'Personal Message (Online)';
+$txt['pm_offline'] = 'Personal Message (Offline)';
+$txt['status'] = 'Status';
+
+$txt['go_up'] = 'Go Up';
+$txt['go_down'] = 'Go Down';
+
+$forum_copyright = '<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">%1$s</a> |
+ <a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF &copy; 2011</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>';
+
+$txt['birthdays'] = 'Birthdays:';
+$txt['events'] = 'Events:';
+$txt['birthdays_upcoming'] = 'Upcoming Birthdays:';
+$txt['events_upcoming'] = 'Upcoming Events:';
+// Prompt for holidays in the calendar, leave blank to just display the holiday's name.
+$txt['calendar_prompt'] = 'Holidays:';
+$txt['calendar_month'] = 'Month:';
+$txt['calendar_year'] = 'Year:';
+$txt['calendar_day'] = 'Day:';
+$txt['calendar_event_title'] = 'Event Title';
+$txt['calendar_event_options'] = 'Event Options';
+$txt['calendar_post_in'] = 'Post In:';
+$txt['calendar_edit'] = 'Edit Event';
+$txt['event_delete_confirm'] = 'Delete this event?';
+$txt['event_delete'] = 'Delete Event';
+$txt['calendar_post_event'] = 'Post Event';
+$txt['calendar'] = 'Calendar';
+$txt['calendar_link'] = 'Link to Calendar';
+$txt['calendar_upcoming'] = 'Upcoming Calendar';
+$txt['calendar_today'] = 'Today\'s Calendar';
+$txt['calendar_week'] = 'Week';
+$txt['calendar_week_title'] = 'Week %1$d of %2$d';
+$txt['calendar_numb_days'] = 'Number of Days:';
+$txt['calendar_how_edit'] = 'how do you edit these events?';
+$txt['calendar_link_event'] = 'Link Event To Post:';
+$txt['calendar_confirm_delete'] = 'Are you sure you want to delete this event?';
+$txt['calendar_linked_events'] = 'Linked Events';
+$txt['calendar_click_all'] = 'click to see all %1$s';
+
+$txt['moveTopic1'] = 'Post a redirection topic';
+$txt['moveTopic2'] = 'Change the topic\'s subject';
+$txt['moveTopic3'] = 'New subject';
+$txt['moveTopic4'] = 'Change every message\'s subject';
+$txt['move_topic_unapproved_js'] = 'Warning! This topic has not yet been approved.\\n\\nIt is not recommended that you create a redirection topic unless you intend to approve the post immediately following the move.';
+$txt['movetopic_auto_board'] = '[BOARD]';
+$txt['movetopic_auto_topic'] = '[TOPIC LINK]';
+$txt['movetopic_default'] = 'This topic has been moved to ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic'];
+$txt['movetopic_redirect'] = 'Redirect to the moved topic';
+$txt['movetopic_expires'] = 'Automatically remove the redirection topic';
+
+$txt['theme_template_error'] = 'Unable to load the \'%1$s\' template.';
+$txt['theme_language_error'] = 'Unable to load the \'%1$s\' language file.';
+
+$txt['parent_boards'] = 'Child Boards';
+
+$txt['smtp_no_connect'] = 'Could not connect to SMTP host';
+$txt['smtp_port_ssl'] = 'SMTP port setting incorrect; it should be 465 for SSL servers.';
+$txt['smtp_bad_response'] = 'Couldn\'t get mail server response codes';
+$txt['smtp_error'] = 'Ran into problems sending Mail. Error: ';
+$txt['mail_send_unable'] = 'Unable to send mail to the email address \'%1$s\'';
+
+$txt['mlist_search'] = 'Search For Members';
+$txt['mlist_search_again'] = 'Search again';
+$txt['mlist_search_filter'] = 'Search Options';
+$txt['mlist_search_email'] = 'Search by email address';
+$txt['mlist_search_messenger'] = 'Search by messenger nickname';
+$txt['mlist_search_group'] = 'Search by position';
+$txt['mlist_search_name'] = 'Search by name';
+$txt['mlist_search_website'] = 'Search by website';
+$txt['mlist_search_results'] = 'Search results for';
+$txt['mlist_search_by'] = 'Search by %1$s';
+$txt['mlist_menu_view'] = 'View the memberlist';
+
+$txt['attach_downloaded'] = 'downloaded';
+$txt['attach_viewed'] = 'viewed';
+$txt['attach_times'] = 'times';
+
+$txt['settings'] = 'Settings';
+$txt['never'] = 'Never';
+$txt['more'] = 'more';
+
+$txt['hostname'] = 'Hostname';
+$txt['you_are_post_banned'] = 'Sorry %1$s, you are banned from posting and sending personal messages on this forum.';
+$txt['ban_reason'] = 'Reason';
+
+$txt['tables_optimized'] = 'Database tables optimized';
+
+$txt['add_poll'] = 'Add poll';
+$txt['poll_options6'] = 'You may only select up to %1$s options.';
+$txt['poll_remove'] = 'Remove Poll';
+$txt['poll_remove_warn'] = 'Are you sure you want to remove this poll from the topic?';
+$txt['poll_results_expire'] = 'Results will be shown when voting has closed';
+$txt['poll_expires_on'] = 'Voting closes';
+$txt['poll_expired_on'] = 'Voting closed';
+$txt['poll_change_vote'] = 'Remove Vote';
+$txt['poll_return_vote'] = 'Voting options';
+$txt['poll_cannot_see'] = 'You cannot see the results of this poll at the moment.';
+
+$txt['quick_mod_approve'] = 'Approve selected';
+$txt['quick_mod_remove'] = 'Remove selected';
+$txt['quick_mod_lock'] = 'Lock/Unlock selected';
+$txt['quick_mod_sticky'] = 'Sticky/Unsticky selected';
+$txt['quick_mod_move'] = 'Move selected to';
+$txt['quick_mod_merge'] = 'Merge selected';
+$txt['quick_mod_markread'] = 'Mark selected read';
+$txt['quick_mod_go'] = 'Go!';
+$txt['quickmod_confirm'] = 'Are you sure you want to do this?';
+
+$txt['spell_check'] = 'Spell Check';
+
+$txt['quick_reply'] = 'Quick Reply';
+$txt['quick_reply_desc'] = 'With <em>Quick-Reply</em> you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.';
+$txt['quick_reply_warning'] = 'Warning: this topic is currently locked! Only admins and moderators can reply.';
+$txt['quick_reply_verification'] = 'After submitting your post you will be directed to the regular post page to verify your post %1$s.';
+$txt['quick_reply_verification_guests'] = '(required for all guests)';
+$txt['quick_reply_verification_posts'] = '(required for all users with less than %1$d posts)';
+$txt['wait_for_approval'] = 'Note: this post will not display until it\'s been approved by a moderator.';
+
+$txt['notification_enable_board'] = 'Are you sure you wish to enable notification of new topics for this board?';
+$txt['notification_disable_board'] = 'Are you sure you wish to disable notification of new topics for this board?';
+$txt['notification_enable_topic'] = 'Are you sure you wish to enable notification of new replies for this topic?';
+$txt['notification_disable_topic'] = 'Are you sure you wish to disable notification of new replies for this topic?';
+
+$txt['report_to_mod'] = 'Report to moderator';
+$txt['issue_warning_post'] = 'Issue a warning because of this message';
+
+$txt['unread_topics_visit'] = 'Recent Unread Topics';
+$txt['unread_topics_visit_none'] = 'No unread topics found since your last visit.  <a href="' . $scripturl . '?action=unread;all">Click here to try all unread topics</a>.';
+$txt['unread_topics_all'] = 'All Unread Topics';
+$txt['unread_replies'] = 'Updated Topics';
+
+$txt['who_title'] = 'Who\'s Online';
+$txt['who_and'] = ' and ';
+$txt['who_viewing_topic'] = ' are viewing this topic.';
+$txt['who_viewing_board'] = ' are viewing this board.';
+$txt['who_member'] = 'Member';
+
+// No longer used by default theme, but for backwards compat
+$txt['powered_by_php'] = 'Powered by PHP';
+$txt['powered_by_mysql'] = 'Powered by MySQL';
+$txt['valid_css'] = 'Valid CSS!';
+
+// Current footer strings
+$txt['valid_html'] = 'Valid HTML 4.01!';
+$txt['valid_xhtml'] = 'Valid XHTML 1.0!';
+$txt['wap2'] = 'WAP2';
+$txt['rss'] = 'RSS';
+$txt['atom'] = 'Atom';
+$txt['xhtml'] = 'XHTML';
+$txt['html'] = 'HTML';
+
+$txt['guest'] = 'Guest';
+$txt['guests'] = 'Guests';
+$txt['user'] = 'User';
+$txt['users'] = 'Users';
+$txt['hidden'] = 'Hidden';
+$txt['buddy'] = 'Buddy';
+$txt['buddies'] = 'Buddies';
+$txt['most_online_ever'] = 'Most Online Ever';
+$txt['most_online_today'] = 'Most Online Today';
+
+$txt['merge_select_target_board'] = 'Select the target board of the merged topic';
+$txt['merge_select_poll'] = 'Select which poll the merged topic should have';
+$txt['merge_topic_list'] = 'Select topics to be merged';
+$txt['merge_select_subject'] = 'Select subject of merged topic';
+$txt['merge_custom_subject'] = 'Custom subject';
+$txt['merge_enforce_subject'] = 'Change the subject of all the messages';
+$txt['merge_include_notifications'] = 'Include notifications?';
+$txt['merge_check'] = 'Merge?';
+$txt['merge_no_poll'] = 'No poll';
+
+$txt['response_prefix'] = 'Re: ';
+$txt['current_icon'] = 'Current Icon';
+$txt['message_icon'] = 'Message Icon';
+
+$txt['smileys_current'] = 'Current Smiley Set';
+$txt['smileys_none'] = 'No Smileys';
+$txt['smileys_forum_board_default'] = 'Forum/Board Default';
+
+$txt['search_results'] = 'Search Results';
+$txt['search_no_results'] = 'Sorry, no matches were found';
+
+$txt['totalTimeLogged1'] = 'Total time logged in: ';
+$txt['totalTimeLogged2'] = ' days, ';
+$txt['totalTimeLogged3'] = ' hours and ';
+$txt['totalTimeLogged4'] = ' minutes.';
+$txt['totalTimeLogged5'] = 'd ';
+$txt['totalTimeLogged6'] = 'h ';
+$txt['totalTimeLogged7'] = 'm';
+
+$txt['approve_thereis'] = 'There is';
+$txt['approve_thereare'] = 'There are';
+$txt['approve_member'] = 'one member';
+$txt['approve_members'] = 'members';
+$txt['approve_members_waiting'] = 'awaiting approval.';
+
+$txt['notifyboard_turnon'] = 'Do you want a notification email when someone posts a new topic in this board?';
+$txt['notifyboard_turnoff'] = 'Are you sure you do not want to receive new topic notifications for this board?';
+
+$txt['activate_code'] = 'Your activation code is';
+
+$txt['find_members'] = 'Find Members';
+$txt['find_username'] = 'Name, username, or email address';
+$txt['find_buddies'] = 'Show Buddies Only?';
+$txt['find_wildcards'] = 'Allowed Wildcards: *, ?';
+$txt['find_no_results'] = 'No results found';
+$txt['find_results'] = 'Results';
+$txt['find_close'] = 'Close';
+
+$txt['unread_since_visit'] = 'Show unread posts since last visit.';
+$txt['show_unread_replies'] = 'Show new replies to your posts.';
+
+$txt['change_color'] = 'Change Color';
+
+$txt['quickmod_delete_selected'] = 'Remove Selected';
+$txt['quickmod_split_selected'] = 'Split Selected';
+
+$txt['show_personal_messages_heading'] = 'New messages!';
+$txt['show_personal_messages'] = 'You have <strong>%1$s</strong> unread personal messages in your inbox!<br /><br /><a href="%2$s">Go to your inbox</a>';
+
+$txt['help_popup'] = 'A little lost? Let me explain:';
+
+$txt['previous_next_back'] = '&laquo; previous';
+$txt['previous_next_forward'] = 'next &raquo;';
+
+$txt['upshrink_description'] = 'Shrink or expand the header.';
+
+$txt['mark_unread'] = 'Mark unread';
+
+$txt['ssi_not_direct'] = 'Please don\'t access SSI.php by URL directly; you may want to use the path (%1$s) or add ?ssi_function=something.';
+$txt['ssi_session_broken'] = 'SSI.php was unable to load a session!  This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts!';
+
+// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'.
+$txt['preview_title'] = 'Preview post';
+$txt['preview_fetch'] = 'Fetching preview...';
+$txt['preview_new'] = 'New message';
+$txt['pm_error_while_submitting'] = 'The following error or errors occurred while sending this personal message:';
+$txt['error_while_submitting'] = 'The following error or errors occurred while posting this message:';
+$txt['error_old_topic'] = 'Warning: this topic has not been posted in for at least %1$d days.<br />Unless you\'re sure you want to reply, please consider starting a new topic.';
+
+$txt['split_selected_posts'] = 'Selected posts';
+$txt['split_selected_posts_desc'] = 'The posts below will form a new topic after splitting.';
+$txt['split_reset_selection'] = 'reset selection';
+
+$txt['modify_cancel'] = 'Cancel';
+$txt['mark_read_short'] = 'Mark Read';
+
+$txt['pm_short'] = 'My Messages';
+$txt['pm_menu_read'] = 'Read your messages';
+$txt['pm_menu_send'] = 'Send a message';
+
+$txt['hello_member_ndt'] = 'Hello';
+
+$txt['unapproved_posts'] = 'Unapproved Posts (Topics: %1$d, Posts: %2$d)';
+
+$txt['ajax_in_progress'] = 'Loading...';
+
+$txt['mod_reports_waiting'] = 'There are currently %1$d moderator reports open.';
+
+$txt['view_unread_category'] = 'Unread Posts';
+$txt['verification'] = 'Verification';
+$txt['visual_verification_description'] = 'Type the letters shown in the picture';
+$txt['visual_verification_sound'] = 'Listen to the letters';
+$txt['visual_verification_request_new'] = 'Request another image';
+
+// Sub menu labels
+$txt['summary'] = 'Summary';
+$txt['account'] = 'Account Settings';
+$txt['forumprofile'] = 'Forum Profile';
+
+$txt['modSettings_title'] = 'Features and Options';
+$txt['package'] = 'Package Manager';
+$txt['errlog'] = 'Error Log';
+$txt['edit_permissions'] = 'Permissions';
+$txt['mc_unapproved_attachments'] = 'Unapproved Attachments';
+$txt['mc_unapproved_poststopics'] = 'Unapproved Posts and Topics';
+$txt['mc_reported_posts'] = 'Reported Posts';
+$txt['modlog_view'] = 'Moderation Log';
+$txt['calendar_menu'] = 'View Calendar';
+
+// @todo Send email strings - should move?
+$txt['send_email'] = 'Send Email';
+$txt['send_email_disclosed'] = 'Note this will be visible to the recipient.';
+$txt['send_email_subject'] = 'Email Subject';
+
+$txt['ignoring_user'] = 'You are ignoring this user.';
+$txt['show_ignore_user_post'] = 'Show me the post.';
+
+$txt['spider'] = 'Spider';
+$txt['spiders'] = 'Spiders';
+$txt['openid'] = 'OpenID';
+
+$txt['downloads'] = 'Downloads';
+$txt['filesize'] = 'Filesize';
+$txt['subscribe_webslice'] = 'Subscribe to Webslice';
+
+// Restore topic
+$txt['restore_topic'] = 'Restore Topic';
+$txt['restore_message'] = 'Restore';
+$txt['quick_mod_restore'] = 'Restore Selected';
+
+// Editor prompt.
+$txt['prompt_text_email'] = 'Please enter the email address.';
+$txt['prompt_text_ftp'] = 'Please enter the ftp address.';
+$txt['prompt_text_url'] = 'Please enter the URL you wish to link to.';
+$txt['prompt_text_img'] = 'Enter image location';
+
+// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'.
+$txt['autosuggest_delete_item'] = 'Delete Item';
+
+// Debug related - when $db_show_debug is true.
+$txt['debug_templates'] = 'Templates: ';
+$txt['debug_subtemplates'] = 'Sub templates: ';
+$txt['debug_language_files'] = 'Language files: ';
+$txt['debug_stylesheets'] = 'Style sheets: ';
+$txt['debug_files_included'] = 'Files included: ';
+$txt['debug_kb'] = 'KB.';
+$txt['debug_show'] = 'show';
+$txt['debug_cache_hits'] = 'Cache hits: ';
+$txt['debug_cache_seconds_bytes'] = '%1$ss - %2$s bytes';
+$txt['debug_cache_seconds_bytes_total'] = '%1$ss for %2$s bytes';
+$txt['debug_queries_used'] = 'Queries used: %1$d.';
+$txt['debug_queries_used_and_warnings'] = 'Queries used: %1$d, %2$d warnings.';
+$txt['debug_query_in_line'] = 'in <em>%1$s</em> line <em>%2$s</em>, ';
+$txt['debug_query_which_took'] = 'which took %1$s seconds.';
+$txt['debug_query_which_took_at'] = 'which took %1$s seconds at %2$s into request.';
+$txt['debug_show_queries'] = '[Show Queries]';
+$txt['debug_hide_queries'] = '[Hide Queries]';
+$txt['debug_tokens'] = 'Tokens: ';
+$txt['debug_browser'] = 'Browser ID: ';
+
 ?>

+ 61 - 96
Themes/default/scripts/theme.js

@@ -1,96 +1,61 @@
-// The purpose of this code is to fix the height of overflow: auto blocks, because some browsers can't figure it out for themselves.
-function smf_codeBoxFix()
-{
-	var codeFix = document.getElementsByTagName('code');
-	for (var i = codeFix.length - 1; i >= 0; i--)
-	{
-		if (is_webkit && codeFix[i].offsetHeight < 20)
-			codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + 'px';
-
-		else if (is_ff && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
-			codeFix[i].style.overflow = 'scroll';
-
-		else if ('currentStyle' in codeFix[i] && codeFix[i].currentStyle.overflow == 'auto' && (codeFix[i].currentStyle.height == '' || codeFix[i].currentStyle.height == 'auto') && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0))
-			codeFix[i].style.height = (codeFix[i].offsetHeight + 24) + 'px';
-	}
-}
-
-// Add a fix for code stuff?
-if ((is_ie && !is_ie4) || is_webkit || is_ff)
-	addLoadEvent(smf_codeBoxFix);
-
-// Toggles the element height and width styles of an image.
-function smc_toggleImageDimensions()
-{
-	var oImages = document.getElementsByTagName('IMG');
-	for (oImage in oImages)
-	{
-		// Not a resized image? Skip it.
-		if (oImages[oImage].className == undefined || oImages[oImage].className.indexOf('bbc_img resized') == -1)
-			continue;
-
-		oImages[oImage].style.cursor = 'pointer';
-		oImages[oImage].onclick = function() {
-			this.style.width = this.style.height = this.style.width == 'auto' ? null : 'auto';
-		};
-	}
-}
-
-// Add a load event for the function above.
-addLoadEvent(smc_toggleImageDimensions);
-
-// Adds a button to a certain button strip.
-function smf_addButton(sButtonStripId, bUseImage, oOptions)
-{
-	var oButtonStrip = document.getElementById(sButtonStripId);
-	var aItems = oButtonStrip.getElementsByTagName('span');
-
-	// Remove the 'last' class from the last item.
-	if (aItems.length > 0)
-	{
-		var oLastSpan = aItems[aItems.length - 1];
-		oLastSpan.className = oLastSpan.className.replace(/\s*last/, 'position_holder');
-	}
-
-	// Add the button.
-	var oButtonStripList = oButtonStrip.getElementsByTagName('ul')[0];
-	var oNewButton = document.createElement('li');
-	setInnerHTML(oNewButton, '<a href="' + oOptions.sUrl + '" ' + ('sCustom' in oOptions ? oOptions.sCustom : '') + '><span class="last"' + ('sId' in oOptions ? ' id="' + oOptions.sId + '"': '') + '>' + oOptions.sText + '</span></a>');
-
-	oButtonStripList.appendChild(oNewButton);
-}
-
-// Adds hover events to list items. Used for a versions of IE that don't support this by default.
-var smf_addListItemHoverEvents = function()
-{
-	var cssRule, newSelector;
-
-	// Add a rule for the list item hover event to every stylesheet.
-	for (var iStyleSheet = 0; iStyleSheet < document.styleSheets.length; iStyleSheet ++)
-		for (var iRule = 0; iRule < document.styleSheets[iStyleSheet].rules.length; iRule ++)
-		{
-			oCssRule = document.styleSheets[iStyleSheet].rules[iRule];
-			if (oCssRule.selectorText.indexOf('LI:hover') != -1)
-			{
-				sNewSelector = oCssRule.selectorText.replace(/LI:hover/gi, 'LI.iehover');
-				document.styleSheets[iStyleSheet].addRule(sNewSelector, oCssRule.style.cssText);
-			}
-		}
-
-	// Now add handling for these hover events.
-	var oListItems = document.getElementsByTagName('LI');
-	for (oListItem in oListItems)
-	{
-		oListItems[oListItem].onmouseover = function() {
-			this.className += ' iehover';
-		};
-
-		oListItems[oListItem].onmouseout = function() {
-			this.className = this.className.replace(new RegExp(' iehover\\b'), '');
-		};
-	}
-}
-
-// Add hover events to list items if the browser requires it.
-if (is_ie7down && 'attachEvent' in window)
-	window.attachEvent('onload', smf_addListItemHoverEvents);
+// The purpose of this code is to fix the height of overflow: auto blocks, because some browsers can't figure it out for themselves.
+function smf_codeBoxFix()
+{
+	var codeFix = document.getElementsByTagName('code');
+	for (var i = codeFix.length - 1; i >= 0; i--)
+	{
+		if (is_webkit && codeFix[i].offsetHeight < 20)
+			codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + 'px';
+
+		else if (is_ff && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
+			codeFix[i].style.overflow = 'scroll';
+
+		else if ('currentStyle' in codeFix[i] && codeFix[i].currentStyle.overflow == 'auto' && (codeFix[i].currentStyle.height == '' || codeFix[i].currentStyle.height == 'auto') && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0))
+			codeFix[i].style.height = (codeFix[i].offsetHeight + 24) + 'px';
+	}
+}
+
+// Add a fix for code stuff?
+if ((is_ie && !is_ie4) || is_webkit || is_ff)
+	addLoadEvent(smf_codeBoxFix);
+
+// Toggles the element height and width styles of an image.
+function smc_toggleImageDimensions()
+{
+	var oImages = document.getElementsByTagName('IMG');
+	for (oImage in oImages)
+	{
+		// Not a resized image? Skip it.
+		if (oImages[oImage].className == undefined || oImages[oImage].className.indexOf('bbc_img resized') == -1)
+			continue;
+
+		oImages[oImage].style.cursor = 'pointer';
+		oImages[oImage].onclick = function() {
+			this.style.width = this.style.height = this.style.width == 'auto' ? null : 'auto';
+		};
+	}
+}
+
+// Add a load event for the function above.
+addLoadEvent(smc_toggleImageDimensions);
+
+// Adds a button to a certain button strip.
+function smf_addButton(sButtonStripId, bUseImage, oOptions)
+{
+	var oButtonStrip = document.getElementById(sButtonStripId);
+	var aItems = oButtonStrip.getElementsByTagName('span');
+
+	// Remove the 'last' class from the last item.
+	if (aItems.length > 0)
+	{
+		var oLastSpan = aItems[aItems.length - 1];
+		oLastSpan.className = oLastSpan.className.replace(/\s*last/, 'position_holder');
+	}
+
+	// Add the button.
+	var oButtonStripList = oButtonStrip.getElementsByTagName('ul')[0];
+	var oNewButton = document.createElement('li');
+	setInnerHTML(oNewButton, '<a href="' + oOptions.sUrl + '" ' + ('sCustom' in oOptions ? oOptions.sCustom : '') + '><span class="last"' + ('sId' in oOptions ? ' id="' + oOptions.sId + '"': '') + '>' + oOptions.sText + '</span></a>');
+
+	oButtonStripList.appendChild(oNewButton);
+}