Announcement

  •  » Requests
  •  » [resolved] Tags for parent album

#1 2014-03-03 16:58:40

JanisV
Member
2013-09-25
85

[resolved] Tags for parent album

Hi!

Currently (2.6.1) Piwigo don't show tags for parent album without images. Only for albums with images. My idea - to show tags of sub-albums in their parent.

This is a simple patch. Add this lines into file include/menubar.inc.php at line 165:

Code:

 else if ($block!=null and 'picture' != script_basename())
  {
    if (isset($page['category']['id'])) {
      if (!isset($filter['visible_categories']))
        $filter['visible_categories'] = '';
      $old_filter = $filter['visible_categories'];
      $filter['visible_categories'] = $filter['visible_categories'] . implode(',', get_subcat_ids(array($page['category']['id'])));
    }
    $tags = add_level_to_tags( get_available_tags() );
    if (isset($page['category']['id'])) {
      if (empty($old_filter))
        unset($filter['visible_categories']);
      else
        $filter['visible_categories'] = $old_filter;
    }
    foreach ($tags as $tag)
    {
      $block->data[] =
      array_merge( $tag,
        array(
          'URL' => make_index_url( array( 'tags' => array($tag) ) ),
        )
      );
    }
    if ( !empty($block->data) )
    {
      $block->template = 'menubar_tags.tpl';
    }
  }

Offline

 

#2 2014-03-03 17:17:25

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] Tags for parent album

Hello
thx for the sharing Could filla ticket in our bugtracker plz? thx


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2014-03-03 19:13:45

JanisV
Member
2013-09-25
85

Re: [resolved] Tags for parent album

Offline

 

#4 2014-10-15 08:58:58

JanisV
Member
2013-09-25
85

Re: [resolved] Tags for parent album

Offline

 
  •  » Requests
  •  » [resolved] Tags for parent album

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact