News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

code help please

Started by Zennia, July 24, 2016, 02:11:53 PM

Previous topic - Next topic

Zennia



On my site we have a sub account mod running. It's that drop down box in the image. I wanted to put the drop down for it below the date. However, every time I try I get a parse template error.

The code is based on the default curve skin. This is the section of code that I've been trying to change and getting errors on. This is before I've changed anything, this one doesn't error but it's not what I want it to look like. This one makes it look exactly like the above image layout.
echo '
            <ul class="reset">
              <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span>', '</li><li>', $context['subaccount_dropdown'], '</li>
               <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';


So what do I need to change to get the drop down where I want it without causing errors?

Zennia

Of course I figure this out after I post asking for help. xD
I'll post the answer here if anyone wants to know later.


Find this in the index.template.php of the skin:
echo '
               <li>', $context['current_time'], '</li>
            </ul>';


And replace with:
  echo '
               <li>', $context['current_time'], '</li>
<li>', $context['subaccount_dropdown'], '</li>
            </ul>';
   }


Then find:
echo '
            <ul class="reset">
              <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span>', '</li><li>', $context['subaccount_dropdown'], '</li>
               <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';


And remove the first drop down by replacing it with this. or you'll end up with two drop downs.
echo '
            <ul class="reset">
              <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span>', '</li>
               <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Advertisement: