Support for SMF Tricks Themes & Mods

0 Members and 1 Guest are viewing this topic.

*
fortitude
Sniffer
How to add more tabs in bottom of Redsy?
June 18, 2015, 11:44:02 AM
Forum Info Center has 2 tabs
Forum Stats and Users Online

I'd like to add 3rd tab - in front of these two, and make it active when page loads.
It would be for custom html which would contain images.

Could you please show me how to add that 3rd tab?






*
Daniel
#1
Webmaster
Re: How to add more tabs in bottom of Redsy?
August 09, 2015, 01:08:31 PM
Hello, sorry for not having replied before, here u have:
BoardIndex.template.php
Button on tab
Search:
Code: [Select]
<li role="presentation" class="active">
<a href="#users" aria-controls="users" role="tab" data-toggle="tab">
<i class="fa fa-users"></i>
<span>&nbsp;', $txt['online_users'], '</span>
</a>
</li>
Add after:
Code: [Select]
<li role="presentation" class="active">
<a href="#nameofthetab" aria-controls="nameofthetab" role="tab" data-toggle="tab">
<i class="fa fa-users"></i>
<span>&nbsp;', $txt['nameofthetab'], '</span>
</a>
</li>

You have to change nameofthetab for the name what you want, and fa-users for the icon, you can search icons here: http://fontawesome.io/icons/

Content
Search:
Code: [Select]
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}

echo '
Add after:
Code: [Select]
<div class="tab-pane" id="nameofthetab" role="tabpanel">
The content here
</div>
You have to change nameofthetab, It must be equal to the button.
ThemeString.english.php (themes/Redsy/languages)
Add before ?>:
Code: [Select]
$txt['nameofthetab'] = 'Name of the tab';Change nameofthetab and "Name of the tab".