The above manual changes is the basic. And since I have some extra time, I come with another suggestion.
1. Like the above, open your BoardIndex.template.php and find:
/**
* Show information above the boardindex, like the newsfader
*/
function template_boardindex_outer_above()
{
global $context, $settings, $txt;
// Show some statistics if info centre stats is off.
if (!$settings['show_stats_index'])
echo '
<div id="index_common_stats">
', $txt['members'], ': ', $context['common_stats']['total_members'], ' • ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' • ', $txt['topics_made'], ': ', $context['common_stats']['total_topics'], '<br />
', $settings['show_latest_member'] ? ' ' . sprintf($txt['welcome_newest_member'], ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>') : '', '
</div>';
}
Add something similar to the end of it just before closing:
/**
* Show information above the boardindex, like the newsfader
*/
function template_boardindex_outer_above()
{
global $context, $settings, $txt;
// Show some statistics if info centre stats is off.
if (!$settings['show_stats_index'])
echo '
<div id="index_common_stats">
', $txt['members'], ': ', $context['common_stats']['total_members'], ' • ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' • ', $txt['topics_made'], ': ', $context['common_stats']['total_topics'], '<br />
', $settings['show_latest_member'] ? ' ' . sprintf($txt['welcome_newest_member'], ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>') : '', '
</div>';
template_recent_posts_2top();
}
2. We then rename function template_ic_recent_posts() to function template_ic_recent_posts2().
3. Lastly, add the following at the end:
/**
* The recent posts
*/
function template_recent_posts_2top()
{
global $context, $txt;
// Here's where the "Recent Posts" starts...
echo '
<div id="info_center" class="forum_category">
<h2 class="category_header">
<span id="category_toggle">
<span id="upshrink_ic2" class="', empty($context['minmax_preferences']['info']) ? 'collapse' : 'expand', '" style="display: none;" title="', $txt['hide'], '"></span>
</span>
<a href="#" id="upshrink_link2">', $txt['recent_posts'], '</a>
</h2>
<ul id="upshrinkHeaderIC2" class="category_boards"', empty($context['minmax_preferences']['info']) ? '' : ' style="display: none;"', '>';
template_ic_recent_posts2();
echo '
</ul>
</div>';
// Recent Posts collapse object.
echo '
<script><!-- // --><![CDATA[
var oInfoCenterToggle = new elk_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($context['minmax_preferences']['info']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC2\'
],
aSwapClasses: [
{
sId: \'upshrink_ic2\',
classExpanded: \'collapse\',
titleExpanded: ', JavaScriptEscape($txt['hide']), ',
classCollapsed: \'expand\',
titleCollapsed: ', JavaScriptEscape($txt['show']), '
}
],
aSwapLinks: [
{
sId: \'upshrink_link2\',
msgExpanded: ', JavaScriptEscape($txt['recent_posts']), ',
msgCollapsed: ', JavaScriptEscape($txt['recent_posts']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'minmax_preferences\',
sSessionId: elk_session_id,
sSessionVar: elk_session_var,
sAdditionalVars: \';minmax_key=info\'
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC2\'
}
});
// ]]></script>';
}
This can also be added as a hook.