Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: MLM on November 22, 2010, 06:22:52 PM

Title: Repeated navigate_section on board/thread viewing
Post by: MLM on November 22, 2010, 06:22:52 PM
Well I am revamping a smf RC4 skin called Minimal. You can view what I have here: http://www.visual-pulse.madlittlemods.com/forums/index.php

The problem only happens when you view a board or thread. The div class="navigate_section" gets repeated down below. I have no idea why it does and it is in the code only once. I just want to get rid of that whole lower navigation area.

Problem ex1. http://www.visual-pulse.madlittlemods.com/forums/index.php?board=2.0
Problem ex2. http://www.visual-pulse.madlittlemods.com/forums/index.php?board=1.0

For those who will ask... I will attach the code for the css and template..

This is just a test site for a theme I am making for a future site i have in mind...
Title: Re: Repeated navigate_section on board/thread viewing
Post by: Deaks on November 22, 2010, 08:31:16 PM
we need your messageindex.template.php
Title: Re: Repeated navigate_section on board/thread viewing
Post by: MLM on November 22, 2010, 10:06:05 PM
Quote from: Runic on November 22, 2010, 08:31:16 PM
we need your messageindex.template.php

Okay, now that you have said this, I can probably figure it out but if you have time please give it a go.

Attached.. I got it from the default theme slot? I am using a different theme but I think it runs off this.

Thanks!
Title: Re: Repeated navigate_section on board/thread viewing
Post by: Deaks on November 23, 2010, 08:50:46 AM
ok in MessageIndex.template find

// Show breadcrumbs at the bottom too.
    theme_linktree();


replace with

// Show breadcrumbs at the bottom too.
    theme_linktree2();


in index.template.php find

// Show the menu up top. Something like [home] [help] [profile] [logout]...


add before

function theme_linktree2($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;

    echo '
    <div class="navigate_section2">
        <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 '
            <div class="linktree_bottom">
            <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>
            </div>';
    }
    echo '
        </ul>
    </div>';

    $shown_linktree = true;
}


in index.css find

.navigate_section
{
    background-image:url('../images/banner/vp_banner1.png');
    background-repeat:no-repeat;
    width: 800px;
    height: 234px;
    margin: 0;
}
.navigate_section ul
{
    display: block;
    margin: 0;
    font-size: 0.9em;
    padding: 1em 0 0.5em 0;
    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;
}


replace with

.navigate_section
{
    background-image:url('../images/banner/vp_banner1.png');
    background-repeat:no-repeat;
    width: 800px;
    height: 234px;
    margin: 0;
}
.navigate_section2
{
    padding: 0.5em;
    margin: 0 0 0 0;   
}
.navigate_section ul, .navigate_section2 ul
{
    display: block;
    margin: 0;
    font-size: 0.9em;
    padding: 1em 0 0.5em 0;
    overflow: hidden;
    list-style: none;
    clear: both;
    width: 100%;
}
.navigate_section ul li, .navigate_section2 ul li
{
    float: left;
    padding: 0 0.5em 0 0;
    font-size: 0.95em;
}
Title: Re: Repeated navigate_section on board/thread viewing
Post by: MLM on November 23, 2010, 08:59:52 AM
Thank you so much Runic! I have not done this yet but I will be tonight.  Thanks for showing me what to do instead of doing it for me.

Is there a index or something of what each file contributes? After you said which file to edit, it made a lot of sense but even with chrome with resource tracking, i could not tell which file.
Title: Re: Repeated navigate_section on board/thread viewing
Post by: Deaks on November 23, 2010, 09:01:34 AM
remember mark this as solved when it works (yes im confident it will as ive done it before lol)
Title: Re: Repeated navigate_section on board/thread viewing
Post by: MLM on November 23, 2010, 09:15:17 AM
You answered so fast i do not think you saw my edit.

"Is there a index or something of what each file contributes? After you said which file to edit, it made a lot of sense but even with chrome with resource tracking, i could not tell which file."

I will be sure to mark as solved  ;)
Title: Re: Repeated navigate_section on board/thread viewing
Post by: Deaks on November 23, 2010, 09:19:02 AM
themes I can tell you easily sources wee bit harder as im still learning them, but for themes

Main Page = index.template.php and boardindex.template.php example http://www.simplemachines.org/community/index.php
Message View = index.template.php and messageindex.template.php example http://www.simplemachines.org/community/index.php?board=147.0
Topic Dosplay = index.template.php and Display.template.php example http://www.simplemachines.org/community/index.php?topic=410326.0;topicseen

Index.template.php controls the header and footer.

The rest of the files arent as commonly edited so ive just gave you the main ones :)
Title: Re: Repeated navigate_section on board/thread viewing
Post by: MLM on November 23, 2010, 04:53:17 PM
Thanks for the help :) Worked great with a few fixes!