Repeated navigate_section on board/thread viewing

Started by MLM, November 22, 2010, 06:22:52 PM

Previous topic - Next topic

MLM

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...

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

MLM

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!

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Deaks

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;
}
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

MLM

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.

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Deaks

remember mark this as solved when it works (yes im confident it will as ive done it before lol)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

MLM

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  ;)

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Deaks

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 :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

MLM

Thanks for the help :) Worked great with a few fixes!

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Advertisement: