* User

Welcome, Guest. Please login or register.
Did you miss your activation email?

12 Mar 10, 06:39:12

Login with username, password and session length

Select language:

* Recent Topics



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

* Stats

  • *Total Members: 1973
  • *Latest: jimpacgr

  • *Total Posts: 9047
  • *Total Topics: 1317
  • *Online Today: 24
  • *Most Online: 157
(27 Aug 09, 03:54:53)
  • *Users: 0
  • *Guests: 10
  • *Spiders: 0
  • *Total: 10

* Themes

*

Author Topic: show option on 2nd sub buttons  (Read 603 times)

0 Members and 1 Guest are viewing this topic.

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 2772
  • Gender: Female
show option on 2nd sub buttons
« on: 18 Jan 10, 02:48:07 »
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 path, a few in relation to the target.

Offline antechinus

  • PortaMx Supporter
  • *
  • Posts: 656
Re: show option on 2nd sub buttons
« Reply #1 on: 19 Jan 10, 01:53:35 »
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.

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 2772
  • Gender: Female
Re: show option on 2nd sub buttons
« Reply #2 on: 19 Jan 10, 02:08:27 »
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 path, a few in relation to the target.