News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Odd Characters in Forum tree links

Started by sammyboy405, February 10, 2009, 05:08:27 AM

Previous topic - Next topic

sammyboy405

Hello,

I Recent Upgraded to SMF 2.0 from 1.1.7 when I did, it caused alot of odd characters everywhere. I managed to clean that up with a ton of scripts.  Never really found the root of the problem. 

Well Now all im left with is little � after every forum tree link.  And for the life of me I cannot find where they coming from.

My website is  www.oklahomawow.com 

Any assistance / suggestions on where to look would be greatly appreciated.

Vekseid

There seems to be a bug with Windows-1252 characters when upgrading to RC1...

Hard to pin down when though : /
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.

sammyboy405

Quote from: Vekseid on February 10, 2009, 05:19:00 AM
There seems to be a bug with Windows-1252 characters when upgrading to RC1...

Hard to pin down when though : /

In templates where dose the extra_after  from from?

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

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree = true;

echo '
<ul id="linktree">';

// 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 ' >';

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


is the extra_after in the database? or is it in a language file?  Id like to look at that location and see if thats where my odd characters are coming from.

sammyboy405

Any Ideas?  Or can someone atleast tell me where the extra_after and extra_before stuff comes from?

sammyboy405

#4
Bump :|

Could Really Use some Assistance here...

sammyboy405

Quote from: sammyboy405 on February 11, 2009, 02:54:39 PM
Bump :|

Could Really Use some Assistance here...

Who do I gotta strip for/ pay money to get some help?  This ought to be a simple issue to fix, im just over looking something some where.

as stated I Upgraded from 117 to 2.0rc1 and i get odd separator characters on the forum link tree. where do i go to find where those characters are at.  ive changed themes and they show up in every theme so its gotta either be in common shared files or in the database.

Brettflan

Check in your theme's index.template.php file. You should have this code around line 400:
        // Don't show a separator for the last one.
        if ($link_num != count($context['linktree']) - 1)
            echo '&nbsp;>';

That last line is what it should be showing as " >" (the "&nbsp;" is a forced space " ") rather than your odd character.
Really, they should probably switch the ">" to its encoded form of "&gt;", but that's a minor and separate detail.

sammyboy405

Quote from: Brettflan on February 12, 2009, 04:43:53 PM
Check in your theme's index.template.php file. You should have this code around line 400:
        // Don't show a separator for the last one.
        if ($link_num != count($context['linktree']) - 1)
            echo '&nbsp;>';

That last line is what it should be showing as " >" (the "&nbsp;" is a forced space " ") rather than your odd character.
Really, they should probably switch the ">" to its encoded form of "&gt;", but that's a minor and separate detail.

Holy Cow Man.  It Worked.  You Rock.  consider this Fixed! Never would of thought of that.

Advertisement: