Support for SMF Tricks Themes & Mods

0 Members and 1 Guest are viewing this topic.

*
Puffin
Customer
I recently downloaded the Army theme and I'm super happy with it!  The only issue I've had is that it doesn't seem to be compatible with the subaccounts mod I have installed.  Normally, with this mod, a drop-down option appears in the upper left hand corner of the forum, allowing members to easily switch between accounts (you can see a preview screenshot in the link I've provided).  This drop-down isn't visible with the Army theme and I'm not sure how to go about remedying that.

Any help or advice would be much appreciated!






*
Diego Andrés
#1
Webmaster
Yeah, I'll take a look and see what's the best place to display it :)
*
Puffin
#2
Customer
That would be fantastic, thank you so much!
*
Diego Andrés
#3
Webmaster
I'll try to get it done by the afternoon :P
*
Puffin
#4
Customer
Awesome, no rush at all! :) I don't want to take advantage of your helpfulness but, if you get a chance, I've noticed a secondary issue in that a list of a member's subaccounts are supposed to show in their parent account profile.  Even with the relevant option selected in the subaccounts settings, with the Army theme these don't appear.

Example of how it should appear:



How it actual appears:

*
Diego Andrés
#5
Webmaster
Alright I've been working on it.
Did you installed it on Army theme with the error?
Otherwise you should use the mod parse to get the other changes: https://custom.simplemachines.org/mods/index.php?action=parse;mod=2264;attach=160463;smf_version=2.0_RC4
Profile.template.php
Display.template.php
Army/css/index.css (indicated for the default theme, should be done as well)

I would only work on the Index.template.php changes as they are not compatible by default, will have it done soon
*
Diego Andrés
#6
Webmaster
index.template.php
Code: (search) [Select]
global $context, $settings, $options, $txt;
Code: (replace) [Select]
global $context, $settings, $options, $txt, $user_info, $scripturl;

Code: (search) [Select]
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = true;
Code: (add after) [Select]
$context['subaccount_dropdown'] = '';
if (!empty($user_info['subaccounts']))
{
$context['subaccount_dropdown'] = '
<form style="display: inline; margin-left: 5px;" class="smalltext" action="' . $scripturl . '?action=switchsubaccount" method="post" name="subaccount_drop" id="subaccount_drop" enctype="multipart/form-data">
<select style="margin-top:5px;" name="subaccount" size="1" onchange="document.subaccount_drop.submit()">
<option selected="selected">' . $txt['change_subaccount'] . '</option>';
foreach($user_info['subaccounts'] as $id => $subaccount)
$context['subaccount_dropdown'] .= '
<option value="' . $id . '">' . $subaccount['name'] . '</option>';
$context['subaccount_dropdown'] .= '
</select>
<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
</form>';
}

Code: (search) [Select]
<ul class="dropdown">
<li>
<a href="', $scripturl, '?action=profile" class="dropdown-toggle" data-toggle="dropdown" role="button" id="user-menu" aria-haspopup="true" aria-expanded="true">
<span class="welcome">', $txt['hello_guest'], '</span><br>
', $context['user']['name'], ' <span class="fa fa-chevron-down"></span>
</a>
<ul class="dropdown-menu" aria-labelledby="user-menu">
<li><a href="', $scripturl, '?action=profile;area=forumprofile"><span class="fa fa-user"></span> ', $txt['forumprofile'], '</a></li>
<li><a href="', $scripturl, '?action=profile;area=account"><span class="fa fa-cog"></span> ', $txt['account'], '</a></li>
<li><a href="', $scripturl, '?action=unread"><span class="fa fa-comments"></span> ', $txt['unread_topics_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies"><span class="fa fa-commenting"></span> ', $txt['unread_replies'], '</a></li>
<li class="divider"></li>
<li><a href="', $scripturl, '?action=logout;', $context['session_var'], '=', $context['session_id'], '"><span class="fa fa-sign-out"></span> ', $txt['logout'], '</a></li>
</ul>
</li>
</ul>
Code: (replace) [Select]
<ul class="dropdown">
<li>
<a href="', $scripturl, '?action=profile" class="dropdown-toggle" data-toggle="dropdown" role="button" id="user-menu" aria-haspopup="true" aria-expanded="true">
<span class="welcome">', $txt['hello_guest'], '</span><br>
', $context['user']['name'], ' <span class="fa fa-chevron-down"></span>
</a>
<ul class="dropdown-menu" aria-labelledby="user-menu">
<li><a href="', $scripturl, '?action=profile;area=forumprofile"><span class="fa fa-user"></span> ', $txt['forumprofile'], '</a></li>
<li><a href="', $scripturl, '?action=profile;area=account"><span class="fa fa-cog"></span> ', $txt['account'], '</a></li>
<li><a href="', $scripturl, '?action=unread"><span class="fa fa-comments"></span> ', $txt['unread_topics_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies"><span class="fa fa-commenting"></span> ', $txt['unread_replies'], '</a></li>
<li class="divider"></li>
<li><a href="', $scripturl, '?action=logout;', $context['session_var'], '=', $context['session_id'], '"><span class="fa fa-sign-out"></span> ', $txt['logout'], '</a></li>
</ul>
</li>
</ul>
', $context['subaccount_dropdown'], '
« Last Edit: May 16, 2017, 06:32:35 PM by Diego Andrés »
*
Puffin
#7
Customer
This works perfectly!  Thank you so much for all your help, Diego Andrés! ~