Browse Source

Deleted penguin folder

No point wasting more time on it. Code is saved elsewhere.
Antechinus 12 years ago
parent
commit
80ba1a829a
100 changed files with 0 additions and 14852 deletions
  1. 0 1672
      Themes/penguin/Admin.template.php
  2. 0 502
      Themes/penguin/BoardIndex.template.php
  3. 0 46
      Themes/penguin/Compat.template.php
  4. 0 853
      Themes/penguin/Display.template.php
  5. 0 590
      Themes/penguin/ManageMaintenance.template.php
  6. 0 511
      Themes/penguin/MessageIndex.template.php
  7. 0 1078
      Themes/penguin/Post.template.php
  8. 0 3073
      Themes/penguin/Profile.template.php
  9. 0 273
      Themes/penguin/Settings.template.php
  10. 0 441
      Themes/penguin/Stats.template.php
  11. 0 1152
      Themes/penguin/Themes.template.php
  12. 0 595
      Themes/penguin/css/admin.css
  13. 0 4039
      Themes/penguin/css/index.css
  14. 0 9
      Themes/penguin/css/index.php
  15. BIN
      Themes/penguin/images/#collapse.png
  16. BIN
      Themes/penguin/images/#expand.png
  17. BIN
      Themes/penguin/images/#upshrink.png
  18. BIN
      Themes/penguin/images/#upshrink2.png
  19. BIN
      Themes/penguin/images/Female.png
  20. BIN
      Themes/penguin/images/Male.png
  21. BIN
      Themes/penguin/images/admin/administration.png
  22. BIN
      Themes/penguin/images/admin/attachment.png
  23. BIN
      Themes/penguin/images/admin/ban.png
  24. BIN
      Themes/penguin/images/admin/boards.png
  25. BIN
      Themes/penguin/images/admin/calendar.png
  26. BIN
      Themes/penguin/images/admin/change_menu.png
  27. BIN
      Themes/penguin/images/admin/change_menu2.png
  28. BIN
      Themes/penguin/images/admin/corefeatures.png
  29. BIN
      Themes/penguin/images/admin/current_theme.png
  30. BIN
      Themes/penguin/images/admin/engines.png
  31. BIN
      Themes/penguin/images/admin/feature_cd.png
  32. BIN
      Themes/penguin/images/admin/feature_cp.png
  33. BIN
      Themes/penguin/images/admin/feature_k.png
  34. BIN
      Themes/penguin/images/admin/feature_ml.png
  35. BIN
      Themes/penguin/images/admin/feature_pm.png
  36. BIN
      Themes/penguin/images/admin/feature_ps.png
  37. BIN
      Themes/penguin/images/admin/feature_rg.png
  38. BIN
      Themes/penguin/images/admin/feature_sp.png
  39. BIN
      Themes/penguin/images/admin/feature_w.png
  40. BIN
      Themes/penguin/images/admin/features.png
  41. BIN
      Themes/penguin/images/admin/features_and_options.png
  42. BIN
      Themes/penguin/images/admin/forum_maintenance.png
  43. BIN
      Themes/penguin/images/admin/ignore.png
  44. 0 9
      Themes/penguin/images/admin/index.php
  45. BIN
      Themes/penguin/images/admin/languages.png
  46. BIN
      Themes/penguin/images/admin/logs.png
  47. BIN
      Themes/penguin/images/admin/mail.png
  48. BIN
      Themes/penguin/images/admin/maintain.png
  49. BIN
      Themes/penguin/images/admin/membergroups.png
  50. BIN
      Themes/penguin/images/admin/members.png
  51. BIN
      Themes/penguin/images/admin/members_lg.png
  52. BIN
      Themes/penguin/images/admin/modifications.png
  53. BIN
      Themes/penguin/images/admin/news.png
  54. BIN
      Themes/penguin/images/admin/package_ops.png
  55. BIN
      Themes/penguin/images/admin/packages.png
  56. BIN
      Themes/penguin/images/admin/packages_lg.png
  57. BIN
      Themes/penguin/images/admin/paid.png
  58. BIN
      Themes/penguin/images/admin/permissions.png
  59. BIN
      Themes/penguin/images/admin/permissions_lg.png
  60. BIN
      Themes/penguin/images/admin/post_moderation_allow.png
  61. BIN
      Themes/penguin/images/admin/post_moderation_deny.png
  62. BIN
      Themes/penguin/images/admin/post_moderation_moderate.png
  63. BIN
      Themes/penguin/images/admin/posts.png
  64. BIN
      Themes/penguin/images/admin/regcenter.png
  65. BIN
      Themes/penguin/images/admin/reports.png
  66. BIN
      Themes/penguin/images/admin/scheduled.png
  67. BIN
      Themes/penguin/images/admin/search.png
  68. BIN
      Themes/penguin/images/admin/security.png
  69. BIN
      Themes/penguin/images/admin/server.png
  70. BIN
      Themes/penguin/images/admin/smiley.png
  71. BIN
      Themes/penguin/images/admin/smilies_and_messageicons.png
  72. BIN
      Themes/penguin/images/admin/subsection.png
  73. BIN
      Themes/penguin/images/admin/support.png
  74. BIN
      Themes/penguin/images/admin/support_and_credits.png
  75. BIN
      Themes/penguin/images/admin/switch_off.png
  76. BIN
      Themes/penguin/images/admin/switch_on.png
  77. BIN
      Themes/penguin/images/admin/themes.png
  78. BIN
      Themes/penguin/images/admin/themes_and_layout.png
  79. BIN
      Themes/penguin/images/aim.png
  80. BIN
      Themes/penguin/images/arrow-down.png
  81. BIN
      Themes/penguin/images/arrow.png
  82. BIN
      Themes/penguin/images/backdrop-copy.png
  83. BIN
      Themes/penguin/images/backdrop-new.png
  84. BIN
      Themes/penguin/images/backdrop.png
  85. BIN
      Themes/penguin/images/bar_stats.png
  86. BIN
      Themes/penguin/images/bbc/bbc_bg.png
  87. BIN
      Themes/penguin/images/bbc/bbc_hoverbg.png
  88. BIN
      Themes/penguin/images/bbc/bold.png
  89. BIN
      Themes/penguin/images/bbc/center.png
  90. BIN
      Themes/penguin/images/bbc/code.png
  91. BIN
      Themes/penguin/images/bbc/divider.png
  92. BIN
      Themes/penguin/images/bbc/email.png
  93. BIN
      Themes/penguin/images/bbc/flash.png
  94. BIN
      Themes/penguin/images/bbc/ftp.png
  95. BIN
      Themes/penguin/images/bbc/glow.png
  96. BIN
      Themes/penguin/images/bbc/hr.png
  97. BIN
      Themes/penguin/images/bbc/img.png
  98. 0 9
      Themes/penguin/images/bbc/index.php
  99. BIN
      Themes/penguin/images/bbc/italicize.png
  100. BIN
      Themes/penguin/images/bbc/left.png

+ 0 - 1672
Themes/penguin/Admin.template.php

@@ -1,1672 +0,0 @@
-<?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 is the administration center home.
- */
-function template_admin()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	// Welcome message for the admin.
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">';
-
-	if ($context['user']['is_admin'])
-		echo '
-			<object id="quick_search">
-				<form action="', $scripturl, '?action=admin;area=search" method="post" accept-charset="', $context['character_set'], '" class="floatright">
-					<img class="icon" src="', $settings['images_url'] , '/filter.png" alt="" />
-					<input type="text" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';" class="input_text" />
-					<select name="search_type">
-						<option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected="selected"' : ''), '>', $txt['admin_search_type_internal'], '</option>
-						<option value="member"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'member' ? ' selected="selected"' : ''), '>', $txt['admin_search_type_member'], '</option>
-						<option value="online"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'online' ? ' selected="selected"' : ''), '>', $txt['admin_search_type_online'], '</option>
-					</select>
-					<input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button_submit" />
-				</form>
-			</object>';
-
-	echo $txt['admin_center'], '
-			</h3>
-		</div>
-		<div class="information">
-			<div id="welcome">
-				<strong>', $txt['hello_guest'], ' ', $context['user']['name'], '!</strong>
-				', sprintf($txt['admin_main_welcome'], $txt['admin_center'], $txt['help'], $txt['help']), '
-			</div>
-		</div>';
-
-	// Is there an update available?
-	echo '
-		<div id="update_section"></div>';
-
-	echo '
-		<div id="admin_main_section">';
-
-	// Display the "live news" from simplemachines.org.
-	echo '
-			<div id="live_news" class="floatleft">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<a href="', $scripturl, '?action=helpadmin;help=live_news" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a> ', $txt['live'], '
-					</h3>
-				</div>
-				<div class="windowbg">
-					<div class="content">
-						<div id="smfAnnouncements">', $txt['lfyi'], '</div>
-					</div>
-				</div>
-			</div>';
-
-	// Show the user version information from their server.
-	echo '
-			<div id="supportVersionsTable" class="floatright">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<a href="', $scripturl, '?action=admin;area=credits">', $txt['support_title'], '</a>
-					</h3>
-				</div>
-				<div class="windowbg">
-					<div class="content">
-						<div id="version_details">
-							<strong>', $txt['support_versions'], ':</strong><br />
-							', $txt['support_versions_forum'], ':
-							<em id="yourVersion" style="white-space: nowrap;">', $context['forum_version'], '</em><br />
-							', $txt['support_versions_current'], ':
-							<em id="smfVersion" style="white-space: nowrap;">??</em><br />
-							', $context['can_admin'] ? '<a href="' . $scripturl . '?action=admin;area=maintain;sa=routine;activity=version">' . $txt['version_check_more'] . '</a>' : '', '<br />';
-
-	// Display all the members who can administrate the forum.
-	echo '
-							<br />
-							<strong>', $txt['administrators'], ':</strong>
-							', implode(', ', $context['administrators']);
-	// If we have lots of admins... don't show them all.
-	if (!empty($context['more_admins_link']))
-		echo '
-							(', $context['more_admins_link'], ')';
-
-	echo '
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>';
-
-	echo '
-		<div class="windowbg2">
-			<div class="content">
-				<ul id="quick_tasks" class="flow_auto">';
-
-	foreach ($context['quick_admin_tasks'] as $task)
-		echo '
-					<li>
-						', !empty($task['icon']) ? '<a href="' . $task['href'] . '"><img src="' . $settings['default_images_url'] . '/admin/' . $task['icon'] . '" alt="" class="home_image" /></a>' : '', '
-						<h5>', $task['link'], '</h5>
-						<p class="task">', $task['description'],'</p>
-					</li>';
-
-	echo '
-				</ul>
-			</div>
-		</div>
-	</div>';
-
-	// The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization.
-	if (empty($modSettings['disable_smf_js']))
-		echo '
-		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script>
-		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>';
-
-	// This sets the announcements and current versions themselves ;).
-	echo '
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?alp21"></script>
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var oAdminIndex = new smf_AdminIndex({
-				sSelf: \'oAdminCenter\',
-
-				bLoadAnnouncements: true,
-				sAnnouncementTemplate: ', JavaScriptEscape('
-					<dl>
-						%content%
-					</dl>
-				'), ',
-				sAnnouncementMessageTemplate: ', JavaScriptEscape('
-					<dt><a href="%href%">%subject%</a> ' . $txt['on'] . ' %time%</dt>
-					<dd>
-						%message%
-					</dd>
-				'), ',
-				sAnnouncementContainerId: \'smfAnnouncements\',
-
-				bLoadVersions: true,
-				sSmfVersionContainerId: \'smfVersion\',
-				sYourVersionContainerId: \'yourVersion\',
-				sVersionOutdatedTemplate: ', JavaScriptEscape('
-					<span class="alert">%currentVersion%</span>
-				'), ',
-
-				bLoadUpdateNotification: true,
-				sUpdateNotificationContainerId: \'update_section\',
-				sUpdateNotificationDefaultTitle: ', JavaScriptEscape($txt['update_available']), ',
-				sUpdateNotificationDefaultMessage: ', JavaScriptEscape($txt['update_message']), ',
-				sUpdateNotificationTemplate: ', JavaScriptEscape('
-					<div class="cat_bar">
-						<h3 id="update_title" class="catbg">
-							%title%
-						</h3>
-					</div>
-					<div class="windowbg">
-						<div class="content">
-							<div id="update_message" class="smalltext">
-								%message%
-							</div>
-						</div>
-					</div>
-				'), ',
-				sUpdateNotificationLink: smf_scripturl + ', JavaScriptEscape('?action=admin;area=packages;pgdownload;auto;package=%package%;' . $context['session_var'] . '=' . $context['session_id']), '
-
-			});
-		// ]]></script>';
-}
-
-/**
- * Show some support information and credits to those who helped make this.
- */
-function template_credits()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	// Show the user version information from their server.
-	echo '
-
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				', $txt['support_title'], '
-			</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content large_height">
-				<strong>', $txt['support_versions'], ':</strong><br />
-					', $txt['support_versions_forum'], ':
-				<em id="yourVersion" style="white-space: nowrap;">', $context['forum_version'], '</em>', $context['can_admin'] ? ' <a href="' . $scripturl . '?action=admin;area=maintain;sa=routine;activity=version">' . $txt['version_check_more'] . '</a>' : '', '<br />
-					', $txt['support_versions_current'], ':
-				<em id="smfVersion" style="white-space: nowrap;">??</em><br />';
-
-	// Display all the variables we have server information for.
-	foreach ($context['current_versions'] as $version)
-	{
-		echo '
-					', $version['title'], ':
-				<em>', $version['version'], '</em>';
-		
-		// more details for this item, show them a link
-		if ($context['can_admin'] && isset($version['more']))
-			echo 
-				' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>';
-		echo '
-				<br />';
-	}
-
-	echo '
-			</div>
-		</div>';
-
-	// Point the admin to common support resources.
-	echo '
-		<div class="cat_bar">
-			<h3 class="catbg">
-				', $txt['support_resources'], '
-			</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-				<p>', $txt['support_resources_p1'], '</p>
-				<p>', $txt['support_resources_p2'], '</p>
-			</div>
-		</div>';
-
-	// Display latest support questions from simplemachines.org.
-	echo '
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<a href="', $scripturl, '?action=helpadmin;help=latest_support" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a>', $txt['support_latest'], '
-			</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content">
-				<div id="latestSupport">', $txt['support_latest_fetch'], '</div>
-			</div>
-		</div>';
-
-	// The most important part - the credits :P.
-	echo '
-		<div class="cat_bar">
-			<h3 class="catbg">
-				', $txt['admin_credits'], '
-			</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">';
-
-	foreach ($context['credits'] as $section)
-	{
-		if (isset($section['pretext']))
-			echo '
-				<p style="margin: 0 0 0 0; padding: 0 0 10px 0; border-bottom: 1px solid #bbb;">', $section['pretext'], '</p>';
-
-		echo '
-				<dl class="large_height">';
-
-		foreach ($section['groups'] as $group)
-		{
-			if (isset($group['title']))
-				echo '
-					<dt style="width: 100%; padding: 5px 0 0 0; color: #444; border-top: 2px solid #fff; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;">
-						<strong>', $group['title'], ':</strong>
-					</dt>';
-
-			echo '
-					<dd style="width: 100%; margin: 0 0 0 0; padding: 0 0 10px 80px; border-bottom: 1px solid #bbb; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;">', implode(', ', $group['members']), '</dd>';
-		}
-
-		echo '
-				</dl>';
-
-		if (isset($section['posttext']))
-			echo '
-				<p style="margin: 0 0 0 0; padding: 10px 0 0 0; color: #444; border-top: 2px solid #fff; font-size: 1.083em; font-weight: bold;">', $section['posttext'], '</p>';
-	}
-
-	echo '
-			</div>
-		</div>
-	</div>';
-
-	// This makes all the support information available to the support script...
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var smfSupportVersions = {};
-
-			smfSupportVersions.forum = "', $context['forum_version'], '";';
-
-	// Don't worry, none of this is logged, it's just used to give information that might be of use.
-	foreach ($context['current_versions'] as $variable => $version)
-		echo '
-			smfSupportVersions.', $variable, ' = "', $version['version'], '";';
-
-	// Now we just have to include the script and wait ;).
-	echo '
-		// ]]></script>
-		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script>
-		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>
-		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-support.js"></script>';
-
-	// This sets the latest support stuff.
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			function smfSetLatestSupport()
-			{
-				if (window.smfLatestSupport)
-					setInnerHTML(document.getElementById("latestSupport"), window.smfLatestSupport);
-			}
-
-			function smfCurrentVersion()
-			{
-				var smfVer, yourVer;
-
-				if (!window.smfVersion)
-					return;
-
-				smfVer = document.getElementById("smfVersion");
-				yourVer = document.getElementById("yourVersion");
-
-				setInnerHTML(smfVer, window.smfVersion);
-
-				var currentVersion = getInnerHTML(yourVer);
-				if (currentVersion != window.smfVersion)
-					setInnerHTML(yourVer, "<span class=\"alert\">" + currentVersion + "</span>");
-			}';
-
-	// IE 4 is rather annoying, this wouldn't be necessary...
-	echo '
-			var fSetupCredits = function ()
-			{
-				smfSetLatestSupport();
-				smfCurrentVersion()
-			}
-			addLoadEvent(fSetupCredits);
-		// ]]></script>';
-}
-
-/**
- * Displays information about file versions installed, and compares them to current version.
- */
-function template_view_versions()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				', $txt['admin_version_check'], '
-			</h3>
-		</div>
-		<div class="information">', $txt['version_check_desc'], '</div>
-			<table width="100%" class="table_grid">
-				<thead>
-					<tr class="catbg" align="left">
-						<th class="first_th" scope="col" width="50%">
-							<strong>', $txt['admin_smffile'], '</strong>
-						</th>
-						<th scope="col" width="25%">
-							<strong>', $txt['dvc_your'], '</strong>
-						</th>
-						<th class="last_th" scope="col" width="25%">
-							<strong>', $txt['dvc_current'], '</strong>
-						</th>
-					</tr>
-				</thead>
-				<tbody>';
-
-	// The current version of the core SMF package.
-	echo '
-					<tr>
-						<td class="windowbg">
-							', $txt['admin_smfpackage'], '
-						</td>
-						<td class="windowbg">
-							<em id="yourSMF">', $context['forum_version'], '</em>
-						</td>
-						<td class="windowbg">
-							<em id="currentSMF">??</em>
-						</td>
-					</tr>';
-
-	// Now list all the source file versions, starting with the overall version (if all match!).
-	echo '
-					<tr>
-						<td class="windowbg">
-							<a href="#" id="Sources-link">', $txt['dvc_sources'], '</a>
-						</td>
-						<td class="windowbg">
-							<em id="yourSources">??</em>
-						</td>
-						<td class="windowbg">
-							<em id="currentSources">??</em>
-						</td>
-					</tr>
-				</tbody>
-			</table>
-
-			<table id="Sources" width="100%" class="table_grid">
-			<tbody>';
-
-	// Loop through every source file displaying its version - using javascript.
-	foreach ($context['file_versions'] as $filename => $version)
-		echo '
-				<tr>
-					<td class="windowbg2" width="50%" style="padding-left: 3ex;">
-						', $filename, '
-					</td>
-					<td class="windowbg2" width="25%">
-						<em id="yourSources', $filename, '">', $version, '</em>
-					</td>
-					<td class="windowbg2" width="25%">
-						<em id="currentSources', $filename, '">??</em>
-					</td>
-				</tr>';
-
-	// Default template files.
-	echo '
-			</tbody>
-			</table>
-
-			<table width="100%" class="table_grid">
-				<tbody>
-					<tr>
-						<td class="windowbg" width="50%">
-							<a href="#" id="Default-link">', $txt['dvc_default'], '</a>
-						</td>
-						<td class="windowbg" width="25%">
-							<em id="yourDefault">??</em>
-						</td>
-						<td class="windowbg" width="25%">
-							<em id="currentDefault">??</em>
-						</td>
-					</tr>
-				</tbody>
-			</table>
-
-			<table id="Default" width="100%" class="table_grid">
-				<tbody>';
-
-	foreach ($context['default_template_versions'] as $filename => $version)
-		echo '
-					<tr>
-						<td class="windowbg2" width="50%" style="padding-left: 3ex;">
-							', $filename, '
-						</td>
-						<td class="windowbg2" width="25%">
-							<em id="yourDefault', $filename, '">', $version, '</em>
-						</td>
-						<td class="windowbg2" width="25%">
-							<em id="currentDefault', $filename, '">??</em>
-						</td>
-					</tr>';
-
-	// Now the language files...
-	echo '
-				</tbody>
-			</table>
-
-			<table width="100%" class="table_grid">
-				<tbody>
-					<tr>
-						<td class="windowbg" width="50%">
-							<a href="#" id="Languages-link">', $txt['dvc_languages'], '</a>
-						</td>
-						<td class="windowbg" width="25%">
-							<em id="yourLanguages">??</em>
-						</td>
-						<td class="windowbg" width="25%">
-							<em id="currentLanguages">??</em>
-						</td>
-					</tr>
-				</tbody>
-			</table>
-
-			<table id="Languages" width="100%" class="table_grid">
-				<tbody>';
-
-	foreach ($context['default_language_versions'] as $language => $files)
-	{
-		foreach ($files as $filename => $version)
-			echo '
-					<tr>
-						<td class="windowbg2" width="50%" style="padding-left: 3ex;">
-							', $filename, '.<em>', $language, '</em>.php
-						</td>
-						<td class="windowbg2" width="25%">
-							<em id="your', $filename, '.', $language, '">', $version, '</em>
-						</td>
-						<td class="windowbg2" width="25%">
-							<em id="current', $filename, '.', $language, '">??</em>
-						</td>
-					</tr>';
-	}
-
-	echo '
-				</tbody>
-			</table>';
-
-	// Finally, display the version information for the currently selected theme - if it is not the default one.
-	if (!empty($context['template_versions']))
-	{
-		echo '
-			<table width="100%" class="table_grid">
-				<tbody>
-					<tr>
-						<td class="windowbg" width="50%">
-							<a href="#" id="Templates-link">', $txt['dvc_templates'], '</a>
-						</td>
-						<td class="windowbg" width="25%">
-							<em id="yourTemplates">??</em>
-						</td>
-						<td class="windowbg" width="25%">
-							<em id="currentTemplates">??</em>
-						</td>
-					</tr>
-				</tbody>
-			</table>
-
-			<table id="Templates" width="100%" class="table_grid">
-				<tbody>';
-
-		foreach ($context['template_versions'] as $filename => $version)
-			echo '
-					<tr>
-						<td class="windowbg2" width="50%" style="padding-left: 3ex;">
-							', $filename, '
-						</td>
-						<td class="windowbg2" width="25%">
-							<em id="yourTemplates', $filename, '">', $version, '</em>
-						</td>
-						<td class="windowbg2" width="25%">
-							<em id="currentTemplates', $filename, '">??</em>
-						</td>
-					</tr>';
-
-		echo '
-				</tbody>
-			</table>';
-	}
-
-	echo '
-		</div>';
-
-	/* Below is the hefty javascript for this. Upon opening the page it checks the current file versions with ones
-	   held at simplemachines.org and works out if they are up to date.  If they aren't it colors that files number
-	   red.  It also contains the function, swapOption, that toggles showing the detailed information for each of the
-	   file categories. (sources, languages, and templates.) */
-	echo '
-		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=detailed-version.js"></script>
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?alp21"></script>
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var oViewVersions = new smf_ViewVersions({
-				aKnownLanguages: [
-					\'.', implode('\',
-					\'.', $context['default_known_languages']), '\'
-				],
-				oSectionContainerIds: {
-					Sources: \'Sources\',
-					Default: \'Default\',
-					Languages: \'Languages\',
-					Templates: \'Templates\'
-				}
-			});
-		// ]]></script>';
-
-}
-
-// Form for stopping people using naughty words, etc.
-function template_edit_censored()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	// First section is for adding/removing words from the censored list.
-	echo '
-	<div id="admincenter">
-		<form action="', $scripturl, '?action=admin;area=postsettings;sa=censor" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					', $txt['admin_censored_words'], '
-				</h3>
-			</div>
-			<div class="windowbg2">
-				<div class="content">
-					<p>', $txt['admin_censored_where'], '</p>';
-
-	// Show text boxes for censoring [bad   ] => [good  ].
-	foreach ($context['censored_words'] as $vulgar => $proper)
-		echo '
-					<div style="margin-top: 1ex;">
-						<input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30" /> => <input type="text" name="censor_proper[]" value="', $proper, '" size="30" />
-					</div>';
-
-	// Now provide a way to censor more words.
-	echo '
-					<div style="margin-top: 1ex;">
-						<input type="text" name="censor_vulgar[]" size="30" class="input_text" /> => <input type="text" name="censor_proper[]" size="30" class="input_text" />
-					</div>
-					<div id="moreCensoredWords"></div><div style="margin-top: 1ex; display: none;" id="moreCensoredWords_link">
-						<a class="button_link" style="float: left" href="#;" onclick="addNewWord(); return false;">', $txt['censor_clickadd'], '</a><br />
-					</div>
-					<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?alp21"></script>
-					<script type="text/javascript"><!-- // --><![CDATA[
-						document.getElementById("moreCensoredWords_link").style.display = "";
-					// ]]></script>
-					<hr width="100%" size="1" class="hrcolor clear" />
-					<dl class="settings">
-						<dt>
-							<strong><label for="censorWholeWord_check">', $txt['censor_whole_words'], ':</label></strong>
-						</dt>
-						<dd>
-							<input type="checkbox" name="censorWholeWord" value="1" id="censorWholeWord_check"', empty($modSettings['censorWholeWord']) ? '' : ' checked="checked"', ' class="input_check" />
-						</dd>
-						<dt>
-							<strong><label for="censorIgnoreCase_check">', $txt['censor_case'], ':</label></strong>
-						</dt>
-						<dd>
-							<input type="checkbox" name="censorIgnoreCase" value="1" id="censorIgnoreCase_check"', empty($modSettings['censorIgnoreCase']) ? '' : ' checked="checked"', ' class="input_check" />
-						</dd>
-					</dl>
-					<hr class="hrcolor" />
-					<input type="submit" name="save_censor" value="', $txt['save'], '" class="button_submit" />
-				</div>
-			</div>
-			<br />';
-
-	// This table lets you test out your filters by typing in rude words and seeing what comes out.
-	echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					', $txt['censor_test'], '
-				</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<p class="centertext">
-						<input type="text" name="censortest" value="', empty($context['censor_test']) ? '' : $context['censor_test'], '" class="input_text" />
-						<input type="submit" value="', $txt['censor_test_save'], '" class="button_submit" />
-					</p>
-				</div>
-			</div>
-
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="', $context['admin-censor_token_var'], '" value="', $context['admin-censor_token'], '" />
-		</form>
-	</div>';
-}
-
-// Maintenance is a lovely thing, isn't it?
-function template_not_done()
-{
-	global $context, $settings, $options, $txt, $scripturl;
-
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				', $txt['not_done_title'], '
-			</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content">
-				', $txt['not_done_reason'];
-
-	if (!empty($context['continue_percent']))
-		echo '
-				<br /><br />
-				<div class="progress_bar">
-					<div class="full_bar">', $context['continue_percent'], '%</div>
-					<div class="green_percent" style="width: ', $context['continue_percent'], '%;">&nbsp;</div>
-				</div>';
-
-	if (!empty($context['substep_enabled']))
-		echo '
-				<br /><br />
-				<div class="progress_bar">
-					<div class="full_bar">', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</div>
-					<div class="blue_percent" style="width: ', $context['substep_continue_percent'], '%;">&nbsp;</div>
-				</div>';
-
-	echo '
-				<form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;" name="autoSubmit" id="autoSubmit">
-					<div style="margin: 1ex; text-align: right;"><input type="submit" name="cont" value="', $txt['not_done_continue'], '" class="button_submit" /></div>
-					', $context['continue_post_data'], '
-				</form>
-			</div>
-		</div>
-	</div>
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var countdown = ', $context['continue_countdown'], ';
-		doAutoSubmit();
-
-		function doAutoSubmit()
-		{
-			if (countdown == 0)
-				document.forms.autoSubmit.submit();
-			else if (countdown == -1)
-				return;
-
-			document.forms.autoSubmit.cont.value = "', $txt['not_done_continue'], ' (" + countdown + ")";
-			countdown--;
-
-			setTimeout("doAutoSubmit();", 1000);
-		}
-	// ]]></script>';
-}
-
-// Template for showing settings (Of any kind really!)
-function template_show_settings()
-{
-	global $context, $txt, $settings, $scripturl;
-
-	if (!empty($context['settings_pre_javascript']))
-		echo '
-	<script type="text/javascript"><!-- // --><![CDATA[', $context['settings_pre_javascript'], '// ]]></script>';
-
-	if (!empty($context['settings_insert_above']))
-		echo $context['settings_insert_above'];
-		
-	echo '
-	<div id="admincenter">
-		<form action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>';
-
-	// Is there a custom title?
-	if (isset($context['settings_title']))
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					', $context['settings_title'], '
-				</h3>
-			</div>';
-
-	// Have we got a message to display?
-	if (!empty($context['settings_message']))
-		echo '
-			<div class="information">', $context['settings_message'], '</div>';
-
-	// Now actually loop through all the variables.
-	$is_open = false;
-	foreach ($context['config_vars'] as $config_var)
-	{
-		// Is it a title or a description?
-		if (is_array($config_var) && ($config_var['type'] == 'title' || $config_var['type'] == 'desc'))
-		{
-			// Not a list yet?
-			if ($is_open)
-			{
-				$is_open = false;
-				echo '
-					</dl>
-				</div>
-			</div>';
-			}
-
-			// A title?
-			if ($config_var['type'] == 'title')
-			{
-				if (!$is_open)
-					echo '
-					<br class="clear" />';
-				
-				echo '
-					<div class="cat_bar">
-						<h3 class="', !empty($config_var['class']) ? $config_var['class'] : 'catbg', '"', !empty($config_var['force_div_id']) ? ' id="' . $config_var['force_div_id'] . '"' : '', '>
-							', ($config_var['help'] ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $config_var['help'] . '" onclick="return reqWin(this.href);" class="help"><img src="' . $settings['images_url'] . '/helptopics.png" class="icon" alt="' . $txt['help'] . '" /></a>' : ''), '
-							', $config_var['label'], '
-						</h3>
-					</div>';
-			}
-			// A description?
-			else
-			{
-				echo '
-					<p class="description">
-						', $config_var['label'], '
-					</p>';
-			}
-
-			continue;
-		}
-
-		// Not a list yet?
-		if (!$is_open)
-		{
-			$is_open = true;
-			echo '
-			<div class="windowbg2">
-				<div class="content">
-					<dl class="settings">';
-		}
-
-		// Hang about? Are you pulling my leg - a callback?!
-		if (is_array($config_var) && $config_var['type'] == 'callback')
-		{
-			if (function_exists('template_callback_' . $config_var['name']))
-				call_user_func('template_callback_' . $config_var['name']);
-
-			continue;
-		}
-
-		if (is_array($config_var))
-		{
-			// First off, is this a span like a message?
-			if (in_array($config_var['type'], array('message', 'warning')))
-			{
-				echo '
-						<dd', $config_var['type'] == 'warning' ? ' class="alert"' : '', (!empty($config_var['force_div_id']) ? ' id="' . $config_var['force_div_id'] . '_dd"' : ''), '>
-							', $config_var['label'], '
-						</dd>';
-			}
-			// Otherwise it's an input box of some kind.
-			else
-			{
-				echo '
-						<dt', is_array($config_var) && !empty($config_var['force_div_id']) ? ' id="' . $config_var['force_div_id'] . '"' : '', '>';
-
-				// Some quick helpers...
-				$javascript = $config_var['javascript'];
-				$disabled = !empty($config_var['disabled']) ? ' disabled="disabled"' : '';
-				$subtext = !empty($config_var['subtext']) ? '<br /><span class="smalltext"> ' . $config_var['subtext'] . '</span>' : '';
-
-				// Show the [?] button.
-				if ($config_var['help'])
-					echo '
-							<a id="setting_', $config_var['name'], '" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a><span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br /><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span>
-						</dt>';
-				else
-					echo '
-							<a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br /><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span>
-						</dt>';
-
-				echo '
-						<dd', (!empty($config_var['force_div_id']) ? ' id="' . $config_var['force_div_id'] . '_dd"' : ''), '>',
-							$config_var['preinput'];
-
-				// Show a check box.
-				if ($config_var['type'] == 'check')
-					echo '
-							<input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked="checked"' : ''), ' value="1" class="input_check" />';
-				// Escape (via htmlspecialchars.) the text box.
-				elseif ($config_var['type'] == 'password')
-					echo '
-							<input type="password"', $disabled, $javascript, ' name="', $config_var['name'], '[0]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' value="*#fakepass#*" onfocus="this.value = \'\'; this.form.', $config_var['name'], '.disabled = false;" class="input_password" /><br />
-							<input type="password" disabled="disabled" id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_password" />';
-				// Show a selection box.
-				elseif ($config_var['type'] == 'select')
-				{
-					echo '
-							<select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), '>';
-					foreach ($config_var['data'] as $option)
-						echo '
-								<option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected="selected"' : ''), '>', $option[1], '</option>';
-					echo '
-							</select>';
-				}
-				// Text area?
-				elseif ($config_var['type'] == 'large_text')
-					echo '
-							<textarea rows="', ($config_var['size'] ? $config_var['size'] : 4), '" cols="30" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>';
-				// Permission group?
-				elseif ($config_var['type'] == 'permissions')
-					theme_inline_permissions($config_var['name']);
-				// BBC selection?
-				elseif ($config_var['type'] == 'bbc')
-				{
-					echo '
-							<fieldset id="', $config_var['name'], '">
-								<legend>', $txt['bbcTagsToUse_select'], '</legend>
-									<ul class="reset">';
-
-					foreach ($context['bbc_columns'] as $bbcColumn)
-					{
-						foreach ($bbcColumn as $bbcTag)
-							echo '
-										<li class="list_bbc floatleft">
-											<input type="checkbox" name="', $config_var['name'], '_enabledTags[]" id="tag_', $config_var['name'], '_', $bbcTag['tag'], '" value="', $bbcTag['tag'], '"', !in_array($bbcTag['tag'], $context['bbc_sections'][$config_var['name']]['disabled']) ? ' checked="checked"' : '', ' class="input_check" /> <label for="tag_', $config_var['name'], '_', $bbcTag['tag'], '">', $bbcTag['tag'], '</label>', $bbcTag['show_help'] ? ' (<a href="' . $scripturl . '?action=helpadmin;help=tag_' . $bbcTag['tag'] . '" onclick="return reqWin(this.href);">?</a>)' : '', '
-										</li>';
-					}
-					echo '			</ul>
-								<input type="checkbox" id="select_all" onclick="invertAll(this, this.form, \'', $config_var['name'], '_enabledTags\');"', $context['bbc_sections'][$config_var['name']]['all_selected'] ? ' checked="checked"' : '', ' class="input_check" /> <label for="select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label>
-							</fieldset>';
-				}
-				// A simple message?
-				elseif ($config_var['type'] == 'var_message')
-					echo '
-							<div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '>', $config_var['var_message'], '</div>';
-				// Assume it must be a text box.
-				else
-					echo '
-							<input type="text"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '" value="', $config_var['value'], '"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_text" />';
-
-				echo isset($config_var['postinput']) ? '
-							' . $config_var['postinput'] : '',
-						'</dd>';
-			}
-		}
-
-		else
-		{
-			// Just show a separator.
-			if ($config_var == '')
-				echo '
-					</dl>
-					<hr class="hrcolor clear" />
-					<dl class="settings">';
-			else
-				echo '
-						<dd>
-							<strong>' . $config_var . '</strong>
-						</dd>';
-		}
-	}
-
-	if ($is_open)
-		echo '
-					</dl>';
-
-	if (empty($context['settings_save_dont_show']))
-		echo '
-					<hr class="hrcolor" />
-					<input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled="disabled"' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button_submit" />';
-
-	if ($is_open)
-		echo '
-				</div>
-			</div>';
-
-
-	// At least one token has to be used!
-	if (isset($context['admin-ssc_token']))
-		echo '
-		<input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '" />';
-
-	if (isset($context['admin-dbsc_token']))
-		echo '
-		<input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '" />';
-
-	if (isset($context['admin-mp_token']))
-		echo '
-		<input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '" />';
-
-	echo '
-		<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-		</form>
-	</div>
-	<br class="clear" />';
-
-	if (!empty($context['settings_post_javascript']))
-		echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-	', $context['settings_post_javascript'], '
-	// ]]></script>';
-
-	if (!empty($context['settings_insert_below']))
-		echo $context['settings_insert_below'];
-}
-
-// Template for showing custom profile fields.
-function template_show_custom_profile()
-{
-	global $context, $txt, $settings, $scripturl;
-	
-	// Standard fields.
-	template_show_list('standard_profile_fields');
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var iNumChecks = document.forms.standardProfileFields.length;
-		for (var i = 0; i < iNumChecks; i++)
-			if (document.forms.standardProfileFields[i].id.indexOf(\'reg_\') == 0)
-				document.forms.standardProfileFields[i].disabled = document.forms.standardProfileFields[i].disabled || !document.getElementById(\'active_\' + document.forms.standardProfileFields[i].id.substr(4)).checked;
-	// ]]></script><br />';
-
-	// Custom fields.
-	template_show_list('custom_profile_fields');
-}
-
-// Edit a profile field?
-function template_edit_profile_field()
-{
-	global $context, $txt, $settings, $scripturl;
-
-	// All the javascript for this page - quite a bit in script.js!
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var startOptID = ', count($context['field']['options']), ';
-	// ]]></script>';
-	
-	// any errors messages to show?
-	if (isset($_GET['msg']))
-	{
-		loadLanguage('Errors');
-		if (isset($txt['custom_option_' . $_GET['msg']]))
-			echo '
-	<div class="errorbox">',
-		$txt['custom_option_' . $_GET['msg']], '
-	</div>';
-	}
-
-	echo '
-	<div id="admincenter">
-		<form action="', $scripturl, '?action=admin;area=featuresettings;sa=profileedit;fid=', $context['fid'], ';', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					', $context['page_title'], '
-				</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<fieldset>
-						<legend>', $txt['custom_edit_general'], '</legend>
-
-						<dl class="settings">
-							<dt>
-								<strong><label for="field_name">', $txt['custom_edit_name'], ':</label></strong>
-							</dt>
-							<dd>
-								<input type="text" name="field_name" id="field_name" value="', $context['field']['name'], '" size="20" maxlength="40" class="input_text" />
-							</dd>
-							<dt>
-								<strong><label for="field_desc">', $txt['custom_edit_desc'], ':</label></strong>
-							</dt>
-							<dd>
-								<textarea name="field_desc" id="field_desc" rows="3" cols="40">', $context['field']['desc'], '</textarea>
-							</dd>
-							<dt>
-								<strong><label for="profile_area">', $txt['custom_edit_profile'], ':</label></strong><br />
-								<span class="smalltext">', $txt['custom_edit_profile_desc'], '</span>
-							</dt>
-							<dd>
-								<select name="profile_area" id="profile_area">
-									<option value="none"', $context['field']['profile_area'] == 'none' ? ' selected="selected"' : '', '>', $txt['custom_edit_profile_none'], '</option>
-									<option value="account"', $context['field']['profile_area'] == 'account' ? ' selected="selected"' : '', '>', $txt['account'], '</option>
-									<option value="forumprofile"', $context['field']['profile_area'] == 'forumprofile' ? ' selected="selected"' : '', '>', $txt['forumprofile'], '</option>
-									<option value="theme"', $context['field']['profile_area'] == 'theme' ? ' selected="selected"' : '', '>', $txt['theme'], '</option>
-								</select>
-							</dd>
-							<dt>
-								<strong><label for="reg">', $txt['custom_edit_registration'], ':</label></strong>
-							</dt>
-							<dd>
-								<select name="reg" id="reg">
-									<option value="0"', $context['field']['reg'] == 0 ? ' selected="selected"' : '', '>', $txt['custom_edit_registration_disable'], '</option>
-									<option value="1"', $context['field']['reg'] == 1 ? ' selected="selected"' : '', '>', $txt['custom_edit_registration_allow'], '</option>
-									<option value="2"', $context['field']['reg'] == 2 ? ' selected="selected"' : '', '>', $txt['custom_edit_registration_require'], '</option>
-								</select>
-							</dd>
-							<dt>
-								<strong><label for="display">', $txt['custom_edit_display'], ':</label></strong>
-							</dt>
-							<dd>
-								<input type="checkbox" name="display" id="display"', $context['field']['display'] ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-
-							<dt>
-								<strong><label for="placement">', $txt['custom_edit_placement'], ':</label></strong>
-							</dt>
-							<dd>
-								<select name="placement" id="placement">
-									<option value="0"', $context['field']['placement'] == '0' ? ' selected="selected"' : '', '>', $txt['custom_edit_placement_standard'], '</option>
-									<option value="1"', $context['field']['placement'] == '1' ? ' selected="selected"' : '', '>', $txt['custom_edit_placement_withicons'], '</option>
-									<option value="2"', $context['field']['placement'] == '2' ? ' selected="selected"' : '', '>', $txt['custom_edit_placement_abovesignature'], '</option>
-								</select>
-							</dd>
-							<dt>
-								<a id="field_show_enclosed" href="', $scripturl, '?action=helpadmin;help=field_show_enclosed" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a>
-								<strong><label for="enclose">', $txt['custom_edit_enclose'], ':</label></strong><br />
-								<span class="smalltext">', $txt['custom_edit_enclose_desc'], '</span>
-							</dt>
-							<dd>
-								<textarea name="enclose" id="enclose" rows="10" cols="50">', @$context['field']['enclose'], '</textarea>
-							</dd>
-						</dl>
-					</fieldset>
-					<fieldset>
-						<legend>', $txt['custom_edit_input'], '</legend>
-						<dl class="settings">
-							<dt>
-								<strong><label for="field_type">', $txt['custom_edit_picktype'], ':</label></strong>
-							</dt>
-							<dd>
-								<select name="field_type" id="field_type" onchange="updateInputBoxes();">
-									<option value="text"', $context['field']['type'] == 'text' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_text'], '</option>
-									<option value="textarea"', $context['field']['type'] == 'textarea' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_textarea'], '</option>
-									<option value="select"', $context['field']['type'] == 'select' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_select'], '</option>
-									<option value="radio"', $context['field']['type'] == 'radio' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_radio'], '</option>
-									<option value="check"', $context['field']['type'] == 'check' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_check'], '</option>
-								</select>
-							</dd>
-							<dt id="max_length_dt">
-								<strong><label for="max_length_dd">', $txt['custom_edit_max_length'], ':</label></strong><br />
-								<span class="smalltext">', $txt['custom_edit_max_length_desc'], '</span>
-							</dt>
-							<dd>
-								<input type="text" name="max_length" id="max_length_dd" value="', $context['field']['max_length'], '" size="7" maxlength="6" class="input_text" />
-							</dd>
-							<dt id="dimension_dt">
-								<strong><label for="dimension_dd">', $txt['custom_edit_dimension'], ':</label></strong>
-							</dt>
-							<dd id="dimension_dd">
-								<strong>', $txt['custom_edit_dimension_row'], ':</strong> <input type="text" name="rows" value="', $context['field']['rows'], '" size="5" maxlength="3" class="input_text" />
-								<strong>', $txt['custom_edit_dimension_col'], ':</strong> <input type="text" name="cols" value="', $context['field']['cols'], '" size="5" maxlength="3" class="input_text" />
-							</dd>
-							<dt id="bbc_dt">
-								<strong><label for="bbc_dd">', $txt['custom_edit_bbc'], '</label></strong>
-							</dt>
-							<dd >
-								<input type="checkbox" name="bbc" id="bbc_dd"', $context['field']['bbc'] ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt id="options_dt">
-								<a href="', $scripturl, '?action=helpadmin;help=customoptions" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a>
-								<strong><label for="options_dd">', $txt['custom_edit_options'], ':</label></strong><br />
-								<span class="smalltext">', $txt['custom_edit_options_desc'], '</span>
-							</dt>
-							<dd id="options_dd">
-								<div>';
-
-	foreach ($context['field']['options'] as $k => $option)
-	{
-		echo '
-								', $k == 0 ? '' : '<br />', '<input type="radio" name="default_select" value="', $k, '"', $context['field']['default_select'] == $option ? ' checked="checked"' : '', ' class="input_radio" /><input type="text" name="select_option[', $k, ']" value="', $option, '" class="input_text" />';
-	}
-	echo '
-								<span id="addopt"></span>
-								[<a href="" onclick="addOption(); return false;">', $txt['custom_edit_options_more'], '</a>]
-								</div>
-							</dd>
-							<dt id="default_dt">
-								<strong><label for="default_dd">', $txt['custom_edit_default'], ':</label></strong>
-							</dt>
-							<dd>
-								<input type="checkbox" name="default_check" id="default_dd"', $context['field']['default_check'] ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-						</dl>
-					</fieldset>
-					<fieldset>
-						<legend>', $txt['custom_edit_advanced'], '</legend>
-						<dl class="settings">
-							<dt id="mask_dt">
-								<a id="custom_mask" href="', $scripturl, '?action=helpadmin;help=custom_mask" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a>
-								<strong><label for="mask">', $txt['custom_edit_mask'], ':</label></strong><br />
-								<span class="smalltext">', $txt['custom_edit_mask_desc'], '</span>
-							</dt>
-							<dd>
-								<select name="mask" id="mask" onchange="updateInputBoxes();">
-									<option value="nohtml"', $context['field']['mask'] == 'nohtml' ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_nohtml'], '</option>
-									<option value="email"', $context['field']['mask'] == 'email' ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_email'], '</option>
-									<option value="number"', $context['field']['mask'] == 'number' ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_number'], '</option>
-									<option value="regex"', strpos($context['field']['mask'], 'regex') === 0 ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_regex'], '</option>
-								</select>
-								<br />
-								<span id="regex_div">
-									<input type="text" name="regex" value="', $context['field']['regex'], '" size="30" class="input_text" />
-								</span>
-							</dd>
-							<dt>
-								<strong><label for="private">', $txt['custom_edit_privacy'], ':</label></strong>
-								<span class="smalltext">', $txt['custom_edit_privacy_desc'], '</span>
-							</dt>
-							<dd>
-								<select name="private" id="private" onchange="updateInputBoxes();" style="width: 100%">
-									<option value="0"', $context['field']['private'] == 0 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_all'], '</option>
-									<option value="1"', $context['field']['private'] == 1 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_see'], '</option>
-									<option value="2"', $context['field']['private'] == 2 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_owner'], '</option>
-									<option value="3"', $context['field']['private'] == 3 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_none'], '</option>
-								</select>
-							</dd>
-							<dt id="can_search_dt">
-								<strong><label for="can_search_dd">', $txt['custom_edit_can_search'], ':</label></strong><br />
-								<span class="smalltext">', $txt['custom_edit_can_search_desc'], '</span>
-							</dt>
-							<dd>
-								<input type="checkbox" name="can_search" id="can_search_dd"', $context['field']['can_search'] ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt>
-								<strong><label for="can_search_check">', $txt['custom_edit_active'], ':</label></strong><br />
-								<span class="smalltext">', $txt['custom_edit_active_desc'], '</span>
-							</dt>
-							<dd>
-								<input type="checkbox" name="active" id="can_search_check"', $context['field']['active'] ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-						</dl>
-					</fieldset>
-					<hr class="hrcolor" />
-						<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />';
-
-	if ($context['fid'])
-		echo '
-						<input type="submit" name="delete" value="', $txt['delete'], '" onclick="return confirm(\'', $txt['custom_edit_delete_sure'], '\');" class="button_submit" />';
-
-	echo '
-				</div>
-			</div>
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="', $context['admin-ecp_token_var'], '" value="', $context['admin-ecp_token'], '" />
-		</form>
-	</div>';
-
-	// Get the javascript bits right!
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		updateInputBoxes();
-	// ]]></script>';
-}
-
-// Results page for an admin search.
-function template_admin_search_results()
-{
-	global $context, $txt, $settings, $options, $scripturl;
-
-	echo '
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<object id="quick_search">
-					<form action="', $scripturl, '?action=admin;area=search" method="post" accept-charset="', $context['character_set'], '" class="floatright">
-						<input type="text" name="search_term" value="', $context['search_term'], '" class="input_text" />
-						<input type="hidden" name="search_type" value="', $context['search_type'], '" />
-						<input type="submit" name="search_go" value="', $txt['admin_search_results_again'], '" class="button_submit" />
-					</form>
-				</object>
-				<img src="' . $settings['images_url'] . '/buttons/search.png" alt="" />&nbsp;', sprintf($txt['admin_search_results_desc'], $context['search_term']), '
-			</h3>
-		</div>
-	<div class="windowbg2">
-		<div class="content">';
-
-	if (empty($context['search_results']))
-	{
-		echo '
-			<p class="centertext"><strong>', $txt['admin_search_results_none'], '</strong></p>';
-	}
-	else
-	{
-		echo '
-			<ol class="search_results large_height">';
-		foreach ($context['search_results'] as $result)
-		{
-			// Is it a result from the online manual?
-			if ($context['search_type'] == 'online')
-			{
-				echo '
-				<li>
-					<p>
-						<a href="', $context['doc_scripturl'], '?topic=', $result['topic_id'], '.0" target="_blank" class="new_win"><strong>', $result['messages'][0]['subject'], '</strong></a>
-						<br /><span class="smalltext"><a href="', $result['category']['href'], '" target="_blank" class="new_win">', $result['category']['name'], '</a> &nbsp;/&nbsp;
-						<a href="', $result['board']['href'], '" target="_blank" class="new_win">', $result['board']['name'], '</a> /</span>
-					</p>
-					<p>
-						', $result['messages'][0]['body'], '
-					</p>
-					<hr />
-				</li>';
-			}
-			// Otherwise it's... not!
-			else
-			{
-				echo '
-				<li>
-					<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'] , ']';
-
-				if ($result['help'])
-					echo '
-					<p>', $result['help'], '</p>';
-
-				echo '
-					<hr />
-				</li>';
-			}
-		}
-		echo '
-			</ol>';
-	}
-
-	echo '
-		</div>
-	</div>';
-}
-
-// Turn on and off certain key features.
-function template_core_features()
-{
-	global $context, $txt, $settings, $options, $scripturl;
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var token_name;
-		var token_value;
-		$(document).ready(function() {
-			$(".core_features_hide").css(\'display\', \'none\');
-			$(".core_features_img").css({\'cursor\': \'pointer\', \'display\': \'\'});
-			$("#core_features_submit").css(\'display\', \'none\');
-			if (token_name == undefined)
-				token_name = $("#core_features_token").attr("name")
-			if (token_value == undefined)
-				token_value = $("#core_features_token").attr("value")
-			$(".core_features_img").click(function(){
-				var cc = $(this);
-				var cf = $(this).attr("id").substring(7);
-				var imgs = new Array("', $settings['images_url'], '/admin/switch_off.png", "', $settings['images_url'], '/admin/switch_on.png");
-				var new_state = !$("#feature_" + cf).attr("checked");
-				var ajax_infobar = document.createElement(\'div\');
-				$(ajax_infobar).css({\'position\': \'fixed\', \'top\': \'0\', \'left\': \'0\', \'width\': \'100%\'});
-				$("body").append(ajax_infobar);
-				$(ajax_infobar).slideUp();
-				$("#feature_" + cf).attr("checked", new_state);
-
-				data = {save: "save", feature_id: cf};
-				data[$("#core_features_session").attr("name")] = $("#core_features_session").attr("value");
-				data[token_name] = token_value;
-				$(".core_features_status_box").each(function(){
-					data[$(this).attr("name")] = !$(this).attr("checked") ? 0 : 1;
-				});
-
-				// Launch AJAX request.
-				$.ajax({
-					// The link we are accessing.
-					url: "', $scripturl, '?action=xmlhttp;sa=corefeatures;xml",
-					// The type of request.
-					type: "post",
-					// The type of data that is getting returned.
-					data: data,
-					error: function(error){
-							$(ajax_infobar).html(error).slideDown(\'fast\');
-					},
-
-					success: function(request){
-						if ($(request).find("errors").find("error").length != 0)
-						{
-							$(ajax_infobar).attr(\'class\', \'errorbox\');
-							$(ajax_infobar).html($(request).find("errors").find("error").text()).slideDown(\'fast\');
-						}
-						else if ($(request).find("smf").length != 0)
-						{
-							$("#feature_link_" + cf).html($(request).find("corefeatures").find("corefeature").text());
-							cc.attr("src", imgs[new_state ? 1 : 0]);
-							$("#feature_link_" + cf).fadeOut().fadeIn();
-							$(ajax_infobar).attr(\'class\', \'infobox\');
-							var message = new_state ? ' . JavaScriptEscape($txt['core_settings_activation_message']) . ' : ' . JavaScriptEscape($txt['core_settings_deactivation_message']) . ';
-							$(ajax_infobar).html(message.replace(\'{core_feature}\', $(request).find("corefeatures").find("corefeature").text())).slideDown(\'fast\');
-							setTimeout(function() {
-								$(ajax_infobar).slideUp();
-							}, 5000);
-
-							token_name = $(request).find("tokens").find(\'[type="token"]\').text();
-							token_value = $(request).find("tokens").find(\'[type="token_var"]\').text();
-						}
-						else
-						{
-							$(ajax_infobar).attr(\'class\', \'errorbox\');
-							$(ajax_infobar).html(' . JavaScriptEscape($txt['core_settings_generic_error']) . ').slideDown(\'fast\');
-							
-						}
-					}
-				});
-			});
-		});
-	// ]]></script>
-	<div id="admincenter">';
-	if ($context['is_new_install'])
-	{
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					', $txt['core_settings_welcome_msg'], '
-				</h3>
-			</div>
-			<div class="information">
-				', $txt['core_settings_welcome_msg_desc'], '
-			</div>';
-	}
-
-	echo '
-		<form id="core_features" action="', $scripturl, '?action=admin;area=corefeatures" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					', $txt['core_settings_title'], '
-				</h3>
-			</div>
-			<div style="display:none" id="activation_message" class="errorbox"></div>';
-
-	$alternate = true;
-	$num = 0;
-	$num_features = count($context['features']);
-	foreach ($context['features'] as $id => $feature)
-	{
-		$num++;
-		echo '
-			<div class="windowbg', $alternate ? '2' : '', '">
-				<div class="content features">
-					<img class="features_image" src="', $feature['image'], '" alt="', $feature['title'], '" />
-					<div class="features_switch" id="js_feature_', $id, '">
-							<label class="core_features_hide" for="feature_', $id, '">', $txt['core_settings_enabled'], '<input class="core_features_status_box" type="checkbox" name="feature_', $id, '" id="feature_', $id, '"', $feature['enabled'] ? ' checked="checked"' : '', ' /></label>
-							<img class="core_features_img ', $feature['state'], '" src="', $settings['images_url'], '/admin/switch_', $feature['state'], '.png" id="switch_', $id, '" style="margin-top: 1.3em;display:none" alt="', $txt['core_settings_switch_' . $feature['state']], '" title="', $txt['core_settings_switch_' . $feature['state']], '" />
-					</div>
-					<h4 id="feature_link_' . $id . '">', ($feature['enabled'] && $feature['url'] ? '<a href="' . $feature['url'] . '">' . $feature['title'] . '</a>' : $feature['title']), '</h4>
-					<p>', $feature['desc'], '</p>
-				</div>
-				<span class="botslice clear_right"><span></span></span>
-			</div>';
-
-		$alternate = !$alternate;
-	}
-
-	echo '
-			<div class="righttext">
-				<input id="core_features_session" type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				<input id="core_features_token" type="hidden" name="', $context['admin-core_token_var'], '" value="', $context['admin-core_token'], '" />
-				<input id="core_features_submit" type="submit" value="', $txt['save'], '" name="save" class="button_submit" />
-			</div>
-		</form>
-	</div>';
-}
-
-
-// This little beauty shows questions and answer from the captcha type feature.
-function template_callback_question_answer_list()
-{
-	global $txt, $context, $settings;
-
-	echo '
-			<dt>
-				<strong>', $txt['setup_verification_question'], '</strong>
-			</dt>
-			<dd>
-				<strong>', $txt['setup_verification_answer'], '</strong>
-			</dd>';
-
-	foreach ($context['question_answers'] as $data)
-		echo '
-
-			<dt>
-				<input type="text" name="question[', $data['id'], ']" value="', $data['question'], '" size="50" class="input_text verification_question" />
-			</dt>
-			<dd>
-				<input type="text" name="answer[', $data['id'], ']" value="', $data['answer'], '" size="50" class="input_text verification_answer" />
-			</dd>';
-
-	// Some blank ones.
-	for ($count = 0; $count < 3; $count++)
-		echo '
-			<dt>
-				<input type="text" name="question[]" size="50" class="input_text verification_question" />
-			</dt>
-			<dd>
-				<input type="text" name="answer[]" size="50" class="input_text verification_answer" />
-			</dd>';
-
-	echo '
-		<dt id="add_more_question_placeholder" style="display: none;"></dt><dd></dd>
-		<dt id="add_more_link_div" style="display: none;">
-			<a href="#" onclick="addAnotherQuestion(); return false;">&#171; ', $txt['setup_verification_add_more'], ' &#187;</a>
-			<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?alp21"></script>
-
-		</dt><dd></dd>';
-
-	// The javascript needs to go at the end but we'll put it in this template for looks.
-	$context['settings_post_javascript'] .= '
-		var placeHolder = document.getElementById(\'add_more_question_placeholder\');
-		document.getElementById(\'add_more_link_div\').style.display = \'\';
-	';
-}
-
-// Repairing boards.
-function template_repair_boards()
-{
-	global $context, $txt, $scripturl;
-
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">',
-				$context['error_search'] ? $txt['errors_list'] : $txt['errors_fixing'] , '
-			</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content">';
-
-	// Are we actually fixing them, or is this just a prompt?
-	if ($context['error_search'])
-	{
-		if (!empty($context['to_fix']))
-		{
-			echo '
-				', $txt['errors_found'], ':
-				<ul>';
-
-			foreach ($context['repair_errors'] as $error)
-				echo '
-					<li>
-						', $error, '
-					</li>';
-
-			echo '
-				</ul>
-				<p>
-					', $txt['errors_fix'], '
-				</p>
-				<p class="padding">
-					<strong><a href="', $scripturl, '?action=admin;area=repairboards;fixErrors;', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $scripturl, '?action=admin;area=maintain">', $txt['no'], '</a></strong>
-				</p>';
-		}
-		else
-			echo '
-				<p>', $txt['maintain_no_errors'], '</p>
-				<p class="padding">
-					<a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a>
-				</p>';
-
-	}
-	else
-	{
-		if (!empty($context['redirect_to_recount']))
-		{
-			echo '
-				<p>
-					', $txt['errors_do_recount'], '
-				</p>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=recount" id="recount_form" method="post">
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '" />
-				</form>';
-		}
-		else
-		{
-			echo '
-				<p>', $txt['errors_fixed'], '</p>
-				<p class="padding">
-					<a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a>
-				</p>';
-		}
-	}
-
-	echo '
-			</div>
-		</div>
-	</div>';
-
-	if (!empty($context['redirect_to_recount']))
-	{
-		echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var countdown = 5;
-		doAutoSubmit();
-
-		function doAutoSubmit()
-		{
-			if (countdown == 0)
-				document.forms.recount_form.submit();
-			else if (countdown == -1)
-				return;
-
-			document.forms.recount_form.recount_now.value = "', $txt['errors_recount_now'], ' (" + countdown + ")";
-			countdown--;
-
-			setTimeout("doAutoSubmit();", 1000);
-		}
-	// ]]></script>';
-	}
-}
-
-// Retrieves info from the php_info function, scrubs and preps it for display
-function template_php_info()
-{
-	global $context, $txt;
-
-	// for each php info area
-	foreach ($context['pinfo'] as $area => $php_area)
-	{
-		echo '
-	<table id="', str_replace(' ', '_', $area), '" width="100%" class="table_grid">
-		<thead>
-		<tr class="catbg" align="center">
-			<th class="first_th" scope="col" width="33%"></th>
-			<th scope="col" width="33%"><strong>', $area, '</strong></th>
-			<th class="last_th" scope="col" width="33%"></th>
-		</tr>
-		</thead>
-		<tbody>';
-
-		$alternate = true;
-		$localmaster = true;
-		
-		// and for each setting in this category
-		foreach ($php_area as $key => $setting)
-		{
-			// start of a local / master setting (3 col)
-			if (is_array($setting))
-			{
-				if ($localmaster)
-				{
-					// heading row for the settings section of this categorys settings
-					echo '
-		<tr class="titlebg">
-			<td align="center" width="33%"><strong>', $txt['phpinfo_itemsettings'], '</strong></td>
-			<td align="center" width="33%"><strong>', $txt['phpinfo_localsettings'], '</strong></td>
-			<td align="center" width="33%"><strong>', $txt['phpinfo_defaultsettings'], '</strong></td>
-		</tr>';
-					$localmaster = false;
-				}
-					
-				echo '
-		<tr>
-			<td align="left" width="33%" class="windowbg', $alternate ? '2' : '', '">', $key, '</td>';
-
-				foreach ($setting as $key_lm => $value)
-				{
-					echo '
-			<td align="left" width="33%" class="windowbg', $alternate ? '2' : '', '">', $value, '</td>';
-				}
-				echo '
-		</tr>';
-			}
-			// just a single setting (2 col)
-			else
-			{
-				echo '
-		<tr>
-			<td align="left" width="33%" class="windowbg', $alternate ? '2' : '', '">', $key,  '</td>
-			<td align="left" class="windowbg', $alternate ? '2' : '', '" colspan="2">', $setting, '</td>
-		</tr>';
-			}
-		
-			$alternate = !$alternate;
-		}
-		echo '
-		</tbody>
-	</table>';
-	}
-}
-
-function template_clean_cache_button_above()
-{
-}
-
-function template_clean_cache_button_below()
-{
-	global $txt, $scripturl, $context;
-
-	echo '
-	<div class="cat_bar">
-		<h3 class="catbg">', $txt['maintain_cache'], '</h3>
-	</div>
-	<div class="windowbg">
-		<div class="content">
-			<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=cleancache" method="post" accept-charset="', $context['character_set'], '">
-				<p>', $txt['maintain_cache_info'], '</p>
-				<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
-				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-			</form>
-		</div>
-	</div>';
-}
-
-?>

+ 0 - 502
Themes/penguin/BoardIndex.template.php

@@ -1,502 +0,0 @@
-<?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 ' <a href="#" id="skipnav_target"></a>';
-
-	/* 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 '
-		<div class="category_wrapper">
-		<div id="category_', $category['id'], '" 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="cat_unread" href="', $scripturl, '?action=unread;c=', $category['id'], '" title="', $txt['view_unread_category'], '">', $category['name'], '</a>';
-		else
-			echo '
-				', $category['name'];
-			echo '
-				<span style="margin-left: -999em;">', $category['link'], '</span>
-			</h3>
-		</div>';
-
-		// Assuming the category hasn't been collapsed...
-		if (!$category['is_collapsed'])
-		{
-
-		echo '
-			<ul class="forum_category" id="category_', $category['id'], '_boards">
-				<li class="titlebg subheader">
-					<div class="icon">&nbsp;</div>
-					<div class="info">', $txt['board_name'], '</div>
-					<div class="stats">
-						<ul>
-							<li class="stats">', $txt['forum_stats'], '</li>
-							<li class="posts">', $txt['posts'], '</li>
-							<li class="topics">', $txt['topics'], '</li>
-						</ul>
-					</div>
-					<div class="lastpost">', $txt['latest_post'], '</div>
-				</li>';
-			/* 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 '
-				<li id="board_', $board['id'], '">
-					<div class="windowbg icon">
-						<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'], ' ', $txt['in'], ' ', $board['name'], '" />';
-				// 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>
-					</div>
-					<div class="windowbg2 info">
-						<h4><a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></h4>';
-
-				// 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 '
-						<div class="moderators">
-							<h5>', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ':</h5>&nbsp; ', implode(', ', $board['link_moderators']), '
-						</div>';
-
-
-				// Show some basic information about the number of posts, etc.
-					echo '
-					</div>
-					<div class="windowbg stats">
-						<ul>
-							<li class="posts" style="display: none;">', comma_format($board['posts']), ' <span>', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '</span></li>
-							<li class="topics" style="font-size: 1em; color: #444; text-align: right;">', $board['last_post']['time'], '</li>
-						</ul>
-					</div>
-					<div class="windowbg2 lastpost">';
-
-				/* The board's and children's 'last_post's have:
-				time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
-				link, href, subject, start (where they should go for the first unread post.),
-				and member. (which has id, name, link, href, username in it.) */
-				if (!empty($board['last_post']['id']))
-					echo '
-						<ul>
-							<li><h5>', $txt['last_post'], ' &nbsp; </h5><span>', $txt['by'], '</span>', $board['last_post']['member']['link'] , '</li>
-							<li><span>', $txt['in'], '</span>', $board['last_post']['link'], '</li>
-							<li><span>', $txt['on'], '</span>', $board['last_post']['time'], '</li>
-						</ul>';
-				echo '
-					</div>';
-				// 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="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.png" class="new_posts" alt="" />' : '') . '</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'] ? '<li><strong>' . $child['link'] . '</strong></li>' : '<li> ' .$child['link'] . '</li>';
-					}
-					echo '
-					<div id="board_', $board['id'], '_children" class="windowbg children">
-							<h5>', $txt['parent_boards'], ':</h5><ul class="reset">', implode($children), '</ul>
-					</div>';
-				}
-			echo '
-				</li>';
-			}
-		echo '
-				<li class="divider"></li>
-			</ul>';
-		}
-	echo '
-		</div>';
-	}
-
-	if ($context['user']['is_logged'])
-	{
-		echo '
-	<div id="posting_icons" class="floatleft">';
-
-		// Mark read button.
-		$mark_read_button = array(
-			'markread' => array('text' => 'mark_as_read', 'image' => 'markread.png', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
-		);
-
-		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>';
-
-
-	}
-	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 id="info_center" class="roundframe"><div class="innerframe">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/go_up.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
-				', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
-			</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'], '/icons/recent.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="middletext">
-					&quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' <span class="floatright">(', $context['latest_post']['time'], ')</span>
-				</p>';
-		}
-		// Show lots of posts.
-		elseif (!empty($context['latest_posts']))
-		{
-			//echo '
-				//<dl id="ic_recentposts" class="middletext">';
-echo '			<table style="width: 100%; max-width: 96em; padding: 0 0.5em 0.2em 0.5em; font-size: 0.917em;" cellspacing="0">';
-			/* 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 '
-					<tr>
-						<td style="width: 35%; border-top: 1px solid #eee;"><strong>', $post['link'], '</strong></td>
-						<td style="width: 15%; border-top: 1px solid #eee;"> ', $txt['by'], ' ', $post['poster']['link'], ' </td>
-						<td style="width: 25%; border-top: 1px solid #eee;">(', $post['board']['link'], ')</td>
-						<td style="width: 25%; border-top: 1px solid #eee; text-align: right;">', $post['time'], '</td>
-					</tr>';
-//			echo '
-//				</dl>';
-echo '			</table>';
-		}
-		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>
-			<div id="calendar_IC" style="line-height: 1.7em;">';
-
-		// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
-		if (!empty($context['calendar_holidays']))
-				echo '
-				<p class="smalltext" style="border-bottom: 1px solid #eee; margin: 0; padding: 0.2em 0.5em;"><span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span></p>';
-
-		// People's birthdays. Like mine. And yours, I guess. Kidding.
-		if (!empty($context['calendar_birthdays']))
-		{
-				echo '
-				<p class="smalltext" style="border-bottom: 1px solid #eee; margin: 0; padding: 0.2em 0.5em;"><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 />' : ', ';
-				echo '
-				</p>';
-		}
-		// Events like community get-togethers.
-		if (!empty($context['calendar_events']))
-		{
-			echo '
-				<p class="smalltext" style="margin: 0; padding: 0.2em 0.5em;"><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/modify_small.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>';
-		}
-
-		echo '
-			</div>';
-	}
-
-	// 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>
-			<ul id="stats_IC" style="max-width: 96em; margin: 0; padding: 0; font-size: 0.917em; line-height: 2em; overflow: auto; list-style: none;">
-				', !empty($settings['show_latest_member']) ? '<li style="float: left; width: 49%; padding: 0 0.5%;">'. $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong></li>' : '', '
-				', ($context['allow_memberlist']) ? '<li style="float: left; width: 49%; padding: 0 0.5%; text-align: right;"><a href="'. $scripturl. '?action=mlist;sort=registered;start=0;desc">New members</a></li>' : '', '
-
-				<li style="float: left; width: 49%; padding: 0 0.5%; border-top: 1px solid #eee;">', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '.</li>
-				', $context['show_stats'] ? '<li style="float: left; width: 49%; padding: 0 0.5%; border-top: 1px solid #eee; text-align: right;"><a href="' . $scripturl . '?action=stats">Statistics Center</a></li>' : '', '
-
-				<li style="float: left; width: 49%; padding: 0 0.5%; border-top: 1px solid #eee;">', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>' . $context['latest_post']['link'] . '</strong>&nbsp;(' . $context['latest_post']['time'] . ')</li>' : ''), '
-				<li style="float: left; width: 49%; padding: 0 0.5%; border-top: 1px solid #eee; text-align: right;"><a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a></li>
-			</ul>';
-	}
-
-	// "Users online" - in order of activity.
-	echo '
-			<div class="title_barIC" style="clear: both;">
-				<h4 class="titlebg">
-
-					<span class="inline stats" style="margin: 0 0 0 0; padding: 0 0 0 0; "><img class="icon" src="', $settings['images_url'], '/icons/online.png', '" alt="" />', $txt['online'], '&nbsp;Now:&nbsp; 
-					', $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>' : '', '
-					</span>
-				</h4>
-			</div>
-			<p id="online_IC" 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 '
-				<span class="floatleft" style="display: block;">', sprintf($txt['users_active'], $modSettings['lastActive']), ':&nbsp;</span><span class="floatleft" style="display: block;>', implode(', ', $context['list_users_online']). '</span>';
-
-		// Showing membergroups?
-		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
-			echo '
-				<span class="clear" style="display: block;">' . implode('&nbsp;|&nbsp;', $context['membergroups']) . '</span>';
-	}
-
-	echo '
-			</p>
-			<p class="last smalltext" style="max-width: 95em;">
-				<span class="floatright">', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong></span>
-				<br />', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
-			</p>';
-
-	echo '
-		</div>
-	</div></div>';
-
-	// 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 + \'/go_up.png\',
-					altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
-					srcCollapsed: smf_images_url + \'/go_down.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\'
-			}
-		});
-
-		$(document).ready(function() { 
-			$("a.collapse, a.cat_unread").bt();
-		});
-
-	// ]]></script>';
-}
-?>

+ 0 - 46
Themes/penguin/Compat.template.php

@@ -1,46 +0,0 @@
-<?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
- */
-
-// Generate a strip of buttons, out of buttons.
-function template_button_strip($button_strip, $direction = 'top', $strip_options = array())
-{
-	global $settings, $context, $txt, $scripturl;
-
-	// Compatibility.
-	if (!is_array($strip_options))
-		$strip_options = array();
-
-	// 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', $direction != 'top' ? '_bottom' : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '>
-			<ul class="reset clearfix">
-				', implode('', $buttons), '
-			</ul>
-		</div>';
-}
-
-?>

+ 0 - 853
Themes/penguin/Display.template.php

@@ -1,853 +0,0 @@
-<?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">';
-
-		// Build the poll moderation button array.
-		$poll_buttons = array(
-			'vote' => array('test' => 'allow_return_vote', 'text' => 'poll_return_vote', 'image' => 'poll_options.png', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start']),
-			'results' => array('test' => 'show_view_results_button', 'text' => 'poll_results', 'image' => 'poll_results.png', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start'] . ';viewresults'),
-			'change_vote' => array('test' => 'allow_change_vote', 'text' => 'poll_change_vote', 'image' => 'poll_change_vote.png', 'lang' => true, 'url' => $scripturl . '?action=vote;topic=' . $context['current_topic'] . '.' . $context['start'] . ';poll=' . $context['poll']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-			'lock' => array('test' => 'allow_lock_poll', 'text' => (!$context['poll']['is_locked'] ? 'poll_lock' : 'poll_unlock'), 'image' => 'poll_lock.png', 'lang' => true, 'url' => $scripturl . '?action=lockvoting;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-			'edit' => array('test' => 'allow_edit_poll', 'text' => 'poll_edit', 'image' => 'poll_edit.png', 'lang' => true, 'url' => $scripturl . '?action=editpoll;topic=' . $context['current_topic'] . '.' . $context['start']),
-			'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-		);
-
-		template_button_strip($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/modify_small.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>';
-	}
-
-	// Build the normal button array.
-	$normal_buttons = array(
-		'print' => array('test' => 'can_print', 'text' => 'print', 'image' => 'print.png', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
-		'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.png', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'),
-		'mark_unread' => array('test' => 'can_mark_unread', 'text' => 'mark_unread', 'image' => 'markunread.png', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-		'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-		'add_poll' => array('test' => 'can_add_poll', 'text' => 'add_poll', 'image' => 'add_poll.png', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start']),
-	);
-	
-	// Build the reply button array.
-	$reply_button = array(
-		'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.png', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], 'active' => true),
-	);
-
-	// Allow adding new buttons easily.
-	call_integration_hook('integrate_display_buttons', array(&$normal_buttons));
-
-	// 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="" />', $txt['topic'], ':&nbsp;', $context['subject'], ' &nbsp;(', $context['num_views'], ' ', $txt['views'], ')
-					</h3>
-				</div>
-				<div class="windowbg">
-					<div class="title_bar" style="margin: 0 11px 10px 11px; border-radius: 4px; overflow: auto;">
-						<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'],'</div>
-						<div class="nextlinks_bottom floatright" style="padding: 4px 8px;">', $context['previous_next'], '</div>
-					</div>
-						', template_button_strip($normal_buttons, 'left'), '', template_button_strip($reply_button, 'right'), '
-				</div><a href="#" id="skipnav_target"></a>';
-
-	if (!empty($settings['display_who_viewing']))
-	{
-		echo '
-				<p id="whoisviewing" class="smalltext flow_auto">';
-
-		// 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" 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', '">';
-		// Ignore user?
-		//if($ignoring)
-		//	echo '
-		//			<a href="', $scripturl, '?action=ignoreuser;u=', $message['member']['id'], ';rt=', $context['current_topic'], ';rm=', $message['id'], '" class="ignore_button floatleft" title="Don\'t do it. You\'ll be sorry.">Resume viewing</a>
-		//			<div style="padding: 1em 1.7em 1em 15em;">You really do not want to see this post. This person drives you crazy.</div>';
-
-		echo '
-					<div class="post_wrapper"', $ignoring ? 'style="display:none;"' : '', '>';
-
-		// Show information about the poster of this message.
-		echo '
-						<div class="poster">';
-
-		// Show a link to the member's profile.
-		echo '
-								
-							<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';
-
-		// 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>';
-
-//			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'], '" class="', $message['member']['online']['is_online'] ?'online':'offline','">
-										', $message['member']['avatar']['image'], '
-									</a>
-									<ul class="reset">';
-			// 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>';
-
-			// Show how many posts they have made.
-			if (!isset($context['disabled_fields']['posts']))
-				echo '
-										<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</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']], '" /><span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span>', $context['can_issue_warning'] ? '</a>' : '', '</li>';
-
-			// Show the member's signature?
-			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
-				echo '
-										<li class="signature" id="msg_', $message['id'], '_signature"><hr />', $message['member']['signature'], '</li>';
-
-				echo '
-									</ul>
-								</li>';
-			}
-
-		// Don't show these things for guests.
-		if (!$message['member']['is_guest'])
-		{
-			// Show online and offline buttons?
-			if (!empty($modSettings['onlineEnable']) && ($context['can_send_pm']))
-			{
-				if(!$message['is_message_author'])
-				{				
-				echo '
-								<li class="online_button"><a href="', $scripturl,'?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $message['member']['name']. ' is online' : $message['member']['name']. ' is offline', '"><img src="', $message['member']['online']['image_href'], '" style="vertical-align: middle; margin-top: -0.1em;" alt="', $message['member']['online']['text'], '" />&nbsp;Send message</a></li>';
-				}
-				else
-				{
-				echo '
-								<li class="online_button"><a href="', $scripturl,'?action=pm" title="Check my inbox">', $txt['pm_short'], ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
-				}
-			}
-		}
-
-			echo '
-								<li class="icons">', $message['member']['group_icons'], '</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>';
-		// Show the post group if they have no other group or the option is on, and they are in a post group.
-		elseif (($message['member']['group'] == '') && $message['member']['post_group'] != '')
-				echo '
-								<li class="membergroup">', $message['member']['post_group'], '</li>';
-
-		// Show the member's custom title, if they have one.
-		//if (!empty($message['member']['title']))
-		//	echo '
-		//						<li class="title">', $message['member']['title'], '</li>';
-
-//		if(!$message['is_message_author'] && $context['user']['is_logged'])
-//		{
-//			echo'
-//								<li class="floatleft" style="width: 58px; border-radius: 4px; margin: 0 0 0.4em 1.1em; padding: 0.2em;"><a href="', $scripturl, '?action=ignoreuser;u=', $message['member']['id'], ';rt=', $context['current_topic'], ';rm=', $message['id'], '">', $txt['ignore_link'], '</a></li>
-//								<li class="floatright" style="width: 58px; border-radius: 4px; margin: 0 1.1em 0.4em 0; padding: 0.2em;"><a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '" title="', $txt['report_to_mod'], '">Report</a></li>';
-//		}
-
-		// Done with the information about the poster... on to the post itself.
-		echo '
-							</ul>
-						</div><!--/poster-->
-						<div class="postarea">
-								<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'], '" class="smalltext">
-										<a href="', $message['href'], '" rel="nofollow" class="topic_reply_title" title="', $context['subject'], '">', !empty($message['counter']) ? $txt['reply_noun'] . ' ' . $message['counter'] : 'Opening Post', '</a>&nbsp;by <strong>', $message['member']['link'], '</strong>', (!empty($message['member']['title'])) ? '&nbsp;('. $message['member']['title']. ')' : '','&nbsp;-&nbsp;<time>', $message['time'], '</time>
-									</h5>
-									<a href="#top_most" class="go_up"><img src="', $settings['images_url'], '/go_up.png" alt="', $txt['go_up'], '" /></a>
-									<a href="#bottom_most" class="go_down"><img src="', $settings['images_url'], '/go_down.png" alt="', $txt['go_down'], '" /></a>
-										<div id="msg_', $message['id'], '_quick_mod"></div>
-								</div>';
-						// Show "� Last Edit: Time by Person �" if this post was edited.
-						if ($settings['show_modify'] && !empty($message['modified']['name']))
-							echo '
-								<div class="smalltext" style="padding: 2px 0 0 10px; margin: 0 0 -4px 125px;">
-									<em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em>
-								</div>';
-
-		// Show the post itself, finally!
-		echo '
-							<div class="post" style="',$ignoring?'display:none;':'','"><hr />';
-
-		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'], '"', ' style="padding-bottom: 0.6em;">', $message['body'], '</div>';
-
-		// 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>';
-
-		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
-			echo '
-								<ul class="reset quickbuttons">';
-
-			// Show their personal text?
-			if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
-				echo '
-									<li class="blurb">', $message['member']['blurb'], '</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'], '" title="', $txt['quote'], '&nbsp;', $message['member']['name'], '\'s post" 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'], '" title="', $txt['quote'], '&nbsp;', $message['member']['name'], '\'s post" 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'], '" title="', $txt['fulledit'], '" class="modify_button">', $txt['fulledit'], '</a></li>';
-
-		// Can the user modify the contents of this post?  Show the modify inline image.
-		if ($message['can_modify'])
-			echo '
-									<li><a href="#" class="modify_inline" title="', $txt['quick_edit'], '">', $txt['edit'], '<img src="', $settings['images_url'], '/icons/modify_inline.png" alt="', $txt['modify_msg'], '" title="', $txt['quick_edit'] ,'" id="modify_button_', $message['id'], '" style="cursor: pointer; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" /></a></li>';
-
-		if ($context['can_moderate_forum'])
-		{
-			echo '
-									<li class="moderation_button"><a href="#">', $txt['post_options'], '</a>
-										<ul>';
-
-									// Maybe they want to report this post to the moderator(s)?
-									if ($context['can_report_moderator'])
-										echo '
-											<li><a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a></li>';
-										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>
-											<li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '" class="split_button">', $txt['split'], '</a></li>';
-									
-									// 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 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>';
-									
-									// 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 '
-											<li><a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '" title="', $txt['issue_warning_post'], '" class="issue_warning">Issue warning</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'], '"><label for="in_topic_mod_check_', $message['id'], '">Select post&nbsp;</label></li>';
-										echo '
-											<li><a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '" class="ip_link">', $message['member']['ip'], '</a></li>
-										</ul>
-									</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'], '" title="', $txt['quote'], '&nbsp;', $message['member']['name'], '\'s post" 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'], '" title="', $txt['quote'], '&nbsp;', $message['member']['name'], '\'s post" class="quote_button">', $txt['quote'], '</a></li>';
-
-		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
-			echo '
-								</ul>';
-
-//		// 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"><hr />', $message['member']['signature'], '</div>';
-
-		echo '
-						</div><!--/postarea-->
-					</div><!--/post_wrapper-->
-				</div>
-				<hr class="post_separator" />';
-	}
-
-	echo '
-				</form>
-			</div>
-			<a id="lastPost"></a>';
-
-	$mod_buttons = array(
-		'move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.png', 'lang' => true, 'url' => $scripturl . '?action=movetopic;current_board=' . $context['current_board'] . ';topic=' . $context['current_topic'] . '.0'),
-		'delete' => array('test' => 'can_delete', 'text' => 'remove_topic', 'image' => 'admin_rem.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_remove_topic'] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
-		'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'set_lock' : 'set_unlock', 'image' => 'admin_lock.png', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-		'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.png', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-		'merge' => array('test' => 'can_merge', 'text' => 'merge', 'image' => 'merge.png', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
-		'calendar' => array('test' => 'calendar_post', 'text' => 'calendar_link', 'image' => 'linktocal.png', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0'),
-	);
-
-	// Restore topic. eh?  No monkey business.
-	if ($context['can_restore_topic'])
-		$mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
-
-	// Allow adding new mod buttons easily.
-	call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));
-
-	echo '
-			<div class="windowbg" id="display_lower_buttons">
-				', template_button_strip($normal_buttons, 'left'), '', template_button_strip($reply_button, 'right'), '
-				<div id="moderationbuttons">', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '</div>
-				<div class="title_bar" style="margin: 10px 11px 10px 11px; border-radius: 4px; clear: both;">
-					<div class="pagelinks floatleft" style="font-weight: bold;">', $txt['pages'], ': ', $context['page_index'],'</div>
-					<div class="nextlinks_bottom floatright" style="padding: 4px 8px;">', $context['previous_next'], '</div>
-				</div>';
-
-	// Show the page index... "Pages: [1]".
-
-	// Show the jumpto box, or actually...let Javascript do it.
-	echo '
-				<div class="navigate_section">',theme_linktree(),'</div>
-				<div class="title_bar" style="margin: 10px 11px 0 11px; border-radius: 4px;">
-					<div class="nextlinks_bottom floatleft" style="display: none; margin-bottom: 0; clear: none; padding: 4px 8px;">', $context['previous_next'], '</div>
-					<div class="floatright" style="margin-top: 0; clear: none;" id="display_jump_to">&nbsp;</div>
-				</div>
-			</div><br class="clear" />';
-			
-	// Show the lower breadcrumbs.
-
-	if ($context['can_reply'] && !empty($options['display_quick_reply']))
-	{
-		echo '
-			<a id="quickreply"></a><br />
-			<div class="tborder" id="quickreplybox">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<a href="javascript:oQuickReply.swap();" id="QuickReply_swap">
-							<img src="', $settings['images_url'], '/', $options['display_quick_reply'] > 1 ? 'upshrink' : 'upshrink2', '.png" alt="+" id="quickReplyExpand" class="icon floatright" />
-						</a>
-						<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
-					</h3>
-				</div>
-				<div id="quickReplyOptions"', $options['display_quick_reply'] > 1 ? '' : ' style="display: none"', '>
-					<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" class="flow_auto" onsubmit="submitonce(this);">
-							<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 class ="expand_test" cols="" rows="" 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">
-								<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" />
-							</div>';
-
-			if ($context['show_spellchecking'])
-				echo '
-								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
-
-			echo '
-						</form>
-					</div>
-				</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: "upshrink.png",
-						sImageExpanded: "upshrink2.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" class="topic_reply_title" title="%subject%"><strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' ' . $message['counter'] : 'Opening Post', ':</a></strong><time> ', $message['time'], '</time>'), ',
-							sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ':&nbsp; %subject% &nbsp;(', $context['num_views'], ' ', $txt['views'], ')'), ',
-							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 '
-		$(document).ready(function(){
-			$("li a.quote_button, li a.modify_button, li a.modify_inline, a.topic_reply_title").bt(jQuery.bt.options = {positions: "top, bottom"});
-		});
-
-		// ]]></script>';
-}
-
-?>

+ 0 - 590
Themes/penguin/ManageMaintenance.template.php

@@ -1,590 +0,0 @@
-<?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
- */
-
-// Template for the database maintenance tasks.
-function template_maintain_database()
-{
-	global $context, $settings, $options, $txt, $scripturl, $db_type, $modSettings;
-
-	// If maintenance has finished tell the user.
-	if (!empty($context['maintenance_finished']))
-		echo '
-			<div class="maintenance_finished">
-				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
-			</div>';
-
-	echo '
-	<div id="manage_maintenance">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['maintain_sub_database'], ' ', $txt['permitgroups_maintenance'], '</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-				<h3 class="double_height">', $txt['maintain_optimize'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=optimize" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['maintain_optimize_info'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form>
-				<hr />
-			</div>
-			<div class="content">
-				<h3 class="double_height">
-					<a href="', $scripturl, '?action=helpadmin;help=maintenance_backup" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a> ', $txt['maintain_backup'], '
-				</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=backup" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['maintain_backup_info'], '</p>
-					<br classs="clear" />';
-
-	if ($db_type == 'sqlite')
-		echo '
-					<hr />
-					<p>
-						<input type="submit" value="', $txt['maintain_backup_save'], '" id="submitDump" class="button_submit" />
-					</p>';
-	else
-	{
-		if ($context['safe_mode_enable'])
-			echo '
-					<div class="errorbox">', $txt['safe_mode_enabled'], '</div>';
-		else
-			echo '
-					<div class="', $context['suggested_method'] == 'use_external_tool' || $context['use_maintenance'] != 0 ? 'errorbox' : 'noticebox', '">
-						', $txt[$context['suggested_method']],
-						$context['use_maintenance'] != 0 ? '<br />' . $txt['enable_maintenance' . $context['use_maintenance']] : '',
-					'</div>';
-		echo '
-					<p>
-						<label for="struct"><input type="checkbox" name="struct" id="struct" onclick="document.getElementById(\'submitDump\').disabled = !document.getElementById(\'struct\').checked &amp;&amp; !document.getElementById(\'data\').checked;" class="input_check" checked="checked" /> ', $txt['maintain_backup_struct'], '</label><br />
-						<label for="data"><input type="checkbox" name="data" id="data" onclick="document.getElementById(\'submitDump\').disabled = !document.getElementById(\'struct\').checked &amp;&amp; !document.getElementById(\'data\').checked;" checked="checked" class="input_check" /> ', $txt['maintain_backup_data'], '</label><br />
-						<label for="compress"><input type="checkbox" name="compress" id="compress" value="gzip"', $context['suggested_method'] == 'zipped_file' ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['maintain_backup_gz'], '</label>
-					</p>
-					<p>
-						<input ', $context['use_maintenance'] == 2 ? 'disabled="disabled" ' : '', 'type="submit" value="', $txt['maintain_backup_save'], '" id="submitDump" onclick="return document.getElementById(\'struct\').checked || document.getElementById(\'data\').checked;" class="button_submit" />
-						<br class="clear_right" />
-					</p>';
-	}
-	echo '
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>';
-
-	// Show an option to convert to UTF-8 if we're not on UTF-8 yet.
-	if ($context['convert_utf8'])
-	{
-		echo '
-			<div class="content">
-				<h3 class="double_height">', $txt['utf8_title'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertutf8" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['utf8_introduction'], '</p>
-					', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? '<p class="errorbox">' . $txt['utf8_cannot_convert_fulltext'] . '</p>' : '', '
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" ', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? 'disabled="disabled"' : '', '/>
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>';
-	}
-
-	// We might want to convert entities if we're on UTF-8.
-	if ($context['convert_entities'])
-	{
-		echo '
-			<div class="content">
-				<h3 class="double_height">', $txt['entity_convert_title'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertentities" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['entity_convert_introduction'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>';
-	}
-
-	echo '
-		</div>
-	</div>';
-}
-
-// Template for the routine maintenance tasks.
-function template_maintain_routine()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	// If maintenance has finished tell the user.
-	if (!empty($context['maintenance_finished']))
-		echo '
-			<div class="infobox">
-				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
-			</div>';
-
-	// Starts off with general maintenance procedures.
-	echo '
-	<div id="manage_maintenance">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['maintain_sub_routine'], '&nbsp;', $txt['permitgroups_maintenance'], '</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-				<h3 class="double_height">', $txt['maintain_version'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=version" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['maintain_version_info'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				</form><hr />
-			</div>
-			<div class="content">
-				<h3 class="double_height">', $txt['maintain_errors'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=repairboards" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['maintain_errors_info'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>
-			<div class="content">
-			<h3 class="double_height">', $txt['maintain_recount'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=recount" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['maintain_recount_info'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>
-			<div class="content">
-			<h3 class="double_height">', $txt['maintain_logs'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=logs" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['maintain_logs_info'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>
-			<div class="content">
-			<h3 class="double_height">', $txt['maintain_cache'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=cleancache" method="post" accept-charset="', $context['character_set'], '">
-					<p class="floatleft">', $txt['maintain_cache_info'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>
-		</div>
-	</div>';
-}
-
-// Template for the member maintenance tasks.
-function template_maintain_members()
-{
-	global $context, $settings, $options, $txt, $scripturl;
-
-	// If maintenance has finished tell the user.
-	if (!empty($context['maintenance_finished']))
-		echo '
-			<div class="infobox">
-				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
-			</div>';
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var warningMessage = \'\';
-		var membersSwap = false;
-
-		function swapMembers()
-		{
-			membersSwap = !membersSwap;
-			var membersForm = document.getElementById(\'membersForm\');
-
-			document.getElementById("membersIcon").src = smf_images_url + (membersSwap ? "/collapse.png" : "/expand.png");
-			setInnerHTML(document.getElementById("membersText"), membersSwap ? "', $txt['maintain_members_choose'], '" : "', $txt['maintain_members_all'], '");
-			document.getElementById("membersPanel").style.display = (membersSwap ? "block" : "none");
-
-			for (var i = 0; i < membersForm.length; i++)
-			{
-				if (membersForm.elements[i].type.toLowerCase() == "checkbox")
-					membersForm.elements[i].checked = !membersSwap;
-			}
-		}
-
-		function checkAttributeValidity()
-		{
-			origText = \'', $txt['reattribute_confirm'], '\';
-			valid = true;
-
-			// Do all the fields!
-			if (!document.getElementById(\'to\').value)
-				valid = false;
-			warningMessage = origText.replace(/%member_to%/, document.getElementById(\'to\').value);
-
-			if (document.getElementById(\'type_email\').checked)
-			{
-				if (!document.getElementById(\'from_email\').value)
-					valid = false;
-				warningMessage = warningMessage.replace(/%type%/, \'', addcslashes($txt['reattribute_confirm_email'], "'"), '\').replace(/%find%/, document.getElementById(\'from_email\').value);
-			}
-			else
-			{
-				if (!document.getElementById(\'from_name\').value)
-					valid = false;
-				warningMessage = warningMessage.replace(/%type%/, \'', addcslashes($txt['reattribute_confirm_username'], "'"), '\').replace(/%find%/, document.getElementById(\'from_name\').value);
-			}
-
-			document.getElementById(\'do_attribute\').disabled = valid ? \'\' : \'disabled\';
-
-			setTimeout("checkAttributeValidity();", 500);
-			return valid;
-		}
-		setTimeout("checkAttributeValidity();", 500);
-	// ]]></script>
-	<div id="manage_maintenance">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['admin_news_select_members'], '&nbsp;', $txt['admin_maintenance'], '</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-			<h3 class="double_height">', $txt['maintain_reattribute_posts'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=members;activity=reattribute" method="post" accept-charset="', $context['character_set'], '">
-					<p><strong>', $txt['reattribute_guest_posts'], '</strong></p>
-					<dl class="settings">
-						<dt>
-							<label for="type_email"><input type="radio" name="type" id="type_email" value="email" checked="checked" class="input_radio" />', $txt['reattribute_email'], '</label>
-						</dt>
-						<dd>
-							<input type="text" name="from_email" id="from_email" value="" onclick="document.getElementById(\'type_email\').checked = \'checked\'; document.getElementById(\'from_name\').value = \'\';" />
-						</dd>
-						<dt>
-							<label for="type_name"><input type="radio" name="type" id="type_name" value="name" class="input_radio" />', $txt['reattribute_username'], '</label>
-						</dt>
-						<dd>
-							<input type="text" name="from_name" id="from_name" value="" onclick="document.getElementById(\'type_name\').checked = \'checked\'; document.getElementById(\'from_email\').value = \'\';" class="input_text" />
-						</dd>
-					</dl>
-					<dl class="settings">
-						<dt>
-							<label for="to"><strong>', $txt['reattribute_current_member'], ':</strong></label>
-						</dt>
-						<dd>
-							<input type="text" name="to" id="to" value="" class="input_text" />
-						</dd>
-					</dl>
-					<p class="maintain_members">
-						<input type="checkbox" name="posts" id="posts" checked="checked" class="input_check" />
-						<label for="posts">', $txt['reattribute_increase_posts'], '</label>
-					</p>
-					<input type="submit" id="do_attribute" value="', $txt['reattribute'], '" onclick="if (!checkAttributeValidity()) return false; return confirm(warningMessage);" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>
-			<div class="content">
-				<h3 class="double_height">
-					<a href="', $scripturl, '?action=helpadmin;help=maintenance_members" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a> ', $txt['maintain_members'], '
-				</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=members;activity=purgeinactive" method="post" accept-charset="', $context['character_set'], '" id="membersForm">
-					<p><a id="membersLink"></a>', $txt['maintain_members_since1'], '
-					<select name="del_type">
-						<option value="activated" selected="selected">', $txt['maintain_members_activated'], '</option>
-						<option value="logged">', $txt['maintain_members_logged_in'], '</option>
-					</select> ', $txt['maintain_members_since2'], ' <input type="text" name="maxdays" value="30" size="3" class="input_text" />', $txt['maintain_members_since3'], '</p>';
-
-	echo '
-					<p><a href="#membersLink" onclick="swapMembers();"><img src="', $settings['images_url'], '/expand.png" alt="+" id="membersIcon" /></a> <a href="#membersLink" onclick="swapMembers();" id="membersText" style="font-weight: bold;">', $txt['maintain_members_all'], '</a></p>
-					<div style="display: none; padding: 3px" id="membersPanel">';
-
-	foreach ($context['membergroups'] as $group)
-		echo '
-						<label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked="checked" class="input_check" /> ', $group['name'], '</label><br />';
-
-	echo '
-					</div>
-					<input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_members_confirm'], '\');" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>
-			<div class="content">
-				<h3 class="double_height">', $txt['maintain_recountposts'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=members;activity=recountposts" method="post" accept-charset="', $context['character_set'], '" id="membersRecountForm">
-					<p class="floatleft">', $txt['maintain_recountposts_info'], '</p>
-					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr />
-			</div>
-		</div>
-	</div>
-
-	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?fin20"></script>
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var oAttributeMemberSuggest = new smc_AutoSuggest({
-			sSelf: \'oAttributeMemberSuggest\',
-			sSessionId: smf_session_id,
-			sSessionVar: smf_session_var,
-			sSuggestId: \'attributeMember\',
-			sControlId: \'to\',
-			sSearchType: \'member\',
-			sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
-			bItemList: false
-		});
-	// ]]></script>';
-}
-
-// Template for the topic maintenance tasks.
-function template_maintain_topics()
-{
-	global $scripturl, $txt, $context, $settings, $modSettings;
-
-	// If maintenance has finished tell the user.
-	if (!empty($context['maintenance_finished']))
-		echo '
-			<div class="infobox">
-				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
-			</div>';
-
-	// Bit of javascript for showing which boards to prune in an otherwise hidden list.
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var rotSwap = false;
-			function swapRot()
-			{
-				rotSwap = !rotSwap;
-
-				// Toggle icon
-				document.getElementById("rotIcon").src = smf_images_url + (rotSwap ? "/collapse.png" : "/expand.png");
-				setInnerHTML(document.getElementById("rotText"), rotSwap ? ', JavaScriptEscape($txt['maintain_old_choose']), ' : ', JavaScriptEscape($txt['maintain_old_all']), ');
-
-				// Toggle panel
-				document.getElementById("rotPanel").style.display = !rotSwap ? "none" : "";
-
-				// Toggle checkboxes
-				var rotPanel = document.getElementById(\'rotPanel\');
-				var oBoardCheckBoxes = rotPanel.getElementsByTagName(\'input\');
-				for (var i = 0; i < oBoardCheckBoxes.length; i++)
-				{
-					if (oBoardCheckBoxes[i].type.toLowerCase() == "checkbox")
-						oBoardCheckBoxes[i].checked = !rotSwap;
-				}
-			}
-		// ]]></script>';
-
-	echo '
-	<div id="manage_maintenance">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['maintain_sub_topics'], '&nbsp;', $txt['admin_maintenance'], '</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-				<h3 class="double_height">', $txt['maintain_old'], '</h3>
-				<div class="content flow_auto">
-					<form action="', $scripturl, '?action=admin;area=maintain;sa=topics;activity=pruneold" method="post" accept-charset="', $context['character_set'], '">';
-
-	// The otherwise hidden "choose which boards to prune".
-	echo '
-						<p>
-							<a id="rotLink"></a>', $txt['maintain_old_since_days1'], '<input type="text" name="maxdays" value="30" size="3" />', $txt['maintain_old_since_days2'], '
-						</p>
-						<p>
-							<label for="delete_type_nothing"><input type="radio" name="delete_type" id="delete_type_nothing" value="nothing" class="input_radio" /> ', $txt['maintain_old_nothing_else'], '</label><br />
-							<label for="delete_type_moved"><input type="radio" name="delete_type" id="delete_type_moved" value="moved" class="input_radio" checked="checked" /> ', $txt['maintain_old_are_moved'], '</label><br />
-							<label for="delete_type_locked"><input type="radio" name="delete_type" id="delete_type_locked" value="locked" class="input_radio" /> ', $txt['maintain_old_are_locked'], '</label><br />
-						</p>';
-
-	if (!empty($modSettings['enableStickyTopics']))
-		echo '
-						<p>
-							<label for="delete_old_not_sticky"><input type="checkbox" name="delete_old_not_sticky" id="delete_old_not_sticky" class="input_check" checked="checked" /> ', $txt['maintain_old_are_not_stickied'], '</label><br />
-						</p>';
-
-		echo '
-						<p>
-							<a href="#rotLink" onclick="swapRot();"><img src="', $settings['images_url'], '/expand.png" alt="+" id="rotIcon" /></a> <a href="#rotLink" onclick="swapRot();" id="rotText" style="font-weight: bold;">', $txt['maintain_old_all'], '</a>
-						</p>
-						<div style="display: none;" id="rotPanel" class="flow_hidden">
-							<div class="floatleft" style="width: 49%">';
-
-	// This is the "middle" of the list.
-	$middle = ceil(count($context['categories']) / 2);
-
-	$i = 0;
-	foreach ($context['categories'] as $category)
-	{
-		echo '
-								<fieldset>
-									<legend>', $category['name'], '</legend>
-									<ul class="reset">';
-
-		// Display a checkbox with every board.
-		foreach ($category['boards'] as $board)
-			echo '
-										<li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"><label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked="checked" class="input_check" />', $board['name'], '</label></li>';
-
-		echo '
-									</ul>
-								</fieldset>';
-
-		// Increase $i, and check if we're at the middle yet.
-		if (++$i == $middle)
-			echo '
-							</div>
-							<div class="floatright" style="width: 49%;">';
-	}
-
-	echo '
-						</div>
-					</div>
-					<input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_old_confirm'], '\');" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-				</form><hr class="clear" />
-			</div>
-			<div class="content">
-				<h3 class="double_height">', $txt['move_topics_maintenance'], '</h3>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=topics;activity=massmove" method="post" accept-charset="', $context['character_set'], '">
-					<p><label for="id_board_from">', $txt['move_topics_from'], ' </label>
-					<select name="id_board_from" id="id_board_from">
-						<option disabled="disabled">(', $txt['move_topics_select_board'], ')</option>';
-
-	// From board
-	foreach ($context['categories'] as $category)
-	{
-		echo '
-						<option disabled="disabled">--------------------------------------</option>
-						<option disabled="disabled">', $category['name'], '</option>
-						<option disabled="disabled">--------------------------------------</option>';
-
-		foreach ($category['boards'] as $board)
-			echo '
-						<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
-	}
-
-	echo '
-					</select>
-					<label for="id_board_to">', $txt['move_topics_to'], '</label>
-					<select name="id_board_to" id="id_board_to">
-						<option disabled="disabled">(', $txt['move_topics_select_board'], ')</option>';
-
-	// To board
-	foreach ($context['categories'] as $category)
-	{
-		echo '
-						<option disabled="disabled">--------------------------------------</option>
-						<option disabled="disabled">', $category['name'], '</option>
-						<option disabled="disabled">--------------------------------------</option>';
-
-		foreach ($category['boards'] as $board)
-			echo '
-						<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
-	}
-	echo '
-					</select></p>
-					<input type="submit" value="', $txt['move_topics_now'], '" onclick="if (document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_from\').selectedIndex].disabled || document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_to\').selectedIndex].disabled) return false; var confirmText = \'', $txt['move_topics_confirm'] . '\'; return confirm(confirmText.replace(/%board_from%/, document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_from\').selectedIndex].text.replace(/^=+&gt;&nbsp;/, \'\')).replace(/%board_to%/, document.getElementById(\'id_board_to\').options[document.getElementById(\'id_board_to\').selectedIndex].text.replace(/^=+&gt;&nbsp;/, \'\')));" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				</form><hr class="clear" />
-			</div>
-		</div>
-	</div>
-	</div>';
-}
-
-// Simple template for showing results of our optimization...
-function template_optimize()
-{
-	global $context, $settings, $options, $txt, $scripturl;
-
-	echo '
-	<div id="manage_maintenance">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['maintain_optimize'], '</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-				<p>
-					', $txt['database_numb_tables'], '<br />
-					', $txt['database_optimize_attempt'], '<br />';
-
-	// List each table being optimized...
-	foreach ($context['optimized_tables'] as $table)
-		echo '
-					', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br />';
-
-	// How did we go?
-	echo '
-					<br />', $context['num_tables_optimized'] == 0 ? $txt['database_already_optimized'] : $context['num_tables_optimized'] . ' ' . $txt['database_optimized'];
-
-	echo '
-				</p>
-				<p><a href="', $scripturl, '?action=admin;area=maintain">', $txt['maintain_return'], '</a></p>
-			</div>
-		</div>
-	</div>';
-}
-
-function template_convert_utf8()
-{
-	global $context, $txt, $settings, $scripturl;
-
-	echo '
-	<div id="manage_maintenance">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['utf8_title'], '</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertutf8" method="post" accept-charset="', $context['character_set'], '">
-					<p>', $txt['utf8_introduction'], '</p>
-					<div>', $txt['utf8_warning'], '</div>
-
-					<dl class="settings">
-						<dt><strong>', $txt['utf8_source_charset'], ':</strong></dt>
-						<dd><select name="src_charset">';
-	foreach ($context['charset_list'] as $charset)
-		echo '
-							<option value="', $charset, '"', $charset === $context['charset_detected'] ? ' selected="selected"' : '', '>', $charset, '</option>';
-	echo '
-							</select></dd>
-						<dt><strong>', $txt['utf8_database_charset'], ':</strong></dt>
-						<dd>', $context['database_charset'], '</dd>
-						<dt><strong>', $txt['utf8_target_charset'], ': </strong></dt>
-						<dd>', $txt['utf8_utf8'], '</dd>
-					</dl>
-					<input type="submit" value="', $txt['utf8_proceed'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
-					<input type="hidden" name="proceed" value="1" />
-				</form><hr />
-			</div>
-		</div>
-	</div>';
-}
-
-function template_convert_entities()
-{
-	global $context, $txt, $settings, $scripturl;
-
-	echo '
-	<div id="manage_maintenance">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['entity_convert_title'], '</h3>
-		</div>
-		<div class="windowbg2">
-			<div class="content">
-				<p>', $txt['entity_convert_introduction'], '</p>
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertentities;start=0;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">
-				<input type="submit" value="', $txt['entity_convert_proceed'], '" class="button_submit" />
-				</form>< hr />
-			</div>
-		</div>
-	</div>';
-}
-
-?>

+ 0 - 511
Themes/penguin/MessageIndex.template.php

@@ -1,511 +0,0 @@
-<?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"><span class="floatleft">', $txt['parent_boards'], '</span><img class="toggle" id="Child_swap" src="', $settings['images_url'], '/collapse.png" alt="*" title="', $txt['upshrink_description'], '" /></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="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">';
-
-			/* The board's and children's 'last_post's have:
-			time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
-			link, href, subject, start (where they should go for the first unread post.),
-			and member. (which has id, name, link, href, username in it.) */
-			if (!empty($board['last_post']['id']))
-				echo '
-						<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'], '<br />
-						', $txt['in'], ' ', $board['last_post']['link'], '<br />
-						', $txt['on'], ' ', $board['last_post']['time'],'
-						</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="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>';
-
-	// Create the button set...
-	$normal_buttons = array(
-		'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.png', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
-		'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.png', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
-		'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
-		'markread' => array('text' => 'mark_read_short', 'image' => 'markread.png', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
-	);
-
-	// They can only mark read if they are logged in and it's enabled!
-	if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
-		unset($normal_buttons['markread']);
-
-	// Allow adding new buttons easily.
-	call_integration_hook('integrate_messageindex_buttons', array(&$normal_buttons));
-
-	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($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" ', !empty($modSettings['enableParticipation'])?'colspan="2"':'colspan="1"', '>&nbsp;</th>
-					<th scope="col" class="lefttext" style="padding-left: 32px;"><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 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 src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
-					<th scope="col" class="righttext ', (empty($context['can_quick_mod'])) ? 'last_th' : '', '" style="padding-right: 36px;">
-						<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 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 src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a> / 
-						<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 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 lefttext" 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="60">&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 stickybg2" style="font-size: 0.917em; border-bottom: 2px solid #ddd;">';
-			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 class="stickybg2" colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '">
-						<span class="alert">!</span> ', $context['unapproved_posts_message'], '
-					</td>
-				</tr>';
-		}
-
-		$stickybar = false;
-		$normalbar = false;
-		foreach($context['topics'] as $topic)
-		{
-		if($topic['is_sticky'] && !$stickybar)
-			{
-			echo'
-				<tr class="windowbg">
-					<td class="sticky_bar" style="display: none; border-bottom: 1px solid #ddd; line-height: 1.7em; font-size: 1.083em; padding-left: 49px;" colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
-						<img src="', $settings['images_url'], '/icons/quick_sticky.png" style="vertical-align: middle;" alt="" />&nbsp;Stickied Topics
-					</td>
-				</tr>';
-			$stickybar = true;
-			}
-		else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
-			{
-			//echo'
-			//	<tr class="windowbg">
-			//		<td class="normal_bar" style="border-bottom: 1px solid #ddd; line-height: 1.7em; font-size: 1.083em; padding-left: 70px;" colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">Normal Topics</td>
-			//	</tr>';
-			echo'
-				<tr class="windowbg">
-					<td class="normal_bar" style="border-bottom: 1px solid #ddd; height: 1.7em; padding-right: 14px;" colspan="3">
-						<img class="icon floatright" id="Sticky_toggle" src="', $settings['images_url'], '/arrow.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
-					</td>
-					', !empty($options['display_quick_mod']) ? '<td class="normal_bar">&nbsp;</td>':'','
-				</tr>';
-			$normalbar = true;
-			}
-			// 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 class="windowbg2">';
-			if (!empty($modSettings['enableParticipation']))
-				echo '
-					<td class="', $color_class, ' icon1" style="padding: 0 0 0 0; background: none; width: 36px; text-align: right;">
-						<img src="', $settings['images_url'], '/topic/', $topic['class'], '.png" alt="" />
-					</td>';
-				echo '
-					<td class="', $color_class, ' icon2" style="padding: 0 0 0 0; width: 0px; text-align: right;"><div style="position: relative; height: 24px;">';
-			echo '
-							<img src="', $topic['is_poll'] ? $settings['images_url']. '/post/poll.png': $topic['first_post']['icon_url'], '" alt="" style="position: absolute; top: -2px; right: -2.7em; z-index: 5;" />
-							', ($topic['is_posted_in']) ? '<img src="'. $settings['images_url']. '/icons/user_sm.png" alt="" style="position: absolute; top: auto; bottom: -2px; right: -3.5em;" />' : '', '
-					</div></td>
-					<td width="60%" class="subject ', $alternate_class, '" ', (($topic['is_locked']) && (!$topic['is_sticky'])) ? 'style="opacity: 0.7;"' : '', '>
-
-						<div style="margin-left: 3.7em;" ', (!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 id="msg_' . $topic['first_post']['id'] . '" class="thingy" style="line-height: 1.6em;"><a href="', ($topic['new'] && $context['user']['is_logged']) ? $topic['new_href']: $topic['first_post']['href'], '" style="display: block;" title="', ($topic['new'] && $context['user']['is_logged']) ? 'Go to first new post':'Go to first post', '">', ($topic['new'] && $context['user']['is_logged']) ? '<span class="new_posts">' . $txt['new'] . '</span>':'', '', $topic['first_post']['subject'], '', ($context['can_approve_posts'] && !$topic['approved']) ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : '', '</a></span>', $topic['is_sticky'] ? '</strong>' : '';
-
-			echo '
-							<p style="line-height: 1.6em;"><a href="', $topic['first_post']['href'], '" style="font-weight: bold;">First post</a>&nbsp;by&nbsp;<span>', $topic['first_post']['member']['link'], '</span>';
-					//echo '
-					//			', $topic['first_post']['preview'];
-					echo '
-								<span style="font-size: 1em; padding: 0 10px;" id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</span>';
-					echo '
-							</p>
-						</div>
-					</td>';
-					//<td class="stats ', $color_class, '">
-					//	', $topic['replies'], ' ', $txt['replies'], '
-					//	<br />
-					//	', $topic['views'], ' ', $txt['views'], '
-					//</td>
-			echo '	<td width="40%" class="lastpost ', $alternate_class, ' righttext" ', (($topic['is_locked']) && (!$topic['is_sticky'])) ? 'style="opacity: 0.7;"' : '', '>
-				<a href="', $topic['last_post']['href'], '" class="lastpost_icon"><img src="', $settings['images_url'], '/icons/', ($topic['is_sticky'] && $topic['is_locked'])? 'sticky_locked_last_post.png' : ($topic['is_locked'] ? 'locked_last_post.png': ($topic['is_sticky'] ? 'sticky_last_post.png' : 'last_post.png')), '" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
-						<div class="lastpost_stuff">';
-
-			echo '
-							<span style="font-size: 1.083em; white-space: pre;">', $topic['replies'], ' ', $txt['replies'], '&nbsp;-&nbsp;', $topic['views'], ' ', $txt['views'], '</span><br />
-							', $topic['last_post']['time'], '&nbsp;', $txt['by'], '&nbsp;<span style="white-space: pre;"><strong>', $topic['last_post']['member']['link'], '</strong></span>
-						</div>';
-			//echo '
-			//			<div style="float: left; width: 100%; height: 0.6em; clear: both; margin: 0 0 0 0; padding: 2px 10px; overflow: visible;"><small style="font-weight: bold; display: block; margin: -8px 0 0 0; padding-right: 56px;" id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small></div>';
-			echo '
-					</td>';
-
-			// Show the quick moderation options?
-			if (!empty($context['can_quick_mod']))
-			{
-				echo '
-					<td class="', $color_class, ' moderation ', $alternate_class, ' righttext" ', (($topic['is_locked']) && (!$topic['is_sticky'])) ? 'style="opacity: 0.7;"' : '', '>';
-				if ($options['display_quick_mod'] == 1)
-					echo '
-						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" style="margin-left: -6px;" />';
-				else
-				{
-					// Check permissions on each and show only the ones they are allowed to use.
-					if ($topic['quick_mod']['remove'])
-						echo '<a style="margin: 2px;" 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 style="margin: 2px;" 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 style="margin: 2px;" 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 style="margin: 2px;" href="', $scripturl, '?action=movetopic;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="windowbg">
-					<td class="normal_bar" 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($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>
-				<span>', $context['user']['is_logged'] ? '<img src="'. $settings['images_url']. '/icons/user_sm.png" alt="" class="centericon" /> '. $txt['participation_caption'] : '', '</span>
-				<span><img src="' . $settings['images_url'] . '/icons/locked_last_post.png" alt="" class="centericon" /> ' . $txt['locked_topic'] . '</span>' . ($modSettings['enableStickyTopics'] == '1' ? '
-				<span><img src="' . $settings['images_url'] . '/icons/sticky_last_post.png" alt="" class="centericon" /> ' . $txt['sticky_topic'] . '</span>' : '') . ($modSettings['pollMode'] == '1' ? '
-				<span><img src="' . $settings['images_url'] . '/post/poll.png" alt="" class="centericon" /> ' . $txt['poll']. '</span>' : '') . '
-			</p>';
-
-	echo '
-			<script type="text/javascript"><!-- // --><![CDATA[
-				if (typeof(window.XMLHttpRequest) != "undefined")
-					aJumpTo[aJumpTo.length] = new JumpTo({
-						sContainerId: "message_index_jump_to",
-						sJumpToTemplate: "<label 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>
-		</div>
-	</div>';
-
-	// Javascript for inline editing.
-	// jQuery Beauty Tips override syntax:	$("span.thingy").bt(jQuery.bt.options = {positions: "bottom"});
-	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;
-
-	$(document).ready(function(){
-		$(".table_list tbody tr").show();
-		$("#Child_swap").show();
-
-		$("#Child_swap").click(function(){
-			// toggle the div on / off
-			$(".table_list tbody tr").toggle();
-			
-			// swap the collapse / expand images
-			var sCurrent_image = $("#Child_swap").attr("src");
-			if ($("#Child_swap").attr("class") == "toggle") {
-				$("#Child_swap").attr("src", sCurrent_image.replace("collapse", "expand"));
-			} else {
-				$("#Child_swap").attr("src", sCurrent_image.replace("expand", "collapse"));
-			}
-			
-			// add/remove a class element to keep track of the image status
-			$("#Child_swap").toggleClass("on");
-		});
-
-		$("td.stickybg, td.stickybg2").show();
-		$("#Sticky_toggle").show();
-
-		$("#Sticky_toggle").click(function(){
-			$("td.stickybg, td.stickybg2").toggle();
-			
-			// swap the arrow up / down images
-			var sCurrent_image = $("#Sticky_toggle").attr("src");
-			if ($("#Sticky_toggle").attr("class") == "icon floatright") {
-				$("#Sticky_toggle").attr("src", sCurrent_image.replace("arrow", "arrow-down"));
-			} else {
-				$("#Sticky_toggle").attr("src", sCurrent_image.replace("arrow-down", "arrow"));
-			}
-			
-			// add/remove a class element to keep track of the image status
-			$("#Sticky_toggle").toggleClass("on");
-		});
-	});
-';
-		//$(document).ready(function() { 
-		//	$("span.thingy").bt();
-		//});
-echo '
-
-
-// ]]></script>';
-}
-
-?>

+ 0 - 1078
Themes/penguin/Post.template.php

@@ -1,1078 +0,0 @@
-<?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 template for the post page.
-function template_main()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings, $counter;
-
-	// Start the javascript... and boy is there a lot.
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[';
-
-	// When using Go Back due to fatal_error, allow the form to be re-submitted with changes.
-	if (isBrowser('is_firefox'))
-		echo '
-			window.addEventListener("pageshow", reActivate, false);';
-
-	// Start with message icons - and any missing from this theme.
-	echo '
-			var icon_urls = {';
-	foreach ($context['icons'] as $icon)
-		echo '
-				\'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ',';
-	echo '
-			};';
-
-	// If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations.
-	if ($context['make_poll'])
-		echo '
-			var pollOptionNum = 0, pollTabIndex;
-			var pollOptionId = ', $context['last_choice_id'], ';
-			function addPollOption()
-			{
-				if (pollOptionNum == 0)
-				{
-					for (var i = 0, n = document.forms.postmodify.elements.length; i < n; i++)
-						if (document.forms.postmodify.elements[i].id.substr(0, 8) == \'options-\')
-						{
-							pollOptionNum++;
-							pollTabIndex = document.forms.postmodify.elements[i].tabIndex;
-						}
-				}
-				pollOptionNum++
-				pollOptionId++
-
-				setOuterHTML(document.getElementById(\'pollMoreOptions\'), ', JavaScriptEscape('<li><label for="options-'), ' + pollOptionId + ', JavaScriptEscape('">' . $txt['option'] . ' '), ' + pollOptionNum + ', JavaScriptEscape('</label>: <input type="text" name="options['), ' + pollOptionId + ', JavaScriptEscape(']" id="options-'), ' + pollOptionId + ', JavaScriptEscape('" value="" size="80" maxlength="255" tabindex="'), ' + pollTabIndex + ', JavaScriptEscape('" class="input_text" /></li><li id="pollMoreOptions"></li>'), ');
-			}';
-
-	// If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here.
-	if ($context['make_event'])
-		echo '
-			var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];';
-
-	// End of the javascript, start the form and display the link tree.
-	echo '
-		// ]]></script>
-		<form action="', $scripturl, '?action=', $context['destination'], ';', empty($context['current_board']) ? '' : 'board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" class="flow_hidden" onsubmit="', ($context['becomes_approved'] ? '' : 'alert(\'' . $txt['js_post_will_require_approval'] . '\');'), 'submitonce(this);smc_saveEntities(\'postmodify\', [\'subject\', \'', $context['post_box_name'], '\', \'guestname\', \'evtitle\', \'question\'], \'options\');" enctype="multipart/form-data">';
-
-	// If the user wants to see how their message looks - the preview section is where it's at!
-	echo '
-			<div id="preview_section"', isset($context['preview_message']) ? '' : ' style="display: none;"', '>
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<span id="preview_subject">', empty($context['preview_subject']) ? '' : $context['preview_subject'], '</span>
-					</h3>
-				</div>
-				<div class="windowbg">
-					<div class="content">
-						<div class="post" id="preview_body">
-							', empty($context['preview_message']) ? '<br />' : $context['preview_message'], '
-						</div>
-					</div>
-				</div>
-			</div><br />';
-
-	if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board'])))
-		echo '
-			<input type="hidden" name="eventid" value="', $context['event']['id'], '" />';
-
-	// Start the main table.
-	echo '
-			<div class="cat_bar">
-				<h3 class="catbg">', $context['page_title'], '</h3>
-			</div>
-				<div class="roundframe flow_auto">', isset($context['current_topic']) ? '
-					<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '';
-
-	// If an error occurred, explain what happened.
-	echo '
-					<div class="', empty($context['error_type']) || $context['error_type'] != 'serious' ? 'noticebox' : 'errorbox', '"', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
-						<dl>
-							<dt>
-								<strong id="error_serious">', $txt['error_while_submitting'], '</strong>
-							</dt>
-							<dd class="error" id="error_list">
-								', empty($context['post_error']['messages']) ? '' : implode('<br />', $context['post_error']['messages']), '
-							</dd>
-						</dl>
-					</div>';
-
-	// If this won't be approved let them know!
-	if (!$context['becomes_approved'])
-	{
-		echo '
-					<p class="information">
-						<em>', $txt['wait_for_approval'], '</em>
-						<input type="hidden" name="not_approved" value="1" />
-					</p>';
-	}
-
-	// If it's locked, show a message to warn the replyer.
-	echo '
-					<p class="information"', $context['locked'] ? '' : ' style="display: none"', ' id="lock_warning">
-						', $txt['topic_locked_no_reply'], '
-					</p>';
-
-	// The post header... important stuff
-	echo '
-					<dl id="post_header">';
-
-	// Guests have to put in their name and email...
-	if (isset($context['name']) && isset($context['email']))
-	{
-		echo '
-						<dt>
-							<span', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '', ' id="caption_guestname">', $txt['name'], ':</span>
-						</dt>
-						<dd>
-							<input type="text" name="guestname" size="25" value="', $context['name'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
-						</dd>';
-
-		if (empty($modSettings['guest_post_no_email']))
-			echo '
-						<dt>
-							<span', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</span>
-						</dt>
-						<dd>
-							<input type="text" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
-						</dd>';
-	}
-
-	// Now show the subject box for this post.
-	echo '
-						<dt class="clear">
-							<span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>
-						</dt>
-						<dd>
-							<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80"', isset($context['post_error']['no_subject']) ? ' class="error"' : ' class="input_text"', '/>
-						</dd>
-						<dt class="clear_left">
-							', $txt['message_icon'], ':
-						</dt>
-						<dd>
-							<select name="icon" id="icon" onchange="showimage()">';
-
-	// Loop through each message icon allowed, adding it to the drop down list.
-	foreach ($context['icons'] as $icon)
-		echo '
-								<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected="selected"' : '', '>', $icon['name'], '</option>';
-
-	echo '
-							</select>
-							<img src="', $context['icon_url'], '" name="icons" hspace="15" alt="" />
-						</dd>
-					</dl><hr class="clear" />';
-
-	// Are you posting a calendar event?
-	if ($context['make_event'])
-	{
-		echo '
-					<div id="post_event">
-						<fieldset id="event_main">
-							<legend><span', isset($context['post_error']['no_event']) ? ' class="error"' : '', ' id="caption_evtitle">', $txt['calendar_event_title'], '</span></legend>
-							<input type="text" name="evtitle" maxlength="255" size="55" value="', $context['event']['title'], '" tabindex="', $context['tabindex']++, '" 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" tabindex="', $context['tabindex']++, '" 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'] && $context['is_new_post']))
-		{
-			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, '"', $days == $context['event']['span'] ? ' 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'] && $context['is_new_post'])
-			{
-				echo '
-									<li>
-										', $txt['calendar_post_in'], '
-										<select name="board">';
-				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>';
-			}
-
-			echo '
-								</ul>
-							</div>
-						</fieldset>';
-		}
-
-		echo '
-					</div>';
-	}
-
-	// If this is a poll then display all the poll options!
-	if ($context['make_poll'])
-	{
-		echo '
-					<div id="edit_poll">
-						<fieldset id="poll_main">
-							<legend><span ', (isset($context['poll_error']['no_question']) ? ' class="error"' : ''), '>', $txt['poll_question'], '</span></legend>
-							<input type="text" name="question" value="', isset($context['question']) ? $context['question'] : '', '" tabindex="', $context['tabindex']++, '" size="80" class="input_text" />
-							<ul class="poll_main">';
-
-		// Loop through all the choices and print them out.
-		foreach ($context['choices'] as $choice)
-		{
-			echo '
-								<li>
-									<label for="options-', $choice['id'], '">', $txt['option'], ' ', $choice['number'], '</label>:
-									<input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="255" class="input_text" />
-								</li>';
-		}
-
-		echo '
-								<li id="pollMoreOptions"></li>
-							</ul>
-							<strong><a href="javascript:addPollOption(); void(0);">(', $txt['poll_add_option'], ')</a></strong>
-						</fieldset>
-						<fieldset id="poll_options">
-							<legend>', $txt['poll_options'], '</legend>
-							<dl class="settings poll_options">
-								<dt>
-									<label for="poll_max_votes">', $txt['poll_max_votes'], ':</label>
-								</dt>
-								<dd>
-									<input type="text" name="poll_max_votes" id="poll_max_votes" size="2" value="', $context['poll_options']['max_votes'], '" class="input_text" />
-								</dd>
-								<dt>
-									<label for="poll_expire">', $txt['poll_run'], ':</label><br />
-									<em class="smalltext">', $txt['poll_run_limit'], '</em>
-								</dt>
-								<dd>
-									<input type="text" name="poll_expire" id="poll_expire" size="2" value="', $context['poll_options']['expire'], '" onchange="pollOptions();" maxlength="4" class="input_text" /> ', $txt['days_word'], '
-								</dd>
-								<dt>
-									<label for="poll_change_vote">', $txt['poll_do_change_vote'], ':</label>
-								</dt>
-								<dd>
-									<input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked="checked"' : '', ' class="input_check" />
-								</dd>';
-
-		if ($context['poll_options']['guest_vote_enabled'])
-			echo '
-								<dt>
-									<label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label>
-								</dt>
-								<dd>
-									<input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll_options']['guest_vote']) ? ' checked="checked"' : '', ' class="input_check" />
-								</dd>';
-
-		echo '
-								<dt>
-									', $txt['poll_results_visibility'], ':
-								</dt>
-								<dd>
-									<input type="radio" name="poll_hide" id="poll_results_anyone" value="0"', $context['poll_options']['hide'] == 0 ? ' checked="checked"' : '', ' class="input_radio" /> <label for="poll_results_anyone">', $txt['poll_results_anyone'], '</label><br />
-									<input type="radio" name="poll_hide" id="poll_results_voted" value="1"', $context['poll_options']['hide'] == 1 ? ' checked="checked"' : '', ' class="input_radio" /> <label for="poll_results_voted">', $txt['poll_results_voted'], '</label><br />
-									<input type="radio" name="poll_hide" id="poll_results_expire" value="2"', $context['poll_options']['hide'] == 2 ? ' checked="checked"' : '', empty($context['poll_options']['expire']) ? 'disabled="disabled"' : '', ' class="input_radio" /> <label for="poll_results_expire">', $txt['poll_results_after'], '</label>
-								</dd>
-							</dl>
-						</fieldset>
-					</div>';
-	}
-
-	// 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');
-
-	// If this message has been edited in the past - display when it was.
-	if (isset($context['last_modified']))
-		echo '
-					<div class="padding smalltext">
-						<strong>', $txt['last_edit'], ':</strong>
-						', $context['last_modified'], '
-					</div>';
-
-	// If the admin has enabled the hiding of the additional options - show a link and image for it.
-	if (!empty($settings['additional_options_collapsable']))
-		echo '
-					<div id="postAdditionalOptionsHeader" class="title_bar">
-						<h4 class="titlebg">
-							<img id="postMoreExpand" class="panel_toggle" style="display: none;" src="', $settings['images_url'], '/collapse.png" alt="-" /> <strong><a href="#" id="postMoreExpandLink">', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong>
-						</h4>
-					</div>';
-
-	// Display the check boxes for all the standard options - if they are available to the user!
-	echo '
-					<div id="postMoreOptions" class="smalltext">
-						<ul class="post_options">
-							', $context['can_notify'] ? '<li><input type="hidden" name="notify" value="0" /><label for="check_notify"><input type="checkbox" name="notify" id="check_notify"' . ($context['notify'] || !empty($options['auto_notify']) ? ' checked="checked"' : '') . ' value="1" class="input_check" /> ' . $txt['notify_replies'] . '</label></li>' : '', '
-							', $context['can_lock'] ? '<li><input type="hidden" name="lock" value="0" /><label for="check_lock"><input type="checkbox" name="lock" id="check_lock"' . ($context['locked'] ? ' checked="checked"' : '') . ' value="1" class="input_check" /> ' . $txt['lock_topic'] . '</label></li>' : '', '
-							<li><label for="check_back"><input type="checkbox" name="goback" id="check_back"' . ($context['back_to_topic'] || !empty($options['return_to_post']) ? ' checked="checked"' : '') . ' value="1" class="input_check" /> ' . $txt['back_to_topic'] . '</label></li>
-							', $context['can_sticky'] ? '<li><input type="hidden" name="sticky" value="0" /><label for="check_sticky"><input type="checkbox" name="sticky" id="check_sticky"' . ($context['sticky'] ? ' checked="checked"' : '') . ' value="1" class="input_check" /> ' . $txt['sticky_after'] . '</label></li>' : '', '
-							<li><label for="check_smileys"><input type="checkbox" name="ns" id="check_smileys"', $context['use_smileys'] ? '' : ' checked="checked"', ' value="NS" class="input_check" /> ', $txt['dont_use_smileys'], '</label></li>', '
-							', $context['can_move'] ? '<li><input type="hidden" name="move" value="0" /><label for="check_move"><input type="checkbox" name="move" id="check_move" value="1" class="input_check" ' . (!empty($context['move']) ? 'checked="checked" ' : '') . '/> ' . $txt['move_after2'] . '</label></li>' : '', '
-							', $context['can_announce'] && $context['is_first_post'] ? '<li><label for="check_announce"><input type="checkbox" name="announce_topic" id="check_announce" value="1" class="input_check" ' . (!empty($context['announce']) ? 'checked="checked" ' : '') . '/> ' . $txt['announce_topic'] . '</label></li>' : '', '
-							', $context['show_approval'] ? '<li><label for="approve"><input type="checkbox" name="approve" id="approve" value="2" class="input_check" ' . ($context['show_approval'] === 2 ? 'checked="checked"' : '') . ' /> ' . $txt['approve_this_post'] . '</label></li>' : '', '
-						</ul>
-					</div>';
-
-	// If this post already has attachments on it - give information about them.
-	if (!empty($context['current_attachments']))
-	{
-		echo '
-					<dl id="postAttachment">
-						<dt>
-							', $txt['attached'], ':
-						</dt>
-						<dd class="smalltext">
-							<input type="hidden" name="attach_del[]" value="0" />
-							', $txt['uncheck_unwatchd_attach'], ':
-						</dd>';
-		foreach ($context['current_attachments'] as $attachment)
-			echo '
-						<dd class="smalltext">
-							<label for="attachment_', $attachment['id'], '"><input type="checkbox" id="attachment_', $attachment['id'], '" name="attach_del[]" value="', $attachment['id'], '"', empty($attachment['unchecked']) ? ' checked="checked"' : '', ' class="input_check" /> ', $attachment['name'], (empty($attachment['approved']) ? ' (' . $txt['awaiting_approval'] . ')' : ''),
-							!empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit']) ? sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1028) / 1028), 0)) : '', '</label>
-						</dd>';
-
-		if (!empty($context['files_in_session_warning']))
-			echo '
-						<dd class="smalltext">', $context['files_in_session_warning'], '</dd>';
-
-		echo '
-					</dl>';
-	}
-
-	// Is the user allowed to post any additional ones? If so give them the boxes to do it!
-	if ($context['can_post_attachment'])
-	{
-		echo '
-					<dl id="postAttachment2">';
-		
-		// But, only show them if they haven't reached a limit. Or a mod author hasn't hidden them.
-		if ($context['num_allowed_attachments'] > 0 || !empty($context['dont_show_them']))
-		{
-			echo '
-						<dt>
-							', $txt['attach'], ':
-						</dt>
-						<dd class="smalltext">
-							', empty($modSettings['attachmentSizeLimit']) ? '' : ('<input type="hidden" name="MAX_FILE_SIZE" value="' . $modSettings['attachmentSizeLimit'] * 1028 . '" />'), '
-							<input type="file" size="60" name="attachment[]" id="attachment1" class="input_file" /> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)';
-
-			// Show more boxes if they aren't approaching that limit.
-			if ($context['num_allowed_attachments'] > 1)
-				echo '
-							<script type="text/javascript"><!-- // --><![CDATA[
-								var allowed_attachments = ', $context['num_allowed_attachments'], ';
-								var current_attachment = 1;
-
-								function addAttachment()
-								{
-									allowed_attachments = allowed_attachments - 1;
-									current_attachment = current_attachment + 1;
-									if (allowed_attachments <= 0)
-										return alert("', $txt['more_attachments_error'], '");
-
-									setOuterHTML(document.getElementById("moreAttachments"), \'<dd class="smalltext"><input type="file" size="60" name="attachment[]" id="attachment\' + current_attachment + \'" class="input_file" /> (<a href="javascript:void(0);" onclick="cleanFileInput(\\\'attachment\' + current_attachment + \'\\\');">', $txt['clean_attach'], '<\/a>)\' + \'<\/dd><dd class="smalltext" id="moreAttachments"><a href="#" onclick="addAttachment(); return false;">(', $txt['more_attachments'], ')<\' + \'/a><\' + \'/dd>\');
-
-									return true;
-								}
-							// ]]></script>
-						</dd>
-						<dd class="smalltext" id="moreAttachments"><a href="#" onclick="addAttachment(); return false;">(', $txt['more_attachments'], ')</a></dd>';
-			else
-				echo '
-						</dd>';
-		}
-
-		// Add any template changes for an alternative upload system here.
-		call_integration_hook('integrate_upload_template', array());
-
-		echo '
-						<dd class="smalltext">';
-
-		// Show some useful information such as allowed extensions, maximum size and amount of attachments allowed.
-		if (!empty($modSettings['attachmentCheckExtensions']))
-			echo '
-							', $txt['allowed_types'], ': ', $context['allowed_extensions'], '<br />';
-
-		if (!empty($context['attachment_restrictions']))
-			echo '
-							', $txt['attach_restrictions'], ' ', implode(', ', $context['attachment_restrictions']), '<br />';
-
-		if ($context['num_allowed_attachments'] == 0)
-			echo '
-							', $txt['attach_limit_nag'], '<br />';
-
-		if (!$context['can_post_attachment_unapproved'])
-			echo '
-							<span class="alert">', $txt['attachment_requires_approval'], '</span>', '<br />';
-
-		echo '
-						</dd>
-					</dl>';
-	}
-
-	// Is visual verification enabled?
-	if ($context['require_verification'])
-	{
-		echo '
-					<div class="post_verification">
-						<span', !empty($context['post_error']['need_qr_verification']) ? ' class="error"' : '', '>
-							<strong>', $txt['verification'], ':</strong>
-						</span>
-						', template_control_verification($context['visual_verification_id'], 'all'), '
-					</div>';
-	}
-
-	// Finally, the submit buttons.
-	echo '
-					<hr class="hrcolor" />
-					<span class="smalltext" >
-						', isBrowser('is_firefox') ? $txt['shortcuts_firefox'] : $txt['shortcuts'], '
-					</span>
-					<span id="post_confirm_buttons">
-						', template_control_richedit_buttons($context['post_box_name']);
-
-	// Option to delete an event if user is editing one.
-	if ($context['make_event'] && !$context['event']['new'])
-		echo '
-						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['event_delete_confirm'], '\');" class="button_submit" />';
-
-	echo '
-					</span>
-					<br class="clear_right" />
-				</div>';
-
-	// Assuming this isn't a new topic pass across the last message id.
-	if (isset($context['topic_last_message']))
-		echo '
-			<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />';
-
-	echo '
-			<input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '" />
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
-		</form>';
-
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[';
-
-	// The functions used to preview a posts without loading a new page.
-	echo '
-			var current_board = ', empty($context['current_board']) ? 'null' : $context['current_board'], ';
-			var make_poll = ', $context['make_poll'] ? 'true' : 'false', ';
-			var txt_preview_title = "', $txt['preview_title'], '";
-			var txt_preview_fetch = "', $txt['preview_fetch'], '";
-			var new_replies = new Array();
-			var reply_counter = ', empty($counter) ? 0 : $counter, ';
-			function previewPost()
-			{';
-	if (isBrowser('is_firefox'))
-		echo '
-				// Firefox doesn\'t render <marquee> that have been put it using javascript
-				if (document.forms.postmodify.elements[', JavaScriptEscape($context['post_box_name']), '].value.indexOf(\'[move]\') != -1)
-				{
-					return submitThisOnce(document.forms.postmodify);
-				}';
-	echo '
-				if (window.XMLHttpRequest)
-				{
-					// Opera didn\'t support setRequestHeader() before 8.01.
-					if (\'opera\' in window)
-					{
-						var test = new XMLHttpRequest();
-						if (!(\'setRequestHeader\' in test))
-							return submitThisOnce(document.forms.postmodify);
-					}
-					// @todo Currently not sending poll options and option checkboxes.
-					var x = new Array();
-					var textFields = [\'subject\', ', JavaScriptEscape($context['post_box_name']), ', \'icon\', \'guestname\', \'email\', \'evtitle\', \'question\', \'topic\'];
-					var numericFields = [
-						\'board\', \'topic\', \'last_msg\',
-						\'eventid\', \'calendar\', \'year\', \'month\', \'day\',
-						\'poll_max_votes\', \'poll_expire\', \'poll_change_vote\', \'poll_hide\'
-					];
-					var checkboxFields = [
-						\'ns\'
-					];
-
-					for (var i = 0, n = textFields.length; i < n; i++)
-						if (textFields[i] in document.forms.postmodify)
-						{
-							// Handle the WYSIWYG editor.
-							if (textFields[i] == ', JavaScriptEscape($context['post_box_name']), ' && ', JavaScriptEscape('oEditorHandle_' . $context['post_box_name']), ' in window && oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled)
-								x[x.length] = \'message_mode=1&\' + textFields[i] + \'=\' + oEditorHandle_', $context['post_box_name'], '.getText(false).replace(/&#/g, \'&#38;#\').php_to8bit().php_urlencode();
-							else
-								x[x.length] = textFields[i] + \'=\' + document.forms.postmodify[textFields[i]].value.replace(/&#/g, \'&#38;#\').php_to8bit().php_urlencode();
-						}
-					for (var i = 0, n = numericFields.length; i < n; i++)
-						if (numericFields[i] in document.forms.postmodify && \'value\' in document.forms.postmodify[numericFields[i]])
-							x[x.length] = numericFields[i] + \'=\' + parseInt(document.forms.postmodify.elements[numericFields[i]].value);
-					for (var i = 0, n = checkboxFields.length; i < n; i++)
-						if (checkboxFields[i] in document.forms.postmodify && document.forms.postmodify.elements[checkboxFields[i]].checked)
-							x[x.length] = checkboxFields[i] + \'=\' + document.forms.postmodify.elements[checkboxFields[i]].value;
-
-					sendXMLDocument(smf_prepareScriptUrl(smf_scripturl) + \'action=post2\' + (current_board ? \';board=\' + current_board : \'\') + (make_poll ? \';poll\' : \'\') + \';preview;xml\', x.join(\'&\'), onDocSent);
-
-					document.getElementById(\'preview_section\').style.display = \'\';
-					setInnerHTML(document.getElementById(\'preview_subject\'), txt_preview_title);
-					setInnerHTML(document.getElementById(\'preview_body\'), txt_preview_fetch);
-
-					return false;
-				}
-				else
-					return submitThisOnce(document.forms.postmodify);
-			}
-			function onDocSent(XMLDoc)
-			{
-				if (!XMLDoc)
-				{
-					document.forms.postmodify.preview.onclick = new function ()
-					{
-						return true;
-					}
-					document.forms.postmodify.preview.click();
-				}
-
-				// Show the preview section.
-				var preview = XMLDoc.getElementsByTagName(\'smf\')[0].getElementsByTagName(\'preview\')[0];
-				setInnerHTML(document.getElementById(\'preview_subject\'), preview.getElementsByTagName(\'subject\')[0].firstChild.nodeValue);
-
-				var bodyText = \'\';
-				for (var i = 0, n = preview.getElementsByTagName(\'body\')[0].childNodes.length; i < n; i++)
-					bodyText += preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue;
-
-				setInnerHTML(document.getElementById(\'preview_body\'), bodyText);
-				document.getElementById(\'preview_body\').className = \'post\';
-
-				// Show a list of errors (if any).
-				var errors = XMLDoc.getElementsByTagName(\'smf\')[0].getElementsByTagName(\'errors\')[0];
-				var errorList = new Array();
-				for (var i = 0, numErrors = errors.getElementsByTagName(\'error\').length; i < numErrors; i++)
-					errorList[errorList.length] = errors.getElementsByTagName(\'error\')[i].firstChild.nodeValue;
-				document.getElementById(\'errors\').style.display = numErrors == 0 ? \'none\' : \'\';
-				document.getElementById(\'errors\').className = errors.getAttribute(\'serious\') == 1 ? \'errorbox\' : \'noticebox\';
-				document.getElementById(\'error_serious\').style.display = numErrors == 0 ? \'none\' : \'\';
-				setInnerHTML(document.getElementById(\'error_list\'), numErrors == 0 ? \'\' : errorList.join(\'<br />\'));
-
-				// Show a warning if the topic has been locked.
-				document.getElementById(\'lock_warning\').style.display = errors.getAttribute(\'topic_locked\') == 1 ? \'\' : \'none\';
-
-				// Adjust the color of captions if the given data is erroneous.
-				var captions = errors.getElementsByTagName(\'caption\');
-				for (var i = 0, numCaptions = errors.getElementsByTagName(\'caption\').length; i < numCaptions; i++)
-					if (document.getElementById(\'caption_\' + captions[i].getAttribute(\'name\')))
-						document.getElementById(\'caption_\' + captions[i].getAttribute(\'name\')).className = captions[i].getAttribute(\'class\');
-
-				if (errors.getElementsByTagName(\'post_error\').length == 1)
-					document.forms.postmodify.', $context['post_box_name'], '.style.border = \'1px solid red\';
-				else if (document.forms.postmodify.', $context['post_box_name'], '.style.borderColor == \'red\' || document.forms.postmodify.', $context['post_box_name'], '.style.borderColor == \'red red red red\')
-				{
-					if (\'runtimeStyle\' in document.forms.postmodify.', $context['post_box_name'], ')
-						document.forms.postmodify.', $context['post_box_name'], '.style.borderColor = \'\';
-					else
-						document.forms.postmodify.', $context['post_box_name'], '.style.border = null;
-				}
-
-				// Set the new last message id.
-				if (\'last_msg\' in document.forms.postmodify)
-					document.forms.postmodify.last_msg.value = XMLDoc.getElementsByTagName(\'smf\')[0].getElementsByTagName(\'last_msg\')[0].firstChild.nodeValue;
-
-				// Remove the new image from old-new replies!
-				for (i = 0; i < new_replies.length; i++)
-					document.getElementById(\'image_new_\' + new_replies[i]).style.display = \'none\';
-				new_replies = new Array();
-
-				var ignored_replies = new Array(), ignoring;
-				var newPosts = XMLDoc.getElementsByTagName(\'smf\')[0].getElementsByTagName(\'new_posts\')[0] ? XMLDoc.getElementsByTagName(\'smf\')[0].getElementsByTagName(\'new_posts\')[0].getElementsByTagName(\'post\') : {length: 0};
-				var numNewPosts = newPosts.length;
-				if (numNewPosts != 0)
-				{
-					var newPostsHTML = \'<span id="new_replies"><\' + \'/span>\';
-					for (var i = 0; i < numNewPosts; i++)
-					{
-						new_replies[new_replies.length] = newPosts[i].getAttribute("id");
-
-						ignoring = false;
-						if (newPosts[i].getElementsByTagName("is_ignored")[0].firstChild.nodeValue != 0)
-							ignored_replies[ignored_replies.length] = ignoring = newPosts[i].getAttribute("id");
-
-						newPostsHTML += \'<div class="windowbg\' + (++reply_counter % 2 == 0 ? \'2\' : \'\') + \' core_posts"><span class="topslice"><span></span></span><div class="content" id="msg\' + newPosts[i].getAttribute("id") + \'"><div class="floatleft"><h5>', $txt['posted_by'], ': \' + newPosts[i].getElementsByTagName("poster")[0].firstChild.nodeValue + \'</h5><span class="smalltext">&#171;&nbsp;<strong>', $txt['on'], ':</strong> \' + newPosts[i].getElementsByTagName("time")[0].firstChild.nodeValue + \'&nbsp;&#187;</span> <span class="new_posts" id="image_new_\' + newPosts[i].getAttribute("id") + \'">', $txt['new'], '</span></div>\';';
-
-	if ($context['can_quote'])
-		echo '
-						newPostsHTML += \'<ul class="reset smalltext quickbuttons" id="msg_\' + newPosts[i].getAttribute("id") + \'_quote"><li><a href="#postmodify" onclick="return insertQuoteFast(\\\'\' + newPosts[i].getAttribute("id") + \'\\\');" class="quote_button"><span>',$txt['bbc_quote'],'</span><\' + \'/a></li></ul>\';';
-
-	echo '
-						newPostsHTML += \'<br class="clear" />\';
-
-						if (ignoring)
-							newPostsHTML += \'<div id="msg_\' + newPosts[i].getAttribute("id") + \'_ignored_prompt" class="smalltext">', $txt['ignoring_user'], '<a href="#" id="msg_\' + newPosts[i].getAttribute("id") + \'_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a></div>\';
-
-						newPostsHTML += \'<div class="list_posts smalltext" id="msg_\' + newPosts[i].getAttribute("id") + \'_body">\' + newPosts[i].getElementsByTagName("message")[0].firstChild.nodeValue + \'<\' + \'/div></div><span class="botslice"><span></span></span></div>\';
-					}
-					setOuterHTML(document.getElementById(\'new_replies\'), newPostsHTML);
-				}
-
-				var numIgnoredReplies = ignored_replies.length;
-				if (numIgnoredReplies != 0)
-				{
-					for (var i = 0; i < numIgnoredReplies; i++)
-					{
-						aIgnoreToggles[ignored_replies[i]] = new smc_Toggle({
-							bToggleEnabled: true,
-							bCurrentlyCollapsed: true,
-							aSwappableContainers: [
-								\'msg_\' + ignored_replies[i] + \'_body\',
-								\'msg_\' + ignored_replies[i] + \'_quote\',
-							],
-							aSwapLinks: [
-								{
-									sId: \'msg_\' + ignored_replies[i] + \'_ignored_link\',
-									msgExpanded: \'\',
-									msgCollapsed: ', JavaScriptEscape($txt['show_ignore_user_post']), '
-								}
-							]
-						});
-					}
-				}
-
-				location.hash = \'#\' + \'preview_section\';
-
-				if (typeof(smf_codeFix) != \'undefined\')
-					smf_codeFix();
-			}';
-
-	// Code for showing and hiding additional options.
-	if (!empty($settings['additional_options_collapsable']))
-		echo '
-			var oSwapAdditionalOptions = new smc_Toggle({
-				bToggleEnabled: true,
-				bCurrentlyCollapsed: ', $context['show_additional_options'] ? 'false' : 'true', ',
-				funcOnBeforeCollapse: function () {
-					document.getElementById(\'additional_options\').value = \'0\';
-				},
-				funcOnBeforeExpand: function () {
-					document.getElementById(\'additional_options\').value = \'1\';
-				},
-				aSwappableContainers: [
-					\'postMoreOptions\',
-					\'postAttachment\',
-					\'postAttachment2\',
-					\'postAttachment3\'
-				],
-				aSwapImages: [
-					{
-						sId: \'postMoreExpand\',
-						srcExpanded: smf_images_url + \'/collapse.png\',
-						altExpanded: \'-\',
-						srcCollapsed: smf_images_url + \'/expand.png\',
-						altCollapsed: \'+\'
-					}
-				],
-				aSwapLinks: [
-					{
-						sId: \'postMoreExpandLink\',
-						msgExpanded: ', JavaScriptEscape($context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt']), ',
-						msgCollapsed: ', JavaScriptEscape($context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt']), '
-					}
-				]
-			});';
-
-	echo '
-		// ]]></script>';
-
-	// If the user is replying to a topic show the previous posts.
-	if (isset($context['previous_posts']) && count($context['previous_posts']) > 0)
-	{
-		echo '
-		<div id="recent" class="flow_hidden main_section">
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['topic_summary'], '</h3>
-			</div>
-			<span id="new_replies"></span>';
-
-		$ignored_posts = array();
-		foreach ($context['previous_posts'] as $post)
-		{
-			$ignoring = false;
-			if (!empty($post['is_ignored']))
-				$ignored_posts[] = $ignoring = $post['id'];
-
-			echo '
-				<div class="', $post['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
-				<div class="content" id="msg', $post['id'], '">
-					<div class="floatleft">
-						<h5>', $txt['posted_by'], ': ', $post['poster'], '</h5>
-						<span class="smalltext">', $post['time'], '</span>
-					</div>';
-
-			if ($context['can_quote'])
-			{
-				echo '
-					<ul class="reset smalltext quickbuttons" id="msg_', $post['id'], '_quote">
-						<li><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');" class="quote_button"><span style="white-space: pre;">',$txt['bbc_quote'],'</span></a></li>
-					</ul>';
-			}
-
-			if ($ignoring)
-			{
-				echo '
-					<div id="msg_', $post['id'], '_ignored_prompt" class="smalltext">
-						', $txt['ignoring_user'], '
-						<a href="#" id="msg_', $post['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
-					</div>';
-			}
-
-			echo '
-					<div class="list_posts clear" id="msg_', $post['id'], '_body"><hr />', $post['message'], '</div>
-				</div>
-			</div>';
-		}
-
-		echo '
-		</div>
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var aIgnoreToggles = new Array();';
-
-		foreach ($ignored_posts as $post_id)
-		{
-			echo '
-			aIgnoreToggles[', $post_id, '] = new smc_Toggle({
-				bToggleEnabled: true,
-				bCurrentlyCollapsed: true,
-				aSwappableContainers: [
-					\'msg_', $post_id, '_body\',
-					\'msg_', $post_id, '_quote\',
-				],
-				aSwapLinks: [
-					{
-						sId: \'msg_', $post_id, '_ignored_link\',
-						msgExpanded: \'\',
-						msgCollapsed: ', JavaScriptEscape($txt['show_ignore_user_post']), '
-					}
-				]
-			});';
-		}
-
-		echo '
-			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 true;
-			}
-			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);
-			}
-		// ]]></script>';
-	}
-}
-
-// The template for the spellchecker.
-function template_spellcheck()
-{
-	global $context, $settings, $options, $txt;
-
-	// The style information that makes the spellchecker look... like the forum hopefully!
-	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['spell_check'], '</title>
-		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />
-		<style type="text/css">
-			body, td
-			{
-				font-size: small;
-				margin: 0;
-				background: #f0f0f0;
-				color: #000;
-				padding: 10px;
-			}
-			.highlight
-			{
-				color: red;
-				font-weight: bold;
-			}
-			#spellview
-			{
-				border-style: outset;
-				border: 1px solid black;
-				padding: 5px;
-				width: 95%;
-				height: 314px;
-				overflow: auto;
-				background: #ffffff;
-			}';
-
-	// As you may expect - we need a lot of javascript for this... load it form the separate files.
-	echo '
-		</style>
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var spell_formname = window.opener.spell_formname;
-			var spell_fieldname = window.opener.spell_fieldname;
-		// ]]></script>
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/spellcheck.js"></script>
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
-		<script type="text/javascript"><!-- // --><![CDATA[
-			', $context['spell_js'], '
-		// ]]></script>
-	</head>
-	<body onload="nextWord(false);">
-		<form action="#" method="post" accept-charset="', $context['character_set'], '" name="spellingForm" id="spellingForm" onsubmit="return false;" style="margin: 0;">
-			<div id="spellview">&nbsp;</div>
-			<table border="0" cellpadding="4" cellspacing="0" width="100%"><tr class="windowbg">
-				<td width="50%" valign="top">
-					', $txt['spellcheck_change_to'], '<br />
-					<input type="text" name="changeto" style="width: 98%;" class="input_text" />
-				</td>
-				<td width="50%">
-					', $txt['spellcheck_suggest'], '<br />
-					<select name="suggestions" style="width: 98%;" size="5" onclick="if (this.selectedIndex != -1) this.form.changeto.value = this.options[this.selectedIndex].text;" ondblclick="replaceWord();">
-					</select>
-				</td>
-			</tr></table>
-			<div class="righttext" style="padding: 4px;">
-				<input type="button" name="change" value="', $txt['spellcheck_change'], '" onclick="replaceWord();" class="button_submit" />
-				<input type="button" name="changeall" value="', $txt['spellcheck_change_all'], '" onclick="replaceAll();" class="button_submit" />
-				<input type="button" name="ignore" value="', $txt['spellcheck_ignore'], '" onclick="nextWord(false);" class="button_submit" />
-				<input type="button" name="ignoreall" value="', $txt['spellcheck_ignore_all'], '" onclick="nextWord(true);" class="button_submit" />
-			</div>
-		</form>
-	</body>
-</html>';
-}
-
-function template_quotefast()
-{
-	global $context, $settings, $options, $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>
-		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
-		<title>', $txt['retrieving_quote'], '</title>
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
-	</head>
-	<body>
-		', $txt['retrieving_quote'], '
-		<div id="temporary_posting_area" style="display: none;"></div>
-		<script type="text/javascript"><!-- // --><![CDATA[';
-
-	if ($context['close_window'])
-		echo '
-			window.close();';
-	else
-	{
-		// Lucky for us, Internet Explorer has an "innerText" feature which basically converts entities <--> text. Use it if possible ;).
-		echo '
-			var quote = \'', $context['quote']['text'], '\';
-			var stage = \'createElement\' in document ? document.createElement("DIV") : document.getElementById("temporary_posting_area");
-
-			if (\'DOMParser\' in window && !(\'opera\' in window))
-			{
-				var xmldoc = new DOMParser().parseFromString("<temp>" + \'', $context['quote']['mozilla'], '\'.replace(/\n/g, "_SMF-BREAK_").replace(/\t/g, "_SMF-TAB_") + "</temp>", "text/xml");
-				quote = xmldoc.childNodes[0].textContent.replace(/_SMF-BREAK_/g, "\n").replace(/_SMF-TAB_/g, "\t");
-			}
-			else if (\'innerText\' in stage)
-			{
-				setInnerHTML(stage, quote.replace(/\n/g, "_SMF-BREAK_").replace(/\t/g, "_SMF-TAB_").replace(/</g, "&lt;").replace(/>/g, "&gt;"));
-				quote = stage.innerText.replace(/_SMF-BREAK_/g, "\n").replace(/_SMF-TAB_/g, "\t");
-			}
-
-			if (\'opera\' in window)
-				quote = quote.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, \'"\').replace(/&amp;/g, "&");
-
-			window.opener.oEditorHandle_', $context['post_box_name'], '.InsertText(quote);
-
-			window.focus();
-			setTimeout("window.close();", 400);';
-	}
-	echo '
-		// ]]></script>
-	</body>
-</html>';
-}
-
-function template_announce()
-{
-	global $context, $settings, $options, $txt, $scripturl;
-
-	echo '
-	<div id="announcement">
-		<form action="', $scripturl, '?action=announce;sa=send" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['announce_title'], '</h3>
-			</div>
-			<div class="information">
-				', $txt['announce_desc'], '
-			</div>
-			<div class="windowbg2">
-				<span class="topslice"><span></span></span>
-				<div class="content">
-					<p>
-						', $txt['announce_this_topic'], ' <a href="', $scripturl, '?topic=', $context['current_topic'], '.0">', $context['topic_subject'], '</a>
-					</p>
-					<ul class="reset">';
-
-	foreach ($context['groups'] as $group)
-		echo '
-						<li>
-							<label for="who_', $group['id'], '"><input type="checkbox" name="who[', $group['id'], ']" id="who_', $group['id'], '" value="', $group['id'], '" checked="checked" class="input_check" /> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em>
-						</li>';
-
-	echo '
-						<li>
-							<label for="checkall"><input type="checkbox" id="checkall" class="input_check" onclick="invertAll(this, this.form);" checked="checked" /> <em>', $txt['check_all'], '</em></label>
-						</li>
-					</ul>
-					<div id="confirm_buttons">
-						<input type="submit" value="', $txt['post'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="topic" value="', $context['current_topic'], '" />
-						<input type="hidden" name="move" value="', $context['move'], '" />
-						<input type="hidden" name="goback" value="', $context['go_back'], '" />
-					</div>
-				</div>
-				<span class="botslice"><span></span></span>
-			</div>
-		</form>
-	</div>
-	<br />';
-}
-
-function template_announcement_send()
-{
-	global $context, $settings, $options, $txt, $scripturl;
-
-	echo '
-	<div id="announcement">
-		<form action="' . $scripturl . '?action=announce;sa=send" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit">
-			<div class="windowbg2">
-				<span class="topslice"><span></span></span>
-				<div class="content">
-					<p>', $txt['announce_sending'], ' <a href="', $scripturl, '?topic=', $context['current_topic'], '.0" target="_blank" class="new_win">', $context['topic_subject'], '</a></p>
-					<div class="progress_bar">
-						<div class="full_bar">', $context['percentage_done'], '% ', $txt['announce_done'], '</div>
-						<div class="green_percent" style="width: ', $context['percentage_done'], '%;">&nbsp;</div>
-					</div>
-					<hr class="hrcolor" />
-					<div id="confirm_buttons">
-						<input type="submit" name="b" value="', $txt['announce_continue'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="topic" value="', $context['current_topic'], '" />
-						<input type="hidden" name="move" value="', $context['move'], '" />
-						<input type="hidden" name="goback" value="', $context['go_back'], '" />
-						<input type="hidden" name="start" value="', $context['start'], '" />
-						<input type="hidden" name="membergroups" value="', $context['membergroups'], '" />
-					</div>
-				</div>
-				<br class="clear_right" />
-				<span class="botslice"><span></span></span>
-			</div>
-		</form>
-	</div>
-	<br />
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var countdown = 2;
-			doAutoSubmit();
-
-			function doAutoSubmit()
-			{
-				if (countdown == 0)
-					document.forms.autoSubmit.submit();
-				else if (countdown == -1)
-					return;
-
-				document.forms.autoSubmit.b.value = "', $txt['announce_continue'], ' (" + countdown + ")";
-				countdown--;
-
-				setTimeout("doAutoSubmit();", 1000);
-			}
-		// ]]></script>';
-}
-
-?>

+ 0 - 3073
Themes/penguin/Profile.template.php

@@ -1,3073 +0,0 @@
-<?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
- */
-
-// Template for the profile side bar - goes before any other profile template.
-function template_profile_above()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	echo '
-	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/profile.js"></script>';
-
-	// Prevent Chrome from auto completing fields when viewing/editing other members profiles
-	if (isBrowser('is_chrome') && !$context['user']['is_owner'])
-		echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		disableAutoComplete();
-	// ]]></script>';
-
-	// If an error occurred while trying to save previously, give the user a clue!
-	if (!empty($context['post_errors']))
-		echo '
-					', template_error_message();
-
-	// If the profile was update successfully, let the user know this.
-	if (!empty($context['profile_updated']))
-		echo '
-					<div class="infobox">
-						', $context['profile_updated'], '
-					</div>';
-}
-
-// Template for closing off table started in profile_above.
-function template_profile_below()
-{
-}
-
-// This template displays users details without any option to edit them.
-function template_summary()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	// Display the basic information about the user
-	echo '
-<div id="profileview" class="flow_auto">
-	<div class="cat_bar">
-		<h3 class="catbg">
-			<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['summary'], '
-		</h3>
-	</div>
-	<div id="basicinfo">
-		<div class="windowbg">
-			<div class="content flow_auto">
-				<div class="username"><h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>
-				', $context['member']['avatar']['image'], '
-				<ul class="reset">';
-
-	// What about if we allow email only via the forum??
-	if ($context['member']['show_email'] === 'yes' || $context['member']['show_email'] === 'no_through_forum' || $context['member']['show_email'] === 'yes_permission_override')
-		echo '
-					<li><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '" title="', $context['member']['show_email'] == 'yes' || $context['member']['show_email'] == 'yes_permission_override' ? $context['member']['email'] : '', '" rel="nofollow"><img src="', $settings['images_url'], '/email_sm.png" alt="', $txt['email'], '" /></a></li>';
-
-	// Don't show an icon if they haven't specified a website.
-	if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website']))
-		echo '
-					<li><a href="', $context['member']['website']['url'], '" title="' . $context['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.png" alt="' . $context['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';
-
-	// Are there any custom profile fields for the summary?
-	if (!empty($context['custom_fields']))
-	{
-		foreach ($context['custom_fields'] as $field)
-			if (($field['placement'] == 1 || empty($field['output_html'])) && !empty($field['value']))
-				echo '
-					<li class="custom_field">', $field['output_html'], '</li>';
-	}
-
-	echo '
-				', !isset($context['disabled_fields']['icq']) && !empty($context['member']['icq']['link']) ? '<li>' . $context['member']['icq']['link'] . '</li>' : '', '
-				', !isset($context['disabled_fields']['msn']) && !empty($context['member']['msn']['link']) ? '<li>' . $context['member']['msn']['link'] . '</li>' : '', '
-				', !isset($context['disabled_fields']['aim']) && !empty($context['member']['aim']['link']) ? '<li>' . $context['member']['aim']['link'] . '</li>' : '', '
-				', !isset($context['disabled_fields']['yim']) && !empty($context['member']['yim']['link']) ? '<li>' . $context['member']['yim']['link'] . '</li>' : '', '
-			</ul>
-			<span id="userstatus">', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['label'] . '" rel="nofollow">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" align="middle" />' : $context['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '';
-
-	// Can they add this member as a buddy?
-	if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'])
-		echo '
-				<br /><a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>';
-
-	echo '
-				</span>';
-
-	echo '
-				<p id="infolinks">';
-
-	if (!$context['user']['is_owner'] && $context['can_send_pm'])
-		echo '
-					<a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], '">', $txt['profile_sendpm_short'], '</a><br />';
-	echo '
-					<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
-					<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
-				</p>';
-
-	echo '
-			</div>
-		</div>
-	</div>
-	<div id="detailedinfo">
-		<div class="windowbg2">
-			<div class="content">
-				<dl>';
-
-	if ($context['user']['is_owner'] || $context['user']['is_admin'])
-		echo '
-					<dt>', $txt['username'], ': </dt>
-					<dd>', $context['member']['username'], '</dd>';
-
-	if (!isset($context['disabled_fields']['posts']))
-		echo '
-					<dt>', $txt['profile_posts'], ': </dt>
-					<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
-
-	// Only show the email address fully if it's not hidden - and we reveal the email.
-	if ($context['member']['show_email'] == 'yes')
-		echo '
-					<dt>', $txt['email'], ': </dt>
-					<dd><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></dd>';
-
-	// ... Or if the one looking at the profile is an admin they can see it anyway.
-	elseif ($context['member']['show_email'] == 'yes_permission_override')
-		echo '
-					<dt>', $txt['email'], ': </dt>
-					<dd><em><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></em></dd>';
-
-	if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title']))
-		echo '
-					<dt>', $txt['custom_title'], ': </dt>
-					<dd>', $context['member']['title'], '</dd>';
-
-	if (!empty($context['member']['blurb']))
-		echo '
-					<dt>', $txt['personal_text'], ': </dt>
-					<dd>', $context['member']['blurb'], '</dd>';
-
-	// If karma enabled show the members karma.
-	if ($modSettings['karmaMode'] == '1')
-		echo '
-					<dt>', $modSettings['karmaLabel'], ' </dt>
-					<dd>', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '</dd>';
-
-	elseif ($modSettings['karmaMode'] == '2')
-		echo '
-					<dt>', $modSettings['karmaLabel'], ' </dt>
-					<dd>+', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], '</dd>';
-
-	if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
-		echo '
-					<dt>', $txt['gender'], ': </dt>
-					<dd>', $context['member']['gender']['name'], '</dd>';
-
-	echo '
-					<dt>', $txt['age'], ':</dt>
-					<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), '</dd>';
-
-	if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
-		echo '
-					<dt>', $txt['location'], ':</dt>
-					<dd>', $context['member']['location'], '</dd>';
-
-	echo '
-				</dl>';
-
-	// Any custom fields for standard placement?
-	if (!empty($context['custom_fields']))
-	{
-		$shown = false;
-		foreach ($context['custom_fields'] as $field)
-		{
-			if ($field['placement'] != 0 || empty($field['output_html']))
-				continue;
-
-			if (empty($shown))
-			{
-				echo '
-				<dl>';
-				$shown = true;
-			}
-
-			echo '
-					<dt>', $field['name'], ':</dt>
-					<dd>', $field['output_html'], '</dd>';
-		}
-
-		if (!empty($shown))
-			echo '
-				</dl>';
-	}
-
-	echo '
-				<dl class="noborder">';
-
-	// Can they view/issue a warning?
-	if ($context['can_view_warning'] && $context['member']['warning'])
-	{
-		echo '
-					<dt>', $txt['profile_warning_level'], ': </dt>
-					<dd>
-						<a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=', $context['can_issue_warning'] ? 'issuewarning' : 'viewwarning', '">', $context['member']['warning'], '%</a>';
-
-		// Can we provide information on what this means?
-		if (!empty($context['warning_status']))
-			echo '
-						<span class="smalltext">(', $context['warning_status'], ')</span>';
-
-		echo '
-					</dd>';
-	}
-
-	// Is this member requiring activation and/or banned?
-	if (!empty($context['activate_message']) || !empty($context['member']['bans']))
-	{
-
-		// If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves.
-		if (!empty($context['activate_message']))
-			echo '
-					<dt class="clear"><span class="alert">', $context['activate_message'], '</span>&nbsp;(<a href="' . $scripturl . '?action=profile;save;area=activateaccount;u=' . $context['id_member'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '"', ($context['activate_type'] == 4 ? ' onclick="return confirm(\'' . $txt['profileConfirm'] . '\');"' : ''), '>', $context['activate_link_text'], '</a>)</dt>';
-
-		// If the current member is banned, show a message and possibly a link to the ban.
-		if (!empty($context['member']['bans']))
-		{
-			echo '
-					<dt class="clear"><span class="alert">', $txt['user_is_banned'], '</span>&nbsp;[<a href="#" onclick="document.getElementById(\'ban_info\').style.display = document.getElementById(\'ban_info\').style.display == \'none\' ? \'\' : \'none\';return false;">' . $txt['view_ban'] . '</a>]</dt>
-					<dt class="clear" id="ban_info" style="display: none;">
-						<strong>', $txt['user_banned_by_following'], ':</strong>';
-
-			foreach ($context['member']['bans'] as $ban)
-				echo '
-						<br /><span class="smalltext">', $ban['explanation'], '</span>';
-
-			echo '
-					</dt>';
-		}
-	}
-
-	echo '
-					<dt>', $txt['date_registered'], ': </dt>
-					<dd>', $context['member']['registered'], '</dd>';
-
-	// If the person looking is allowed, they can check the members IP address and hostname.
-	if ($context['can_see_ip'])
-	{
-		if (!empty($context['member']['ip']))
-		echo '
-					<dt>', $txt['ip'], ': </dt>
-					<dd><a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['member']['ip'], ';u=', $context['member']['id'], '">', $context['member']['ip'], '</a></dd>';
-
-		if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip']))
-			echo '
-					<dt>', $txt['hostname'], ': </dt>
-					<dd>', $context['member']['hostname'], '</dd>';
-	}
-
-	echo '
-					<dt>', $txt['local_time'], ':</dt>
-					<dd>', $context['member']['local_time'], '</dd>';
-
-	if (!empty($modSettings['userLanguage']) && !empty($context['member']['language']))
-		echo '
-					<dt>', $txt['language'], ':</dt>
-					<dd>', $context['member']['language'], '</dd>';
-
-	echo '
-					<dt>', $txt['lastLoggedIn'], ': </dt>
-					<dd>', $context['member']['last_login'], '</dd>
-				</dl>';
-
-	// Are there any custom profile fields for the summary?
-	if (!empty($context['custom_fields']))
-	{
-		$shown = false;
-		foreach ($context['custom_fields'] as $field)
-		{
-			if ($field['placement'] != 2 || empty($field['output_html']))
-				continue;
-			if (empty($shown))
-			{
-				$shown = true;
-				echo '
-				<div class="custom_fields_above_signature">
-					<ul class="reset nolist">';
-			}
-			echo '
-						<li>', $field['output_html'], '</li>';
-		}
-		if ($shown)
-				echo '
-					</ul>
-				</div>';
-	}
-
-	// Show the users signature.
-	if ($context['signature_enabled'] && !empty($context['member']['signature']))
-		echo '
-				<div class="signature">
-					<h5>', $txt['signature'], ':</h5>
-					', $context['member']['signature'], '
-				</div>';
-
-	echo '
-			</div>
-		</div>
-	</div>
-<div class="clear"></div>
-</div>';
-}
-
-// Template for showing all the posts of the user, in chronological order.
-function template_showPosts()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	echo '
-		<div class="cat_bar">
-			<h3 class="catbg">
-				', (!isset($context['attachments']) && empty($context['is_topics']) ? $txt['showMessages'] : (!empty($context['is_topics']) ? $txt['showTopics'] : $txt['showAttachments'])), ' - ', $context['member']['name'], '
-			</h3>
-		</div>
-		<div class="pagesection">
-			<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-		</div>';
-
-	// Button shortcuts
-	$quote_button = create_button('quote.png', 'reply_quote', 'quote', 'align="middle"');
-	$reply_button = create_button('reply_sm.png', 'reply', 'reply', 'align="middle"');
-	$remove_button = create_button('delete.png', 'remove_message', 'remove', 'align="middle"');
-	$notify_button = create_button('notify_sm.png', 'notify_replies', 'notify', 'align="middle"');
-
-	// Are we displaying posts or attachments?
-	if (!isset($context['attachments']))
-	{
-		// For every post to be displayed, give it its own div, and show the important details of the post.
-		foreach ($context['posts'] as $post)
-		{
-			echo '
-		<div class="topic">
-			<div class="', $post['alternate'] == 0 ? 'windowbg2' : 'windowbg', ' core_posts">
-				<div class="content">
-					<div class="counter">', $post['counter'], '</div>
-					<div class="topic_details">
-						<h5><strong><a href="', $scripturl, '?board=', $post['board']['id'], '.0">', $post['board']['name'], '</a> / <a href="', $scripturl, '?topic=', $post['topic'], '.', $post['start'], '#msg', $post['id'], '">', $post['subject'], '</a></strong></h5>
-						<span class="smalltext">&#171;&nbsp;<strong>', $txt['on'], ':</strong> ', $post['time'], '&nbsp;&#187;</span>
-					</div>
-					<div class="list_posts">';
-
-			if (!$post['approved'])
-				echo '
-					<div class="approve_post">
-						<em>', $txt['post_awaiting_approval'], '</em>
-					</div>';
-
-			echo '
-					', $post['body'], '
-					</div>
-				</div>';
-
-			if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
-				echo '
-				<div class="floatright">
-					<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'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $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 '
-				<br class="clear" />
-			</div>
-		</div>';
-		}
-	}
-	else
-	{
-		echo '
-		<table border="0" width="100%" cellspacing="1" cellpadding="2" class="table_grid" align="center">
-			<thead>
-				<tr class="titlebg">
-					<th class="first_th lefttext" scope="col" width="25%">
-						<a href="', $scripturl, '?action=profile;u=', $context['current_member'], ';area=showposts;sa=attach;sort=filename', ($context['sort_direction'] == 'down' && $context['sort_order'] == 'filename' ? ';asc' : ''), '">
-							', $txt['show_attach_filename'], '
-							', ($context['sort_order'] == 'filename' ? '<img src="' . $settings['images_url'] . '/sort_' . ($context['sort_direction'] == 'down' ? 'down' : 'up') . '.png" alt="" />' : ''), '
-						</a>
-					</th>
-					<th scope="col" width="12%">
-						<a href="', $scripturl, '?action=profile;u=', $context['current_member'], ';area=showposts;sa=attach;sort=downloads', ($context['sort_direction'] == 'down' && $context['sort_order'] == 'downloads' ? ';asc' : ''), '">
-							', $txt['show_attach_downloads'], '
-							', ($context['sort_order'] == 'downloads' ? '<img src="' . $settings['images_url'] . '/sort_' . ($context['sort_direction'] == 'down' ? 'down' : 'up') . '.png" alt="" />' : ''), '
-						</a>
-					</th>
-					<th class="lefttext" scope="col" width="30%">
-						<a href="', $scripturl, '?action=profile;u=', $context['current_member'], ';area=showposts;sa=attach;sort=subject', ($context['sort_direction'] == 'down' && $context['sort_order'] == 'subject' ? ';asc' : ''), '">
-							', $txt['message'], '
-							', ($context['sort_order'] == 'subject' ? '<img src="' . $settings['images_url'] . '/sort_' . ($context['sort_direction'] == 'down' ? 'down' : 'up') . '.png" alt="" />' : ''), '
-						</a>
-					</th>
-					<th class="last_th lefttext" scope="col">
-						<a href="', $scripturl, '?action=profile;u=', $context['current_member'], ';area=showposts;sa=attach;sort=posted', ($context['sort_direction'] == 'down' && $context['sort_order'] == 'posted' ? ';asc' : ''), '">
-						', $txt['show_attach_posted'], '
-						', ($context['sort_order'] == 'posted' ? '<img src="' . $settings['images_url'] . '/sort_' . ($context['sort_direction'] == 'down' ? 'down' : 'up') . '.png" alt="" />' : ''), '
-						</a>
-					</th>
-				</tr>
-			</thead>
-			<tbody>';
-
-		// Looks like we need to do all the attachments instead!
-		$alternate = false;
-		foreach ($context['attachments'] as $attachment)
-		{
-			echo '
-				<tr class="', $attachment['approved'] ? ($alternate ? 'windowbg' : 'windowbg2') : 'approvebg', '">
-					<td><a href="', $scripturl, '?action=dlattach;topic=', $attachment['topic'], '.0;attach=', $attachment['id'], '">', $attachment['filename'], '</a>', !$attachment['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : '', '</td>
-					<td align="center">', $attachment['downloads'], '</td>
-					<td><a href="', $scripturl, '?topic=', $attachment['topic'], '.msg', $attachment['msg'], '#msg', $attachment['msg'], '" rel="nofollow">', $attachment['subject'], '</a></td>
-					<td>', $attachment['posted'], '</td>
-				</tr>';
-			$alternate = !$alternate;
-		}
-
-	// No posts? Just end the table with a informative message.
-	if ((isset($context['attachments']) && empty($context['attachments'])) || (!isset($context['attachments']) && empty($context['posts'])))
-		echo '
-				<tr>
-					<td class="tborder windowbg2 padding centertext" colspan="4">
-						', isset($context['attachments']) ? $txt['show_attachments_none'] : ($context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none']), '
-					</td>
-				</tr>';
-
-		echo '
-			</tbody>
-		</table>';
-	}
-	// Show more page numbers.
-	echo '
-		<div class="pagesection" style="margin-bottom: 0;">
-			<span>', $txt['pages'], ': ', $context['page_index'], '</span>
-		</div>';
-}
-
-// Template for showing all the buddies of the current user.
-function template_editBuddies()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-	
-	$disabled_fields = isset($modSettings['disabled_profile_fields']) ? array_flip(explode(',', $modSettings['disabled_profile_fields'])) : array();
-	$buddy_fields = array('icq', 'aim', 'yim', 'msn');
-	
-	echo '
-		<div class="title_bar">
-			<h3 class="titlebg">
-				<img src="', $settings['images_url'], '/icons/online.png" alt="" class="icon" />', $txt['editBuddies'], '
-			</h3>
-		</div>
-		<table border="0" width="100%" cellspacing="1" cellpadding="4" class="table_grid" align="center">
-			<tr class="catbg">
-				<th class="first_th" scope="col" width="20%">', $txt['name'], '</th>
-				<th scope="col">', $txt['status'], '</th>
-				<th scope="col">', $txt['email'], '</th>';
-	
-	// don't show them if they are sdisabled
-	foreach ($buddy_fields as $key => $column)
-	{
-		if (!isset($disabled_fields[$column]))
-			echo '
-				<th scope="col">', $txt[$column], '</th>';
-	}
-
-	echo '
-				<th class="last_th" scope="col"></th>
-			</tr>';
-
-	// If they don't have any buddies don't list them!
-	if (empty($context['buddies']))
-		echo '
-			<tr class="windowbg2">
-				<td colspan="8" align="center"><strong>', $txt['no_buddies'], '</strong></td>
-			</tr>';
-
-	// Now loop through each buddy showing info on each.
-	$alternate = false;
-	foreach ($context['buddies'] as $buddy)
-	{
-		echo '
-			<tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
-				<td>', $buddy['link'], '</td>
-				<td align="center"><a href="', $buddy['online']['href'], '"><img src="', $buddy['online']['image_href'], '" alt="', $buddy['online']['label'], '" title="', $buddy['online']['label'], '" /></a></td>
-				<td align="center">', ($buddy['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $buddy['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $buddy['name'] . '" /></a>'), '</td>';
-		
-		// If these are off, don't show them
-		foreach ($buddy_fields as $key => $column)
-		{
-			if (!isset($disabled_fields[$column]))
-				echo '
-					<td align="center">', $buddy[$column]['link'], '</td>';
-		}
-		
-		echo '
-				<td align="center"><a href="', $scripturl, '?action=profile;area=lists;sa=buddies;u=', $context['id_member'], ';remove=', $buddy['id'], ';', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/icons/delete.png" alt="', $txt['buddy_remove'], '" title="', $txt['buddy_remove'], '" /></a></td>
-			</tr>';
-
-		$alternate = !$alternate;
-	}
-
-	echo '
-		</table>';
-
-	// Add a new buddy?
-	echo '
-	<br />
-	<form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=buddies" method="post" accept-charset="', $context['character_set'], '">
-		<div class="tborder add_buddy">
-			<div class="title_bar">
-				<h3 class="titlebg">', $txt['buddy_add'], '</h3>
-			</div>
-			<div class="roundframe padding">
-				<dl class="settings">
-					<dt>
-						<label for="new_buddy"><strong>', $txt['who_member'], ':</strong></label>
-					</dt>
-					<dd>
-						<input type="text" name="new_buddy" id="new_buddy" size="30" class="input_text" />
-					</dd>
-				</dl>';
-					
-	if (!empty($context['token_check']))
-		echo '
-				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-	echo '
-				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				<input type="submit" value="', $txt['buddy_add_button'], '" class="button_submit" />
-				<br class="clear_right" />
-			</div>
-		</div>
-	</form>
-	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?fin20"></script>
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var oAddBuddySuggest = new smc_AutoSuggest({
-			sSelf: \'oAddBuddySuggest\',
-			sSessionId: smf_session_id,
-			sSessionVar: smf_session_var,
-			sSuggestId: \'new_buddy\',
-			sControlId: \'new_buddy\',
-			sSearchType: \'member\',
-			sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
-			bItemList: false
-		});
-	// ]]></script>';
-}
-
-// Template for showing the ignore list of the current user.
-function template_editIgnoreList()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	echo '
-		<div class="title_bar">
-			<h3 class="titlebg">
-				<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['editIgnoreList'], '
-			</h3>
-		</div>
-		<table border="0" width="100%" cellspacing="1" cellpadding="4" class="table_grid" align="center">
-			<tr class="catbg">
-				<th class="first_th" scope="col" width="20%">', $txt['name'], '</th>
-				<th scope="col">', $txt['status'], '</th>
-				<th scope="col">', $txt['email'], '</th>
-				<th scope="col">', $txt['icq'], '</th>
-				<th scope="col">', $txt['aim'], '</th>
-				<th scope="col">', $txt['yim'], '</th>
-				<th scope="col">', $txt['msn'], '</th>
-				<th class="last_th" scope="col"></th>
-			</tr>';
-
-	// If they don't have anyone on their ignore list, don't list it!
-	if (empty($context['ignore_list']))
-		echo '
-			<tr class="windowbg2">
-				<td colspan="8" align="center"><strong>', $txt['no_ignore'], '</strong></td>
-			</tr>';
-
-	// Now loop through each buddy showing info on each.
-	$alternate = false;
-	foreach ($context['ignore_list'] as $member)
-	{
-		echo '
-			<tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
-				<td>', $member['link'], '</td>
-				<td align="center"><a href="', $member['online']['href'], '"><img src="', $member['online']['image_href'], '" alt="', $member['online']['label'], '" title="', $member['online']['label'], '" /></a></td>
-				<td align="center">', ($member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $member['name'] . '" /></a>'), '</td>
-				<td align="center">', $member['icq']['link'], '</td>
-				<td align="center">', $member['aim']['link'], '</td>
-				<td align="center">', $member['yim']['link'], '</td>
-				<td align="center">', $member['msn']['link'], '</td>
-				<td align="center"><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=ignore;remove=', $member['id'], ';', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/icons/delete.png" alt="', $txt['ignore_remove'], '" title="', $txt['ignore_remove'], '" /></a></td>
-			</tr>';
-
-		$alternate = !$alternate;
-	}
-
-	echo '
-		</table>';
-
-	// Add to the ignore list?
-	echo '
-	<br />
-	<form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=ignore" method="post" accept-charset="', $context['character_set'], '">
-		<div class="tborder add_buddy">
-			<div class="title_bar">
-				<h3 class="titlebg">', $txt['ignore_add'], '</h3>
-			</div>
-			<div class="roundframe">
-				<dl class="settings">
-					<dt>
-						<label for="new_buddy"><strong>', $txt['who_member'], ':</strong></label>
-					</dt>
-					<dd>
-						<input type="text" name="new_ignore" id="new_ignore" size="25" class="input_text" />
-					</dd>
-				</dl>';
-
-	if (!empty($context['token_check']))
-		echo '
-				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-	echo '
-				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				<input type="submit" value="', $txt['ignore_add_button'], '" class="button_submit" />
-				<br class="clear_right" />
-			</div>
-		</div>
-	</form>
-	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?fin20"></script>
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var oAddIgnoreSuggest = new smc_AutoSuggest({
-			sSelf: \'oAddIgnoreSuggest\',
-			sSessionId: \'', $context['session_id'], '\',
-			sSessionVar: \'', $context['session_var'], '\',
-			sSuggestId: \'new_ignore\',
-			sControlId: \'new_ignore\',
-			sSearchType: \'member\',
-			sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
-			bItemList: false
-		});
-	// ]]></script>';
-}
-
-// This template shows an admin information on a users IP addresses used and errors attributed to them.
-function template_trackActivity()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	// The first table shows IP information about the user.
-	echo '
-			<div class="title_bar">
-				<h3 class="titlebg"><strong>', $txt['view_ips_by'], ' ', $context['member']['name'], '</strong></h3>
-			</div>';
-
-	// The last IP the user used.
-	echo '
-			<div id="tracking" class="windowbg2">
-				<div class="content">
-					<dl class="noborder">
-						<dt>', $txt['most_recent_ip'], ':
-							', (empty($context['last_ip2']) ? '' : '<br />
-							<span class="smalltext">(<a href="' . $scripturl . '?action=helpadmin;help=whytwoip" onclick="return reqWin(this.href);">' . $txt['why_two_ip_address'] . '</a>)</span>'), '
-						</dt>
-						<dd>
-							<a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['last_ip'], ';u=', $context['member']['id'], '">', $context['last_ip'], '</a>';
-
-	// Second address detected?
-	if (!empty($context['last_ip2']))
-		echo '
-							, <a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['last_ip2'], ';u=', $context['member']['id'], '">', $context['last_ip2'], '</a>';
-
-	echo '
-						</dd>';
-
-	// Lists of IP addresses used in messages / error messages.
-	echo '
-						<dt>', $txt['ips_in_messages'], ':</dt>
-						<dd>
-							', (count($context['ips']) > 0 ? implode(', ', $context['ips']) : '(' . $txt['none'] . ')'), '
-						</dd>
-						<dt>', $txt['ips_in_errors'], ':</dt>
-						<dd>
-							', (count($context['ips']) > 0 ? implode(', ', $context['error_ips']) : '(' . $txt['none'] . ')'), '
-						</dd>';
-
-	// List any members that have used the same IP addresses as the current member.
-	echo '
-						<dt>', $txt['members_in_range'], ':</dt>
-						<dd>
-							', (count($context['members_in_range']) > 0 ? implode(', ', $context['members_in_range']) : '(' . $txt['none'] . ')'), '
-						</dd>
-					</dl>
-				</div>
-			</div>
-			<br class="clear" />';
-
-	// Show the track user list.
-	template_show_list('track_user_list');
-}
-
-// The template for trackIP, allowing the admin to see where/who a certain IP has been used.
-function template_trackIP()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	// This function always defaults to the last IP used by a member but can be set to track any IP.
-	// The first table in the template gives an input box to allow the admin to enter another IP to track.
-	echo '
-	<div class="tborder">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['trackIP'], '</h3>
-		</div>
-		<div class="roundframe">
-			<form action="', $context['base_url'], '" method="post" accept-charset="', $context['character_set'], '">
-				<dl class="settings">
-					<dt>
-						<label for="searchip"><strong>', $txt['enter_ip'], ':</strong></label>
-					</dt>
-					<dd>					
-						<input type="text" name="searchip" value="', $context['ip'], '" class="input_text" />
-					</dd>
-				</dl>
-				<input type="submit" value="', $txt['trackIP'], '" class="button_submit" />
-				<br class="clear_right" />
-			</form>
-		</div>
-	</div>
-	<br class="clear" />';
-
-	// The table inbetween the first and second table shows links to the whois server for every region.
-	if ($context['single_ip'])
-	{
-		echo '
-			<div class="title_bar">
-				<h3 class="titlebg">', $txt['whois_title'], ' ', $context['ip'], '</h3>
-			</div>
-			<div class="windowbg2">
-				<div class="padding">';
-			foreach ($context['whois_servers'] as $server)
-				echo '
-					<a href="', $server['url'], '" target="_blank" class="new_win"', isset($context['auto_whois_server']) && $context['auto_whois_server']['name'] == $server['name'] ? ' style="font-weight: bold;"' : '', '>', $server['name'], '</a><br />';
-			echo '
-				</div>
-			</div>
-		<br class="clear" />';
-	}
-
-	// The second table lists all the members who have been logged as using this IP address.
-	echo '
-		<div class="title_bar">
-			<h3 class="titlebg">', $txt['members_from_ip'], ' ', $context['ip'], '</h3>
-		</div>';
-	if (empty($context['ips']))
-		echo '
-		<p class="windowbg2 description"><em>', $txt['no_members_from_ip'], '</em></p>';
-	else
-	{
-		echo '
-		<table class="table_grid" cellspacing="0" width="100%">
-			<thead>
-				<tr class="catbg">
-					<th class="first_th" scope="col">', $txt['ip_address'], '</th>
-					<th class="last_th" scope="col">', $txt['display_name'], '</th>
-				</tr>
-			</thead>
-			<tbody>';
-
-		// Loop through each of the members and display them.
-		foreach ($context['ips'] as $ip => $memberlist)
-			echo '
-				<tr>
-					<td class="windowbg2"><a href="', $context['base_url'], ';searchip=', $ip, '">', $ip, '</a></td>
-					<td class="windowbg2">', implode(', ', $memberlist), '</td>
-				</tr>';
-
-		echo '
-			</tbody>
-		</table>
-		<br />';
-	}
-
-	template_show_list('track_message_list');
-
-	echo '<br />';
-
-	template_show_list('track_user_list');
-}
-
-function template_showPermissions()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['showPermissions'], '
-			</h3>
-		</div>';
-
-	if ($context['member']['has_all_permissions'])
-	{
-		echo '
-		<p class="windowbg description">', $txt['showPermissions_all'], '</p>';
-	}
-	else
-	{
-		echo '
-		<p class="description">',$txt['showPermissions_help'],'</p>
-		<div id="permissions" class="flow_hidden">';
-
-		if (!empty($context['no_access_boards']))
-		{
-			echo '
-				<div class="cat_bar">
-					<h3 class="catbg">', $txt['showPermissions_restricted_boards'], '</h3>
-				</div>
-				<div class="windowbg smalltext">
-					<span class="topslice"><span></span></span>
-					<div class="content">', $txt['showPermissions_restricted_boards_desc'], ':<br />';
-				foreach ($context['no_access_boards'] as $no_access_board)
-					echo '
-						<a href="', $scripturl, '?board=', $no_access_board['id'], '.0">', $no_access_board['name'], '</a>', $no_access_board['is_last'] ? '' : ', ';
-				echo '
-					</div>
-				</div>';
-		}
-
-		// General Permissions section.
-		echo '
-				<div class="tborder">
-					<div class="cat_bar">
-						<h3 class="catbg">', $txt['showPermissions_general'], '</h3>
-					</div>';
-		if (!empty($context['member']['permissions']['general']))
-		{
-			echo '
-					<table class="table_grid" width="100%" cellspacing="0">
-						<thead>
-							<tr class="titlebg">
-								<th class="lefttext first_th" scope="col" width="50%">', $txt['showPermissions_permission'], '</th>
-								<th class="lefttext last_th" scope="col" width="50%">', $txt['showPermissions_status'], '</th>
-							</tr>
-						</thead>
-						<tbody>';
-
-			foreach ($context['member']['permissions']['general'] as $permission)
-			{
-				echo '
-							<tr>
-								<td class="windowbg" title="', $permission['id'], '">
-									', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
-								</td>
-								<td class="windowbg2 smalltext">';
-
-				if ($permission['is_denied'])
-					echo '
-									<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']),'</span>';
-				else
-					echo '
-									', $txt['showPermissions_given'], ':&nbsp;', implode(', ', $permission['groups']['allowed']);
-
-					echo '
-								</td>
-							</tr>';
-			}
-			echo '
-						</tbody>
-					</table>
-				</div><br />';
-		}
-		else
-			echo '
-			<p class="windowbg2 description">', $txt['showPermissions_none_general'], '</p>';
-
-		// Board permission section.
-		echo '
-			<div class="tborder">
-				<form action="' . $scripturl . '?action=profile;u=', $context['id_member'], ';area=permissions#board_permissions" method="post" accept-charset="', $context['character_set'], '">
-					<div class="cat_bar">
-						<h3 class="catbg">
-							<a id="board_permissions"></a>', $txt['showPermissions_select'], ':
-							<select name="board" onchange="if (this.options[this.selectedIndex].value) this.form.submit();">
-								<option value="0"', $context['board'] == 0 ? ' selected="selected"' : '', '>', $txt['showPermissions_global'], '&nbsp;</option>';
-				if (!empty($context['boards']))
-					echo '
-								<option value="" disabled="disabled">---------------------------</option>';
-
-				// Fill the box with any local permission boards.
-				foreach ($context['boards'] as $board)
-					echo '
-								<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>';
-
-				echo '
-							</select>
-						</h3>
-					</div>
-				</form>';
-		if (!empty($context['member']['permissions']['board']))
-		{
-			echo '
-				<table class="table_grid" width="100%" cellspacing="0">
-					<thead>
-						<tr class="titlebg">
-							<th class="lefttext first_th" scope="col" width="50%">', $txt['showPermissions_permission'], '</th>
-							<th class="lefttext last_th" scope="col" width="50%">', $txt['showPermissions_status'], '</th>
-						</tr>
-					</thead>
-					<tbody>';
-			foreach ($context['member']['permissions']['board'] as $permission)
-			{
-				echo '
-						<tr>
-							<td class="windowbg" title="', $permission['id'], '">
-								', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
-							</td>
-							<td class="windowbg2 smalltext">';
-
-				if ($permission['is_denied'])
-				{
-					echo '
-								<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']), '</span>';
-				}
-				else
-				{
-					echo '
-								', $txt['showPermissions_given'], ': &nbsp;', implode(', ', $permission['groups']['allowed']);
-				}
-				echo '
-							</td>
-						</tr>';
-			}
-			echo '
-					</tbody>
-				</table>';
-		}
-		else
-			echo '
-			<p class="windowbg2 description">', $txt['showPermissions_none_board'], '</p>';
-	echo '
-			</div>
-		</div>';
-	}
-}
-
-// Template for user statistics, showing graphs and the like.
-function template_statPanel()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	// First, show a few text statistics such as post/topic count.
-	echo '
-	<div id="profileview">
-		<div id="generalstats">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/stats_info.png" alt="" class="icon" />
-					', $txt['statPanel_generalStats'], ' - ', $context['member']['name'], '
-				</h3>
-			</div>
-			<div class="windowbg2">
-				<div class="content">
-					<dl>
-						<dt>', $txt['statPanel_total_time_online'], ':</dt>
-						<dd>', $context['time_logged_in'], '</dd>
-						<dt>', $txt['statPanel_total_posts'], ':</dt>
-						<dd>', $context['num_posts'], ' ', $txt['statPanel_posts'], '</dd>
-						<dt>', $txt['statPanel_total_topics'], ':</dt>
-						<dd>', $context['num_topics'], ' ', $txt['statPanel_topics'], '</dd>
-						<dt>', $txt['statPanel_users_polls'], ':</dt>
-						<dd>', $context['num_polls'], ' ', $txt['statPanel_polls'], '</dd>
-						<dt>', $txt['statPanel_users_votes'], ':</dt>
-						<dd>', $context['num_votes'], ' ', $txt['statPanel_votes'], '</dd>
-					</dl>
-				</div>
-			</div>
-		</div>
-		<br class="clear" />';
-
-	// This next section draws a graph showing what times of day they post the most.
-	echo '
-		<div id="activitytime" class="flow_hidden">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/stats_history.png" alt="" class="icon" />', $txt['statPanel_activityTime'], '
-				</h3>
-			</div>
-			<div class="windowbg2">
-				<div class="content">';
-
-	// If they haven't post at all, don't draw the graph.
-	if (empty($context['posts_by_time']))
-		echo '
-					<span class="centertext">', $txt['statPanel_noPosts'], '</span>';
-	// Otherwise do!
-	else
-	{
-		echo '
-					<ul class="activity_stats flow_hidden">';
-
-		// The labels.
-		foreach ($context['posts_by_time'] as $time_of_day)
-		{
-			echo '
-						<li', $time_of_day['is_last'] ? ' class="last"' : '', '>
-							<div class="bar" style="padding-top: ', ((int) (100 - $time_of_day['relative_percent'])), 'px;" title="', sprintf($txt['statPanel_activityTime_posts'], $time_of_day['posts'], $time_of_day['posts_percent']), '">
-								<div style="height: ', (int) $time_of_day['relative_percent'], 'px;">
-									<span>', sprintf($txt['statPanel_activityTime_posts'], $time_of_day['posts'], $time_of_day['posts_percent']), '</span>
-								</div>
-							</div>
-							<span class="stats_hour">', $time_of_day['hour_format'], '</span>
-						</li>';
-		}
-
-		echo '
-
-					</ul>';
-	}
-
-	echo '
-					<span class="clear" />
-				</div>
-			</div>
-		</div>';
-
-	// Two columns with the most popular boards by posts and activity (activity = users posts / total posts).
-	echo '
-		<div class="flow_hidden">
-			<div id="popularposts">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<img src="', $settings['images_url'], '/stats_replies.png" alt="" class="icon" />', $txt['statPanel_topBoards'], '
-					</h3>
-				</div>
-				<div class="windowbg2">
-					<div class="content">';
-
-	if (empty($context['popular_boards']))
-		echo '
-						<span class="centertext">', $txt['statPanel_noPosts'], '</span>';
-
-	else
-	{
-		echo '
-						<dl>';
-
-		// Draw a bar for every board.
-		foreach ($context['popular_boards'] as $board)
-		{
-			echo '
-							<dt>', $board['link'], '</dt>
-							<dd>
-								<div class="profile_pie" style="background-position: -', ((int) ($board['posts_percent'] / 5) * 20), 'px 0;" title="', sprintf($txt['statPanel_topBoards_memberposts'], $board['posts'], $board['total_posts_member'], $board['posts_percent']), '">
-									', sprintf($txt['statPanel_topBoards_memberposts'], $board['posts'], $board['total_posts_member'], $board['posts_percent']), '
-								</div>
-								<span>', empty($context['hide_num_posts']) ? $board['posts'] : '', '</span>
-							</dd>';
-		}
-
-		echo '
-						</dl>';
-	}
-	echo '
-					</div>
-				</div>
-			</div>';
-	echo '
-			<div id="popularactivity">
-				<div class="cat_bar">
-					<h3 class="catbg">
-						<img src="', $settings['images_url'], '/stats_replies.png" alt="" class="icon" />', $txt['statPanel_topBoardsActivity'], '
-					</h3>
-				</div>
-				<div class="windowbg2">
-					<div class="content">';
-
-	if (empty($context['board_activity']))
-		echo '
-						<span>', $txt['statPanel_noPosts'], '</span>';
-	else
-	{
-		echo '
-						<dl>';
-
-		// Draw a bar for every board.
-		foreach ($context['board_activity'] as $activity)
-		{
-			echo '
-							<dt>', $activity['link'], '</dt>
-							<dd>
-								<div class="profile_pie" style="background-position: -', ((int) ($activity['percent'] / 5) * 20), 'px 0;" title="', sprintf($txt['statPanel_topBoards_posts'], $activity['posts'], $activity['total_posts'], $activity['posts_percent']), '">
-									', sprintf($txt['statPanel_topBoards_posts'], $activity['posts'], $activity['total_posts'], $activity['posts_percent']), '
-								</div>
-								<span>', $activity['percent'], '%</span>
-							</dd>';
-		}
-
-		echo '
-						</dl>';
-	}
-	echo '
-					</div>
-				</div>
-			</div>
-		</div>';
-
-	echo '
-	</div>
-	<br class="clear" />';
-}
-
-// Template for editing profile options.
-function template_edit_options()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	// The main header!
-	echo '
-		<form action="', (!empty($context['profile_custom_submit_url']) ? $context['profile_custom_submit_url'] : $scripturl . '?action=profile;area=' . $context['menu_item_selected'] . ';u=' . $context['id_member'] . ';save'), '" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator" enctype="multipart/form-data" onsubmit="return checkProfileSubmit();">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />';
-
-		// Don't say "Profile" if this isn't the profile...
-		if (!empty($context['profile_header_text']))
-			echo '
-					', $context['profile_header_text'];
-		else
-			echo '
-					', $txt['profile'];
-
-		echo '
-				</h3>
-			</div>';
-
-	// Have we some description?
-	if ($context['page_desc'])
-		echo '
-			<p class="windowbg description">', $context['page_desc'], '</p>';
-
-	echo '
-			<div class="windowbg2">
-				<div class="content">';
-
-	// Any bits at the start?
-	if (!empty($context['profile_prehtml']))
-		echo '
-					<div>', $context['profile_prehtml'], '</div>';
-
-	if (!empty($context['profile_fields']))
-		echo '
-					<dl>';
-
-	// Start the big old loop 'of love.
-	$lastItem = 'hr';
-	foreach ($context['profile_fields'] as $key => $field)
-	{
-		// We add a little hack to be sure we never get more than one hr in a row!
-		if ($lastItem == 'hr' && $field['type'] == 'hr')
-			continue;
-
-		$lastItem = $field['type'];
-		if ($field['type'] == 'hr')
-		{
-			echo '
-					</dl>
-					<hr width="100%" size="1" class="hrcolor clear" />
-					<dl>';
-		}
-		elseif ($field['type'] == 'callback')
-		{
-			if (isset($field['callback_func']) && function_exists('template_profile_' . $field['callback_func']))
-			{
-				$callback_func = 'template_profile_' . $field['callback_func'];
-				$callback_func();
-			}
-		}
-		else
-		{
-			echo '
-						<dt>
-							<strong', !empty($field['is_error']) ? ' class="error"' : '', '>', $field['type'] !== 'label' ? '<label for="' . $key . '">' : '', $field['label'], $field['type'] !== 'label' ? '</label>' : '', '</strong>';
-
-			// Does it have any subtext to show?
-			if (!empty($field['subtext']))
-				echo '
-							<br />
-							<span class="smalltext">', $field['subtext'], '</span>';
-
-			echo '
-						</dt>
-						<dd>';
-
-			// Want to put something infront of the box?
-			if (!empty($field['preinput']))
-				echo '
-							', $field['preinput'];
-
-			// What type of data are we showing?
-			if ($field['type'] == 'label')
-				echo '
-							', $field['value'];
-
-			// Maybe it's a text box - very likely!
-			elseif (in_array($field['type'], array('int', 'float', 'text', 'password')))
-				echo '
-							<input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '" />';
-
-			// You "checking" me out? ;)
-			elseif ($field['type'] == 'check')
-				echo '
-							<input type="hidden" name="', $key, '" value="0" /><input type="checkbox" name="', $key, '" id="', $key, '" ', !empty($field['value']) ? ' checked="checked"' : '', ' value="1" class="input_check" ', $field['input_attr'], ' />';
-
-			// Always fun - select boxes!
-			elseif ($field['type'] == 'select')
-			{
-				echo '
-							<select name="', $key, '" id="', $key, '">';
-
-				if (isset($field['options']))
-				{
-					// Is this some code to generate the options?
-					if (!is_array($field['options']))
-						$field['options'] = eval($field['options']);
-					// Assuming we now have some!
-					if (is_array($field['options']))
-						foreach ($field['options'] as $value => $name)
-							echo '
-								<option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
-				}
-
-				echo '
-							</select>';
-			}
-
-			// Something to end with?
-			if (!empty($field['postinput']))
-				echo '
-							', $field['postinput'];
-
-			echo '
-						</dd>';
-		}
-	}
-
-	if (!empty($context['profile_fields']))
-		echo '
-					</dl>';
-
-	// Are there any custom profile fields - if so print them!
-	if (!empty($context['custom_fields']))
-	{
-		if ($lastItem != 'hr')
-			echo '
-					<hr width="100%" size="1" class="hrcolor clear" />';
-
-		echo '
-					<dl>';
-
-		foreach ($context['custom_fields'] as $field)
-		{
-			echo '
-						<dt>
-							<strong>', $field['name'], ': </strong><br />
-							<span class="smalltext">', $field['desc'], '</span>
-						</dt>
-						<dd>
-							', $field['input_html'], '
-						</dd>';
-		}
-
-		echo '
-					</dl>';
-
-	}
-
-	// Any closing HTML?
-	if (!empty($context['profile_posthtml']))
-		echo '
-					<div>', $context['profile_posthtml'], '</div>';
-
-	// Only show the password box if it's actually needed.
-	if ($context['require_password'])
-		echo '
-					<dl>
-						<dt>
-							<strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '><label for="oldpasswrd">', $txt['current_password'], ': </label></strong><br />
-							<span class="smalltext">', $txt['required_security_reasons'], '</span>
-						</dt>
-						<dd>
-							<input type="password" name="oldpasswrd" id="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password" />
-						</dd>
-					</dl>';
-
-	echo '
-					<hr class="hrcolor" />';
-
-	// The button shouldn't say "Change profile" unless we're changing the profile...
-	if (!empty($context['submit_button_text']))
-		echo '
-					<input type="submit" value="', $context['submit_button_text'], '" class="button_submit" />';
-	else
-		echo '
-					<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />';
-
-	if (!empty($context['token_check']))
-		echo '
-					<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-	echo '
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="u" value="', $context['id_member'], '" />
-					<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-					<br class="clear_right" />
-				</div>
-			</div>
-			<br />
-		</form>';
-
-	// Some javascript!
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			function checkProfileSubmit()
-			{';
-
-	// If this part requires a password, make sure to give a warning.
-	if ($context['require_password'])
-		echo '
-				// Did you forget to type your password?
-				if (document.forms.creator.oldpasswrd.value == "")
-				{
-					alert("', $txt['required_security_reasons'], '");
-					return false;
-				}';
-
-	// Any onsubmit javascript?
-	if (!empty($context['profile_onsubmit_javascript']))
-		echo '
-				', $context['profile_javascript'];
-
-	echo '
-			}';
-
-	// Any totally custom stuff?
-	if (!empty($context['profile_javascript']))
-		echo '
-			', $context['profile_javascript'];
-
-	echo '
-		// ]]></script>';
-
-	// Any final spellchecking stuff?
-	if (!empty($context['show_spellchecking']))
-		echo '
-		<form name="spell_form" id="spell_form" method="post" accept-charset="', $context['character_set'], '" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spellstring" value="" /></form>';
-}
-
-// Personal Message settings.
-function template_profile_pm_settings()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	echo '
-								<dt>
-									<label for="pm_prefs">', $txt['pm_display_mode'], ':</label>
-								</dt>
-								<dd>
-									<select name="pm_prefs" id="pm_prefs" onchange="if (this.value == 2 &amp;&amp; !document.getElementById(\'copy_to_outbox\').checked) alert(\'', $txt['pm_recommend_enable_outbox'], '\');">
-										<option value="0"', $context['display_mode'] == 0 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_all'], '</option>
-										<option value="1"', $context['display_mode'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_one'], '</option>
-										<option value="2"', $context['display_mode'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_linked'], '</option>
-									</select>
-								</dd>
-								<dt>
-									<label for="view_newest_pm_first">', $txt['recent_pms_at_top'], '</label>
-								</dt>
-								<dd>
-										<input type="hidden" name="default_options[view_newest_pm_first]" value="0" />
-										<input type="checkbox" name="default_options[view_newest_pm_first]" id="view_newest_pm_first" value="1"', !empty($context['member']['options']['view_newest_pm_first']) ? ' checked="checked"' : '', ' class="input_check" />
-								</dd>
-						</dl>
-						<hr />
-						<dl>
-								<dt>
-										<label for="pm_receive_from">', $txt['pm_receive_from'], '</label>
-								</dt>
-								<dd>
-										<select name="pm_receive_from" id="pm_receive_from">
-												<option value="0"', empty($context['receive_from']) || (empty($modSettings['enable_buddylist']) && $context['receive_from'] < 3) ? ' selected="selected"' : '', '>', $txt['pm_receive_from_everyone'], '</option>';
-
-	if (!empty($modSettings['enable_buddylist']))
-		echo '
-												<option value="1"', !empty($context['receive_from']) && $context['receive_from'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_ignore'], '</option>
-												<option value="2"', !empty($context['receive_from']) && $context['receive_from'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_buddies'], '</option>';
-
-	echo '
-												<option value="3"', !empty($context['receive_from']) && $context['receive_from'] > 2 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_admins'], '</option>
-										</select>
-								</dd>
-								<dt>
-										<label for="pm_email_notify">', $txt['email_notify'], '</label>
-								</dt>
-								<dd>
-										<select name="pm_email_notify" id="pm_email_notify">
-												<option value="0"', empty($context['send_email']) ? ' selected="selected"' : '', '>', $txt['email_notify_never'], '</option>
-												<option value="1"', !empty($context['send_email']) && ($context['send_email'] == 1 || (empty($modSettings['enable_buddylist']) && $context['send_email'] > 1)) ? ' selected="selected"' : '', '>', $txt['email_notify_always'], '</option>';
-
-	if (!empty($modSettings['enable_buddylist']))
-		echo '
-												<option value="2"', !empty($context['send_email']) && $context['send_email'] > 1 ? ' selected="selected"' : '', '>', $txt['email_notify_buddies'], '</option>';
-
-	echo '
-										</select>
-								</dd>
-								<dt>
-										<label for="popup_messages">', $txt['popup_messages'], '</label>
-								</dt>
-								<dd>
-										<input type="hidden" name="default_options[popup_messages]" value="0" />
-										<input type="checkbox" name="default_options[popup_messages]" id="popup_messages" value="1"', !empty($context['member']['options']['popup_messages']) ? ' checked="checked"' : '', ' class="input_check" />
-								</dd>
-						</dl>
-						<hr />
-						<dl>
-								<dt>
-										<label for="copy_to_outbox"> ', $txt['copy_to_outbox'], '</label>
-								</dt>
-								<dd>
-										<input type="hidden" name="default_options[copy_to_outbox]" value="0" />
-										<input type="checkbox" name="default_options[copy_to_outbox]" id="copy_to_outbox" value="1"', !empty($context['member']['options']['copy_to_outbox']) ? ' checked="checked"' : '', ' class="input_check" />
-								</dd>
-								<dt>
-										<label for="pm_remove_inbox_label">', $txt['pm_remove_inbox_label'], '</label>
-								</dt>
-								<dd>
-										<input type="hidden" name="default_options[pm_remove_inbox_label]" value="0" />
-										<input type="checkbox" name="default_options[pm_remove_inbox_label]" id="pm_remove_inbox_label" value="1"', !empty($context['member']['options']['pm_remove_inbox_label']) ? ' checked="checked"' : '', ' class="input_check" />
-								</dd>';
-
-}
-
-// Template for showing theme settings. Note: template_options() actually adds the theme specific options.
-function template_profile_theme_settings()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	echo '
-							<dt>
-								<label for="show_board_desc">', $txt['board_desc_inside'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[show_board_desc]" value="0" />
-								<input type="checkbox" name="default_options[show_board_desc]" id="show_board_desc" value="1"', !empty($context['member']['options']['show_board_desc']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt>
-								<label for="show_children">', $txt['show_children'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[show_children]" value="0" />
-								<input type="checkbox" name="default_options[show_children]" id="show_children" value="1"', !empty($context['member']['options']['show_children']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt>
-								<label for="use_sidebar_menu">', $txt['use_sidebar_menu'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[use_sidebar_menu]" value="0" />
-								<input type="checkbox" name="default_options[use_sidebar_menu]" id="use_sidebar_menu" value="1"', !empty($context['member']['options']['use_sidebar_menu']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt>
-								<label for="show_no_avatars">', $txt['show_no_avatars'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[show_no_avatars]" value="0" />
-								<input type="checkbox" name="default_options[show_no_avatars]" id="show_no_avatars" value="1"', !empty($context['member']['options']['show_no_avatars']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt>
-								<label for="show_no_signatures">', $txt['show_no_signatures'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[show_no_signatures]" value="0" />
-								<input type="checkbox" name="default_options[show_no_signatures]" id="show_no_signatures" value="1"', !empty($context['member']['options']['show_no_signatures']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>';
-							
-	if ($settings['allow_no_censored'])
-		echo '
-							<dt>
-								<label for="show_no_censored">' . $txt['show_no_censored'] . '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[show_no_censored]" value="0" />
-								<input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked="checked"' : '') . ' class="input_check" />
-							</dd>';
-
-	echo '
-							<dt>
-								<label for="return_to_post">', $txt['return_to_post'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[return_to_post]" value="0" />
-								<input type="checkbox" name="default_options[return_to_post]" id="return_to_post" value="1"', !empty($context['member']['options']['return_to_post']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt>
-								<label for="no_new_reply_warning">', $txt['no_new_reply_warning'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[no_new_reply_warning]" value="0" />
-								<input type="checkbox" name="default_options[no_new_reply_warning]" id="no_new_reply_warning" value="1"', !empty($context['member']['options']['no_new_reply_warning']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>';
-
-	if (!empty($modSettings['enable_buddylist']))
-		echo '
-							<dt>
-								<label for="posts_apply_ignore_list">', $txt['posts_apply_ignore_list'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[posts_apply_ignore_list]" value="0" />
-								<input type="checkbox" name="default_options[posts_apply_ignore_list]" id="posts_apply_ignore_list" value="1"', !empty($context['member']['options']['posts_apply_ignore_list']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>';
-
-	echo '
-							<dt>
-								<label for="view_newest_first">', $txt['recent_posts_at_top'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[view_newest_first]" value="0" />
-								<input type="checkbox" name="default_options[view_newest_first]" id="view_newest_first" value="1"', !empty($context['member']['options']['view_newest_first']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>';
-
-	// Choose WYSIWYG settings?
-	if (empty($modSettings['disable_wysiwyg']))
-		echo '
-							<dt>
-								<label for="wysiwyg_default">', $txt['wysiwyg_default'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[wysiwyg_default]" value="0" />
-								<input type="checkbox" name="default_options[wysiwyg_default]" id="wysiwyg_default" value="1"', !empty($context['member']['options']['wysiwyg_default']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>';
-
-	if (empty($modSettings['disableCustomPerPage']))
-	{
-		echo '
-							<dt>
-								<label for="topics_per_page">', $txt['topics_per_page'], '</label>
-							</dt>
-							<dd>
-								<select name="default_options[topics_per_page]" id="topics_per_page">
-									<option value="0"', empty($context['member']['options']['topics_per_page']) ? ' selected="selected"' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxTopics'], ')</option>
-									<option value="5"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 5 ? ' selected="selected"' : '', '>5</option>
-									<option value="10"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 10 ? ' selected="selected"' : '', '>10</option>
-									<option value="25"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 25 ? ' selected="selected"' : '', '>25</option>
-									<option value="50"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 50 ? ' selected="selected"' : '', '>50</option>
-								</select>
-							</dd>
-							<dt>
-								<label for="messages_per_page">', $txt['messages_per_page'], '</label>
-							</dt>
-							<dd>
-								<select name="default_options[messages_per_page]" id="messages_per_page">
-									<option value="0"', empty($context['member']['options']['messages_per_page']) ? ' selected="selected"' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxMessages'], ')</option>
-									<option value="5"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 5 ? ' selected="selected"' : '', '>5</option>
-									<option value="10"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 10 ? ' selected="selected"' : '', '>10</option>
-									<option value="25"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 25 ? ' selected="selected"' : '', '>25</option>
-									<option value="50"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 50 ? ' selected="selected"' : '', '>50</option>
-								</select>
-							</dd>';
-	}
-
-	if (!empty($modSettings['cal_enabled']))
-		echo '
-							<dt>
-								<label for="calendar_start_day">', $txt['calendar_start_day'], ':</label>
-							</dt>
-							<dd>
-								<select name="default_options[calendar_start_day]" id="calendar_start_day">
-									<option value="0"', empty($context['member']['options']['calendar_start_day']) ? ' selected="selected"' : '', '>', $txt['days'][0], '</option>
-									<option value="1"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 1 ? ' selected="selected"' : '', '>', $txt['days'][1], '</option>
-									<option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected="selected"' : '', '>', $txt['days'][6], '</option>
-								</select>
-							</dd>';
-
-	echo '
-							<dt>
-								<label for="display_quick_reply">', $txt['display_quick_reply'], '</label>
-							</dt>
-							<dd>
-								<select name="default_options[display_quick_reply]" id="display_quick_reply">
-									<option value="0"', empty($context['member']['options']['display_quick_reply']) ? ' selected="selected"' : '', '>', $txt['display_quick_reply1'], '</option>
-									<option value="1"', !empty($context['member']['options']['display_quick_reply']) && $context['member']['options']['display_quick_reply'] == 1 ? ' selected="selected"' : '', '>', $txt['display_quick_reply2'], '</option>
-									<option value="2"', !empty($context['member']['options']['display_quick_reply']) && $context['member']['options']['display_quick_reply'] == 2 ? ' selected="selected"' : '', '>', $txt['display_quick_reply3'], '</option>
-									<option value="3"', !empty($context['member']['options']['display_quick_reply']) && $context['member']['options']['display_quick_reply'] == 3 ? ' selected="selected"' : '', '>', $txt['display_quick_reply4'], '</option>
-								</select>
-							</dd>
-							<dt>
-								<label for="display_quick_mod">', $txt['display_quick_mod'], '</label>
-							</dt>
-							<dd>
-								<select name="default_options[display_quick_mod]" id="display_quick_mod">
-									<option value="0"', empty($context['member']['options']['display_quick_mod']) ? ' selected="selected"' : '', '>', $txt['display_quick_mod_none'], '</option>
-									<option value="1"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] == 1 ? ' selected="selected"' : '', '>', $txt['display_quick_mod_check'], '</option>
-									<option value="2"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] != 1 ? ' selected="selected"' : '', '>', $txt['display_quick_mod_image'], '</option>
-								</select>
-							</dd>';
-}
-
-function template_notification()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-
-	// The main containing header.
-	echo '
-		<form action="', $scripturl, '?action=profile;area=notification;save" method="post" accept-charset="', $context['character_set'], '" id="notify_options" class="flow_hidden">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['profile'], '
-				</h3>
-			</div>
-			<p class="windowbg description">', $txt['notification_info'], '</p>
-			<div class="windowbg2">
-				<div class="content">
-					<dl class="settings">';
-
-	// Allow notification on announcements to be disabled?
-	if (!empty($modSettings['allow_disableAnnounce']))
-		echo '
-						<dt>
-							<label for="notify_announcements">', $txt['notify_important_email'], '</label>
-						</dt>
-						<dd>
-							<input type="hidden" name="notify_announcements" value="0" />
-							<input type="checkbox" id="notify_announcements" name="notify_announcements"', !empty($context['member']['notify_announcements']) ? ' checked="checked"' : '', ' class="input_check" />
-						</dd>';
-
-	// More notification options.
-	echo '
-						<dt>
-							<label for="auto_notify">', $txt['auto_notify'], '</label>
-						</dt>
-						<dd>
-							<input type="hidden" name="default_options[auto_notify]" value="0" />
-							<input type="checkbox" id="auto_notify" name="default_options[auto_notify]" value="1"', !empty($context['member']['options']['auto_notify']) ? ' checked="checked"' : '', ' class="input_check" />
-						</dd>';
-
-	if (empty($modSettings['disallow_sendBody']))
-		echo '
-						<dt>
-							<label for="notify_send_body">', $txt['notify_send_body'], '</label>
-						</dt>
-						<dd>
-							<input type="hidden" name="notify_send_body" value="0" />
-							<input type="checkbox" id="notify_send_body" name="notify_send_body"', !empty($context['member']['notify_send_body']) ? ' checked="checked"' : '', ' class="input_check" />
-						</dd>';
-
-	echo '
-						<dt>
-							<label for="notify_regularity">', $txt['notify_regularity'], ':</label>
-						</dt>
-						<dd>
-							<select name="notify_regularity" id="notify_regularity">
-								<option value="0"', $context['member']['notify_regularity'] == 0 ? ' selected="selected"' : '', '>', $txt['notify_regularity_instant'], '</option>
-								<option value="1"', $context['member']['notify_regularity'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_regularity_first_only'], '</option>
-								<option value="2"', $context['member']['notify_regularity'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_regularity_daily'], '</option>
-								<option value="3"', $context['member']['notify_regularity'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_regularity_weekly'], '</option>
-							</select>
-						</dd>
-						<dt>
-							<label for="notify_types">', $txt['notify_send_types'], ':</label>
-						</dt>
-						<dd>
-							<select name="notify_types" id="notify_types">
-								<option value="1"', $context['member']['notify_types'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything'], '</option>
-								<option value="2"', $context['member']['notify_types'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything_own'], '</option>
-								<option value="3"', $context['member']['notify_types'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_send_type_only_replies'], '</option>
-								<option value="4"', $context['member']['notify_types'] == 4 ? ' selected="selected"' : '', '>', $txt['notify_send_type_nothing'], '</option>
-							</select>
-						</dd>
-					</dl>
-					<hr class="hrcolor" />
-					<div>
-						<input id="notify_submit" type="submit" value="', $txt['notify_save'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="u" value="', $context['id_member'], '" />
-						<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-					</div>
-					<br class="clear_right" />
-				</div>
-			</div>
-		</form>
-		<br />';
-
-	template_show_list('topic_notification_list');
-
-	echo '
-		<br />';
-
-	template_show_list('board_notification_list');
-}
-
-// Template for choosing group membership.
-function template_groupMembership()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	// The main containing header.
-	echo '
-		<form action="', $scripturl, '?action=profile;area=groupmembership;save" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['profile'], '
-				</h3>
-			</div>
-			<p class="description">', $txt['groupMembership_info'], '</p>';
-
-	// Do we have an update message?
-	if (!empty($context['update_message']))
-		echo '
-			<div class="infobox">
-				', $context['update_message'], '.
-			</div>';
-
-	// Requesting membership to a group?
-	if (!empty($context['group_request']))
-	{
-		echo '
-			<div class="groupmembership">
-				<div class="cat_bar">
-					<h3 class="catbg">', $txt['request_group_membership'], '</h3>
-				</div>
-				<div class="roundframe"><div class="innerframe">
-					', $txt['request_group_membership_desc'], ':
-					<textarea name="reason" rows="4" style="' . (isBrowser('is_ie8') ? 'width: 635px; max-width: 99%; min-width: 99%' : 'width: 99%') . ';"></textarea>
-					<div class="righttext" style="margin: 0.5em 0.5% 0 0.5%;">
-						<input type="hidden" name="gid" value="', $context['group_request']['id'], '" />
-						<input type="submit" name="req" value="', $txt['submit_request'], '" class="button_submit" />
-					</div>
-				</div></div>
-			</div>';
-	}
-	else
-	{
-		echo '
-			<table border="0" width="100%" cellspacing="0" cellpadding="4" class="table_grid">
-				<thead>
-					<tr class="catbg">
-						<th class="first_th" scope="col" ', $context['can_edit_primary'] ? ' colspan="2"' : '', '>', $txt['current_membergroups'], '</th>
-						<th class="last_th" scope="col"></th>
-					</tr>
-				</thead>
-				<tbody>';
-
-		$alternate = true;
-		foreach ($context['groups']['member'] as $group)
-		{
-			echo '
-					<tr class="', $alternate ? 'windowbg' : 'windowbg2', '" id="primdiv_', $group['id'], '">';
-
-				if ($context['can_edit_primary'])
-					echo '
-						<td width="4%">
-							<input type="radio" name="primary" id="primary_', $group['id'], '" value="', $group['id'], '" ', $group['is_primary'] ? 'checked="checked"' : '', ' onclick="highlightSelected(\'primdiv_' . $group['id'] . '\');" ', $group['can_be_primary'] ? '' : 'disabled="disabled"', ' class="input_radio" />
-						</td>';
-
-				echo '
-						<td>
-							<label for="primary_', $group['id'], '"><strong>', (empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>'), '</strong>', (!empty($group['desc']) ? '<br /><span class="smalltext">' . $group['desc'] . '</span>' : ''), '</label>
-						</td>
-						<td width="15%" class="righttext">';
-
-				// Can they leave their group?
-				if ($group['can_leave'])
-					echo '
-							<a href="' . $scripturl . '?action=profile;save;u=' . $context['id_member'] . ';area=groupmembership;' . $context['session_var'] . '=' . $context['session_id'] . ';gid=' . $group['id'] . ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '">' . $txt['leave_group'] . '</a>';
-				echo '
-						</td>
-					</tr>';
-			$alternate = !$alternate;
-		}
-
-		echo '
-				</tbody>
-			</table>';
-
-		if ($context['can_edit_primary'])
-			echo '
-			<div class="padding righttext">
-				<input type="submit" value="', $txt['make_primary'], '" class="button_submit" />
-			</div>';
-
-		// Any groups they can join?
-		if (!empty($context['groups']['available']))
-		{
-			echo '
-			<br />
-			<table border="0" width="100%" cellspacing="0" cellpadding="4" class="table_grid">
-				<thead>
-					<tr class="catbg">
-						<th class="first_th" scope="col">
-							', $txt['available_groups'], '
-						</th>
-						<th class="last_th" scope="col"></th>
-					</tr>
-				</thead>
-				<tbody>';
-
-			$alternate = true;
-			foreach ($context['groups']['available'] as $group)
-			{
-				echo '
-					<tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
-						<td>
-							<strong>', (empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>'), '</strong>', (!empty($group['desc']) ? '<br /><span class="smalltext">' . $group['desc'] . '</span>' : ''), '
-						</td>
-						<td width="15%" class="lefttext">';
-
-				if ($group['type'] == 3)
-					echo '
-							<a href="', $scripturl, '?action=profile;save;u=', $context['id_member'], ';area=groupmembership;', $context['session_var'], '=', $context['session_id'], ';gid=', $group['id'], ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '">', $txt['join_group'], '</a>';
-				elseif ($group['type'] == 2 && $group['pending'])
-					echo '
-							', $txt['approval_pending'];
-				elseif ($group['type'] == 2)
-					echo '
-							<a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=groupmembership;request=', $group['id'], '">', $txt['request_group'], '</a>';
-
-//				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-				echo '
-						</td>
-					</tr>';
-				$alternate = !$alternate;
-			}
-			echo '
-				</tbody>
-			</table>';
-		}
-
-		// Javascript for the selector stuff.
-		echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-		var prevClass = "";
-		var prevDiv = "";
-		function highlightSelected(box)
-		{
-			if (prevClass != "")
-			{
-				prevDiv.className = prevClass;
-			}
-			prevDiv = document.getElementById(box);
-			prevClass = prevDiv.className;
-
-			prevDiv.className = "highlight2";
-		}';
-		if (isset($context['groups']['member'][$context['primary_group']]))
-			echo '
-		highlightSelected("primdiv_' . $context['primary_group'] . '");';
-		echo '
-	// ]]></script>';
-	}
-
-	if (!empty($context['token_check']))
-		echo '
-				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-	echo '
-				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				<input type="hidden" name="u" value="', $context['id_member'], '" />
-			</form>';
-}
-
-function template_ignoreboards()
-{
-	global $context, $txt, $settings, $scripturl;
-	// The main containing header.
-	echo '
-	<form action="', $scripturl, '?action=profile;area=ignoreboards;save" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['profile'], '
-			</h3>
-		</div>
-		<p class="description">', $txt['ignoreboards_info'], '</p>
-		<div class="windowbg2">
-			<div class="content flow_hidden">
-				<ul class="ignoreboards floatleft">';
-
-	$i = 0;
-	$limit = ceil($context['num_boards'] / 2);
-	foreach ($context['categories'] as $category)
-	{
-		if ($i == $limit)
-		{
-			echo '
-				</ul>
-				<ul class="ignoreboards floatright">';
-
-			$i++;
-		}
-
-		echo '
-					<li class="category">
-						<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), ']); return false;">', $category['name'], '</a>
-						<ul>';
-
-		foreach ($category['boards'] as $board)
-		{
-			if ($i == $limit)
-				echo '
-						</ul>
-					</li>
-				</ul>
-				<ul class="ignoreboards floatright">
-					<li class="category">
-						<ul>';
-
-			echo '
-							<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
-								<label for="ignore_brd', $board['id'], '"><input type="checkbox" id="ignore_brd', $board['id'], '" name="ignore_brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked="checked"' : '', ' class="input_check" /> ', $board['name'], '</label>
-							</li>';
-
-			$i++;
-		}
-
-		echo '
-						</ul>
-					</li>';
-	}
-
-	echo '
-				</ul>
-				<br class="clear" />';
-
-	// Show the standard "Save Settings" profile button.
-	template_profile_save();
-
-	echo '
-			</div>
-		</div>
-	</form>
-	<br />';
-}
-
-// Simple load some theme variables common to several warning templates.
-function template_load_warning_variables()
-{
-	global $modSettings, $context;
-
-	$context['warningBarWidth'] = 200;
-	// Setup the colors - this is a little messy for theming.
-	$context['colors'] = array(
-		0 => 'green',
-		$modSettings['warning_watch'] => 'darkgreen',
-		$modSettings['warning_moderate'] => 'orange',
-		$modSettings['warning_mute'] => 'red',
-	);
-
-	// Work out the starting color.
-	$context['current_color'] = $context['colors'][0];
-	foreach ($context['colors'] as $limit => $color)
-		if ($context['member']['warning'] >= $limit)
-			$context['current_color'] = $color;
-}
-
-// Show all warnings of a user?
-function template_viewWarning()
-{
-	global $context, $txt, $scripturl, $settings;
-
-	template_load_warning_variables();
-
-	echo '
-		<div class="title_bar">
-			<h3 class="titlebg">
-				<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />
-				', sprintf($txt['profile_viewwarning_for_user'], $context['member']['name']), '
-			</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content">
-				<dl class="settings">
-					<dt>
-						<strong>', $txt['profile_warning_name'], ':</strong>
-					</dt>
-					<dd>
-						', $context['member']['name'], '
-					</dd>
-					<dt>
-						<strong>', $txt['profile_warning_level'], ':</strong>
-					</dt>
-					<dd>
-						<div>
-							<div>
-								<div style="font-size: 8pt; height: 12pt; width: ', $context['warningBarWidth'], 'px; border: 1px solid black; background-color: white; padding: 1px; position: relative;">
-									<div id="warning_text" style="padding-top: 1pt; width: 100%; z-index: 2; color: black; position: absolute; text-align: center; font-weight: bold;">', $context['member']['warning'], '%</div>
-									<div id="warning_progress" style="width: ', $context['member']['warning'], '%; height: 12pt; z-index: 1; background-color: ', $context['current_color'], ';">&nbsp;</div>
-								</div>
-							</div>
-						</div>
-					</dd>';
-
-		// There's some impact of this?
-		if (!empty($context['level_effects'][$context['current_level']]))
-			echo '
-					<dt>
-						<strong>', $txt['profile_viewwarning_impact'], ':</strong>
-					</dt>
-					<dd>
-						', $context['level_effects'][$context['current_level']], '
-					</dd>';
-
-		echo '
-				</dl>
-			</div>
-		</div>';
-
-	template_show_list('view_warnings');
-}
-
-// Show a lovely interface for issuing warnings.
-function template_issueWarning()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	template_load_warning_variables();
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		function setWarningBarPos(curEvent, isMove, changeAmount)
-		{
-			barWidth = ', $context['warningBarWidth'], ';
-
-			// Are we passing the amount to change it by?
-			if (changeAmount)
-			{
-				if (document.getElementById(\'warning_level\').value == \'SAME\')
-					percent = ', $context['member']['warning'], ' + changeAmount;
-				else
-					percent = parseInt(document.getElementById(\'warning_level\').value) + changeAmount;
-			}
-			// If not then it\'s a mouse thing.
-			else
-			{
-				if (!curEvent)
-					var curEvent = window.event;
-
-				// If it\'s a movement check the button state first!
-				if (isMove)
-				{
-					if (!curEvent.button || curEvent.button != 1)
-						return false
-				}
-
-				// Get the position of the container.
-				contain = document.getElementById(\'warning_contain\');
-				position = 0;
-				while (contain != null)
-				{
-					position += contain.offsetLeft;
-					contain = contain.offsetParent;
-				}
-
-				// Where is the mouse?
-				if (curEvent.pageX)
-				{
-					mouse = curEvent.pageX;
-				}
-				else
-				{
-					mouse = curEvent.clientX;
-					mouse += document.documentElement.scrollLeft != "undefined" ? document.documentElement.scrollLeft : document.body.scrollLeft;
-				}
-
-				// Is this within bounds?
-				if (mouse < position || mouse > position + barWidth)
-					return;
-
-				percent = Math.round(((mouse - position) / barWidth) * 100);
-
-				// Round percent to the nearest 5 - by kinda cheating!
-				percent = Math.round(percent / 5) * 5;
-			}
-
-			// What are the limits?
-			minLimit = ', $context['min_allowed'], ';
-			maxLimit = ', $context['max_allowed'], ';
-
-			percent = Math.max(percent, minLimit);
-			percent = Math.min(percent, maxLimit);
-
-			size = barWidth * (percent/100);
-
-			setInnerHTML(document.getElementById(\'warning_text\'), percent + "%");
-			document.getElementById(\'warning_level\').value = percent;
-			document.getElementById(\'warning_progress\').style.width = size + "px";
-
-			// Get the right color.
-			color = "black"';
-
-	foreach ($context['colors'] as $limit => $color)
-		echo '
-			if (percent >= ', $limit, ')
-				color = "', $color, '";';
-
-	echo '
-			document.getElementById(\'warning_progress\').style.backgroundColor = color;
-
-			// Also set the right effect.
-			effectText = "";';
-
-	foreach ($context['level_effects'] as $limit => $text)
-		echo '
-			if (percent >= ', $limit, ')
-				effectText = "', $text, '";';
-
-	echo '
-			setInnerHTML(document.getElementById(\'cur_level_div\'), effectText);
-		}
-
-		// Disable notification boxes as required.
-		function modifyWarnNotify()
-		{
-			disable = !document.getElementById(\'warn_notify\').checked;
-			document.getElementById(\'warn_sub\').disabled = disable;
-			document.getElementById(\'warn_body\').disabled = disable;
-			document.getElementById(\'warn_temp\').disabled = disable;
-			document.getElementById(\'new_template_link\').style.display = disable ? \'none\' : \'\';
-		}
-
-		function changeWarnLevel(amount)
-		{
-			setWarningBarPos(false, false, amount);
-		}
-
-		// Warn template.
-		function populateNotifyTemplate()
-		{
-			index = document.getElementById(\'warn_temp\').value;
-			if (index == -1)
-				return false;
-
-			// Otherwise see what we can do...';
-
-	foreach ($context['notification_templates'] as $k => $type)
-		echo '
-			if (index == ', $k, ')
-				document.getElementById(\'warn_body\').value = "', strtr($type['body'], array('"' => "'", "\n" => '\\n', "\r" => '')), '";';
-
-	echo '
-		}
-
-	// ]]></script>';
-
-	echo '
-	<form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=issuewarning" method="post" class="flow_hidden" accept-charset="', $context['character_set'], '">
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />
-				', $context['user']['is_owner'] ? $txt['profile_warning_level'] : $txt['profile_issue_warning'], '
-			</h3>
-		</div>';
-
-	if (!$context['user']['is_owner'])
-		echo '
-		<p class="description">', $txt['profile_warning_desc'], '</p>';
-
-	echo '
-		<div class="windowbg">
-			<div class="content">
-				<dl class="settings">';
-
-	if (!$context['user']['is_owner'])
-		echo '
-					<dt>
-						<strong>', $txt['profile_warning_name'], ':</strong>
-					</dt>
-					<dd>
-						<strong>', $context['member']['name'], '</strong>
-					</dd>';
-
-	echo '
-					<dt>
-						<strong>', $txt['profile_warning_level'], ':</strong>';
-
-	// Is there only so much they can apply?
-	if ($context['warning_limit'])
-		echo '
-						<br /><span class="smalltext">', sprintf($txt['profile_warning_limit_attribute'], $context['warning_limit']), '</span>';
-
-	echo '
-					</dt>
-					<dd>
-						<div id="warndiv1" style="display: none;">
-							<div>
-								<span class="floatleft" style="padding: 0 0.5em"><a href="#" onclick="changeWarnLevel(-5); return false;">[-]</a></span>
-								<div class="floatleft" id="warning_contain" style="font-size: 8pt; height: 12pt; width: ', $context['warningBarWidth'], 'px; border: 1px solid black; background-color: white; padding: 1px; position: relative;" onmousedown="setWarningBarPos(event, true);" onmousemove="setWarningBarPos(event, true);" onclick="setWarningBarPos(event);">
-									<div id="warning_text" style="padding-top: 1pt; width: 100%; z-index: 2; color: black; position: absolute; text-align: center; font-weight: bold;">', $context['member']['warning'], '%</div>
-									<div id="warning_progress" style="width: ', $context['member']['warning'], '%; height: 12pt; z-index: 1; background-color: ', $context['current_color'], ';">&nbsp;</div>
-								</div>
-								<span class="floatleft" style="padding: 0 0.5em"><a href="#" onclick="changeWarnLevel(5); return false;">[+]</a></span>
-								<div class="clear_left smalltext">', $txt['profile_warning_impact'], ': <span id="cur_level_div">', $context['level_effects'][$context['current_level']], '</span></div>
-							</div>
-							<input type="hidden" name="warning_level" id="warning_level" value="SAME" />
-						</div>
-						<div id="warndiv2">
-							<input type="text" name="warning_level_nojs" size="6" maxlength="4" value="', $context['member']['warning'], '" class="input_text" />&nbsp;', $txt['profile_warning_max'], '
-							<div class="smalltext">', $txt['profile_warning_impact'], ':<br />';
-	// For non-javascript give a better list.
-	foreach ($context['level_effects'] as $limit => $effect)
-		echo '
-							', sprintf($txt['profile_warning_effect_text'], $limit, $effect), '<br />';
-
-	echo '
-							</div>
-						</div>
-					</dd>';
-
-	if (!$context['user']['is_owner'])
-	{
-		echo '
-					<dt>
-						<strong>', $txt['profile_warning_reason'], ':</strong><br />
-						<span class="smalltext">', $txt['profile_warning_reason_desc'], '</span>
-					</dt>
-					<dd>
-						<input type="text" name="warn_reason" id="warn_reason" value="', $context['warning_data']['reason'], '" size="50" style="width: 80%;" class="input_text" />
-					</dd>
-				</dl>
-				<hr />
-				<dl class="settings">
-					<dt>
-						<strong><label for="warn_notify">', $txt['profile_warning_notify'], ':</label></strong>
-					</dt>
-					<dd>
-						<input type="checkbox" name="warn_notify" id="warn_notify" onclick="modifyWarnNotify();" ', $context['warning_data']['notify'] ? 'checked="checked"' : '', ' class="input_check" />
-					</dd>
-					<dt>
-						<strong><label for="warn_sub">', $txt['profile_warning_notify_subject'], ':</label></strong>
-					</dt>
-					<dd>
-						<input type="text" name="warn_sub" id="warn_sub" value="', empty($context['warning_data']['notify_subject']) ? $txt['profile_warning_notify_template_subject'] : $context['warning_data']['notify_subject'], '" size="50" style="width: 80%;" class="input_text" />
-					</dd>
-					<dt>
-						<strong><label for="warn_temp">', $txt['profile_warning_notify_body'], ':</label></strong>
-					</dt>
-					<dd>
-						<select name="warn_temp" id="warn_temp" disabled="disabled" onchange="populateNotifyTemplate();" style="font-size: x-small;">
-							<option value="-1">', $txt['profile_warning_notify_template'], '</option>
-							<option value="-1">------------------------------</option>';
-
-		foreach ($context['notification_templates'] as $id_template => $template)
-			echo '
-							<option value="', $id_template, '">', $template['title'], '</option>';
-
-		echo '
-						</select>
-						<span class="smalltext" id="new_template_link" style="display: none;">[<a href="', $scripturl, '?action=moderate;area=warnings;sa=templateedit;tid=0" target="_blank" class="new_win">', $txt['profile_warning_new_template'], '</a>]</span><br />
-						<textarea name="warn_body" id="warn_body" cols="40" rows="8" style="min-width: 50%; max-width: 99%;">', $context['warning_data']['notify_body'], '</textarea>
-					</dd>';
-	}
-	echo '
-				</dl>
-				<div class="righttext">';
-
-	if (!empty($context['token_check']))
-		echo '
-				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-	echo '
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="submit" name="save" value="', $context['user']['is_owner'] ? $txt['change_profile'] : $txt['profile_warning_issue'], '" class="button_submit" />
-				</div>
-			</div>
-		</div>
-	</form>';
-
-	// Previous warnings?
-	echo '<br />
-		<div class="cat_bar">
-			<h3 class="catbg">
-				', $txt['profile_warning_previous'], '
-			</h3>
-		</div>
-		<table border="0" width="100%" cellspacing="0" cellpadding="5" class="table_grid">
-			<thead>
-				<tr class="titlebg lefttext">
-					<th class="first_th" scope="col" width="20%">', $txt['profile_warning_previous_issued'], '</th>
-					<th scope="col" width="30%">', $txt['profile_warning_previous_time'], '</th>
-					<th scope="col">', $txt['profile_warning_previous_reason'], '</th>
-					<th class="last_th" scope="col" width="6%">', $txt['profile_warning_previous_level'], '</th>
-				</tr>
-			</thead>
-			<tbody>';
-
-	// Print the warnings.
-	$alternate = 0;
-	foreach ($context['previous_warnings'] as $warning)
-	{
-		$alternate = !$alternate;
-		echo '
-				<tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
-					<td class="smalltext">', $warning['issuer']['link'], '</td>
-					<td class="smalltext">', $warning['time'], '</td>
-					<td class="smalltext">
-						<div class="floatleft">
-							', $warning['reason'], '
-						</div>';
-
-		if (!empty($warning['id_notice']))
-			echo '
-						<div class="floatright">
-							<a href="', $scripturl, '?action=moderate;area=notice;nid=', $warning['id_notice'], '" onclick="window.open(this.href, \'\', \'scrollbars=yes,resizable=yes,width=400,height=250\');return false;" target="_blank" class="new_win" title="', $txt['profile_warning_previous_notice'], '"><img src="', $settings['images_url'], '/filter.png" alt="" /></a>
-						</div>';
-		echo '
-					</td>
-					<td class="smalltext">', $warning['counter'], '</td>
-				</tr>';
-	}
-
-	if (empty($context['previous_warnings']))
-		echo '
-				<tr class="windowbg2">
-					<td align="center" colspan="4">
-						', $txt['profile_warning_previous_none'], '
-					</td>
-				</tr>';
-
-	echo '
-			</tbody>
-		</table>
-		<div class="pagesection">', $txt['pages'], ': ', $context['page_index'], '</div>';
-
-	// Do our best to get pretty javascript enabled.
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		document.getElementById(\'warndiv1\').style.display = "";
-		document.getElementById(\'warndiv2\').style.display = "none";';
-
-	if (!$context['user']['is_owner'])
-		echo '
-		modifyWarnNotify();';
-
-	echo '
-	// ]]></script>';
-}
-
-// Template to show for deleting a users account - now with added delete post capability!
-function template_deleteAccount()
-{
-	global $context, $settings, $options, $scripturl, $txt, $scripturl;
-
-	// The main containing header.
-	echo '
-		<form action="', $scripturl, '?action=profile;area=deleteaccount;save" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator">
-			<div class="title_bar">
-				<h3 class="titlebg">
-					<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['deleteAccount'], '
-				</h3>
-			</div>';
-	
-	// If deleting another account give them a lovely info box.
-	if (!$context['user']['is_owner'])
-		echo '
-			<p class="windowbg2 description">', $txt['deleteAccount_desc'], '</p>';
-	echo '
-			<div class="windowbg2">
-				<div class="content">';
-
-	// If they are deleting their account AND the admin needs to approve it - give them another piece of info ;)
-	if ($context['needs_approval'])
-		echo '
-					<div class="errorbox">', $txt['deleteAccount_approval'], '</div>';
-
-	// If the user is deleting their own account warn them first - and require a password!
-	if ($context['user']['is_owner'])
-	{
-		echo '
-					<div class="alert">', $txt['own_profile_confirm'], '</div>
-					<div>
-						<strong', (isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : ''), '>', $txt['current_password'], ': </strong>
-						<input type="password" name="oldpasswrd" size="20" class="input_password" />&nbsp;&nbsp;&nbsp;&nbsp;
-						<input type="submit" value="', $txt['yes'], '" class="button_submit" />';
-
-		if (!empty($context['token_check']))
-			echo '
-				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-		echo '
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="u" value="', $context['id_member'], '" />
-						<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-					</div>';
-	}
-	// Otherwise an admin doesn't need to enter a password - but they still get a warning - plus the option to delete lovely posts!
-	else
-	{
-		echo '
-					<div class="alert">', $txt['deleteAccount_warning'], '</div>';
-
-		// Only actually give these options if they are kind of important.
-		if ($context['can_delete_posts'])
-			echo '
-					<div>
-						', $txt['deleteAccount_posts'], ':
-						<select name="remove_type">
-							<option value="none">', $txt['deleteAccount_none'], '</option>
-							<option value="posts">', $txt['deleteAccount_all_posts'], '</option>
-							<option value="topics">', $txt['deleteAccount_topics'], '</option>
-						</select>
-					</div>';
-
-		echo '
-					<div>
-						<label for="deleteAccount"><input type="checkbox" name="deleteAccount" id="deleteAccount" value="1" class="input_check" onclick="if (this.checked) return confirm(\'', $txt['deleteAccount_confirm'], '\');" /> ', $txt['deleteAccount_member'], '.</label>
-					</div>
-					<div>
-						<input type="submit" value="', $txt['delete'], '" class="button_submit" />';
-
-		if (!empty($context['token_check']))
-			echo '
-				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-		echo '
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="u" value="', $context['id_member'], '" />
-						<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-					</div>';
-	}
-	echo '
-				</div>
-			</div>
-			<br />
-		</form>';
-}
-
-// Template for the password box/save button stuck at the bottom of every profile page.
-function template_profile_save()
-{
-	global $context, $settings, $options, $txt;
-
-	echo '
-
-					<hr width="100%" size="1" class="hrcolor clear" />';
-
-	// Only show the password box if it's actually needed.
-	if ($context['require_password'])
-		echo '
-					<dl>
-						<dt>
-							<strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '>', $txt['current_password'], ': </strong><br />
-							<span class="smalltext">', $txt['required_security_reasons'], '</span>
-						</dt>
-						<dd>
-							<input type="password" name="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password" />
-						</dd>
-					</dl>';
-
-	echo '
-					<div class="righttext">
-						<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="u" value="', $context['id_member'], '" />
-						<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-					</div>';
-}
-
-// Small template for showing an error message upon a save problem in the profile.
-function template_error_message()
-{
-	global $context, $txt;
-
-	echo '
-		<div class="errorbox">
-			<span>', !empty($context['custom_error_title']) ? $context['custom_error_title'] : $txt['profile_errors_occurred'], '</span>
-			<ul class="reset">';
-
-		// Cycle through each error and display an error message.
-		foreach ($context['post_errors'] as $error)
-			echo '
-				<li>', isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : $error, '</li>';
-
-		echo '
-			</ul>
-		</div>';
-}
-
-// Display a load of drop down selectors for allowing the user to change group.
-function template_profile_group_manage()
-{
-	global $context, $txt, $scripturl;
-
-	echo '
-							<dt>
-								<strong>', $txt['primary_membergroup'], ': </strong><br />
-								<span class="smalltext">[<a href="', $scripturl, '?action=helpadmin;help=moderator_why_missing" onclick="return reqWin(this.href);">', $txt['moderator_why_missing'], '</a>]</span>
-							</dt>
-							<dd>
-								<select name="id_group" ', ($context['user']['is_owner'] && $context['member']['group_id'] == 1 ? 'onchange="if (this.value != 1 &amp;&amp; !confirm(\'' . $txt['deadmin_confirm'] . '\')) this.value = 1;"' : ''), '>';
-		
-		// Fill the select box with all primary member groups that can be assigned to a member.
-		foreach ($context['member_groups'] as $member_group)
-			if (!empty($member_group['can_be_primary']))
-				echo '
-									<option value="', $member_group['id'], '"', $member_group['is_primary'] ? ' selected="selected"' : '', '>
-										', $member_group['name'], '
-									</option>';
-		echo '
-								</select>
-							</dd>
-							<dt>
-								<strong>', $txt['additional_membergroups'], ':</strong>
-							</dt>
-							<dd>
-								<span id="additional_groupsList">
-									<input type="hidden" name="additional_groups[]" value="0" />';
-									
-		// For each membergroup show a checkbox so members can be assigned to more than one group.
-		foreach ($context['member_groups'] as $member_group)
-			if ($member_group['can_be_additional'])
-				echo '
-									<label for="additional_groups-', $member_group['id'], '"><input type="checkbox" name="additional_groups[]" value="', $member_group['id'], '" id="additional_groups-', $member_group['id'], '"', $member_group['is_additional'] ? ' checked="checked"' : '', ' class="input_check" /> ', $member_group['name'], '</label><br />';
-		echo '
-								</span>
-								<a href="javascript:void(0);" onclick="document.getElementById(\'additional_groupsList\').style.display = \'block\'; document.getElementById(\'additional_groupsLink\').style.display = \'none\'; return false;" id="additional_groupsLink" style="display: none;">', $txt['additional_membergroups_show'], '</a>
-								<script type="text/javascript"><!-- // --><![CDATA[
-									document.getElementById("additional_groupsList").style.display = "none";
-									document.getElementById("additional_groupsLink").style.display = "";
-								// ]]></script>
-							</dd>';
-
-}
-
-// Callback function for entering a birthdate!
-function template_profile_birthdate()
-{
-	global $txt, $context;
-
-	// Just show the pretty box!
-	echo '
-							<dt>
-								<strong>', $txt['dob'], ':</strong><br />
-								<span class="smalltext">', $txt['dob_year'], ' - ', $txt['dob_month'], ' - ', $txt['dob_day'], '</span>
-							</dt>
-							<dd>
-								<input type="text" name="bday3" size="4" maxlength="4" value="', $context['member']['birth_date']['year'], '" class="input_text" /> -
-								<input type="text" name="bday1" size="2" maxlength="2" value="', $context['member']['birth_date']['month'], '" class="input_text" /> -
-								<input type="text" name="bday2" size="2" maxlength="2" value="', $context['member']['birth_date']['day'], '" class="input_text" />
-							</dd>';
-}
-
-// Show the signature editing box?
-function template_profile_signature_modify()
-{
-	global $txt, $context, $settings;
-
-	echo '
-							<dt>
-								<strong>', $txt['signature'], ':</strong><br />
-								<span class="smalltext">', $txt['sig_info'], '</span><br />
-								<br />';
-
-	if ($context['show_spellchecking'])
-		echo '
-								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'creator\', \'signature\');" class="button_submit" />';
-
-		echo '
-							</dt>
-							<dd>
-								<textarea class="editor" onkeyup="calcCharLeft();" name="signature" rows="5" cols="50" style="min-width: 50%; max-width: 99%;">', $context['member']['signature'], '</textarea><br />';
-
-	// If there is a limit at all!
-	if (!empty($context['signature_limits']['max_length']))
-		echo '
-								<span class="smalltext">', sprintf($txt['max_sig_characters'], $context['signature_limits']['max_length']), ' <span id="signatureLeft">', $context['signature_limits']['max_length'], '</span></span><br />';
-
-	if ($context['signature_warning'])
-		echo '
-								<span class="smalltext">', $context['signature_warning'], '</span>';
-
-	// Load the spell checker?
-	if ($context['show_spellchecking'])
-		echo '
-								<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/spellcheck.js"></script>';
-
-	// Some javascript used to count how many characters have been used so far in the signature.
-	echo '
-								<script type="text/javascript"><!-- // --><![CDATA[
-									function tick()
-									{
-										if (typeof(document.forms.creator) != "undefined")
-										{
-											calcCharLeft();
-											setTimeout("tick()", 1000);
-										}
-										else
-											setTimeout("tick()", 800);
-									}
-
-									function calcCharLeft()
-									{
-										var maxLength = ', $context['signature_limits']['max_length'], ';
-										var oldSignature = "", currentSignature = document.forms.creator.signature.value;
-
-										if (!document.getElementById("signatureLeft"))
-											return;
-
-										if (oldSignature != currentSignature)
-										{
-											oldSignature = currentSignature;
-
-											if (currentSignature.replace(/\r/, "").length > maxLength)
-												document.forms.creator.signature.value = currentSignature.replace(/\r/, "").substring(0, maxLength);
-											currentSignature = document.forms.creator.signature.value.replace(/\r/, "");
-										}
-
-										setInnerHTML(document.getElementById("signatureLeft"), maxLength - currentSignature.length);
-									}
-
-									addLoadEvent(tick);
-								// ]]></script>
-							</dd>';
-}
-
-function template_profile_avatar_select()
-{
-	global $context, $txt, $modSettings;
-
-	// Start with the upper menu
-	echo '
-							<dt>
-								<strong id="personal_picture"><label for="avatar_upload_box">', $txt['personal_picture'], '</label></strong>
-								<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_none" value="none"' . ($context['member']['avatar']['choice'] == 'none' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_none"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['no_avatar'] . '</label><br />
-								', !empty($context['member']['avatar']['allow_server_stored']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_server_stored" value="server_stored"' . ($context['member']['avatar']['choice'] == 'server_stored' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_server_stored"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['choose_avatar_gallery'] . '</label><br />' : '', '
-								', !empty($context['member']['avatar']['allow_external']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_external" value="external"' . ($context['member']['avatar']['choice'] == 'external' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_external"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['my_own_pic'] . '</label><br />' : '', '
-								', !empty($context['member']['avatar']['allow_upload']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_upload" value="upload"' . ($context['member']['avatar']['choice'] == 'upload' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['avatar_will_upload'] . '</label>' : '', '
-							</dt>
-							<dd>';
-
-	// If users are allowed to choose avatars stored on the server show selection boxes to choice them from.
-	if (!empty($context['member']['avatar']['allow_server_stored']))
-	{
-		echo '
-								<div id="avatar_server_stored">
-									<div>
-										<select name="cat" id="cat" size="10" onchange="changeSel(\'\');" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'server_stored\');">';
-		// This lists all the file catergories.
-		foreach ($context['avatars'] as $avatar)
-			echo '
-											<option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected="selected"' : ''), '>', $avatar['name'], '</option>';
-		echo '
-										</select>
-									</div>
-									<div>
-										<select name="file" id="file" size="10" style="display: none;" onchange="showAvatar()" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'server_stored\');" disabled="disabled"><option></option></select>
-									</div>
-									<div><img name="avatar" id="avatar" src="', !empty($context['member']['avatar']['allow_external']) && $context['member']['avatar']['choice'] == 'external' ? $context['member']['avatar']['external'] : $modSettings['avatar_url'] . '/blank.png', '" alt="Do Nothing" /></div>
-									<script type="text/javascript"><!-- // --><![CDATA[
-										var files = ["' . implode('", "', $context['avatar_list']) . '"];
-										var avatar = document.getElementById("avatar");
-										var cat = document.getElementById("cat");
-										var selavatar = "' . $context['avatar_selected'] . '";
-										var avatardir = "' . $modSettings['avatar_url'] . '/";
-										var size = avatar.alt.substr(3, 2) + " " + avatar.alt.substr(0, 2) + String.fromCharCode(117, 98, 116);
-										var file = document.getElementById("file");
-
-										if (avatar.src.indexOf("blank.png") > -1)
-											changeSel(selavatar);
-										else
-											previewExternalAvatar(avatar.src)
-
-										function changeSel(selected)
-										{
-											if (cat.selectedIndex == -1)
-												return;
-
-											if (cat.options[cat.selectedIndex].value.indexOf("/") > 0)
-											{
-												var i;
-												var count = 0;
-
-												file.style.display = "inline";
-												file.disabled = false;
-
-												for (i = file.length; i >= 0; i = i - 1)
-													file.options[i] = null;
-
-												for (i = 0; i < files.length; i++)
-													if (files[i].indexOf(cat.options[cat.selectedIndex].value) == 0)
-													{
-														var filename = files[i].substr(files[i].indexOf("/") + 1);
-														var showFilename = filename.substr(0, filename.lastIndexOf("."));
-														showFilename = showFilename.replace(/[_]/g, " ");
-
-														file.options[count] = new Option(showFilename, files[i]);
-
-														if (filename == selected)
-														{
-															if (file.options.defaultSelected)
-																file.options[count].defaultSelected = true;
-															else
-																file.options[count].selected = true;
-														}
-
-														count++;
-													}
-
-												if (file.selectedIndex == -1 && file.options[0])
-													file.options[0].selected = true;
-
-												showAvatar();
-											}
-											else
-											{
-												file.style.display = "none";
-												file.disabled = true;
-												document.getElementById("avatar").src = avatardir + cat.options[cat.selectedIndex].value;
-												document.getElementById("avatar").style.width = "";
-												document.getElementById("avatar").style.height = "";
-											}
-										}
-
-										function showAvatar()
-										{
-											if (file.selectedIndex == -1)
-												return;
-
-											document.getElementById("avatar").src = avatardir + file.options[file.selectedIndex].value;
-											document.getElementById("avatar").alt = file.options[file.selectedIndex].text;
-											document.getElementById("avatar").alt += file.options[file.selectedIndex].text == size ? "!" : "";
-											document.getElementById("avatar").style.width = "";
-											document.getElementById("avatar").style.height = "";
-										}
-
-										function previewExternalAvatar(src)
-										{
-											if (!document.getElementById("avatar"))
-												return;
-
-											var maxHeight = ', !empty($modSettings['avatar_max_height_external']) ? $modSettings['avatar_max_height_external'] : 0, ';
-											var maxWidth = ', !empty($modSettings['avatar_max_width_external']) ? $modSettings['avatar_max_width_external'] : 0, ';
-											var tempImage = new Image();
-
-											tempImage.src = src;
-											if (maxWidth != 0 && tempImage.width > maxWidth)
-											{
-												document.getElementById("avatar").style.height = parseInt((maxWidth * tempImage.height) / tempImage.width) + "px";
-												document.getElementById("avatar").style.width = maxWidth + "px";
-											}
-											else if (maxHeight != 0 && tempImage.height > maxHeight)
-											{
-												document.getElementById("avatar").style.width = parseInt((maxHeight * tempImage.width) / tempImage.height) + "px";
-												document.getElementById("avatar").style.height = maxHeight + "px";
-											}
-											document.getElementById("avatar").src = src;
-										}
-									// ]]></script>
-								</div>';
-	}
-
-	// If the user can link to an off server avatar, show them a box to input the address.
-	if (!empty($context['member']['avatar']['allow_external']))
-	{
-		echo '
-								<div id="avatar_external">
-									<div class="smalltext">', $txt['avatar_by_url'], '</div>
-									<input type="text" name="userpicpersonal" size="45" value="', $context['member']['avatar']['external'], '" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'external\');" onchange="if (typeof(previewExternalAvatar) != \'undefined\') previewExternalAvatar(this.value);" class="input_text" />
-								</div>';
-	}
-
-	// If the user is able to upload avatars to the server show them an upload box.
-	if (!empty($context['member']['avatar']['allow_upload']))
-	{
-		echo '
-								<div id="avatar_upload">
-									<input type="file" size="44" name="attachment" id="avatar_upload_box" value="" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'upload\');" class="input_file" />
-									', ($context['member']['avatar']['id_attach'] > 0 ? '<br /><br /><img src="' . $context['member']['avatar']['href'] . (strpos($context['member']['avatar']['href'], '?') === false ? '?' : '&amp;') . 'time=' . time() . '" alt="" /><input type="hidden" name="id_attach" value="' . $context['member']['avatar']['id_attach'] . '" />' : ''), '
-								</div>';
-	}
-
-	echo '
-								<script type="text/javascript"><!-- // --><![CDATA[
-									', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "' . ($context['member']['avatar']['choice'] == 'server_stored' ? '' : 'none') . '";' : '', '
-									', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "' . ($context['member']['avatar']['choice'] == 'external' ? '' : 'none') . '";' : '', '
-									', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "' . ($context['member']['avatar']['choice'] == 'upload' ? '' : 'none') . '";' : '', '
-
-									function swap_avatar(type)
-									{
-										switch(type.id)
-										{
-											case "avatar_choice_server_stored":
-												', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "";' : '', '
-												', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
-												', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
-												break;
-											case "avatar_choice_external":
-												', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
-												', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "";' : '', '
-												', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
-												break;
-											case "avatar_choice_upload":
-												', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
-												', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
-												', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "";' : '', '
-												break;
-											case "avatar_choice_none":
-												', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
-												', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
-												', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
-												break;
-										}
-									}
-								// ]]></script>
-							</dd>';
-}
-
-// Callback for modifying karam.
-function template_profile_karma_modify()
-{
-	global $context, $modSettings, $txt;
-
-		echo '
-							<dt>
-								<strong>', $modSettings['karmaLabel'], '</strong>
-							</dt>
-							<dd>
-								', $modSettings['karmaApplaudLabel'], ' <input type="text" name="karma_good" size="4" value="', $context['member']['karma']['good'], '" onchange="setInnerHTML(document.getElementById(\'karmaTotal\'), this.value - this.form.karma_bad.value);" style="margin-right: 2ex;" class="input_text" /> ', $modSettings['karmaSmiteLabel'], ' <input type="text" name="karma_bad" size="4" value="', $context['member']['karma']['bad'], '" onchange="this.form.karma_good.onchange();" class="input_text" /><br />
-								(', $txt['total'], ': <span id="karmaTotal">', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '</span>)
-							</dd>';
-}
-
-
-// Select the time format!
-function template_profile_timeformat_modify()
-{
-	global $context, $modSettings, $txt, $scripturl, $settings;
-
-	echo '
-							<dt>
-								<strong><label for="easyformat">', $txt['time_format'], ':</label></strong><br />
-								<a href="', $scripturl, '?action=helpadmin;help=time_format" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" alt="', $txt['help'], '" class="floatleft" /></a>
-								<span class="smalltext">&nbsp;<label for="time_format">', $txt['date_format'], '</label></span>
-							</dt>
-							<dd>
-								<select name="easyformat" id="easyformat" onchange="document.forms.creator.time_format.value = this.options[this.selectedIndex].value;" style="margin-bottom: 4px;">';
-	// Help the user by showing a list of common time formats.
-	foreach ($context['easy_timeformats'] as $time_format)
-		echo '
-									<option value="', $time_format['format'], '"', $time_format['format'] == $context['member']['time_format'] ? ' selected="selected"' : '', '>', $time_format['title'], '</option>';
-	echo '
-								</select><br />
-								<input type="text" name="time_format" id="time_format" value="', $context['member']['time_format'], '" size="30" class="input_text" />
-							</dd>';
-}
-
-// Time offset?
-function template_profile_timeoffset_modify()
-{
-	global $txt, $context;
-
-	echo '
-							<dt>
-								<strong', (isset($context['modify_error']['bad_offset']) ? ' class="error"' : ''), '><label for="time_offset">', $txt['time_offset'], ':</label></strong><br />
-								<span class="smalltext">', $txt['personal_time_offset'], '</span>
-							</dt>
-							<dd>
-								<input type="text" name="time_offset" id="time_offset" size="5" maxlength="5" value="', $context['member']['time_offset'], '" class="input_text" /> ', $txt['hours'], ' [<a href="javascript:void(0);" onclick="currentDate = new Date(', $context['current_forum_time_js'], '); document.getElementById(\'time_offset\').value = autoDetectTimeOffset(currentDate); return false;">', $txt['timeoffset_autodetect'], '</a>]<br />', $txt['current_time'], ': <em>', $context['current_forum_time'], '</em>
-							</dd>';
-}
-
-// Theme?
-function template_profile_theme_pick()
-{
-	global $txt, $context, $scripturl;
-
-	echo '
-							<dt>
-								<strong>', $txt['current_theme'], ':</strong>
-							</dt>
-							<dd>
-								', $context['member']['theme']['name'], ' [<a href="', $scripturl, '?action=theme;sa=pick;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['change'], '</a>]
-							</dd>';
-}
-
-// Smiley set picker.
-function template_profile_smiley_pick()
-{
-	global $txt, $context, $modSettings, $settings;
-
-	echo '
-							<dt>
-								<strong><label for="smiley_set">', $txt['smileys_current'], ':</label></strong>
-							</dt>
-							<dd>
-								<select name="smiley_set" id="smiley_set" onchange="document.getElementById(\'smileypr\').src = this.selectedIndex == 0 ? \'', $settings['images_url'], '/blank.png\' : \'', $modSettings['smileys_url'], '/\' + (this.selectedIndex != 1 ? this.options[this.selectedIndex].value : \'', !empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'], '\') + \'/smiley.gif\';">';
-	foreach ($context['smiley_sets'] as $set)
-		echo '
-									<option value="', $set['id'], '"', $set['selected'] ? ' selected="selected"' : '', '>', $set['name'], '</option>';
-	echo '
-								</select> <img id="smileypr" class="centericon" src="', $context['member']['smiley_set']['id'] != 'none' ? $modSettings['smileys_url'] . '/' . ($context['member']['smiley_set']['id'] != '' ? $context['member']['smiley_set']['id'] : (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'])) . '/smiley.png' : $settings['images_url'] . '/blank.png', '" alt=":)" style="padding-left: 20px;" />
-							</dd>';
-}
-
-// Change the way you login to the forum.
-function template_authentication_method()
-{
-	global $context, $settings, $options, $scripturl, $modSettings, $txt;
-
-	// The main header!
-	echo '
-		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/register.js"></script>
-		<form action="', $scripturl, '?action=profile;area=authentication;save" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator" enctype="multipart/form-data">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['authentication'], '
-				</h3>
-			</div>
-			<p class="windowbg description">', $txt['change_authentication'], '</p>
-			<div class="windowbg2">
-				<div class="content">
-					<dl>
-						<dt>
-							<input type="radio" onclick="updateAuthMethod();" name="authenticate" value="openid" id="auth_openid"', $context['auth_method'] == 'openid' ? ' checked="checked"' : '', ' class="input_radio" /><label for="auth_openid"><strong>', $txt['authenticate_openid'], '</strong></label>&nbsp;<em><a href="', $scripturl, '?action=helpadmin;help=register_openid" onclick="return reqWin(this.href);" class="help">(?)</a></em><br />
-							<input type="radio" onclick="updateAuthMethod();" name="authenticate" value="passwd" id="auth_pass"', $context['auth_method'] == 'password' ? ' checked="checked"' : '', ' class="input_radio" /><label for="auth_pass"><strong>', $txt['authenticate_password'], '</strong></label>
-						</dt>
-						<dd>
-							<dl id="auth_openid_div">
-								<dt>
-									<em>', $txt['authenticate_openid_url'], ':</em>
-								</dt>
-								<dd>
-									<input type="text" name="openid_identifier" id="openid_url" size="30" tabindex="', $context['tabindex']++, '" value="', $context['member']['openid_uri'], '" class="input_text openid_login" />
-								</dd>
-							</dl>
-							<dl id="auth_pass_div">
-								<dt>
-									<em>', $txt['choose_pass'], ':</em>
-								</dt>
-								<dd>
-									<input type="password" name="passwrd1" id="smf_autov_pwmain" size="30" tabindex="', $context['tabindex']++, '" class="input_password" />
-									<span id="smf_autov_pwmain_div" style="display: none;"><img id="smf_autov_pwmain_img" src="', $settings['images_url'], '/icons/field_invalid.png" alt="*" /></span>
-								</dd>
-								<dt>
-									<em>', $txt['verify_pass'], ':</em>
-								</dt>
-								<dd>
-									<input type="password" name="passwrd2" id="smf_autov_pwverify" size="30" tabindex="', $context['tabindex']++, '" class="input_password" />
-									<span id="smf_autov_pwverify_div" style="display: none;"><img id="smf_autov_pwverify_img" src="', $settings['images_url'], '/icons/field_valid.png" alt="*" /></span>
-								</dd>
-							</dl>
-						</dd>
-					</dl>';
-
-	if ($context['require_password'])
-		echo '
-					<hr width="100%" size="1" class="hrcolor clear" />
-					<dl>
-						<dt>
-							<strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '>', $txt['current_password'], ': </strong><br />
-							<span class="smalltext">', $txt['required_security_reasons'], '</span>
-						</dt>
-						<dd>
-							<input type="password" name="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password" />
-						</dd>
-					</dl>';
-
-	echo '
-					<div class="righttext">';
-
-	if (!empty($context['token_check']))
-		echo '
-						<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
-
-	echo '
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="u" value="', $context['id_member'], '" />
-						<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-						<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />
-					</div>
-				</div>
-			</div>
-		</form>';
-
-	// The password stuff.
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-	var regTextStrings = {
-		"password_short": "', $txt['registration_password_short'], '",
-		"password_reserved": "', $txt['registration_password_reserved'], '",
-		"password_numbercase": "', $txt['registration_password_numbercase'], '",
-		"password_no_match": "', $txt['registration_password_no_match'], '",
-		"password_valid": "', $txt['registration_password_valid'], '"
-	};
-	var verificationHandle = new smfRegister("creator", ', empty($modSettings['password_strength']) ? 0 : $modSettings['password_strength'], ', regTextStrings);
-	var currentAuthMethod = \'passwd\';
-	function updateAuthMethod()
-	{
-		// What authentication method is being used?
-		if (!document.getElementById(\'auth_openid\') || !document.getElementById(\'auth_openid\').checked)
-			currentAuthMethod = \'passwd\';
-		else
-			currentAuthMethod = \'openid\';
-
-		// No openID?
-		if (!document.getElementById(\'auth_openid\'))
-			return true;
-
-		document.forms.creator.openid_url.disabled = currentAuthMethod == \'openid\' ? false : true;
-		document.forms.creator.smf_autov_pwmain.disabled = currentAuthMethod == \'passwd\' ? false : true;
-		document.forms.creator.smf_autov_pwverify.disabled = currentAuthMethod == \'passwd\' ? false : true;
-		document.getElementById(\'smf_autov_pwmain_div\').style.display = currentAuthMethod == \'passwd\' ? \'\' : \'none\';
-		document.getElementById(\'smf_autov_pwverify_div\').style.display = currentAuthMethod == \'passwd\' ? \'\' : \'none\';
-
-		if (currentAuthMethod == \'passwd\')
-		{
-			verificationHandle.refreshMainPassword();
-			verificationHandle.refreshVerifyPassword();
-			document.forms.creator.openid_url.style.backgroundColor = \'\';
-			document.getElementById("auth_openid_div").style.display = "none";
-			document.getElementById("auth_pass_div").style.display = "";
-		}
-		else
-		{
-			document.forms.creator.smf_autov_pwmain.style.backgroundColor = \'\';
-			document.forms.creator.smf_autov_pwverify.style.backgroundColor = \'\';
-			document.forms.creator.openid_url.style.backgroundColor = \'#FCE184\';
-			document.getElementById("auth_openid_div").style.display = "";
-			document.getElementById("auth_pass_div").style.display = "none";
-		}
-	}
-	updateAuthMethod();
-	// ]]></script>';
-}
-
-
-?>

+ 0 - 273
Themes/penguin/Settings.template.php

@@ -1,273 +0,0 @@
-<?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_options()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	$context['theme_options'] = array(
-		array(
-			'id' => 'show_board_desc',
-			'label' => $txt['board_desc_inside'],
-			'default' => true,
-		),
-		array(
-			'id' => 'show_children',
-			'label' => $txt['show_children'],
-			'default' => true,
-		),
-		array(
-			'id' => 'use_sidebar_menu',
-			'label' => $txt['use_sidebar_menu'],
-			'default' => true,
-		),
-		array(
-			'id' => 'show_no_avatars',
-			'label' => $txt['show_no_avatars'],
-			'default' => true,
-		),
-		array(
-			'id' => 'show_no_signatures',
-			'label' => $txt['show_no_signatures'],
-			'default' => true,
-		),
-		array(
-			'id' => 'return_to_post',
-			'label' => $txt['return_to_post'],
-			'default' => true,
-		),
-		array(
-			'id' => 'no_new_reply_warning',
-			'label' => $txt['no_new_reply_warning'],
-			'default' => true,
-		),
-		array(
-			'id' => 'view_newest_first',
-			'label' => $txt['recent_posts_at_top'],
-			'default' => true,
-		),
-		array(
-			'id' => 'view_newest_pm_first',
-			'label' => $txt['recent_pms_at_top'],
-			'default' => true,
-		),
-		array(
-			'id' => 'posts_apply_ignore_list',
-			'label' => $txt['posts_apply_ignore_list'],
-			'default' => false,
-		),
-		array(
-			'id' => 'wysiwyg_default',
-			'label' => $txt['wysiwyg_default'],
-			'default' => false,
-		),
-		array(
-			'id' => 'popup_messages',
-			'label' => $txt['popup_messages'],
-			'default' => true,
-		),
-		array(
-			'id' => 'copy_to_outbox',
-			'label' => $txt['copy_to_outbox'],
-			'default' => true,
-		),
-		array(
-			'id' => 'pm_remove_inbox_label',
-			'label' => $txt['pm_remove_inbox_label'],
-			'default' => true,
-		),
-		array(
-			'id' => 'auto_notify',
-			'label' => $txt['auto_notify'],
-			'default' => true,
-		),
-		array(
-			'id' => 'topics_per_page',
-			'label' => $txt['topics_per_page'],
-			'options' => array(
-				0 => $txt['per_page_default'],
-				5 => 5,
-				10 => 10,
-				25 => 25,
-				50 => 50,
-			),
-			'default' => true,
-		),
-		array(
-			'id' => 'messages_per_page',
-			'label' => $txt['messages_per_page'],
-			'options' => array(
-				0 => $txt['per_page_default'],
-				5 => 5,
-				10 => 10,
-				25 => 25,
-				50 => 50,
-			),
-			'default' => true,
-		),
-		array(
-			'id' => 'calendar_start_day',
-			'label' => $txt['calendar_start_day'],
-			'options' => array(
-				0 => $txt['days'][0],
-				1 => $txt['days'][1],
-				6 => $txt['days'][6],
-			),
-			'default' => true,
-		),
-		array(
-			'id' => 'display_quick_reply',
-			'label' => $txt['display_quick_reply'],
-			'options' => array(
-				0 => $txt['display_quick_reply1'],
-				1 => $txt['display_quick_reply2'],
-				2 => $txt['display_quick_reply3']
-				3 => $txt['display_quick_reply4']
-			),
-			'default' => true,
-		),
-		array(
-			'id' => 'display_quick_mod',
-			'label' => $txt['display_quick_mod'],
-			'options' => array(
-				0 => $txt['display_quick_mod_none'],
-				1 => $txt['display_quick_mod_check'],
-				2 => $txt['display_quick_mod_image'],
-			),
-			'default' => true,
-		),
-	);
-}
-
-function template_settings()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	$context['theme_settings'] = array(
-		array(
-			'id' => 'header_logo_url',
-			'label' => $txt['header_logo_url'],
-			'description' => $txt['header_logo_url_desc'],
-			'type' => 'text',
-		),
-		array(
-			'id' => 'site_slogan',
-			'label' => $txt['site_slogan'],
-			'description' => $txt['site_slogan_desc'],
-			'type' => 'text',
-		),
-		array(
-			'id' => 'smiley_sets_default',
-			'label' => $txt['smileys_default_set_for_theme'],
-			'options' => $context['smiley_sets'],
-			'type' => 'text',
-		),
-	'',
-		array(
-			'id' => 'linktree_link',
-			'label' => $txt['current_pos_text_img'],
-		),
-		array(
-			'id' => 'show_mark_read',
-			'label' => $txt['enable_mark_as_read'],
-		),
-		array(
-			'id' => 'enable_news',
-			'label' => $txt['enable_random_news'],
-		),
-	'',
-		array(
-			'id' => 'show_newsfader',
-			'label' => $txt['news_fader'],
-		),
-		array(
-			'id' => 'newsfader_time',
-			'label' => $txt['admin_fader_delay'],
-			'type' => 'number',
-		),
-		array(
-			'id' => 'number_recent_posts',
-			'label' => $txt['number_recent_posts'],
-			'description' => $txt['number_recent_posts_desc'],
-			'type' => 'number',
-		),
-		array(
-			'id' => 'show_stats_index',
-			'label' => $txt['show_stats_index'],
-		),
-		array(
-			'id' => 'show_latest_member',
-			'label' => $txt['latest_members'],
-		),
-		array(
-			'id' => 'show_group_key',
-			'label' => $txt['show_group_key'],
-		),
-		array(
-			'id' => 'display_who_viewing',
-			'label' => $txt['who_display_viewing'],
-			'options' => array(
-				0 => $txt['who_display_viewing_off'],
-				1 => $txt['who_display_viewing_numbers'],
-				2 => $txt['who_display_viewing_names'],
-			),
-			'type' => 'number',
-		),
-	'',
-		array(
-			'id' => 'show_modify',
-			'label' => $txt['last_modification'],
-		),
-		array(
-			'id' => 'show_profile_buttons',
-			'label' => $txt['show_view_profile_button'],
-		),
-		array(
-			'id' => 'show_user_images',
-			'label' => $txt['user_avatars'],
-		),
-		array(
-			'id' => 'show_blurb',
-			'label' => $txt['user_text'],
-		),
-		array(
-			'id' => 'show_gender',
-			'label' => $txt['gender_images'],
-		),
-		array(
-			'id' => 'hide_post_group',
-			'label' => $txt['hide_post_group'],
-			'description' => $txt['hide_post_group_desc'],
-		),
-	'',
-		array(
-			'id' => 'show_bbc',
-			'label' => $txt['admin_bbc'],
-		),
-		array(
-			'id' => 'additional_options_collapsable',
-			'label' => $txt['additional_options_collapsable'],
-		),
-	'',
-		array(
-			'id' => 'message_index_preview',
-			'label' => $txt['message_index_preview'],
-		),
-		array(
-			'id' => 'message_index_preview_first',
-			'label' => $txt['message_index_preview_first'],
-			'description' => $txt['message_index_preview_first_desc'],
-		),
-	);
-}
-
-?>

+ 0 - 441
Themes/penguin/Stats.template.php

@@ -1,441 +0,0 @@
-<?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 class="clear"></div>
-					</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 class="clear"></div>
-					</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 class="clear"></div>
-						</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 class="clear"></div>
-						</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 class="clear"></div>
-						</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 class="clear"></div>
-					</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 class="clear"></div>
-					</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 class="clear"></div>
-					</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="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 width="15%">', $txt['most_online'], '</th>';
-
-		if (!empty($modSettings['hitStats']))
-			echo '
-					<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'], '/collapse.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'] ? 'collapse.png' : 'expand.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: \'expand.png\',
-			sYearImageExpanded: \'collapse.png\',
-			sYearImageIdPrefix: \'year_img_\',
-			sYearLinkIdPrefix: \'year_link_\',
-
-			reMonthPattern: /tr_month_(\d+)/,
-			sMonthImageCollapsed: \'expand.png\',
-			sMonthImageExpanded: \'collapse.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>';
-	}
-}
-
-?>

+ 0 - 1152
Themes/penguin/Themes.template.php

@@ -1,1152 +0,0 @@
-<?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 sub template - for theme administration.
-function template_main()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	echo '
-	<div id="admincenter">
-		<form action="', $scripturl, '?action=admin;area=theme;sa=admin" method="post" accept-charset="', $context['character_set'], '">
-			<input type="hidden" value="0" name="options[theme_allow]" />
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<a href="', $scripturl, '?action=helpadmin;help=themes" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" align="top" /></a>
-					', $txt['themeadmin_title'], '
-				</h3>
-			</div>
-			<div class="information">
-				', $txt['themeadmin_explain'], '
-			</div>
-			<div class="windowbg2">
-				<div class="content">
-					<dl class="settings">
-						<dt>
-							<label for="options-theme_allow"> ', $txt['theme_allow'], '</label>
-						</dt>
-						<dd>
-							<input type="checkbox" name="options[theme_allow]" id="options-theme_allow" value="1"', !empty($modSettings['theme_allow']) ? ' checked="checked"' : '', ' class="input_check" />
-						</dd>
-						<dt>
-							<label for="known_themes_list">', $txt['themeadmin_selectable'], '</label>:
-						</dt>
-						<dd>
-							<div id="known_themes_list">';
-	foreach ($context['themes'] as $theme)
-		echo '
-								<label for="options-known_themes_', $theme['id'], '"><input type="checkbox" name="options[known_themes][]" id="options-known_themes_', $theme['id'], '" value="', $theme['id'], '"', $theme['known'] ? ' checked="checked"' : '', ' class="input_check" /> ', $theme['name'], '</label><br />';
-
-		echo '
-							</div>
-							<a href="javascript:void(0);" onclick="document.getElementById(\'known_themes_list\').style.display=\'block\'; document.getElementById(\'known_themes_link\').style.display = \'none\'; return false; " id="known_themes_link" style="display: none;">[ ', $txt['themeadmin_themelist_link'], ' ]</a>
-							<script type="text/javascript"><!-- // --><![CDATA[
-								document.getElementById("known_themes_list").style.display = "none";
-								document.getElementById("known_themes_link").style.display = "";
-							// ]]></script>
-						</dd>
-						<dt>
-							<label for="theme_guests">', $txt['theme_guests'], ':</label>
-						</dt>
-						<dd>
-							<select name="options[theme_guests]" id="theme_guests">';
-
-	// Put an option for each theme in the select box.
-	foreach ($context['themes'] as $theme)
-		echo '
-								<option value="', $theme['id'], '"', $modSettings['theme_guests'] == $theme['id'] ? ' selected="selected"' : '', '>', $theme['name'], '</option>';
-
-	echo '
-							</select>
-							<span class="smalltext pick_theme"><a href="', $scripturl, '?action=theme;sa=pick;u=-1;', $context['session_var'], '=', $context['session_id'], '">', $txt['theme_select'], '</a></span>
-						</dd>
-						<dt>
-							<label for="theme_reset">', $txt['theme_reset'], '</label>:
-						</dt>
-						<dd>
-							<select name="theme_reset" id="theme_reset">
-								<option value="-1" selected="selected">', $txt['theme_nochange'], '</option>
-								<option value="0">', $txt['theme_forum_default'], '</option>';
-
-	// Same thing, this time for changing the theme of everyone.
-	foreach ($context['themes'] as $theme)
-		echo '
-								<option value="', $theme['id'], '">', $theme['name'], '</option>';
-
-	echo '
-							</select>
-							<span class="smalltext pick_theme"><a href="', $scripturl, '?action=theme;sa=pick;u=0;', $context['session_var'], '=', $context['session_id'], '">', $txt['theme_select'], '</a></span>
-						</dd>
-					</dl>
-					<hr class="hrcolor" />
-					<input type="submit" name="save" value="' . $txt['save'] . '" class="button_submit" />
-					<br class="clear_right" />
-				</div>
-			</div>
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="', $context['admin-tm_token_var'], '" value="', $context['admin-tm_token'], '" />
-		</form>';
-
-	// Warn them if theme creation isn't possible!
-	if (!$context['can_create_new'])
-		echo '
-		<div class="errorbox">', $txt['theme_install_writable'], '</div>';
-
-		echo '
-		<form action="', $scripturl, '?action=admin;area=theme;sa=install" method="post" accept-charset="', $context['character_set'], '" enctype="multipart/form-data" onsubmit="return confirm(\'', $txt['theme_install_new_confirm'], '\');">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<a href="', $scripturl, '?action=helpadmin;help=theme_install" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a> ', $txt['theme_install'], '
-				</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<dl class="settings">';
-
-	// Here's a little box for installing a new theme.
-	// @todo Should the value="theme_gz" be there?!
-	if ($context['can_create_new'])
-		echo '
-						<dt>
-							<label for="theme_gz">', $txt['theme_install_file'], '</label>:
-						</dt>
-						<dd>
-							<input type="file" name="theme_gz" id="theme_gz" value="theme_gz" size="40" onchange="this.form.copy.disabled = this.value != \'\'; this.form.theme_dir.disabled = this.value != \'\';" class="input_file" />
-						</dd>';
-
-	echo '
-						<dt>
-							<label for="theme_dir">', $txt['theme_install_dir'], '</label>:
-						</dt>
-						<dd>
-							<input type="text" name="theme_dir" id="theme_dir" value="', $context['new_theme_dir'], '" size="40" style="width: 70%;" class="input_text" />
-						</dd>';
-
-	if ($context['can_create_new'])
-		echo '
-						<dt>
-							<label for="copy">', $txt['theme_install_new'], ':</label>
-						</dt>
-						<dd>
-							<input type="text" name="copy" id="copy" value="', $context['new_theme_name'], '" size="40" class="input_text" />
-						</dd>';
-
-	echo '
-					</dl>
-					<hr class="hrcolor" />
-					<input type="submit" name="save" value="', $txt['theme_install_go'], '" class="button_submit" />
-					</br class="clear_right" />
-				</div>
-
-			</div>
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="', $context['admin-tm_token_var'], '" value="', $context['admin-tm_token'], '" />
-		</form>
-	</div>';
-
-	// Link to simplemachines.org for latest themes and info!
-	echo '
-		<div class="cat_bar">
-			<h3 class="catbg">
-				<a href="', $scripturl, '?action=helpadmin;help=latest_themes" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a> ', $txt['theme_latest'], '
-			</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content">
-				<div id="themeLatest">
-					', $txt['theme_latest_fetch'], '
-				</div>
-			</div>
-		</div>
-		<br class="clear" />';
-
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			window.smfForum_scripturl = "', $scripturl, '";
-			window.smfForum_sessionid = "', $context['session_id'], '";
-			window.smfForum_sessionvar = "', $context['session_var'], '";
-			window.smfThemes_writable = ', $context['can_create_new'] ? 'true' : 'false', ';
-		// ]]></script>';
-
-	if (empty($modSettings['disable_smf_js']))
-		echo '
-		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-themes.js"></script>';
-
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var tempOldOnload;
-			smfSetLatestThemes();
-		// ]]></script>';
-}
-
-function template_list_themes()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['themeadmin_list_heading'], '</h3>
-		</div>
-		<div class="information">
-			', $txt['themeadmin_list_tip'], '
-		</div>';
-
-	// Show each theme.... with X for delete and a link to settings.
-	foreach ($context['themes'] as $theme)
-	{
-		echo '
-			<div class="title_bar">
-				<h3 class="titlebg">
-					<span class="floatleft"><strong><a href="', $scripturl, '?action=admin;area=theme;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=settings">', $theme['name'], '</a></strong>', !empty($theme['version']) ? ' <em>(' . $theme['version'] . ')</em>' : '', '</span>';
-
-			// You *cannot* delete the default theme. It's important!
-			if ($theme['id'] != 1)
-				echo '
-					<span class="floatright"><a href="', $scripturl, '?action=admin;area=theme;sa=remove;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['admin-tr_token_var'], '=', $context['admin-tr_token'], '" onclick="return confirm(\'', $txt['theme_remove_confirm'], '\');"><img src="', $settings['images_url'], '/icons/delete.png" alt="', $txt['theme_remove'], '" title="', $txt['theme_remove'], '" /></a></span>';
-
-			echo '
-				</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<dl class="settings themes_list">
-						<dt>', $txt['themeadmin_list_theme_dir'], ':</dt>
-						<dd', $theme['valid_path'] ? '' : ' class="error"', '>', $theme['theme_dir'], $theme['valid_path'] ? '' : ' ' . $txt['themeadmin_list_invalid'], '</dd>
-						<dt>', $txt['themeadmin_list_theme_url'], ':</dt>
-						<dd>', $theme['theme_url'], '</dd>
-						<dt>', $txt['themeadmin_list_images_url'], ':</dt>
-						<dd>', $theme['images_url'], '</dd>
-					</dl>
-				</div>
-
-			</div>';
-	}
-
-	echo '
-
-		<form action="', $scripturl, '?action=admin;area=theme;', $context['session_var'], '=', $context['session_id'], ';sa=list" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['themeadmin_list_reset'], '</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<dl class="settings">
-						<dt>
-							<label for="reset_dir">', $txt['themeadmin_list_reset_dir'], '</label>:
-						</dt>
-						<dd>
-							<input type="text" name="reset_dir" id="reset_dir" value="', $context['reset_dir'], '" size="40" style="width: 80%;" class="input_text" />
-						</dd>
-						<dt>
-							<label for="reset_url">', $txt['themeadmin_list_reset_url'], '</label>:
-						</dt>
-						<dd>
-							<input type="text" name="reset_url" id="reset_url" value="', $context['reset_url'], '" size="40" style="width: 80%;" class="input_text" />
-						</dd>
-					</dl>
-					<input type="submit" name="save" value="', $txt['themeadmin_list_reset_go'], '" class="button_submit" />
-					<br class="clear_right" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-tl_token_var'], '" value="', $context['admin-tl_token'], '" />
-				</div>
-
-			</div>
-		</form>
-	</div>
-	<br class="clear" />';
-}
-
-function template_reset_list()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['themeadmin_reset_title'], '</h3>
-		</div>
-		<div class="information">
-			', $txt['themeadmin_reset_tip'], '
-		</div>';
-
-	// Show each theme.... with X for delete and a link to settings.
-	$alternate = false;
-
-	foreach ($context['themes'] as $theme)
-	{
-		$alternate = !$alternate;
-
-		echo '
-		<div class="title_bar">
-			<h3 class="titlebg">', $theme['name'], '</h3>
-		</div>
-		<div class="windowbg', $alternate ? '' : '2','">
-			<div class="content">
-				<ul class="reset">
-					<li>
-						<a href="', $scripturl, '?action=admin;area=theme;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=reset">', $txt['themeadmin_reset_defaults'], '</a> <em class="smalltext">(', $theme['num_default_options'], ' ', $txt['themeadmin_reset_defaults_current'], ')</em>
-					</li>
-					<li>
-						<a href="', $scripturl, '?action=admin;area=theme;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=reset;who=1">', $txt['themeadmin_reset_members'], '</a>
-					</li>
-					<li>
-						<a href="', $scripturl, '?action=admin;area=theme;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=reset;who=2;', $context['admin-stor_token_var'], '=', $context['admin-stor_token'], '" onclick="return confirm(\'', $txt['themeadmin_reset_remove_confirm'], '\');">', $txt['themeadmin_reset_remove'], '</a> <em class="smalltext">(', $theme['num_members'], ' ', $txt['themeadmin_reset_remove_current'], ')</em>
-					</li>
-				</ul>
-			</div>
-		</div>
-		<br class="clear" />';
-	}
-
-	echo '
-	</div>
-	<br class="clear" />';
-}
-
-function template_set_options()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<form action="', $scripturl, '?action=admin;area=theme;th=', $context['theme_settings']['theme_id'], ';sa=reset" method="post" accept-charset="', $context['character_set'], '">
-			<input type="hidden" name="who" value="', $context['theme_options_reset'] ? 1 : 0, '" />
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['theme_options_title'], ' - ', $context['theme_settings']['name'], '</h3>
-			</div>
-			<div class="information">
-				', $context['theme_options_reset'] ? $txt['themeadmin_reset_options_info'] : $txt['theme_options_defaults'], '
-			</div>
-			<div class="windowbg2">
-				<div class="content">';
-	echo '
-					<dl class="settings">';
-
-	foreach ($context['options'] as $setting)
-	{
-		echo '
-						<dt ', $context['theme_options_reset'] ? 'style="width:50%"' : '', '>';
-						
-		// Show the change option box ?
-		if ($context['theme_options_reset'])
-			echo '
-							<span class="floatleft"><select name="', !empty($setting['default']) ? 'default_' : '', 'options_master[', $setting['id'], ']" onchange="this.form.options_', $setting['id'], '.disabled = this.selectedIndex != 1;">
-								<option value="0" selected="selected">', $txt['themeadmin_reset_options_none'], '</option>
-								<option value="1">', $txt['themeadmin_reset_options_change'], '</option>
-								<option value="2">', $txt['themeadmin_reset_options_default'], '</option>
-							</select>&nbsp;</span>';
-		
-		// display checkbox options
-		if ($setting['type'] == 'checkbox')
-		{
-			echo '
-							<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
-			if (isset($setting['description']))
-				echo '
-							<br /><span class="smalltext">', $setting['description'], '</span>';
-		echo '
-						</dt>
-						<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
-							<input type="hidden" name="' . (!empty($setting['default']) ? 'default_' : '') . 'options[' . $setting['id'] . ']" value="0" />
-							<input type="checkbox" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', !empty($setting['value']) ? ' checked="checked"' : '', $context['theme_options_reset'] ? ' disabled="disabled"' : '', ' value="1" class="input_check floatleft" />';
-		}
-		// how about selection lists, we all love them
-		elseif ($setting['type'] == 'list')
-		{
-			echo '
-							<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
-			if (isset($setting['description']))
-				echo '
-							<br /><span class="smalltext">', $setting['description'], '</span>';
-		echo '
-						</dt>
-						<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
-							&nbsp;<select class="floatleft" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', $context['theme_options_reset'] ? ' disabled="disabled"' : '', '>';
-
-			foreach ($setting['options'] as $value => $label)
-			{
-				echo '
-								<option value="', $value, '"', $value == $setting['value'] ? ' selected="selected"' : '', '>', $label, '</option>';
-			}
-
-			echo '
-							</select>';
-		}
-		// a textbox it is then
-		else
-		{
-			echo '
-							<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
-			if (isset($setting['description']))
-				echo '
-							<br /><span class="smalltext">', $setting['description'], '</span>';
-		echo '
-						</dt>
-						<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
-							<input type="text" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '" value="', $setting['value'], '"', $setting['type'] == 'number' ? ' size="5"' : '', $context['theme_options_reset'] ? ' disabled="disabled"' : '', ' class="input_text" />';
-		}
-		
-		// end of this defintion 
-		echo '
-						</dd>';
-	}
-	
-	// close the option page up
-	echo '
-					</dl>
-					<hr class="hrcolor" />
-					<input type="submit" name="submit" value="', $txt['save'], '" class="button_submit" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<br class="clear_right" />
-				</div>
-			</div>
-		</form>
-	</div>
-	<br class="clear" />';
-}
-
-function template_set_settings()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<form action="', $scripturl, '?action=admin;area=theme;sa=settings;th=', $context['theme_settings']['theme_id'], '" method="post" accept-charset="', $context['character_set'], '">
-			<div class="title_bar">
-				<h3 class="titlebg">
-					<a href="', $scripturl, '?action=helpadmin;help=theme_settings" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" alt="', $txt['help'], '" class="icon" /></a> ', $txt['theme_settings'], ' - ', $context['theme_settings']['name'], '
-				</h3>
-			</div>';
-
-	// @todo Why can't I edit the default theme popup.
-	if ($context['theme_settings']['theme_id'] != 1)
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/config_sm.png" alt="" class="icon" /> ', $txt['theme_edit'], '
-				</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<ul class="reset">
-						<li>
-							<a href="', $scripturl, '?action=admin;area=theme;th=', $context['theme_settings']['theme_id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=edit;filename=index.template.php">', $txt['theme_edit_index'], '</a>
-						</li>
-						<li>
-							<a href="', $scripturl, '?action=admin;area=theme;th=', $context['theme_settings']['theme_id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=edit;directory=css">', $txt['theme_edit_style'], '</a>
-						</li>
-					</ul>
-				</div>
-			</div>
-			<br class="clear" />';
-
-	echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/config_sm.png" alt="" class="icon" /> ', $txt['theme_url_config'], '
-				</h3>
-			</div>
-			<div class="windowbg2">
-				<div class="content">
-					<dl class="settings">
-						<dt>
-							<label for="theme_name">', $txt['actual_theme_name'], '</label>
-						</dt>
-						<dd>
-							<input type="text" id="theme_name" name="options[name]" value="', $context['theme_settings']['name'], '" size="32" class="input_text" />
-						</dd>
-						<dt>
-							<label for="theme_url">', $txt['actual_theme_url'], '</label>
-						</dt>
-						<dd>
-							<input type="text" id="theme_url" name="options[theme_url]" value="', $context['theme_settings']['actual_theme_url'], '" size="50" style="max-width: 100%; width: 50ex;" class="input_text" />
-						</dd>
-						<dt>
-							<label for="images_url">', $txt['actual_images_url'], '</label>
-						</dt>
-						<dd>
-							<input type="text" id="images_url" name="options[images_url]" value="', $context['theme_settings']['actual_images_url'], '" size="50" style="max-width: 100%; width: 50ex;" class="input_text" />
-						</dd>
-						<dt>
-							<label for="theme_dir">', $txt['actual_theme_dir'], '</label>
-						</dt>
-						<dd>
-							<input type="text" id="theme_dir" name="options[theme_dir]" value="', $context['theme_settings']['actual_theme_dir'], '" size="50" style="max-width: 100%; width: 50ex;" class="input_text" />
-						</dd>
-					</dl>
-				</div>
-			</div>
-			<br class="clear" />';
-
-	// Do we allow theme variants?
-	if (!empty($context['theme_variants']))
-	{
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/config_sm.png" alt="" align="top" /> ', $txt['theme_variants'], '
-				</h3>
-			</div>
-			<div class="windowbg2">
-				<div class="content">
-					<dl class="settings">
-						<dt>
-							<label for="variant">', $txt['theme_variants_default'], '</label>:
-						</dt>
-						<dd>
-							<select id="variant" name="options[default_variant]" onchange="changeVariant(this.value)">';
-
-		foreach ($context['theme_variants'] as $key => $variant)
-			echo '
-								<option value="', $key, '" ', $context['default_variant'] == $key ? 'selected="selected"' : '', '>', $variant['label'], '</option>';
-
-		echo '
-							</select>
-						</dd>
-						<dt>
-							<label for="disable_user_variant">', $txt['theme_variants_user_disable'], '</label>:
-						</dt>
-						<dd>
-							<input type="hidden" name="options[disable_user_variant]" value="0" />
-							<input type="checkbox" name="options[disable_user_variant]" id="disable_user_variant"', !empty($context['theme_settings']['disable_user_variant']) ? ' checked="checked"' : '', ' value="1" class="input_check" />
-						</dd>
-					</dl>
-					<img src="', $context['theme_variants'][$context['default_variant']]['thumbnail'], '" id="variant_preview" alt="" />
-				</div>
-			</div>';
-	}
-
-	echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<img src="', $settings['images_url'], '/icons/config_sm.png" alt="" class="icon" /> ', $txt['theme_options'], '
-				</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<dl class="settings flow_auto">';
-
-	foreach ($context['settings'] as $setting)
-	{
-		// Is this a separator?
-		if (empty($setting))
-		{
-			echo '
-					</dl>
-					<hr class="hrcolor" />
-					<dl class="settings flow_auto">';
-		}
-		// A checkbox?
-		elseif ($setting['type'] == 'checkbox')
-		{
-			echo '
-						<dt>
-							<label for="', $setting['id'], '">', $setting['label'], '</label>:';
-
-			if (isset($setting['description']))
-				echo '<br />
-							<span class="smalltext">', $setting['description'], '</span>';
-
-			echo '
-						</dt>
-						<dd>
-							<input type="hidden" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" value="0" />
-							<input type="checkbox" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '"', !empty($setting['value']) ? ' checked="checked"' : '', ' value="1" class="input_check" />
-						</dd>';
-		}
-		// A list with options?
-		elseif ($setting['type'] == 'list')
-		{
-			echo '
-						<dt>
-							<label for="', $setting['id'], '">', $setting['label'], '</label>:';
-
-			if (isset($setting['description']))
-				echo '<br />
-							<span class="smalltext">', $setting['description'], '</span>';
-
-			echo '
-						</dt>
-						<dd>
-							<select name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '">';
-
-			foreach ($setting['options'] as $value => $label)
-				echo '
-							<option value="', $value, '"', $value == $setting['value'] ? ' selected="selected"' : '', '>', $label, '</option>';
-
-			echo '
-							</select>
-						</dd>';
-		}
-		// A regular input box, then?
-		else
-		{
-			echo '
-						<dt>
-							<label for="', $setting['id'], '">', $setting['label'], '</label>:';
-
-			if (isset($setting['description']))
-				echo '<br />
-							<span class="smalltext">', $setting['description'], '</span>';
-
-			echo '
-						</dt>
-						<dd>
-							<input type="text" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '" value="', $setting['value'], '"', $setting['type'] == 'number' ? ' size="5"' : (empty($setting['size']) ? ' size="40"' : ' size="' . $setting['size'] . '"'), ' class="input_text" />
-						</dd>';
-		}
-	}
-
-	echo '
-					</dl>
-					<hr class="hrcolor" />
-					<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" /><br />
-					<br class="clear_right" />
-				</div>
-
-			</div>
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-			<input type="hidden" name="', $context['admin-sts_token_var'], '" value="', $context['admin-sts_token'], '" />
-		</form>
-	</div>
-	<br class="clear" />';
-
-	if (!empty($context['theme_variants']))
-	{
-		echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-		var oThumbnails = {';
-
-		// All the variant thumbnails.
-		$count = 1;
-		foreach ($context['theme_variants'] as $key => $variant)
-		{
-			echo '
-			\'', $key, '\': \'', $variant['thumbnail'], '\'', (count($context['theme_variants']) == $count ? '' : ',');
-			$count++;
-		}
-
-		echo '
-		}
-		// ]]></script>';
-	}
-}
-
-// This template allows for the selection of different themes ;).
-function template_pick()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="pick_theme">
-		<form action="', $scripturl, '?action=theme;sa=pick;u=', $context['current_member'], ';', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">';
-
-	// Just go through each theme and show its information - thumbnail, etc.
-	foreach ($context['available_themes'] as $theme)
-	{
-		echo '
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<a href="', $scripturl, '?action=theme;sa=pick;u=', $context['current_member'], ';th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], !empty($theme['variants']) ? ';vrt=' . $theme['selected_variant'] : '', '">', $theme['name'], '</a>
-				</h3>
-			</div>
-			<div class="', $theme['selected'] ? 'windowbg' : 'windowbg2', '">
-				<div class="flow_hidden content">
-					<div class="floatright"><a href="', $scripturl, '?action=theme;sa=pick;u=', $context['current_member'], ';theme=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], '" id="theme_thumb_preview_', $theme['id'], '" title="', $txt['theme_preview'], '"><img src="', $theme['thumbnail_href'], '" id="theme_thumb_', $theme['id'], '" alt="" class="padding" /></a></div>
-					<p>', $theme['description'], '</p>';
-
-		if (!empty($theme['variants']))
-		{
-			echo '
-					<label for="variant', $theme['id'], '"><strong>', $theme['pick_label'], '</strong></label>:
-					<select id="variant', $theme['id'], '" name="vrt[', $theme['id'], ']" onchange="changeVariant', $theme['id'], '(this.value);">';
-
-			foreach ($theme['variants'] as $key => $variant)
-			{
-				echo '
-						<option value="', $key, '" ', $theme['selected_variant'] == $key ? 'selected="selected"' : '', '>', $variant['label'], '</option>';
-			}
-			echo '
-					</select>
-					<noscript>
-						<input type="submit" name="save[', $theme['id'], ']" value="', $txt['save'], '" class="button_submit" />
-					</noscript>';
-		}
-
-		echo '
-					<br />
-					<p>
-						<em class="smalltext">', $theme['num_users'], ' ', ($theme['num_users'] == 1 ? $txt['theme_user'] : $txt['theme_users']), '</em>
-					</p>
-					<br />
-					<ul class="reset">
-						<li>
-							<a href="', $scripturl, '?action=theme;sa=pick;u=', $context['current_member'], ';th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], !empty($theme['variants']) ? ';vrt=' . $theme['selected_variant'] : '', '" id="theme_use_', $theme['id'], '">[', $txt['theme_set'], ']</a>
-						</li>
-						<li>
-							<a href="', $scripturl, '?action=theme;sa=pick;u=', $context['current_member'], ';theme=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], '" id="theme_preview_', $theme['id'], '">[', $txt['theme_preview'], ']</a>
-						</li>
-					</ul>
-				</div>
-			</div>
-			<br class="clear" />';
-
-		if (!empty($theme['variants']))
-		{
-			echo '
-			<script type="text/javascript"><!-- // --><![CDATA[
-			var sBaseUseUrl', $theme['id'], ' = smf_prepareScriptUrl(smf_scripturl) + \'action=theme;sa=pick;u=', $context['current_member'], ';th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], '\';
-			var sBasePreviewUrl', $theme['id'], ' = smf_prepareScriptUrl(smf_scripturl) + \'action=theme;sa=pick;u=', $context['current_member'], ';theme=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], '\';
-			var oThumbnails', $theme['id'], ' = {';
-
-			// All the variant thumbnails.
-			$count = 1;
-			foreach ($theme['variants'] as $key => $variant)
-			{
-				echo '
-				\'', $key, '\': \'', $variant['thumbnail'], '\'', (count($theme['variants']) == $count ? '' : ',');
-				$count++;
-			}
-
-			echo '
-			}
-
-			function changeVariant', $theme['id'], '(sVariant)
-			{
-				document.getElementById(\'theme_thumb_', $theme['id'], '\').src = oThumbnails', $theme['id'], '[sVariant];
-				document.getElementById(\'theme_use_', $theme['id'], '\').href = sBaseUseUrl', $theme['id'], ' + \';vrt=\' + sVariant;
-				document.getElementById(\'theme_thumb_preview_', $theme['id'], '\').href = sBasePreviewUrl', $theme['id'], ' + \';vrt=\' + sVariant + \';variant=\' + sVariant;
-				document.getElementById(\'theme_preview_', $theme['id'], '\').href = sBasePreviewUrl', $theme['id'], ' + \';vrt=\' + sVariant + \';variant=\' + sVariant;
-			}
-			// ]]></script>';
-		}
-	}
-
-	echo '
-		</form>
-	</div>
-	<br class="clear" />';
-}
-
-// Okay, that theme was installed successfully!
-function template_installed()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	// Not much to show except a link back...
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">', $context['page_title'], '</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content">
-				<p>
-					<a href="', $scripturl, '?action=admin;area=theme;sa=settings;th=', $context['installed_theme']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $context['installed_theme']['name'], '</a> ', $txt['theme_installed_message'], '
-				</p>
-				<p>
-					<a href="', $scripturl, '?action=admin;area=theme;sa=admin;', $context['session_var'], '=', $context['session_id'], '">', $txt['back'], '</a>
-				</p>
-			</div>
-		</div>
-	</div>
-	<br class="clear" />';
-}
-
-function template_edit_list()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['themeadmin_edit_title'], '</h3>
-		</div>';
-
-	$alternate = false;
-
-	foreach ($context['themes'] as $theme)
-	{
-		$alternate = !$alternate;
-
-		echo '
-		<div class="title_bar">
-			<h3 class="titlebg">
-				<a href="', $scripturl, '?action=admin;area=theme;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=edit">', $theme['name'], '</a>', !empty($theme['version']) ? '
-				<em>(' . $theme['version'] . ')</em>' : '', '
-			</h3>
-		</div>
-		<div class="windowbg', $alternate ? '' : '2','">
-			<div class="content">
-				<ul class="reset">
-					<li><a href="', $scripturl, '?action=admin;area=theme;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=edit">', $txt['themeadmin_edit_browse'], '</a></li>', $theme['can_edit_style'] ? '
-					<li><a href="' . $scripturl . '?action=admin;area=theme;th=' . $theme['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';sa=edit;directory=css">' . $txt['themeadmin_edit_style'] . '</a></li>' : '', '
-					<li><a href="', $scripturl, '?action=admin;area=theme;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=copy">', $txt['themeadmin_edit_copy_template'], '</a></li>
-				</ul>
-			</div>
-		</div>
-		<br class="clear" />';
-	}
-
-	echo '
-	</div>
-	<br class="clear" />';
-}
-
-function template_copy_template()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['themeadmin_edit_filename'], '</h3>
-		</div>
-		<div class="information">
-			', $txt['themeadmin_edit_copy_warning'], '
-		</div>
-		<div class="windowbg">
-			<div class="content">
-				<ul class="theme_options">';
-
-	$alternate = false;
-	foreach ($context['available_templates'] as $template)
-	{
-		$alternate = !$alternate;
-
-		echo '
-					<li class="reset flow_hidden windowbg', $alternate ? '2' : '', '">
-						<span class="floatleft">', $template['filename'], $template['already_exists'] ? ' <span class="error">(' . $txt['themeadmin_edit_exists'] . ')</span>' : '', '</span>
-						<span class="floatright">';
-
-		if ($template['can_copy'])
-			echo '<a href="', $scripturl, '?action=admin;area=theme;th=', $context['theme_id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=copy;template=', $template['value'], '" onclick="return confirm(\'', $template['already_exists'] ? $txt['themeadmin_edit_overwrite_confirm'] : $txt['themeadmin_edit_copy_confirm'], '\');">', $txt['themeadmin_edit_do_copy'], '</a>';
-		else
-			echo $txt['themeadmin_edit_no_copy'];
-
-		echo '
-						</span>
-					</li>';
-	}
-
-	echo '
-				</ul>
-			</div>
-		</div>
-	</div>
-	<br class="clear" />';
-}
-
-function template_edit_browse()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	echo '
-	<div id="admincenter">
-		<table width="100%" class="table_grid tborder">
-		<thead>
-			<tr class="catbg">
-				<th class="lefttext first_th" scope="col" width="50%">', $txt['themeadmin_edit_filename'], '</th>
-				<th scope="col" width="35%">', $txt['themeadmin_edit_modified'], '</th>
-				<th class="last_th" scope="col" width="15%">', $txt['themeadmin_edit_size'], '</th>
-			</tr>
-		</thead>
-		<tbody>';
-
-	$alternate = false;
-
-	foreach ($context['theme_files'] as $file)
-	{
-		$alternate = !$alternate;
-
-		echo '
-			<tr class="windowbg', $alternate ? '2' : '', '">
-				<td>';
-
-		if ($file['is_editable'])
-			echo '<a href="', $file['href'], '"', $file['is_template'] ? ' style="font-weight: bold;"' : '', '>', $file['filename'], '</a>';
-
-		elseif ($file['is_directory'])
-			echo '<a href="', $file['href'], '" class="is_directory">', $file['filename'], '</a>';
-
-		else
-			echo $file['filename'];
-
-		echo '
-				</td>
-				<td class="righttext">', !empty($file['last_modified']) ? $file['last_modified'] : '', '</td>
-				<td class="righttext">', $file['size'], '</td>
-			</tr>';
-	}
-
-	echo '
-		</tbody>
-		</table>
-	</div>
-	<br class="clear" />';
-}
-
-// Wanna edit the stylesheet?
-function template_edit_style()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	if ($context['session_error'])
-		echo '
-	<div class="errorbox">
-		', $txt['error_session_timeout'], '
-	</div>';
-
-	// From now on no one can complain that editing css is difficult. If you disagree, go to www.w3schools.com.
-	echo '
-	<div id="admincenter">
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var previewData = "";
-			var previewTimeout;
-			var editFilename = ', JavaScriptEscape($context['edit_filename']), ';
-
-			// Load up a page, but apply our stylesheet.
-			function navigatePreview(url)
-			{
-				var myDoc = new XMLHttpRequest();
-				myDoc.onreadystatechange = function ()
-				{
-					if (myDoc.readyState != 4)
-						return;
-
-					if (myDoc.responseText != null && myDoc.status == 200)
-					{
-						previewData = myDoc.responseText;
-						document.getElementById("css_preview_box").style.display = "";
-
-						// Revert to the theme they actually use ;).
-						var tempImage = new Image();
-						tempImage.src = smf_prepareScriptUrl(smf_scripturl) + "action=admin;area=theme;sa=edit;theme=', $settings['theme_id'], ';preview;" + (new Date().getTime());
-
-						refreshPreviewCache = null;
-						refreshPreview(false);
-					}
-				};
-
-				var anchor = "";
-				if (url.indexOf("#") != -1)
-				{
-					anchor = url.substr(url.indexOf("#"));
-					url = url.substr(0, url.indexOf("#"));
-				}
-
-				myDoc.open("GET", url + (url.indexOf("?") == -1 ? "?" : ";") + "theme=', $context['theme_id'], '" + anchor, true);
-				myDoc.send(null);
-			}
-			navigatePreview(smf_scripturl);
-
-			var refreshPreviewCache;
-			function refreshPreview(check)
-			{
-				var identical = document.forms.stylesheetForm.entire_file.value == refreshPreviewCache;
-
-				// Don\'t reflow the whole thing if nothing changed!!
-				if (check && identical)
-					return;
-				refreshPreviewCache = document.forms.stylesheetForm.entire_file.value;
-				// Replace the paths for images.
-				refreshPreviewCache = refreshPreviewCache.replace(/url\(\.\.\/images/gi, "url(" + smf_images_url);
-
-				// Try to do it without a complete reparse.
-				if (identical)
-				{
-					try
-					{
-					';
-	if (isBrowser('is_ie'))
-		echo '
-						var sheets = frames["css_preview_box"].document.styleSheets;
-						for (var j = 0; j < sheets.length; j++)
-						{
-							if (sheets[j].id == "css_preview_box")
-								sheets[j].cssText = document.forms.stylesheetForm.entire_file.value;
-						}';
-	else
-		echo '
-						setInnerHTML(frames["css_preview_box"].document.getElementById("css_preview_sheet"), document.forms.stylesheetForm.entire_file.value);';
-	echo '
-					}
-					catch (e)
-					{
-						identical = false;
-					}
-				}
-
-				// This will work most of the time... could be done with an after-apply, maybe.
-				if (!identical)
-				{
-					var data = previewData + "";
-					var preview_sheet = document.forms.stylesheetForm.entire_file.value;
-					var stylesheetMatch = new RegExp(\'<link rel="stylesheet"[^>]+href="[^"]+\' + editFilename + \'[^>]*>\');
-
-					// Replace the paths for images.
-					preview_sheet = preview_sheet.replace(/url\(\.\.\/images/gi, "url(" + smf_images_url);
-					data = data.replace(stylesheetMatch, "<style type=\"text/css\" id=\"css_preview_sheet\">" + preview_sheet + "<" + "/style>");
-
-					frames["css_preview_box"].document.open();
-					frames["css_preview_box"].document.write(data);
-					frames["css_preview_box"].document.close();
-
-					// Next, fix all its links so we can handle them and reapply the new css!
-					frames["css_preview_box"].onload = function ()
-					{
-						var fixLinks = frames["css_preview_box"].document.getElementsByTagName("a");
-						for (var i = 0; i < fixLinks.length; i++)
-						{
-							if (fixLinks[i].onclick)
-								continue;
-							fixLinks[i].onclick = function ()
-							{
-								window.parent.navigatePreview(this.href);
-								return false;
-							};
-						}
-					};
-				}
-			}
-		// ]]></script>
-		<iframe id="css_preview_box" name="css_preview_box" src="about:blank" width="99%" height="300" frameborder="0" style="display: none; margin-bottom: 2ex; border: 1px solid black;"></iframe>';
-
-	// Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.)
-	echo '
-		<form action="', $scripturl, '?action=admin;area=theme;th=', $context['theme_id'], ';sa=edit" method="post" accept-charset="', $context['character_set'], '" name="stylesheetForm" id="stylesheetForm">
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['theme_edit'], ' - ', $context['edit_filename'], '</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">';
-
-	if (!$context['allow_save'])
-		echo '
-					', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br />';
-
-	echo '
-					<textarea name="entire_file" cols="80" rows="20" style="' . (isBrowser('is_ie8') ? 'width: 635px; max-width: 96%; min-width: 96%' : 'width: 96%') . '; font-family: monospace; margin-top: 1ex; white-space: pre;" onkeyup="setPreviewTimeout();" onchange="refreshPreview(true);">', $context['entire_file'], '</textarea><br />
-					<div class="padding righttext">
-						<input type="submit" name="save" value="', $txt['theme_edit_save'], '"', $context['allow_save'] ? '' : ' disabled="disabled"', ' style="margin-top: 1ex;" class="button_submit" />
-						<input type="button" value="', $txt['themeadmin_edit_preview'], '" onclick="refreshPreview(false);" class="button_submit" />
-					</div>
-				</div>
-
-			</div>
-			<input type="hidden" name="filename" value="', $context['edit_filename'], '" />
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-		</form>
-	</div>
-	<br class="clear" />';
-}
-
-// This edits the template...
-function template_edit_template()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	if ($context['session_error'])
-		echo '
-	<div class="errorbox">
-		', $txt['error_session_timeout'], '
-	</div>';
-
-	if (isset($context['parse_error']))
-		echo '
-	<div class="errorbox">
-		', $txt['themeadmin_edit_error'], '
-			<div><tt>', $context['parse_error'], '</tt></div>
-	</div>';
-
-	// Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.)
-	echo '
-	<div id="admincenter">
-		<form action="', $scripturl, '?action=admin;area=theme;th=', $context['theme_id'], ';sa=edit" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['theme_edit'], ' - ', $context['edit_filename'], '</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">';
-
-	if (!$context['allow_save'])
-		echo '
-					', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br />';
-
-	foreach ($context['file_parts'] as $part)
-		echo '
-					<label for="on_line', $part['line'], '">', $txt['themeadmin_edit_on_line'], ' ', $part['line'], '</label>:<br />
-					<div class="centertext">
-						<textarea id="on_line', $part['line'] ,'" name="entire_file[]" cols="80" rows="', $part['lines'] > 14 ? '14' : $part['lines'], '" class="edit_file">', $part['data'], '</textarea>
-					</div>';
-
-	echo '
-					<div class="padding righttext">
-						<input type="submit" name="save" value="', $txt['theme_edit_save'], '"', $context['allow_save'] ? '' : ' disabled="disabled"', ' class="button_submit" />
-						<input type="hidden" name="filename" value="', $context['edit_filename'], '" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					</div>
-				</div>
-
-			</div>
-		</form>
-	</div>';
-}
-
-function template_edit_file()
-{
-	global $context, $settings, $options, $scripturl, $txt;
-
-	if ($context['session_error'])
-		echo '
-	<div class="errorbox">
-		', $txt['error_session_timeout'], '
-	</div>';
-
-	//Is this file writeable?
-	if (!$context['allow_save'])
-		echo '
-	<div class="errorbox">
-		', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
-	</div>';
-
-	// Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.)
-	echo '
-	<div id="admincenter">
-		<form action="', $scripturl, '?action=admin;area=theme;th=', $context['theme_id'], ';sa=edit" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">', $txt['theme_edit'], ' - ', $context['edit_filename'], '</h3>
-			</div>
-			<div class="windowbg">
-				<div class="content">
-					<textarea name="entire_file" id="entire_file" cols="80" rows="20" class="edit_file">', $context['entire_file'], '</textarea><br />
-					<input type="submit" name="save" value="', $txt['theme_edit_save'], '"', $context['allow_save'] ? '' : ' disabled="disabled"', ' class="button_submit" />
-					<input type="hidden" name="filename" value="', $context['edit_filename'], '" />
-					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';
-
-	// Hopefully it exists.
-	if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token']))
-		echo '
-					<input type="text" name="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token_var'], '" value="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'], '" />';
-
-	echo '
-				</div>
-
-			</div>
-
-		</form>
-	</div>
-	<br class="clear" />';
-}
-
-?>

+ 0 - 595
Themes/penguin/css/admin.css

@@ -1,595 +0,0 @@
-/* Styles for the admin quick search.
-------------------------------------------------------- */
-
-h3.catbg #quick_search form {
-	padding: .6em 0 0 0;
-	height: 1.65em;
-	line-height: 0.7em;
-	font-size: 0.8em !important;
-}
-h3.catbg #quick_search form select {
-	height: 1.65em;
-	line-height: 1.65em;
-	font-size: 1em;
-	margin: 0 0.2em 0 0;
-}
-#search_go {
-	float: none;
-}
-ol.search_results {
-	margin: 0 0 0 0;
-	padding: 0 0 0 20px;
-}
-ol.search_results li {
-	padding: 0 0 0 0;
-}
-
-/* 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.
-------------------------------------------------------- */
-#admincenter #welcome img {
-	vertical-align: middle;
-}
-#admincenter .content {
-	padding: 1em;
-}
-#admin_main_section {
-	overflow: hidden;
-	margin: 1em 0;
-}
-#admincenter div.windowbg, #admincenter div.windowbg2, #admin_content div.windowbg, #admin_content div.windowbg2 {
-	padding: 0.5em 0.5em 1em 0.5em;
-	border: 1px solid #ddd; border-bottom: 1px solid #ccc;
-	margin: 2px 0 0 0;
-	border-radius: 0 0 0 0; box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
-}
-#live_news {
-	width: 63.5%;
-	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
-}
-#live_news div.content {
-	padding: 0;
-	font-size: 0.92em;
-}
-#live_news div.content dl {
-	padding: 0 5px;
-}
-#supportVersionsTable {
-	width: 35.5%;
-	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
-}
-#version_details {
-	padding: 0 5px;
-	height: 10em;
-	overflow: auto;
-}
-#smfAnnouncements {
-	padding: 0 5px;
-	height: 14.1em;
-	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;
-}
-/* Quick tasks markup could really do with a slight change. */
-#quick_tasks {
-	margin: 0;
-	padding: 0;
-}
-#quick_tasks li:nth-child(1n + 0) {
-	clear: left;
-}
-#quick_tasks li:nth-child(2n + 0) {
-	clear: right;
-}
-#quick_tasks li {
-	float: left;
-	list-style-type: none;
-	margin: 0;
-	padding: 15px 10px 5px 0;
-	width: 50%;
-	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
-}
-.home_image {
-	float: left;
-	padding: 0 10px;
-}
-p.task {
-	margin: -15px 0 0 60px;
-	float: left;
-}
-
-/* Common admin center classes.
-------------------------------------------------------- */
-#admin_content .catbg .icon {
-	margin: 8px 5px 0 0;
-}
-#admin_content .windowbg, #admin_content .windowbg2 {
-	/*border: 1px solid #ddd;
-	border-radius: 0 0 4px 4px;*/
-	padding-top: 16px;
-}
-#admincenter .windowbg2 .icon {
-	margin: 0 5px -5px 0;
-}
-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.92em;
-}
-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;
-}
-/* [WIP]*/
-.description, .information {
-	max-height: 15em;
-	overflow: auto;
-	padding-bottom: .5em;
-}
-/* End [WIP]*/
-#advanced_box {
-	padding-top: 5px;
-}
-.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.92em;
-	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.
-------------------------------------------------- */
-#manage_maintenance {
-	margin: 0 0 0 0;
-}
-#manage_maintenance h3.catbg {
-	padding: 0 0 0 20px;
-}
-#manage_maintenance .content {
-	position: relative;
-}
-#manage_maintenance h3.double_height {
-	font-size: 1.1em;
-	color: #444;
-}
-#manage_maintenance h3.double_height .icon, #manage_maintenance #membersIcon, #manage_maintenance #rotIcon {
-	margin: 0 0 -5px 0;
-}
-#manage_maintenance .windowbg2 form {
-	padding: 0 0 12px 0;
-	overflow: auto;
-}
-#manage_maintenance .windowbg2 p.floatleft {
-	max-width: 85%;
-}
-#manage_maintenance .windowbg2 p.clear {
-	padding-top: 10px;
-}
-#manage_maintenance .content .button_submit {
-	position: absolute;
-	right: 12px;
-	bottom: 40px; 
-}
-.infobox {
-	margin: -0.5em 0 2em 0;
-}
-/* Do we need to keep this next one, or can we just use infobox styling? */
-#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;
-	display: inline-block;
-}
-.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;
-}

+ 0 - 4039
Themes/penguin/css/index.css

@@ -1,4039 +0,0 @@
-/* Styles for the general looks for the theme.
-------------------------------------------------------- */
-
-/* Box sizing for the masses */
-div, ul, li, textarea { 
-	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
-}
-
-/* The wrapper division controls the width of the forum. */
-/* Width may be set in px (fixed width) or in % (fluid width). */
-/* The max-width and min-width values only apply if the forum is set to fluid width (in %). */
-/* If using a fixed with (in px) you can ignore the max-width and min-width values. */
-/* Default min-width is set to accommodate screens down to 800px wide. */ 
-/* If you wish to prevent the forum expanding past a certain width, you may also set a max-width in px. */
-div.wrapper {
-	width: 960px;
-	min-width: 770px;
-	max-width: 98%;
-	margin: 0 auto;
-}
-
-/* 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: 75%/140% "Verdana", "Arial", "Helvetica", sans-serif;
-	margin: 0 auto;
-	padding: 0 0 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: #333;
-}
-
-/* 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, select {
-	font-size: 0.917em;
-	line-height: 1.28em;
-	font-family: "Verdana", "Arial", "Helvetica", sans-serif;
-}
-dl.settings input {
-	font-size: 100%;
-}
-/* Select elements look horrible with the extra padding, so leave them unpadded. */
-select {
-	padding: 0;
-}
-/* Add some padding to the options instead. */
-select option {
-	padding: 1px 4px;
-}
-
-input, input.input_file, select, textarea, textarea.editor {
-	font: 1em/1.4em "Verdana", "Arial", "Helvetica", sans-serif;
-	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;
-}
-input:hover, input.input_file:hover, select:hover, textarea:hover, textarea.editor:hover {
-	outline:none !important;
-	border: 1px solid #aaa;
-}
-textarea:hover, textarea.editor:hover {
-	background: #fbfbfb;
-}
-input:focus, input.input_file:focus, select:focus, textarea:focus, textarea.editor:focus {
-	outline:none !important;
-	border: 1px solid #aaa;
-	box-shadow: 0 2px 5px rgba(0,0,0,0.1) inset;
-}
-
-/* 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, a.button_link {
-	cursor: pointer;
-	color: #333;
-	font-weight: normal;
-	margin-left: 5px;
-	float: right;
-	padding: 1px 4px;
-	padding: 2px 6px;
-	background: #fff;
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #aaa;
-	border-radius: 2px;
-	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);
-}
-.button_submit:hover, .button_reset:hover, a.button_link:hover {
-	color: #222;
-	text-decoration: none;
-	background: #f4f4f4;
-	border-top: none;
-	padding: 2px 4px 1px 5px;
-	padding: 3px 6px 2px 7px;
-	border-left: none;
-	border-bottom: 1px solid #dadada;
-	border-right: 1px solid #dadada;
-	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;
-}
-/* the new "button" */
-a.new_posts, span.new_posts {
-	color: #fff;
-	text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
-	font-weight: bold;
-	border: 1px solid #888;
-	border-top: 1px solid #aaa;
-	border-radius: 4px;
-	background: #6187ad;
-}
-span.new_posts {
-	display: inline;
-	margin: 0 5px 0 -2px;
-	padding: 1px 4px;
-	font-size: /*0.9em*/ 11px;
-	box-shadow: 1px 2px 2px rgba(0,0,0,0.1), 0 -2px 4px rgba(0,0,0,0.1) inset;
-}
-/* Le bugger. Have to override to stop board index gruesomeness :P */
-/* the new "button" */
-.children a.new_posts {
-	display: inline;
-	float: left;
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	background: none;
-	border: none;
-	text-shadow: none;
-	box-shadow: none;
-	font-size: 1em;
-	color: #346; text-decoration: underline;
-}
-a.new_posts:hover {
-	text-decoration: none;
-}
-/* Page listings. */
-a.navPages {
-	padding: 0 0 0 4px; margin: 0 0 0 0;
-}
-span.page_last a.navPages {
-	padding: 0 4px 0 4px;
-}
-.table_grid td span.next_page, .table_grid td span.previous_page {
-	display: none;
-}
-
-/* Lastpost Stuff. */
-.lastpost_icon {
-	margin: 7px 5px 0 0;
-	padding: 4px;
-	display: block;
-	float: right;
-	cursor: pointer;	
-	z-index: 2;
-}
-.lastpost_stuff {
-	float: right;
-	margin: 0 7px 0 0;
-	word-wrap: break-word;
-}
-
-/* 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, .hrcolor {
-	border: 0;
-	height: 3px;
-	color: #eee;
-	background: #eee;
-	box-shadow: 0 1px 0 #bbb inset;
-}
-.windowbg hr {
-	border: 0;
-	height: 3px;
-	color: #ddd;
-	background: #ddd;
-	box-shadow: 0 1px 0 #aaa inset;
-}
-
-/* By default set the color on these tags as #333 */
-h1, h2, h3, h4, h5, h6 {
-	color: #333;
-	font-size: 1em;
-	margin: 0;
-	padding: 0;
-}
-
-/* Fieldsets are used to group elements. */
-fieldset {
-	border: 1px solid #c4c4c4;
-	border-radius: 2px;
-	padding: 1em;
-	margin: 0 0 0.5em 0;
-}
-fieldset legend {
-	font-weight: bold;
-	color: #444;
-}
-
-/* Define strong as bold, and em as italics. */
-/* Use a slightly lighter colour for strong, to give better visual balance. */
-/* Yes, I'm fussy about stuff like that. Details matter. */
-strong {
-	font-weight: bold;
-	color: #444;
-}
-
-em {
-	font-style: italic;
-}
-.underline {
-	text-decoration: underline;
-}
-
-/* Common classes to easy styling.
-------------------------------------------------------- */
-
-.floatright {
-	float: right;
-}
-.floatleft {
-	float: left;
-}
-
-.flow_auto {
-	overflow: auto;
-}
-.flow_hidden {
-	overflow: hidden;
-}
-/*[WIP]*/
-/*
-.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). */
-/* The smalltext class is currently stupid. Smallest font-size anywhere should be 0.9em. */
-.smalltext, tr.smalltext th, .middletext {
-	font-size: 0.917em;
-	font-family: verdana, sans-serif;
-}
-.normaltext {
-	font-size: 1em;
-}
-.largetext {
-	font-size: 1.417em;
-}
-.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;
-}
-.large_height {
-	line-height: 1.7em;
-}
-.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.
-------------------------------------------------------- */
-/* Quotes and code blocks have a slightly different small font-size */
-/* which believe it or not really is for consistency. */
-/* A quote, perhaps from another post. */
-.bbc_standard_quote, .bbc_alternate_quote {
-	font-size: 0.91em;
-	color: #333;
-	border: 1px solid #bbb;	border-bottom: 2px solid #bbb;
-	padding: 8px;
-	margin: 0 0 8px 0;
-	overflow: auto;
-}
-/* Alterate blockquote stylings */
-.windowbg2 .bbc_standard_quote, .windowbg .bbc_alternate_quote {
-	background: #F1F6FF;
-}
-.windowbg2 .bbc_alternate_quote, .windowbg .bbc_standard_quote {
-	background: #FcfdFF;
-}
-/* A code block - maybe PHP ;). */
-.bbc_code {
-	display: block;
-	font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
-	font-size: 0.91em;
-	color: #333;
-	background: #e5e8eb; border: 1px solid #ccc;
-	border-top: 2px solid #aaa;
-	border-bottom: 2px solid #aaa;
-	margin: 0 0 8px 0;
-	padding: 8px;
-	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, .standard_quoteheader, .alternate_quoteheader {
-	color: #666;
-	font-weight: bold;
-	font-size: 0.91em;
-	margin: 8px 0 -1px 0;
-	overflow: auto;
-	padding: 0 0 0 0;
-}
-.bbc_standard_quote .codeheader, .bbc_standard_quote .standard_quoteheader, .bbc_standard_quote .alternate_quoteheader,
-.bbc_alternate_quote .codeheader, .bbc_alternate_quote .standard_quoteheader, .bbc_alternate_quote .alternate_quoteheader {
-	margin: 0 0 -1px 0;
-}
-.codeheader {
-	padding: 0 4px;
-	background: #fff;
-	border: 1px solid #ccc;
-	border-top: 2px solid #aaa;
-}
-.topslice_quote {
-	float: left;
-	border-radius: 0px 14px 0 0;
-	line-height: 1em;
-	padding: 6px 12px 0 20px;
-}
-.windowbg .standard_quoteheader .topslice_quote, .windowbg2 .alternate_quoteheader .topslice_quote {
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #fcfdff;
-	background: #fcfdff url(../images/theme/quote.png) 0px 1px no-repeat;
-}
-.windowbg2 .standard_quoteheader .topslice_quote, .windowbg .alternate_quoteheader .topslice_quote {
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #F1F6FF;
-	background: #f1f6ff url(../images/theme/quote.png) 0px 1px no-repeat;
-}
-.quoteheader a {
-}
-
-/* The following are required to prevent undesirable cascades. */
-.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 .standard_quoteheader, .bbc_alternate_quote .standard_quoteheader,
-.bbc_standard_quote .alternate_quoteheader, .bbc_alternate_quote .alternate_quoteheader
-.bbc_standard_quote  .codeheader, .bbc_alternate_quote  .codeheader {
-	font-size: 1em;
-}
-.codeheader {
-	font-size: 12px;
-	padding: 3px 4px;
-}
-/* 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 {
-}
-.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 {
-	display: inline;
-}
-.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;
-}
-
-/* A more discreet highlight color, for selected membergroups etc. */
-/* Note: IIRC this is only used in one place and could be ditched in favour of just using .highlight everywhere. */
-.highlight2 {
-	background: #D1E1EF;
-	color: #000 !important;
-}
-
-/* Generic, mostly color-related, classes.
-------------------------------------------------------- */
-
-.titlebg, .titlebg2, tr.titlebg th, tr.titlebg td, tr.titlebg2 td {
-	background: #eee;
-	border-radius: 0 0 0 0;
-	border-top: 1px solid #ccc;
-	border-bottom: 1px solid #ccc;
-	padding: 0.2em 9px 0 9px;
-	margin: 0 0 0 0;
-	line-height: 2em;
-	font-size: 1.167em;
-	height: 2.2em;
-}
-.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.083em;
-	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: #333;
-}
-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: 1.5em;
-	font-size: 0.917em;
-}
-
-/* Alternating backgrounds for posts, and several other sections of the forum. */
-.windowbg, #preview_body {
-	color: #333;
-	background: #f3f7ff;
-}
-.windowbg2 {
-	color: #333;
-	background: #fff;
-}
-.windowbg3 {
-	color: #333;
-	background: #cacdd3;
-}
-div.windowbg, div.windowbg2, div.windowbg3, #preview_body {
-	/*overflow: auto;*/
-	float: left; 
-	width: 100%; 
-	padding: 6px;
-	margin: 2px 0 4px 0;
-	border-radius: 4px;
-}
-#forumposts div.windowbg, #recent div.windowbg, #forumposts div.windowbg2, #recent .windowbg2 {
-	border: 1px solid #ddd; border-bottom: 1px solid #ccc;
-	margin: 2px 0 0 0;
-	border-radius: 0 0 0 0;
-}
-#display_lower_buttons {
-	border: 1px solid #ddd;
-	margin: 1px 0 0 0;
-}
-#recent .windowbg, #recent .windowbg2{
-	padding: 6px 6px 16px 6px;
-}
-
-/* the page navigation area */
-.pagesection {
-	font-size: 0.917em;
-	padding: 0.2em;
-	overflow: hidden;
-	margin-bottom: 1px;
-}
-div.pagesection div.floatright input {
-	margin-top: 3px;
-}
-
-.pagelinks {
-	padding: 0 0 0 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: #e7f0f7;
-}
-.stickybg2 {
-	background: #f7fbff;
-}
-
-/* Locked posts get a different shade, too! */
-.lockedbg {
-	background: #e7f0f7;
-}
-.lockedbg2 {
-	background: #f7fbff;
-}
-
-/* Posts and personal messages displayed throughout the forum. */
-.post, .personalmessage {
-	overflow: auto;
-	padding: 2px;
-}
-
-/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
-.signature, .attachments {
-	overflow: auto;
-	clear: both;
-}
-.custom_fields_above_signature {
-	width: 98%;
-	clear: right;
-	padding: 1em 0 3px 0;
-	border-top: 1px solid #ccc;
-	font-size: 0.917em;
-}
-
-/* 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, .information {
-	padding: 0.5em 1em;
-	font-size: 0.917em;
-	border: 1px solid #bbb;
-	background: #f5f5f0;
-	margin: 2px 0 1em 0;
-}
-.description_board {
-	margin: 1em 0 0 0;
-}
-
-/* an informative style */
-.information {
-	background: #f0f6f0;
-}
-.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;
-}
-/* help icons */
-dl.settings dt a img {
-	position: relative;
-	top: 2px;
-}
-
-/* Styles for rounded headers.
-------------------------------------------------------- */
-h3.catbg, h3.catbg2, h3.titlebg, h4.titlebg, h4.catbg {
-	height: 2.4em;
-	line-height: 2.4em;
-	padding: 0.1em 0 0 0;
-	font-size: 1.4em;
-	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: #333;
-}
-h3.titlebg a:hover, h4.titlebg a:hover {
-	color: #53616f;
-	text-decoration: none;
-}
-h3.catbg img.icon {
-	vertical-align: middle;
-	margin: 8px 8px 0 0;
-}
-h4.catbg a.toggle img {
-}
-h4.catbg, h4.catbg2, h3.catbg, h3.catbg2, .table_list tbody.header td.catbg {
-	background: #dadfe6 url(../images/theme/main_block.png) no-repeat -10px -280px;
-	border-radius: 4px 4px 0 0;
-	padding: 0.1em 9px 0 9px;
-	border-radius: 5px 5px 0 0;
-	background: #63819F;
-	margin: 0 0 1px 0;
-	padding-left: 1.2%;
-	box-shadow: 0 10px 16px rgba(255,255,255,0.3) inset, 0 -10px 16px rgba(0,0,0,0.05) inset;
-}
-h4.titlebg, h3.titlebg {
-	background: #dadfe6 url(../images/theme/main_block.png) no-repeat -10px -380px;
-	border-radius: 4px 4px 0 0;
-	padding: 0 9px 0 9px;
-}
-h4.titlebg img.icon {
-	float: left;
-	margin: 8px 8px 0 0;
-}
-div.cat_bar {
-	background: none;
-	padding: 0 0 0 0;
-}
-div.title_bar {
-	background: none;
-	padding: 0 0 0 0;
-}
-
-/* rounded bars needs a different background here */
-#info_centre h3.catbg {
-	padding: 0.8em 9px 0 9px;
-	max-height: 1.6em;
-	line-height: 1.167em;
-	overflow: hidden;
-}
-div.roundframe div.cat_bar {
-	background: none; margin-bottom: 0;
-}
-div.roundframe div.cat_bar h3.catbg {
-	background: #fff; 
-	color: #444;
-	border-bottom: 1px solid #ccc;
-}
-#upshrink_ic {
-	margin: -0.25em -0.25em 0 0;
-}
-img#upshrink_ic, img#newsupshrink, img.panel_toggle, img#quickReplyExpand {
-	margin: .5em .5em 0 1em;
-}
-div.title_barIC {
-	background: none;
-	padding: 0 0 0 0;
-}
-div.title_barIC h4.titlebg {
-	background: #fff;
-	border-radius: 0 0 0 0;
-	border-top: 1px solid #ccc;
-	border-bottom: 1px solid #ccc;
-	padding: 0.2em 9px 0 9px;
-	margin: 0 0 0 0;
-	line-height: 2em;
-	font-size: 1.167em;
-	height: 2.2em;
-}
-div.title_barIC img.icon {
-	margin: 4px 8px 0 0;
-}
-#upshrinkHeaderIC p.pminfo {
-	margin: 0;
-	padding: 0.5em;
-}
-h3.catbg img, h4.titlebg img {
-	float: left;
-	margin: 10px 8px 0 2px;;
-}
-h3.catbg img.toggle {
-	float: right;
-	margin: 10px 8px 0 0;
-	display: none;
-}
-table.table_list a.collapse, #upshrink_ic, #newsupshrink, #expandBoardsIcon {
-	float: right;
-	opacity: 0.7;
-}
-table.table_list a.collapse:hover, #upshrink_ic:hover, #newsupshrink:hover, #expandBoardsIcon:hover {
-	opacity: 1;
-}
-
-/* The half-round header bars for some tables. */
-.table_grid tr.catbg, .table_grid tr.titlebg {
-	font-size: 1em;
-	border-bottom: 1px solid #fff;
-	background: none;
-}
-.table_grid thead tr.catbg, .table_grid thead tr.catbg:hover {
-	border-radius: 5px 5px 0 0;
-	background: #63819F;
-	background-image: none;
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	box-shadow: 0 10px 16px rgba(255,255,255,0.3) inset, 0 -10px 16px rgba(0,0,0,0.05) inset;
-}
-.table_grid thead tr.catbg th {
-	font-size: 1.167em;
-	font-weight: bold;
-	border-bottom: 1px solid #fff;
-	line-height: 1.8em;
-	background: none;
-	margin: 0 0 1px 0;
-	padding: 5px 10px;
-}
-tr.catbg th.first_th {
-	background: #a7b9cd url(../images/theme/main_block.png) no-repeat -10px -280px;
-	border-radius: 5px 0 0 0;
-}
-tr.catbg th.last_th {
-	background: #a7b9cd url(../images/theme/main_block.png) no-repeat -10px -280px;
-	border-radius: 0 5px 0 0;
-	margin-right: 1px;
-}
-tr.titlebg th.first_th {
-	background: #eee;
-	border-radius: 5px 0 0 0;
-}
-tr.titlebg th.last_th {
-	background: #eee;
-	border-radius: 0 5px 0 0;
-}
-.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: 4px 0;
-}
-table.table_grid tr.windowbg, table.table_grid tr.windowbg2 {
-	border-right: 1px solid #e7e7e7;
-	border-left: 1px solid #e7e7e7;
-}
-table.table_grid tbody tr {
-	background: #fff;
-	box-shadow: 0 -5px 10px rgba(244,247,255,0.4) inset;
-}
-table.table_grid tbody td.sticky_bar, table.table_grid tbody td.normal_bar {
-	background: #fff;
-	box-shadow: 0 5px 10px rgba(244,247,255,1) inset, 0 -4px 8px rgba(0,0,0,0.05) inset;
-}
-table.table_grid tr:hover {
-	background: #f9fbff;
-}
-table.table_grid td {
-	padding: 5px;
-	border-top: 1px solid #fff;
-	border-bottom: 1px solid #e7e7e7;
-}
-table.table_grid td.subject {
-	padding: 5px 8px 5px 5px;
-	background: none;
-	line-height: 1.5em;
-}
-table.table_grid td.lastpost {
-	font-size: 0.917em;
-	padding: 0 0 0 0;
-	line-height: 1.7em;
-}
-table.table_grid td.lastpost div{
-	padding: 5px 0 5px 8px;
-}
-
-/* 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.3em;
-	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.
-------------------------------------------------------- */
-.postbg {
-	border-left: 1px solid #7f7f7f;
-	border-right: 1px solid #7f7f7f;
-}
-
-/* Used for sections that need somewhat larger corners.
------------------------------------------------------------ */
-.roundframe {
-	padding: .5em .5em 0.2em .5em;
-	background: #fafafa;
-	border: 1px solid #c5c5c5;
-	border-radius: 5px;
-	clear: both;
-	box-shadow: 0 10px 16px rgba(231,234,239,0.4) inset;
-}
-.roundframe dl, .roundframe dt, .roundframe p {
-	margin: 0;
-}
-.roundframe p {
-	padding: 0.5em;
-}
-
-/* The main content area.
-------------------------------------------------------- */
-.content {
-	padding: 6px 12px;
-	margin: 0;
-	border: none;
-}
-.content p {
-	margin: 0 0 6px 0;
-}
-
-/* Styles used by the auto suggest control.
-------------------------------------------------------- */
-.auto_suggest_div {
-	border: 1px solid #000;
-	position: absolute;
-	visibility: hidden;
-}
-.auto_suggest_item {
-	background: #ddd;
-}
-.auto_suggest_item_hover {
-	background: #888;
-	cursor: pointer;
-	color: #eee;
-}
-
-/* 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: #fff;
-}
-.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;
-	color: #fff;
-	text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
-}
-/* Level 1 active button. */
-.dropmenu li a.active {
-	background: orange;
-	text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
-	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 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;
-	text-shadow: none;
-	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;
-	text-shadow: none;
-	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 0 6px;
-	border: 1px solid #bbb;
-	border-radius: 5px;
-}
-
-/* Styles for the standard button lists.
-------------------------------------------------------- */
-.buttonlist {
-	padding: 0;
-	margin: 0;
-}
-.buttonlist ul {
-	z-index: 100;
-	padding: 0;
-	margin: 0;
-}
-.buttonlist ul li {
-	margin: 0;
-	padding: 0;
-	list-style: none;
-	float: left;
-}
-.buttonlist ul li a {
-	display: block;
-	font-size: 0.917em;
-	color: #333;
-	background: #fff;
-	margin: 0 0 2px 2px;
-	padding: 1px 8px 0 8px;
-	text-transform: uppercase;
-	cursor: pointer;
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #aaa;
-	border-radius: 2px;
-	line-height: 1.9em;
-	overflow: visible;
-	box-shadow: 0 -3px 6px rgba(0,0,0,0.07) inset, 1px 1px 2px rgba(0,0,0,0.15);
-}
-.pagesection .buttonlist ul li a {
-	font-size: 1em;
-}
-.buttonlist ul li a:hover {
-	color: #222;
-	text-decoration: none;
-	background: #f4f4f4;
-	padding: 2px 8px 0 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;
-}
-/* the active one */
-.buttonlist ul li a.active {
-	color: #12304c;
-	background: #f4f4f4;
-	font-weight: bold;
-	padding: 2px 8px 0 9px;
-	border-top: none;
-	border-left: none;
-	border-right: 1px solid #ccc;
-	border-bottom: 1px solid #ccc;
-}
-.buttonlist ul li a.active:hover {
-	color: #0A3E6B;	text-shadow: none;	margin: 0 -1px 1px 2px;
-	background: #f0f0f0;
-	border-right: 1px solid #ccc;
-	border-bottom: 1px solid #ccc;
-	box-shadow: 1px 2px 6px rgba(14,39,61,0.3) inset, 1px 1px 1px rgba(0,0,0,0.8) inset, -4px -4px 4px rgba(255,255,255,0.6) inset;
-}
-.buttonlist ul li a.active {
-	color: #fff;
-	text-shadow: 1px 1px 2px rgba(0,0,0,0.6);	padding: 1px 8px 1px 9px;
-	background: #47719b;
-	font-weight: bold;
-	border-top: none;
-	border-left: none;
-	border-right: none;
-	border-bottom: none;
-	border-radius: 5px;
-	box-shadow: 1px 2px 6px rgba(14,39,61,0.2) inset, 1px 1px 1px rgba(0,0,0,0.8) inset, -4px -4px 4px rgba(255,255,255,0.2) inset;
-}
-.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.917em;
-	padding: 1em 0.4em;
-}
-ul#navigation li {
-	float: none;
-	font-size: 0.91em;
-	display: inline;
-}
-
-#adm_submenus {
-	padding-left: 2em;
-	overflow: hidden;
-}
-
-/* Styles for the general looks for the Curve theme.
-------------------------------------------------------- */
-
-h3, h4 {
-	padding-bottom: 3px;
-}
-select.qaction, input.qaction {
-	font-size: 0.917em;
-	padding: 0;
-}
-input.qaction {
-	padding: 1px 4px;
-	font-weight: bold;
-}
-#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 div.cat_bar, .childboards  div.cat_bar, #newsfader  div.cat_bar {
-	background: #222 url(../images/theme/main_block.png) 0 -280px no-repeat;
-}
-table.table_list h3.catbg, .childboards h3.catbg, #newsfader  h3.catbg {
-	background: url(../images/theme/main_block.png) 100% -280px no-repeat;
-}
-table.table_list tbody.content td.stats {
-	font-size: 90%;
-	width: 15%;
-	text-align: center;
-}
-table.table_list tbody.content td.lastpost {
-	
-	font-size: 85%;
-	width: 24%;
-	padding: 0.8em;
-}
-table.table_list tbody.content td.icon {
-	text-align: center;
-	width: 6%;
-	vertical-align: top;
-	padding: 0.6em;
-}
-
-/* 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.info a.subject:hover {
-}
-.table_list tbody.content td.children {
-	color: #555;
-	font-size: 85%;
-	padding-left: 0.917em;
-}
-p.moderators {
-	font-size: 0.917em;
-	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.917em;
-}
-#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;
-	font-weight: bold;
-	line-height: 2em;
-	padding: 0 0.5em;
-}
-.nextlinks_bottom {
-	clear: right;
-	text-align: right;
-}
-.mark_read {
-	padding: 0 0.5em;
-}
-
-/* the newsfader */
-#newsfader {
-	margin: 0 2px;
-	clear: both;
-}
-#smfFadeScroller {
-	text-align: center;
-	padding: 1em;
-	overflow: auto;
-	margin: 0 0 1em 0;
-	min-height: 40px;
-	color: #575757; /* shouldn't be shorthand style due to a JS bug in IE! */
-	border: #ccc 1px solid;
-	border-top: none;
-	border-radius: 0 0 4px 4px;
-	border-top: none;
-}
-
-/* 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;
-}
-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: 1px dotted #bbb;
-}
-#upshrinkHeaderIC p.inline {
-	border: none;
-	margin: 0;
-	padding: 0.2em 0.5em 0.2em 0.5em;
-	line-height: 2em;
-}
-#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.917em;
-}
-
-img.new_posts {
-	padding: 0 0.1em;
-}
-.children img.new_posts {
-	display: none;
-}
-/* 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;
-}
-
-/* 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;
-}
-#display_lower_buttons ul {
-	margin-bottom: 0;
-}
-#moderationbuttons {
-	overflow: hidden;
-	margin: 0;
-	padding: 0;
-	clear: both;
-}
-#moderationbuttons ul {
-	margin-top: 0;
-	padding-top: 0;
-	float: left;
-}
-#moderationbuttons li {
-	margin-top: 1em;
-}
-/* Events */
-.linked_events {
-	padding: 1em 0;
-}
-.edit_event {
-	margin: 0 1em;
-	vertical-align: top;
-}
-/* Poll question */
-#poll {
-	overflow: hidden;
-}
-#poll .cat_bar {
-	margin-bottom: 3px;
-}
-#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;
-	font-size: 1.1em;
-	line-height: 1.3em !important;
-}
-
-#poll_options dl.options dt {
-	padding: 0.3em 0;
-	width: 30%;
-	max-width: 350px;
-	float: left;
-	margin: 0 0 0.4em 0;
-	clear: left;
-}
-
-#poll_options dl.options .voted {
-	font-weight: bold;
-}
-
-#poll_options dl.options dd {
-	margin: 0 0 0.4em 2em;
-	padding: 0;
-	width: 40em;
-	float: left;
-	background: url(../images/bar_stats.png) no-repeat 0 0;
-}
-
-#poll_options dl.options .percentage {
-	display: block;
-	float: right;
-	padding: 0 0 0 1em;
-	background: #ccc;
-	width: 9em;
-}
-/* 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;
-}
-
-/* author and topic information */
-#forumposts h3 span#author {
-	margin: 0 7.7em 0 0;
-}
-#forumposts h3 img {
-	float: left;
-}
-/* [WIP] #forumposts h3.catbg {
-	margin-bottom: 3px;
-}*/
-p#whoisviewing {
-	margin: 0;
-	padding: 4px;
-}
-/* poster and postarea + moderation area underneath */
-.post_wrapper {
-	float: left;
-	width: 100%;
-	position: relative;
-	padding: 0 0 4px 0;
-}
-.poster {
-	float: left;
-	text-align: center;
-	clear: none;
-}
-.postarea {
-	padding: 0;
-	margin: 0 5px 0 5px;
-}
-.messageicon {
-	float: left;
-	margin: 0 0.5em 0 0;
-	width: 24px;
-	height: 30px;
-	text-align: center;
-	display: none;
-}
-.messageicon img {
-	padding: 0;
-}
-.keyinfo {
-	margin: 0 0 0 0;
-	padding: 7px 6px 0px 6px;
-}
-.keyinfo h5 {
-	padding: 0 0 0 0; font-weight: normal;
-}
-.keyinfo a:hover, .keyinfo h5 a:hover {
-	text-decoration: none;
-}
-.keyinfo a.go_up, .keyinfo a.go_down {
-	position: absolute;
-	top: -4px;
-	right: 30px;
-	z-index: 4;
-	opacity: 0.7;
-}
-.keyinfo a.go_down {
-	right: 5px;
-}
-.keyinfo a:hover {
-	opacity: 1.0;
-}
-.keyinfo .smalltext {
-	line-height: 2em;
-}
-.post {
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	clear: right;
-}
-.inner {
-	padding: 0 0 2px 16px;
-	margin: 0 0 0 0;
-	overflow: auto;
-}
-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;
-}
-.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 {
-
-}
-#quickreplybox .cat_bar {
-	margin-bottom: 2px;
-}
-#quickReplyExpand {
-
-}
-#quickReplyOptions .roundframe {
-	padding: 0 10% 15px 10%;
-	border-radius: 0 0 5px 5px;
-}
-#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: 0 0 0 0;
-}
-#display_jump_to_select {
-	clear: both;
-	font-size: 0.917em;
-}
-#display_jump_to input {
-	display: none;
-}
-/* Separator of posts. More useful in the print stylesheet. */
-#forumposts .post_separator {
-	display: none;
-}
-
-/* Styles for edit post section
----------------------------------------------------- */
-form#postmodify .roundframe {
-	padding: 5px 12% 20px 12%;
-	border-radius: 0 0 5px 5px;
-	margin: 0 0 15px 0;
-}
-#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;
-	border-bottom: 1px solid #cacdd3;
-	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;
-}
-tr.titlebg td {
-	padding-left: 0.7em;
-}
-#admin_menu {
-	min-height: 2em;
-	padding-left: 0;
-}
-#admin_content {
-	clear: left;
-	padding-top: 4px;
-	overflow: auto;
-}
-/* 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;
-	overflow: auto;
-}
-.adm_section h4.catbg {
-	font-size: 95%;
-	margin-bottom: 5px;
-}
-#main_container {
-	position: relative;
-	clear: both;
-}
-.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.917em;
-	padding: 0;
-	margin: 0;
-}
-.topic_table td.lastpost {
-	font-size: 0.917em;
-	padding: 4px;
-}
-.topic_table td.stickybg2, .topic_table td.lockedbg2, .topic_table td.locked_sticky2, .topic_table td.icon2, .topic_table td.stats, .topic_table td.lastpost, .topic_table td.moderation {
-	background: 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: 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 {
-	overflow: auto;
-}
-#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 {
-}
-.signature h5 {
-	font-size: 0.917em;
-	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;
-}
-#recent .list_posts {
-	border-top: none;
-	padding-top: 0;
-	margin-top: 0;
-	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.917em;
-}
-
-/* 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;
-	font-size: 1em;
-}
-dl.stats dt {
-	width: 44%;
-	float: left;
-	margin: 0 0 4px 0;
-	padding: 0;
-	clear: both;
-	height: 1.3em;
-	overflow: hidden;
-}
-dl.stats dd {
-	text-align: right;
-	width: 55%;
-
-	float: right;
-	margin: 0 0 4px 0;
-
-	padding: 0;
-	/*background: url(../images/bar_stats.png) no-repeat 0 0;*/
-}
-#stats_left dt, #stats_right dt {
-	width: 54%;
-	background: none;
-	text-align: left;
-	height: auto;
-	overflow: visible;
-}
-#stats_left dd, #stats_right dd {
-	text-align: left;
-	width: 39%;
-	background: none;
-}
-.statsbar div.bar {
-	float: left;
-	display: block;
-	margin: 0 4px;
-}
-.statsbar div.bar div {
-	position: relative;
-	right: 0;
-
-
-	height: 16px;
-	padding: 0 1px 0 0;
-	background: #fff url(../images/bar_stats.png) no-repeat 100% 0;
-}
-.statsbar span {
-	/*background: #0b0b0b;*/
-	width: 5em;
-	padding: 0 0 0 8px;
-	display: inline-block;
-}
-#most_online dt, #top_topics_starter dt {
-	width: 30%;
-}
-#most_online dd, #top_topics_starter dd {
-	width: 69%;
-}
-#most_online .statsbar span {
-	/*background: #0b0b0b;*/
-	width: 8em;
-	padding: 0 0 0 8px;
-	display: inline-block;
-}
-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;
-}
-
-/* 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: 25px;
-}
-#month_grid h3.catbg {
-	height: 25px;
-	line-height: 27px;
-}
-#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 print media.
-------------------------------------------------------- */
-@media print {
-	#headerarea
-	{
-		display: none;
-	}
-
-	.tborder
-	{
-		border: none;
-	}
-}
-/* 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;
-}
-/* Reuters RSS feed class */
-div.feedflare {
-	display: none;
-}
-/* Beauty tips tooltips. */
-.bt-content {
-	position: relative;
-	padding: 6px 9px;
-	color: #333;
-	white-space: pre;
-	background: #fff;
-	border: 1px solid #aaa;
-	border-radius: 4px 4px 4px 0;
-	box-shadow: 1px 2px 4px rgba(0,0,0,0.2), 0 0px 10px rgba(0,0,0,0.05) inset;
-}
-/* Skip navigation link. */
-#skipnav {
-	position: absolute; top: 0;
-	left: -999em;
-	padding: 1em 1.5em;
-	background: #222 url(../images/theme/main_block.png) no-repeat -20px -380px; color: #bfad8f;
-	border: 2px solid #bfad8f;
-	border-top: none;
-	border-radius: 0 0 7px 7px;
-	font-weight: bold;
-	box-shadow: 2px 3px 4px #000;
-	z-index: 10;
-}
-#skipnav:focus {
-	left: 20%; outline: none;
-}
-/* Test css fix for topic summary quote buttons in Post.template.php */
-.core_posts .content ul {
-	float:right; width: 13em;
-}
-#preview_section .content{
-	overflow: auto;
-}
-
-/* TABLE-LESS BOARD INDEX TESTING */
-.category_wrapper {
-	margin-bottom: 0.8em;
-	clear: both;
-	padding: 1px 1px 1px 1px;
-	border-radius: 6px 6px 0 0;
-}
-.category_wrapper div.cat_bar h3.catbg {
-	border-radius: 5px 5px 0 0;
-	background: #63819F;
-	margin: 0 0 1px 0;
-	padding-left: 1.2%;
-	box-shadow: 0 10px 16px rgba(255,255,255,0.3) inset, 0 -10px 16px rgba(0,0,0,0.05) inset;
-}
-.category_wrapper div.cat_bar a.collapse {
-	float: right; margin: 1px 0 0 0; opacity: 1;
-}
-.category_wrapper div.cat_bar a.collapse:hover {
-	opacity: 1;
-}
-.category_wrapper div.cat_bar a.collapse img {
-	vertical-align: middle;
-	margin: 8px 8px 0 0;
-}
-.forum_category {
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	border-bottom: none;
-}
-.forum_category li {
-	list-style: none;
-	margin: 1px 0 0 0;
-	padding: 0.4em 0 0 0;
-	overflow: hidden;
-	border: 1px solid #ddd;
-	border-top: 1px solid #e3e3e3;
-	border-bottom: 1px solid #d8d8d8;
-	position: relative;
-	background: rgba(240,244,245,0.9);
-	box-shadow: 0 10px 20px rgba(255,255,255,0.7) inset;
-	background: /*#f4f7ff*/ #fff;
-	box-shadow: 0 -5px 10px rgba(244,247,255,0.6) inset;
-}
-.forum_category li li {
-	border: none;
-	box-shadow: none;
-}
-.forum_category li.subheader {
-	display: none;
-}
-.forum_category li h5 {
-	float: left;
-	font-weight: bold;
-	color: #444;
-}
-.forum_category div {
-	float: left;
-	margin: 0 0 -98.5em 0;
-	padding: 1em 1em 99em 1em;
-}
-.forum_category div.icon {
-	padding: 1.0em 0em 99em 0em;
-	width: 6.5%;
-	text-align: center;
-	background: none;
-	border-right: none;
-}
-.forum_category div.icon a {
-	opacity: 0.8;
-}
-.forum_category div.icon a:hover {
-	opacity: 1;
-}
-.forum_category div.icon a img {
-	border: none;
-}
-.forum_category div.info {
-	width: 48.5%;
-	background: none;
-	border-right: none;
-	padding-left: 0;
-}
-.forum_category div.info a {
-	font-weight: bold;
-	font-size: 1.167em;
-}
-.forum_category div.info a:hover {
-	text-decoration: none;
-	border-bottom: 1px solid #82705b;
-}
-.forum_category div.info p {
-	margin: 0.50em 0;
-}
-.forum_category div.info div.moderators {
-	font-size: 0.917em;
-	border: none;
-	padding: 0 0 0 0;
-	margin: 0;
-}
-.forum_category div.info div.moderators a {
-	font-size: 1em;
-	font-weight: normal;
-}
-.forum_category div.stats {
-	width: 45%;
-	text-align: center;
-	background: none;
-	line-height: 1.8em;
-	position: relative;
-	top: 0;
-	right: 0;
-	float: right;
-	border-right: none;
-	padding-top: 0.7em;
-}
-.forum_category div.stats ul, .forum_category div.lastpost ul {
-	margin: 0;
-	padding: 0;
-	float:right;
-}
-.forum_category div.stats li, .forum_category div.lastpost li {
-	margin: 0;
-	float: left;
-	border: none;
-}
-.forum_category div.stats li {
-	font-size: 1.167em;
-	font-weight: bold;
-	padding: 0 0.2em 0 1em;
-	float: left;
-	margin-top: 0.05em;
-}
-.forum_category div.stats li span{
-	font-size: 0.917em;
-	font-weight: normal;
-}
-.forum_category div.lastpost {
-	font-size: 1em;
-	float: right;
-	width: 45%;
-	padding: 0.6em 0.5em 98.5em 0;
-	border-right: none;
-	background: none;
-	position: relative;
-	top: -0.95em;
-	right: 0;
-	background: none;
-}
-.forum_category div.lastpost ul {
-	overflow: hidden;
-	padding-top: 0.4em;
-}
-.forum_category div.lastpost ul li:nth-child(3), .forum_category div.lastpost ul li span:nth-child(1) {
-	display: none;
-}
-.forum_category div.lastpost ul li span {
-	padding: 0 0.4em 0 0;
-}
-.forum_category div.lastpost ul li {
-	padding: 0 0.6em 0 0.2em;
-	margin-left: -3px;
-	line-height: 1.167em;
-	float: right;
-}
-.forum_category div.lastpost ul li h5 {
-	font-weight: normal;
-	display: none;
-}
-.forum_category div.children {
-	clear: both;
-	float: left;
-	width: 93.6%; position: relative; right: 0;
-	margin: 0 0 -98.5em 6.5%;
-	padding: 0.5em 1em 99em 0; background: none;
-	border-top: 1px solid #ddd;
-	font-size: 0.917em;
-}
-.forum_category div.children ul {
-	margin: 0 0 0 -0.6em;
-	overflow: hidden;
-	max-width: 64em;
-}
-.forum_category div.children ul li {
-	float: left;
-	width: 50%;
-	border: none;
-	margin: 0 0 0 -1px;
-	padding: 0 0.6em;
-}
-.forum_category li.divider {
-	display: none;
-}
-.forum_category li div, .forum_category li div li {
-	background: none;
-}
-
-/* Extras */
-div.category_wrapper {
-}
-
-/* Start index.template.php */
-/* Set a background colour so footer looks good when page has little content. */
-html {
-	padding: 0;
-	background: #41576e;
-}
-/* Set a background colour to hide margin between main content and footer. */
-body {
-	background: #99adbe;
-	padding: 0 0 0 0;
-}
-/* Start top bar. */
-#top_section {
-	float: left;
-	width: 100%;
-	background: #75899e url(../images/test_header_top.png) 0 100% repeat-x;
-	border-bottom: 1px solid #111;
-	box-shadow: 0 1px 2px rgba(0,0,0,0.5);
-	padding: 0 0 0 0;
-	margin: 0 0 0 0;
-}
-#top_section .wrapper .frame{
-	float: left;
-	width: 100%;
-	margin: 0 0 0 0;
-	padding: 4px 0 4px 0;
-}
-/* Start user avatar. */
-#top_section a.avatar {
-	float: left;
-	margin: 0 0 0 13px;
-	padding: 0 0 0 0;
-}
-#top_section a.avatar img {
-	max-height: 32px;
-	max-width: 32px;
-	border: 1px solid #999;
-	border-radius: 5px;
-	box-shadow: 1px 1px 3px rgba(0,0,0,0.4);
-}
-/* End user avatar - Start greeting and time. */
-#top_section  ul {
-	float: left;
-	padding: 0 0 0 0;
-	margin: 9px 0 0 0;
-}
-#top_section  ul li {
-	float: left;
-	position: relative;
-	line-height: 1.7em;
-	font-size: 0.917em;
-	padding: 0 0 0 10px;
-	list-style: none;
-	color: #fff;
-	text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
-}
-/* Larger text for the greeting. */
-#top_section  ul li.greeting {
-	float: left;
-	line-height: 1.5em;
-	font-size: 1em;
-}
-#top_section  ul li.greeting span {
-	font-weight: bold;
-}
-/* End greeting and time - Start notifications for maintenance mode,
-   moderator reports, unapproved content and personal messages. */
-#top_section #top_bar_notifications {
-	position: absolute;
-	z-index: 50;
-	top: auto;
-	left: 8px;
-	margin: 0 0 0 0;
-	padding: 8px;
-	background: #fff;
-	border: 1px solid #888;
-	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.2) inset;
-}
-#top_section #top_bar_notifications li {
-	float: none;
-	padding: 0 0 0 0;
-	white-space: pre;
-	color: #333;
-	text-shadow: none;
-}
-#top_section #top_bar_notifications li.notice {
-	color: red;
-	font-weight: bold;
-}
-/* End notifications - Start quick search form. */ 
-#search_form {
-	float: right;
-	margin: 7px 0 0 0;
-	padding: 0 0 0 0;
-}
-#search_form  input {
-	margin: 0 0 0 0;
-	width: 180px;
-	padding: 0 4px;
-	line-height: 1.6em;
-	height: 1.6em;
-	background: rgba(255,255,255,0.9);
-	border: 1px solid #346;
-	border-radius: 3px;
-	font-weight: normal;
-	color: #444;
-}
-#search_form  input:focus {
-	box-shadow: 0 0 5px rgba(255,255,255,0.7); background: rgba(255,255,255,0.9);
-}
-/* Should be re-styled in case it will be displayed. */
-#search_form  .button_submit {
-	background: #eff0ff;
-	box-shadow: 0 2px 5px rgba(0,0,0,0.05) inset;
-	display: none;
-}
-/* End quick search form - Start news section upshrink icon. */
-#upshrink {
-	float: right;
-	padding: 0 0 0 0;
-	margin: 8px 10px 0 4px;
-	opacity: 0.4;
-}
-#upshrink:hover {
-	opacity: 1.0;
-}
-/* End news section upshrink. */
-/* End top bar - Start Header. */
-#header {
-	clear: both;
-	background: #fff;
-	border-bottom: 2px solid #999;
-	padding: 0;
-	margin: 0;
-}
-#header div.frame {
-	background: none;
-	padding: 28px 0 3.5em 0;
-	position: relative;
-}
-/* Start forum banner or name. */
-h1.forumtitle {
-	float: left;
-	max-height: 200px;
-	min-width: 50%;
-	overflow: auto;
-	padding: 0 5px;
-	margin: 0 0 0 0;
-	font-size: 52px;
-	line-height: 65px;
-	font-weight: normal;
-}
-h1.forumtitle a:link, h1.forumtitle a:visited {
-	color: #7F5B37;
-	text-shadow: 0 2px 3px rgba(0,0,0,0.3);
-}
-h1.forumtitle a:hover {
-	text-decoration: none;
-	text-shadow: 0 3px 5px rgba(0,0,0,0.4);
-}
-/* End forum banner or name - Start SMF logo or site slogan. */
-#siteslogan, img#smflogo {
-	margin: 26px 0 0 0;
-	padding: 0;
-	float: right;
-}
-/* End SMF logo or site slogan - Start news section. */
-#upper_section {
-	float: left;
-	width: 100%;
-	clear: both;
-	margin: 10px 0 0 0;
-}
-#news_collapse {
-	border-top: 2px solid #ccc;
-	margin: 0 5px;
-	padding: 10px 0;
-}
-#news_collapse h2 {
-	clear: left;
-}
-#news_collapse h2, #news_collapse p {
-	float: left;
-	padding: 3px;
-	margin: 0;
-}
-/* The login form that is displayed to guests. */
-#guest_form {
-	border-bottom: 1px solid #ccc;
-	margin: -8px 0 8px 0;
-}
-#guest_form  .input_text, #guest_form  .input_password, #guest_form  select, #guest_form  .button_submit {
-	margin: 0;
-	font-size: 1em;
-	padding: 3px 4px 2px 4px;
-	vertical-align: top;
-}
-#guest_form  select {
-	padding: 0;
-}
-#guest_form  select option{
-	padding: 3px 4px 0 4px;
-}
-#guest_form  .button_submit {
-	padding: 2px 4px 1px 4px;
-}
-#guest_form  .button_submit:hover {
-	padding: 3px 4px 1px 5px;
-}
-#guest_form .info {
-	padding: 4px 0 ;
-}
-/* End login form - End news section. */
-#main_menu {
-	background: #476B8F;
-	box-shadow: 0 1px 2px rgba(0,0,0,0.4);
-	border-radius: 7px;
-	border-bottom: 1 px solid rgba(0,0,0,0.9);
-	margin: 0;
-	padding: 0;
-	position: absolute;
-	bottom: -2em;
-	z-index: 5;
-}
-#main_menu #menu_nav {
-	box-shadow: 0 10px 16px rgba(255,255,255,0.25) inset, 0 -10px 16px rgba(0,0,0,0.2) inset;
-	border-radius: 7px;
-	padding: 13px 13px 8px 13px;
-	width: 100%;
-	font-size: 1.083em;
-}
-/* End header - Start main content. */
-#content_section {
-	padding: 0 0 0 0;
-	background: #99adbe;
-}
-#content_section div.wrapper {
-	padding: 3em 0 0 0;
-}
-#content_section div.frame {
-	padding: 0 12px 15px 12px;
-	border: 1px solid #aaa;
-	border-radius: 7px;
-	background: #fff;
-	box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 10px rgba(99,129,159,0.2) inset;
-}
-.navigate_section {
-	padding: 4px 0 4px 0;
-	margin: 0;
-	overflow: auto;
-}
-.navigate_section ul{
-	float: left;
-	margin: 4px;
-	padding: 0;
-}
-.navigate_section ul li{
-	float: left;
-	padding: 0 2px;
-	list-style: none;
-	font-size: 0.917em;
-	font-weight: bold;
-}
-.navigate_section ul li a {
-	white-space: pre;
-}
-ul.unread_links {
-	float: right;
-}
-/* End main content - Start footer. */
-#footer_section {
-	padding: 0 0 0 0;
-	margin: 25px 0 0 0;
-	background: #41576e url(../images/test_header_top.png) 0 -12px repeat-x;
-	border-top: 1px solid #040404;
-	overflow: auto;
-}
-#footer_section div.frame {
-	float: left;
-	width: 100%;
-	padding: 6px 0 12px 0;
-	margin: 0 0 0 0;
-}
-/* Start copyright and other links. */
-#footer_section div.frame ul {
-	float: left;
-	padding: 0 12px 0 12px;
-	margin: 0 0 0 0;
-}
-#footer_section div.frame ul li{
-	padding: 0 12px 0 0;
-	list-style: none;
-	float: left;
-	color: #fff;
-	font-size: 0.917em;
-}
-#footer_section div.frame ul li.copyright{
-	padding: 0;
-	float: none;
-}
-#footer_section div.frame ul li a {
-	color: #fff;
-	white-space: pre;
-}
-/* End copyright and other links - Start go-to-top-of-page icon. */
-#footer_section div.frame a.topmost {
-	float: right;
-	width: 24px;
-	height: 24px;
-	background: url(../images/upshrink.png) no-repeat 50% 3px; margin: 0 1.7em 0 0; opacity: 0.4;
-}
-#footer_section div.frame a.topmost:hover {
-	opacity: 1;
-}
-/* End go-to-top-of-page icon - End footer. */
-/* End index.template.php - Start BoardIndex.template.php */
-/* End BoardIndex.template.php */
-
-
-/*******************************************************/
-/* ODD BITZ WOT R WIP */
-/*====================*/
-.inner {
-	padding-left: 8px;
-}
-#button_pm ul li:nth-child(3) {
-	border-top: 2px solid #ccc;
-}
-#display_lower_buttons {
-	float: left;
-	width: 100%;
-	margin: 2px 0 0 0;
-	padding: 10px 5px;
-	border-radius: 0 0 4px 4px;
-	box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
-}
-#display_lower_buttons .button_strip_reply {
-	margin-right: 8px;
-}
-#display_lower_buttons .first {
-	margin-left: 5px;
-}
-#display_lower_buttons .navigate_section {
-	float: left;
-	width: 100%;
-}
-#display_lower_buttons .navigate_section ul {
-	border: none;
-	font-weight: bold;
-	padding: 0.5em 0 0.5em 0;
-	margin: 0 14px;
-	background: none;
-}
-#display_lower_buttons .navigate_section ul li {
-	float: left;
-	padding: 0 2px;
-	list-style: none;
-	font-size: 0.917em;
-	font-weight: bold;
-}
-#admin_menu {
-	margin: 0;
-	padding: 0;
-}
-#adm_submenus {
-	margin: 0 0 3px 0;
-	padding: 0;
-}
-#admin_menu .dropmenu, #adm_submenus .dropmenu {
-	margin: 0;
-	padding: 0 2px;
-}
-#admin_menu > .dropmenu > li, #adm_submenus > .dropmenu > li {
-	margin: 0 0 0 0;
-}
-#admin_menu .dropmenu li li a, #adm_submenus .dropmenu li li a {
-	font-size: 0.917em;
-}
-#admin_menu > .dropmenu > li > a, #adm_submenus > .dropmenu > li > a, .quickbuttons > li > a {
-	color: #333;
-	background: #fff;
-	margin: 0 2px 0 0;
-	padding: 1px 8px 0 8px;
-	cursor: pointer;
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #aaa;
-	border-radius: 2px;
-	line-height: 1.9em;
-	overflow: visible;
-	text-shadow: none;
-	box-shadow: 0 -3px 6px rgba(0,0,0,0.07) inset, 1px 1px 2px rgba(0,0,0,0.15);
-}
-#admin_menu > .dropmenu > li > a.active, #adm_submenus > .dropmenu > li > a.active {
-	color: #12304c;
-	background: #f4f4f4;
-	padding: 2px 8px 0 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;
-}
-#admin_menu > .dropmenu > li > a:hover, #admin_menu >.dropmenu>li:hover>a, #adm_submenus > .dropmenu > li > a:hover, .quickbuttons > li:hover > a, .quickbuttons > li.sfhover > a {
-	color: #222;
-	text-decoration: none;
-	background: #f4f4f4;
-	padding: 2px 8px 0 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;
-}
-#admin_menu > .dropmenu > li > a.active:hover, #adm_submenus > .dropmenu > li > a.active:hover {
-	color: #0A3E6B;
-	background: #f0f0f0;
-	box-shadow: 1px 2px 6px rgba(14,39,61,0.3) inset, 1px 1px 1px rgba(0,0,0,0.8) inset, -4px -4px 4px rgba(255,255,255,0.6) inset;
-}
-#admin_menu > .dropmenu > li > ul {
-	margin-top: 2px;
-}
-/************************************************/
-/* The quick buttons */
-ul.quickbuttons {
-	float: left;
-	width: 100%;
-	margin: 0 0 0 0;
-	padding: 0 0 0 140px;
-	font: bold 0.833em verdana, arial, sans-serif;
-}
-ul.quickbuttons li, .quickbuttons li:hover, .quickbuttons li.sfhover {
-	float: right;
-	margin: 2px 0 2px 2px;
-	padding: 0 0 0 0;
-}
-ul.quickbuttons li.blurb {
-	float: left;
-	padding: 14px 0 0 0;
-	max-width: 320px;
-	font-weight: normal;
-	word-wrap: break-word;
-}
-ul.quickbuttons li a.quote_button {
-	float: right;
-}
-.quickbuttons li.moderation_button {
-	position: relative;
-}
-.quickbuttons li a.modify_inline {
-	padding: 2px 22px 2px 4px;
-	background: #fff;
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #aaa;
-	border-radius: 2px;
-	position: relative;
-	box-shadow: 0 -3px 6px rgba(0,0,0,0.07) inset, 1px 1px 2px rgba(0,0,0,0.15);
-}
-.quickbuttons li a.modify_inline:hover {
-	padding: 2px 22px 2px 5px;
-	background: #f4f4f4;
-	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;
-}
-.quickbuttons li a.modify_inline img {
-	margin: 0 0 0 0;
-	position: absolute;
-	top: 1px;
-	right: 0;
-	padding: 2px 4px 2px 25px;
-}
-.quickbuttons li a.modify_inline:hover img {
-	right: 0;
-	padding: 3px 4px 4px 25px;
-}
-ul.quickbuttons li a {
-	background: #fff;
-	margin: 0 0 0 0;
-	padding: 2px 6px 2px 6px;
-	display: block;
-	box-shadow: 0 -3px 6px rgba(0,0,0,0.07) inset, 1px 1px 2px rgba(0,0,0,0.15);
-}
-.quickbuttons li:hover a, .quickbuttons li.sfhover a {
-	padding: 3px 6px 2px 7px;
-	text-decoration: none;
-}
-ul.quickbuttons li.quote_button:hover a {
-}
-/* Levels 2 and 3 submenu wrapper. */
-.quickbuttons li ul, .poster li ul {
-	z-index: 90;
-	position: absolute;
-	top: 2.2em;
-	left: -9999px;
-	font-size: 1em;
-	width: 13em;
-	text-align: left;
-	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 10px rgba(99,129,159,0.10) inset;
-	margin: 7px 0 0 0;
-	padding: 5px 0 7px 0;
-}
-/* Level 2 link background. */
-.quickbuttons li li, .poster li li  {
-	margin: 0 0 0 0;
-	padding: 0 0 0 0;
-	overflow: visible;
-	border: none;
-	float: none;
-	border-top: 1px solid rgba(0,0,0,0);
-	border-bottom: 1px solid rgba(0,0,0,0);
-}
-/* Note: The next declaration is for keyboard access with js disabled. */
-.quickbuttons ul a:focus {
-	margin-left: 9999px;
-	min-width: 13em;
-	background: #fff;
-	text-shadow: none;
-	border-radius: 0 0 0 0;
-}
-.quickbuttons li:hover li a, .quickbuttons li.sfhover li a, .quickbuttons li:hover li label, .quickbuttons li.sfhover li label,
-.poster li:hover li a, .poster  li.sfhover li a{
-	margin: 0 0 0 0;
-	width: 13em;
-	line-height: 2em;
-	padding: 0 5px;
-	display: block;
-	border-radius: 0;
-	background: none;
-	color: #346;
-	border: none;
-	text-shadow: none;
-	box-shadow: none;
-	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
-}
-/* Levels 2 and 3 hover effects. */
-.quickbuttons li li:hover, .quickbuttons li li:hover>a, .quickbuttons li li a:focus, .quickbuttons li li:hover>label
-.poster li li:hover, .poster li li:hover>a, .poster li li a:focus {
-	background: none;
-	color: #333;
-	text-decoration: none;
-}
-.quickbuttons li li:hover, .quickbuttons li.sfhover li:hover {
-}
-/* Reposition Level 2 submenu as visible on hover. */
-.quickbuttons li:hover ul, .quickbuttons li.sfhover ul, .poster li:hover ul, .poster li.sfhover ul {
-	left: 0;
-}
-.quickbuttons li.sfhover li.inline_mod_check input {
-	margin: -1.7em 5px 0 0;
-	float: right;
-}
-.quickbuttons li .ip_link a {
-	background: url(../images/buttons/search.png) no-repeat 0 50%;
-}
-/* Poster info area */
-.poster {
-	min-height: 6em;
-	width: 136px;
-	margin: 0px 2px -2.55em 0;
-	word-wrap: break-word;
-}
-.poster li.title, .poster li.online_button , .poster li.icons {
-	margin: 2px 0 0 0;
-}
-.poster li.avatar {
-	margin: 0 0 0 0;
-}
-.poster li.membergroup {
-	font-weight: bold;
-	padding: 0px 0 0px 0; max-width: 136px;
-}
-.poster li.icons {
-	padding: 2px 5px 0 5px;
-}
-.poster li.avatar {
-	padding: 0;
-	overflow: visible;
-	position: relative;
-}
-.poster li.avatar a {
-	margin: 0 0 0 0;
-	padding: 5px;
-	overflow: hidden;
-	display: block;
-	border-radius: 2px; border: 1px solid rgba(0,0,0,0);
-}
-.poster li.avatar a.offline img {
-	opacity: 0.5;
-}
-.poster li.avatar a:hover {
-	padding: 6px 5px 5px 6px;
-	background: #f4f4f4;
-	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;
-}
-.poster li.avatar ul {
-	top: 0;
-	margin-top: 0; 
-	left: 138px;
-	width: 500px;
-	border-radius: 0 4px 0 4px;
-	text-align: left;
-	overflow: auto;
-}
-.poster li.sfhover ul li {
-	float: left;
-	width: 100%;
-	padding: 0 8px 0 8px;
-	margin: 0 0 0 0;
-}
-.poster li.sfhover ul li.signature {
-}
-.poster li.sfhover li a {
-	display: block;
-}
-.poster li.title {
-	padding: 5px 0 4px 0;
-	font-weight: bold;
-	color: #444;
-	background: #fff;
-	border: 1px solid #bbb;
-	border-bottom: 1px solid #aaa;
-	border-radius: 2px;
-	text-shadow: none;
-	box-shadow: 1px 1px 2px rgba(0,0,0,0.15);
-}
-.poster li.blurb {
-	font-weight: bold;
-}
-.poster li.online_button {
-	padding: 0 0 0 0;
-	width: 136px;
-}
-.poster li.online_button a {
-	display: block;
-	color: #333;
-	margin: 0 0 0 0;
-	padding: 1px 0 0px 0;
-	border-radius: 2px; border: 1px solid rgba(0,0,0,0);
-}
-.poster li.online_button a:hover {
-	color: #222;
-	text-decoration: none;
-	background: #f4f4f4;
-	padding: 2px 0 0px 0;
-	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;
-}
-/*******************************************************/
-#message_index_jump_to_select, #message_index_jump_to input {
-	font-size: 1em;
-}
-#message_index_jump_to input {
-	padding: 1px 4px;
-}
-/*******************************************************/
-.keyinfo {
-	padding: 4px 6px 0 6px;
-}
-.keyinfo h5 { 
-	margin: -5px 40px -4px 125px;
-	padding: 0 9px 0 2px;
-	border-radius: 2px 2px 0 0;
-}
-.keyinfo a, .keyinfo strong{
-}

+ 0 - 9
Themes/penguin/css/index.php

@@ -1,9 +0,0 @@
-<?php
-
-// Try to handle it with the upper level index.php. (it should know what to do.)
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
-	include (dirname(dirname(__FILE__)) . '/index.php');
-else
-	exit;
-
-?>

BIN
Themes/penguin/images/#collapse.png


BIN
Themes/penguin/images/#expand.png


BIN
Themes/penguin/images/#upshrink.png


BIN
Themes/penguin/images/#upshrink2.png


BIN
Themes/penguin/images/Female.png


BIN
Themes/penguin/images/Male.png


BIN
Themes/penguin/images/admin/administration.png


BIN
Themes/penguin/images/admin/attachment.png


BIN
Themes/penguin/images/admin/ban.png


BIN
Themes/penguin/images/admin/boards.png


BIN
Themes/penguin/images/admin/calendar.png


BIN
Themes/penguin/images/admin/change_menu.png


BIN
Themes/penguin/images/admin/change_menu2.png


BIN
Themes/penguin/images/admin/corefeatures.png


BIN
Themes/penguin/images/admin/current_theme.png


BIN
Themes/penguin/images/admin/engines.png


BIN
Themes/penguin/images/admin/feature_cd.png


BIN
Themes/penguin/images/admin/feature_cp.png


BIN
Themes/penguin/images/admin/feature_k.png


BIN
Themes/penguin/images/admin/feature_ml.png


BIN
Themes/penguin/images/admin/feature_pm.png


BIN
Themes/penguin/images/admin/feature_ps.png


BIN
Themes/penguin/images/admin/feature_rg.png


BIN
Themes/penguin/images/admin/feature_sp.png


BIN
Themes/penguin/images/admin/feature_w.png


BIN
Themes/penguin/images/admin/features.png


BIN
Themes/penguin/images/admin/features_and_options.png


BIN
Themes/penguin/images/admin/forum_maintenance.png


BIN
Themes/penguin/images/admin/ignore.png


+ 0 - 9
Themes/penguin/images/admin/index.php

@@ -1,9 +0,0 @@
-<?php
-
-// Try to handle it with the upper level index.php. (it should know what to do.)
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
-	include (dirname(dirname(__FILE__)) . '/index.php');
-else
-	exit;
-
-?>

BIN
Themes/penguin/images/admin/languages.png


BIN
Themes/penguin/images/admin/logs.png


BIN
Themes/penguin/images/admin/mail.png


BIN
Themes/penguin/images/admin/maintain.png


BIN
Themes/penguin/images/admin/membergroups.png


BIN
Themes/penguin/images/admin/members.png


BIN
Themes/penguin/images/admin/members_lg.png


BIN
Themes/penguin/images/admin/modifications.png


BIN
Themes/penguin/images/admin/news.png


BIN
Themes/penguin/images/admin/package_ops.png


BIN
Themes/penguin/images/admin/packages.png


BIN
Themes/penguin/images/admin/packages_lg.png


BIN
Themes/penguin/images/admin/paid.png


BIN
Themes/penguin/images/admin/permissions.png


BIN
Themes/penguin/images/admin/permissions_lg.png


BIN
Themes/penguin/images/admin/post_moderation_allow.png


BIN
Themes/penguin/images/admin/post_moderation_deny.png


BIN
Themes/penguin/images/admin/post_moderation_moderate.png


BIN
Themes/penguin/images/admin/posts.png


BIN
Themes/penguin/images/admin/regcenter.png


BIN
Themes/penguin/images/admin/reports.png


BIN
Themes/penguin/images/admin/scheduled.png


BIN
Themes/penguin/images/admin/search.png


BIN
Themes/penguin/images/admin/security.png


BIN
Themes/penguin/images/admin/server.png


BIN
Themes/penguin/images/admin/smiley.png


BIN
Themes/penguin/images/admin/smilies_and_messageicons.png


BIN
Themes/penguin/images/admin/subsection.png


BIN
Themes/penguin/images/admin/support.png


BIN
Themes/penguin/images/admin/support_and_credits.png


BIN
Themes/penguin/images/admin/switch_off.png


BIN
Themes/penguin/images/admin/switch_on.png


BIN
Themes/penguin/images/admin/themes.png


BIN
Themes/penguin/images/admin/themes_and_layout.png


BIN
Themes/penguin/images/aim.png


BIN
Themes/penguin/images/arrow-down.png


BIN
Themes/penguin/images/arrow.png


BIN
Themes/penguin/images/backdrop-copy.png


BIN
Themes/penguin/images/backdrop-new.png


BIN
Themes/penguin/images/backdrop.png


BIN
Themes/penguin/images/bar_stats.png


BIN
Themes/penguin/images/bbc/bbc_bg.png


BIN
Themes/penguin/images/bbc/bbc_hoverbg.png


BIN
Themes/penguin/images/bbc/bold.png


BIN
Themes/penguin/images/bbc/center.png


BIN
Themes/penguin/images/bbc/code.png


BIN
Themes/penguin/images/bbc/divider.png


BIN
Themes/penguin/images/bbc/email.png


BIN
Themes/penguin/images/bbc/flash.png


BIN
Themes/penguin/images/bbc/ftp.png


BIN
Themes/penguin/images/bbc/glow.png


BIN
Themes/penguin/images/bbc/hr.png


BIN
Themes/penguin/images/bbc/img.png


+ 0 - 9
Themes/penguin/images/bbc/index.php

@@ -1,9 +0,0 @@
-<?php
-
-// Try to handle it with the upper level index.php. (it should know what to do.)
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
-	include (dirname(dirname(__FILE__)) . '/index.php');
-else
-	exit;
-
-?>

BIN
Themes/penguin/images/bbc/italicize.png


BIN
Themes/penguin/images/bbc/left.png


Some files were not shown because too many files changed in this diff