|
@@ -12,16 +12,6 @@
|
|
|
|
|
|
function template_boardindex_outer_above()
|
|
|
{
|
|
|
- global $context, $settings, $options, $txt, $scripturl, $modSettings;
|
|
|
-
|
|
|
-
|
|
|
- if (!$settings['show_stats_index'])
|
|
|
- echo '
|
|
|
- <div id="index_common_stats">
|
|
|
- ', $txt['members'], ': ', $context['common_stats']['total_members'], ' &
|
|
|
- ', $settings['show_latest_member'] ? ' ' . sprintf($txt['welcome_newest_member'], ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>') : '' , '
|
|
|
- </div>';
|
|
|
-
|
|
|
template_newsfader();
|
|
|
}
|
|
|
|
|
@@ -236,6 +226,9 @@ function template_info_center()
|
|
|
{
|
|
|
global $context, $settings, $options, $txt, $scripturl, $modSettings;
|
|
|
|
|
|
+ if (empty($context['info_center']))
|
|
|
+ return;
|
|
|
+
|
|
|
|
|
|
echo '
|
|
|
<div class="roundframe" id="info_center">
|
|
@@ -247,10 +240,59 @@ function template_info_center()
|
|
|
</div>
|
|
|
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
|
|
|
|
|
|
-
|
|
|
- if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
|
|
|
+ foreach ($context['info_center'] as $block)
|
|
|
{
|
|
|
- echo '
|
|
|
+ $func = 'template_ic_block_' . $block;
|
|
|
+ $func();
|
|
|
+ }
|
|
|
+
|
|
|
+ echo '
|
|
|
+ </div>
|
|
|
+ </div>';
|
|
|
+
|
|
|
+
|
|
|
+ echo '
|
|
|
+ <script type="text/javascript"><!--
|
|
|
+ var oInfoCenterToggle = new smc_Toggle({
|
|
|
+ bToggleEnabled: true,
|
|
|
+ bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
|
|
|
+ aSwappableContainers: [
|
|
|
+ \'upshrinkHeaderIC\'
|
|
|
+ ],
|
|
|
+ aSwapImages: [
|
|
|
+ {
|
|
|
+ sId: \'upshrink_ic\',
|
|
|
+ altExpanded: ', JavaScriptEscape($txt['hide']), ',
|
|
|
+ altCollapsed: ', JavaScriptEscape($txt['show']), '
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 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\'
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function template_ic_block_recent()
|
|
|
+{
|
|
|
+ global $context, $scripturl, $settings, $txt;
|
|
|
+
|
|
|
+
|
|
|
+ echo '
|
|
|
<div class="title_barIC">
|
|
|
<h4 class="titlebg">
|
|
|
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.png" alt="" />', $txt['recent_posts'], '</a>
|
|
@@ -262,19 +304,19 @@ function template_info_center()
|
|
|
<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
|
|
|
</div>';
|
|
|
|
|
|
-
|
|
|
- if ($settings['number_recent_posts'] == 1)
|
|
|
- {
|
|
|
-
|
|
|
- echo '
|
|
|
+
|
|
|
+ if ($settings['number_recent_posts'] == 1)
|
|
|
+ {
|
|
|
+
|
|
|
+ echo '
|
|
|
<p id="infocenter_onepost" class="inline">
|
|
|
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a> "', sprintf($txt['is_recent_updated'], '"' . $context['latest_post']['link'], '"'), ' (', $context['latest_post']['time'], ')<br />
|
|
|
</p>';
|
|
|
- }
|
|
|
-
|
|
|
- elseif (!empty($context['latest_posts']))
|
|
|
- {
|
|
|
- echo '
|
|
|
+ }
|
|
|
+
|
|
|
+ elseif (!empty($context['latest_posts']))
|
|
|
+ {
|
|
|
+ echo '
|
|
|
<table id="ic_recentposts">
|
|
|
<tr>
|
|
|
<th class="recentpost first_th">', $txt['message'], '</th>
|
|
@@ -283,74 +325,78 @@ function template_info_center()
|
|
|
<th class="recenttime last_th">', $txt['date'], '</th>
|
|
|
</tr>';
|
|
|
|
|
|
-
|
|
|
- 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 '
|
|
|
+
|
|
|
+ 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 class="recentpost"><strong>', $post['link'], '</strong></td>
|
|
|
<td class="recentposter">', $post['poster']['link'], '</td>
|
|
|
<td class="recentboard">', $post['board']['link'], '</td>
|
|
|
<td class="recenttime">', $post['time'], '</td>
|
|
|
</tr>';
|
|
|
- echo '
|
|
|
- </table>';
|
|
|
- }
|
|
|
echo '
|
|
|
- </div>';
|
|
|
+ </table>';
|
|
|
}
|
|
|
+ echo '
|
|
|
+ </div>';
|
|
|
+}
|
|
|
+
|
|
|
+function template_ic_block_calendar()
|
|
|
+{
|
|
|
+ global $context, $scripturl, $txt, $settings;
|
|
|
|
|
|
|
|
|
- if ($context['show_calendar'])
|
|
|
- {
|
|
|
- echo '
|
|
|
+ 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>';
|
|
|
|
|
|
-
|
|
|
- if (!empty($context['calendar_holidays']))
|
|
|
- echo '
|
|
|
+
|
|
|
+ if (!empty($context['calendar_holidays']))
|
|
|
+ echo '
|
|
|
<p class="inline holiday"><span>', $txt['calendar_prompt'], '</span> ', implode(', ', $context['calendar_holidays']), '</p>';
|
|
|
|
|
|
-
|
|
|
- if (!empty($context['calendar_birthdays']))
|
|
|
- {
|
|
|
- echo '
|
|
|
+
|
|
|
+ if (!empty($context['calendar_birthdays']))
|
|
|
+ {
|
|
|
+ echo '
|
|
|
<p class="inline">
|
|
|
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>';
|
|
|
-
|
|
|
- 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'] ? '' : ', ';
|
|
|
+
|
|
|
+ foreach ($context['calendar_birthdays'] as $member)
|
|
|
echo '
|
|
|
+ <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
|
|
|
+ echo '
|
|
|
</p>';
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
- if (!empty($context['calendar_events']))
|
|
|
- {
|
|
|
- echo '
|
|
|
+
|
|
|
+ if (!empty($context['calendar_events']))
|
|
|
+ {
|
|
|
+ echo '
|
|
|
<p class="inline">
|
|
|
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- foreach ($context['calendar_events'] as $event)
|
|
|
- echo '
|
|
|
- ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" class="centericon" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
|
|
|
+
|
|
|
+
|
|
|
+ foreach ($context['calendar_events'] as $event)
|
|
|
echo '
|
|
|
+ ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" class="centericon" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
|
|
|
+ echo '
|
|
|
</p>';
|
|
|
- }
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+function template_ic_block_stats()
|
|
|
+{
|
|
|
+ global $scripturl, $txt, $context, $settings;
|
|
|
|
|
|
|
|
|
- if ($settings['show_stats_index'])
|
|
|
- {
|
|
|
- echo '
|
|
|
+ echo '
|
|
|
<div class="title_barIC">
|
|
|
<h4 class="titlebg">
|
|
|
<a href="', $scripturl, '?action=stats" title="', $txt['more_stats'], '"><span class="stats_icon boards"></span>', $txt['forum_stats'], '</a>
|
|
@@ -361,8 +407,11 @@ function template_info_center()
|
|
|
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
|
|
|
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>
|
|
|
</p>';
|
|
|
- }
|
|
|
+}
|
|
|
|
|
|
+function template_ic_block_online()
|
|
|
+{
|
|
|
+ global $context, $scripturl, $txt, $modSettings;
|
|
|
|
|
|
echo '
|
|
|
<div class="title_barIC">
|
|
@@ -404,59 +453,5 @@ function template_info_center()
|
|
|
|
|
|
echo '
|
|
|
</p>';
|
|
|
-
|
|
|
-
|
|
|
- if ($context['user']['is_logged'] && !$settings['show_stats_index'])
|
|
|
- {
|
|
|
- echo '
|
|
|
- <div class="title_barIC">
|
|
|
- <h4 class="titlebg">
|
|
|
- ', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<span class="pm_icons inbox icon"></span>', $txt['personal_message'], '', $context['allow_pm'] ? '</a>' : '', '
|
|
|
- </h4>
|
|
|
- </div>
|
|
|
- <p class="pminfo">
|
|
|
- ', empty($context['user']['messages']) ? $txt['you_have_no_msg'] : ($context['user']['messages'] == 1 ? sprintf($txt['you_have_one_msg'], $scripturl . '?action=pm') : sprintf($txt['you_have_many_msgs'], $scripturl . '?action=pm', $context['user']['messages'])), '
|
|
|
- </p>';
|
|
|
- }
|
|
|
-
|
|
|
- echo '
|
|
|
- </div>
|
|
|
- </div>';
|
|
|
-
|
|
|
-
|
|
|
- echo '
|
|
|
- <script type="text/javascript"><!--
|
|
|
- var oInfoCenterToggle = new smc_Toggle({
|
|
|
- bToggleEnabled: true,
|
|
|
- bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
|
|
|
- aSwappableContainers: [
|
|
|
- \'upshrinkHeaderIC\'
|
|
|
- ],
|
|
|
- aSwapImages: [
|
|
|
- {
|
|
|
- sId: \'upshrink_ic\',
|
|
|
- altExpanded: ', JavaScriptEscape($txt['hide']), ',
|
|
|
- altCollapsed: ', JavaScriptEscape($txt['show']), '
|
|
|
- }
|
|
|
- ],
|
|
|
- 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\'
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
}
|
|
|
?>
|