Topic: additional menu items not behaving

fresh vanilla install of 1.2.15, no mods, no plugins, etc, and i get this:

http://img141.imageshack.us/img141/1594/shot0002uk1.th.jpg
with this:
http://img141.imageshack.us/img141/1636/shot0001hi3.th.jpg

i've cleared my browser's cache and the PunBB cache folder of all the .php files and it still like this. no errors pop up either.

any ideas?

~James
FluxBB - Less is more

Re: additional menu items not behaving

a bit further testing proves that the links work when there is only one but more than one they stack up in the top links position. ie: if the top link is 2 = <a href.... they all end up between Userlist and Search.

~James
FluxBB - Less is more

Re: additional menu items not behaving

Hmm, it's working fine for me
I think I know what the issue is though: try putting the entries in in reverse order (so the largest number comes first)

Re: additional menu items not behaving

they work in reverse. odd...

~James
FluxBB - Less is more

Re: additional menu items not behaving

Dr.Jeckyl wrote:

they work in reverse. odd...

I think the issue is that you're working with array keys. So when you insert something at the beginning, it has to redo all the keys for the other entries, which changes the key you have to use to add another entry. Doing it in reverse means you'll only reindex parts you won't add more things to

Re: additional menu items not behaving

i don't know if i follow you so is that a bug or something i've done?

for testing i've added these to it and it does the same thing:
works

6 = <a href="http://www.yahoo.com">link 7</a>
5 = <a href="http://www.yahoo.com">link 6</a>
4 = <a href="http://www.yahoo.com">link 5</a>
3 = <a href="http://www.yahoo.com">link 4</a>
2 = <a href="http://www.yahoo.com">link 3</a>
1 = <a href="http://www.yahoo.com">link 2</a>
0 = <a href="http://www.yahoo.com">link 1</a>

doesn't work:

0 = <a href="http://www.yahoo.com">link 1</a>
1 = <a href="http://www.yahoo.com">link 2</a>
2 = <a href="http://www.yahoo.com">link 3</a>
3 = <a href="http://www.yahoo.com">link 4</a>
4 = <a href="http://www.yahoo.com">link 5</a>
5 = <a href="http://www.yahoo.com">link 6</a>
6 = <a href="http://www.yahoo.com">link 7</a>
~James
FluxBB - Less is more

Re: additional menu items not behaving

No, it's not really a bug per-se, but it should be better documented that order is relevant.

And I'll try to explain it a bit better.
The links look something like this:

array
(
    0 => 'Index',
    1 => 'User list',
    2 => 'Search'
)

When you add something to index 0 and index 1 (in that order), you get the following

array
(
    0 => 'thing 1',
    1 => 'Index',
    2 => 'User list',
    3 => 'Search'
)
array
(
    0 => 'thing 1',
    1 => 'thing 2',
    2 => 'Index',
    3 => 'User list',
    4 => 'Search'
)

Done in reverse order, however, it looks like this

array
(
    0 => 'Index',
    1 => 'thing 2',
    2 => 'User list',
    3 => 'Search'
)
array
(
    0 => 'thing 1',
    1 => 'Index',
    2 => 'thing 2',
    3 => 'User list',
    4 => 'Search'
)

You see how the array keys change and how that affects placement?

Re: additional menu items not behaving

kinda. so to overcome just do a reverse order?

~James
FluxBB - Less is more

Re: additional menu items not behaving

Yes