Announcement

#1 2013-04-10 17:21:48

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13782

[2.5] section_title and flat mode

Hi rvelices and mistic100,

In Piwigo 2.5 we have a new behavior related to $page['section_title'].

The problem is on a page like picture.php?/1234 with no section specified. The "Home" link goes to /index.php?/categories/flat instead of /.

I don't think this behavior is expected (or please explain). Can you confirm? Can you fix it?

Offline

 

#2 2013-04-10 17:23:46

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13782

Re: [2.5] section_title and flat mode

Offline

 

#3 2013-04-10 17:25:20

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13782

Re: [2.5] section_title and flat mode

function params_for_duplication (called in duplicate_index_url) adds flat=>true in $params for make_index_url.

Offline

 

#4 2013-04-10 17:35:12

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13782

Re: [2.5] section_title and flat mode

The problem also exists when you go on /picture.php?/1234/category (which happens from PWG Stuffs random photos block, or from Advanced Menu Manager Random Picture)

Offline

 

#5 2013-04-11 14:23:13

rvelices
Former Piwigo Team
2005-12-29
1960

Re: [2.5] section_title and flat mode

plg wrote:

The problem is on a page like picture.php?/1234 with no section specified. The "Home" link goes to /index.php?/categories/flat instead of /.

I don't think this behavior is expected (or please explain). Can you confirm? Can you fix it?

I agree, it is not good (I'll fix it when i have time)
line 581 section_init

Code:

$used_link = duplicate_index_url(array('start'=>0));

should be:

Code:

$used_link = duplicate_index_url(array('start'=>0), array('flat'));

In my initial thoughts, I wanted on the picture page to have the breadcrumb navigate to navigate up as the UP icon (I realized that on picture page most people never click the up icon or the photo, but they expect to fall on the previous page)

I'll try to make it work in 2.6 ...

Offline

 

#6 2013-04-12 13:25:45

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13782

Re: [2.5] section_title and flat mode

Hi rvelices,

Thank you for [Subversion] r22161, but I still have /index.php?/categories instead of a simple / (which is not the same when you have an home page with plugin Additionnal Pages)

Offline

 

#7 2013-04-12 19:47:10

rvelices
Former Piwigo Team
2005-12-29
1960

Re: [2.5] section_title and flat mode

plg wrote:

Hi rvelices,

Thank you for [Subversion] r22161, but I still have /index.php?/categories instead of a simple / (which is not the same when you have an home page with plugin Additionnal Pages)

Ok. Can you try and see if it fits with your configs :

Code:

if (isset($page['title']))
{
  $page['section_title'] = '<a href="'.get_gallery_home_url().'">'.l10n('Home').'</a>';
  if (!empty($page['title']))
  {
    $page['section_title'] .= $conf['level_separator'].$page['title'];
  }
  else
  {
    $page['title'] = $page['section_title'];
  }
}

Offline

 

#8 2013-04-12 23:08:57

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13782

Re: [2.5] section_title and flat mode

Yes, it works much better with this code in include/section_init.inc.php

Offline

 

#9 2013-04-18 15:18:36

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13782

Re: [2.5] section_title and flat mode

[Bugtracker] ticket 2891

I have commited the change you proposed (and that is working fine for me) in [Subversion] r22282

Offline

 

Board footer

Powered by FluxBB

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