News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

very simple!! How to change the character on tree menu (linktree)? V2.0 RC3

Started by UltraEffect, August 03, 2010, 07:19:56 PM

Previous topic - Next topic

UltraEffect

hello everyone,



Took screenshots in 2 different languages as seen in the image..

how do i edit the special character between tree menu?

is it related to <div class="navigate_section"> ??

css
/* The navigation list (i.e. linktree) */
.navigate_section
{
   padding: 0.5em;
   margin: 1em 0 0 0;
}
.navigate_section ul
{
   display: block;
   margin: 0;
   font-size: 0.9em;
   padding: 1em 0 0.5em 0;
   border-top: 1px solid #ccc;
   overflow: hidden;
   list-style: none;
   clear: both;
   width: 100%;
}
.navigate_section ul li
{
   float: left;
   padding: 0 0.5em 0 0;
   font-size: 0.95em;
}




index.template.php

<div class="navigate_section">
      <ul>';

   // Each tree item has a URL and name. Some may have extra_before and extra_after.
   foreach ($context['linktree'] as $link_num => $tree)
   {
      echo '
         <li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';

      // Show something before the link?
      if (isset($tree['extra_before']))
         echo $tree['extra_before'];

      // Show the link, including a URL if it should have one.
      echo $settings['linktree_link'] && isset($tree['url']) ? '
            <a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] . '</span>';

      // Show something after the link...?
      if (isset($tree['extra_after']))
         echo $tree['extra_after'];

      // Don't show a separator for the last one.
      if ($link_num != count($context['linktree']) - 1)
         echo ' &#187;';

      echo '
         </li>';
   }
   echo '
      </ul>
   </div>';

many thanks in advance!!

DoctorMalboro

Those errors are coding errors... you use UTF-8 with BOM that mess up like in the first picture, and in the second you use a non-UTF-8 compatible character...

UltraEffect

Quote from: DoctorMalboro on August 03, 2010, 08:06:19 PM
Those errors are coding errors... you use UTF-8 with BOM that mess up like in the first picture, and in the second you use a non-UTF-8 compatible character...


thank you Doctor!!

I am very new to this, I have only few days of experience with SMF, what u say makes sense. But how do i fix it??


Can i maybe ad a small image between urls? if so where do i write it in the following code?


// Show something after the link...?
      if (isset($tree['extra_after']))
         echo $tree['extra_after'];


my apologies for the hassle :/

Kays

The separator is the &#187; in this bit of code.


// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &#187;';


If you wish to display an image, replace that with an <img> tag .

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

UltraEffect


Kays

Did you do this in index.template.php of the theme you are using?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods


Gary

Try &gt;&gt; instead of putting greater thans in directly like that.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Yonkiz

i solve that problem whit this code -&raquo-  on index.template.php of your theme in this part:

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1 && !$context['right_to_left'])
echo '&raquo;';

Advertisement: