show option on 2nd sub buttons

Started by Feline, 9 years ago

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

Feline

*
9 years ago
Today I found a heavy bug on SMF 2 RC2 ...
If you have 2nd subbuttons, the 'show' option is't handled  :o
To fix that, edit /Sources/Subs.php
find:
Code Select

// Go through the sub buttons if there are any.
if (!empty($button['sub_buttons']))
foreach ($button['sub_buttons'] as $key => $subbutton)
{
if (empty($subbutton['show']))
unset($button['sub_buttons'][$key]);
}


replace with:
Code Select

// Go through the sub buttons if there are any.
if (!empty($button['sub_buttons']))
foreach ($button['sub_buttons'] as $key => $subbutton)
{
if (empty($subbutton['show']))
unset($button['sub_buttons'][$key]);

// 2nd level subbutton
if(!empty($subbutton['sub_buttons']))
{
foreach($subbutton['sub_buttons'] as $key2 => $sub2_button)
{
if(empty($sub2_button['show']))
unset($button['sub_buttons'][$key]['sub_buttons'][$key2]);
}
}
}


Now the 2nd subbuttons show option works  ;)

Fel
Many are stubborn in relation to the way, but less in relation to the target.

antechinus

*
#1
9 years ago
Interesting. I'm not sure if that is deliberate but I'll file a bug report anyway.
Using Internet Explorer 6 on the internet is like urinating in a public swimming pool.
It's rude, there's no excuse for it, and anyone who does it should be ashamed of themselves.

Feline

*
#2
9 years ago
On the index.template.php the code for 2nd subbuttons are exist .. so it's necessary to get the 'show' option to work (I think)

Fel
Many are stubborn in relation to the way, but less in relation to the target.

* Shouts

Feline
5 months ago
Today we update our Forum to the Version 1.45
Feline
8 months ago
Today we update our Forum to Version 1.4
This release is full compatible with the EU GDPR
Feline
10 months ago
Update for PortaMx 1.54 ecl released.
With this updates the Portal works with PHP 7.x and SMF 2.0.15
Feline
10 months ago
PortaMx Forum 1.3
released !

*
Feline
a year ago
Today we switched to PHP 7.2 and activate Opcode caching.
Fast .. Very fast *
Feline
a year ago
Today we upgrade our old SMF 2.0 Forum to PortaMx Forum *

* Calendar

Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28