[BUG] Enable inline links.

Started by fiver, January 07, 2006, 09:07:17 AM

Previous topic - Next topic

fiver

For SMF  1.1 rc 2

"Theme Settings - SMF Default Theme" > "Theme Options and Preferences"

Quote[box] Enable inline links
Enabling this will cause your current location to be drawn in a single line, as opposed to in a tree-like manner.

Whether I tick or untick the box, it still is a single line. It doesn't change into tree-like manner.

:(

codenaught

This is because the inline link functionality is not available for the default theme. Though it should probably not be shown for the default theme because of that.
Dev Consultant
Former SMF Doc Coordinator

fiver

Its a pity... as I am using it as a default look for all members at the moment (they are on the old default aka the new Babylon). I have upgraded to 1.1rc2 but testing the new Core template myself as an admin before releasing it to members .

Anyway way to make it work in Core theme?

:)

bambi

#3
Go to index.template.php       (../Themes/default/index.template.php)

Search:
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// 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 '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

// 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 '&nbsp;>&nbsp;';
}
echo '</div>';
}

Replace:

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num > 0)
echo str_repeat('<img src="' . $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}
// 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 '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

// 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 $settings['linktree_inline'] ? ' &nbsp;>&nbsp; ' : '<br />';
}
echo '</span>';
}

Sverre

Quote from: akabugeyes on January 07, 2006, 02:36:25 PM
This is because the inline link functionality is not available for the default theme. Though it should probably not be shown for the default theme because of that.

Checking the option adds the breadcrumbs also at the bottom of the page, so it does have a function, but the explanation should definitely be updated to reflect the change from the old theme.

baladeva

and also - in the help_data, there is exactly the trea_menu to see,
but then it does not work in the site it self, not so good

Advertisement: