Announcement

  •  » Engine
  •  » hide number of photos in menubar and title

#1 2012-03-14 10:38:42

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

hide number of photos in menubar and title

In the menubar and title (h2), Piwigo displays the number of photos between brackets, such as [12]. Many people want to hide them. It's possible in the menu with some specific CSS rules, but impossible in the h2.

The very basic improvement should be to add a CSS class in h2 for the "[12]", but I wonder if some new options on [Administration > Configuration > Options > Display] wouldn't be better.

Do you have an opinion?

Offline

 

#2 2012-03-14 13:21:16

flop25
Piwigo Team
2006-07-06
7037

Re: hide number of photos in menubar and title

hello
because we've started like that, I would say go for the config page. But initially this page should be the configuration of the default theme, because for a theme started from scratch, this page may have unrelevant config parameters ; doing like this bring another problem which is the parent config is not loaded (as far as i remember)


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 2012-03-14 15:09:34

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

Re: hide number of photos in menubar and title

These options are just "common" option, but it's not a real problem if all themes do not implement them.

Currently, for any theme, this is not possible to remove the "[12]" because it is sent by PHP "as is".

Offline

 

#4 2012-03-14 18:55:13

flop25
Piwigo Team
2006-07-06
7037

Re: hide number of photos in menubar and title

plg wrote:

These options are just "common" option, but it's not a real problem if all themes do not implement them.

okay

plg wrote:

Currently, for any theme, this is not possible to remove the "[12]" because it is sent by PHP "as is".

maybe by using a trigger in menu functions and change $block->data.MENU_CATEGORIES... but it deletes the data so a plugin might need it... so it's better for a theme better to have a prefilter... BTW it's more easy to have a {if config...}

Last edited by flop25 (2012-03-14 18:55:31)


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

 

#5 2012-03-14 21:23:04

Zaphod
Former Piwigo Team
2006-11-13
441

Re: hide number of photos in menubar and title

plg wrote:

The very basic improvement should be to add a CSS class in h2 for the "[12]", but I wonder if some new options on [Administration > Configuration > Options > Display] wouldn't be better.

Do you have an opinion?

Why not both?

The CSS class is very easy to implement, and also allow a user to change the font, color etc... of this number.

Having an option for this would be great for most people who don't know (or want) to add css rules.
But that doesn't change the fact that the css class is currently missing in the templates.

Offline

 

#6 2012-03-14 23:34:42

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

Re: hide number of photos in menubar and title

Zaphod wrote:

plg wrote:

The very basic improvement should be to add a CSS class in h2 for the "[12]", but I wonder if some new options on [Administration > Configuration > Options > Display] wouldn't be better.

Do you have an opinion?

Why not both?

The CSS class is very easy to implement, and also allow a user to change the font, color etc... of this number.

Having an option for this would be great for most people who don't know (or want) to add css rules.
But that doesn't change the fact that the css class is currently missing in the templates.

I perfectly agree with that. First let's have a CSS class, that's easy to implement and very powerful. The UI option is important for user who don't know about CSS (the vast majority) but can be postponed.

Offline

 

#7 2012-03-23 05:02:31

nighthawk
Member
2010-11-07
18

Re: hide number of photos in menubar and title

plg wrote:

In the menubar and title (h2), Piwigo displays the number of photos between brackets, such as [12]. Many people want to hide them. It's possible in the menu with some specific CSS rules, but impossible in the h2.

I'm happy enough to have the number of photos in the menu but would like to have it in a smaller font and perhaps a different color.

Where would I make this change?

Last edited by nighthawk (2012-03-23 05:03:03)

Offline

 

#8 2012-03-25 13:55:18

Zaphod
Former Piwigo Team
2006-11-13
441

Re: hide number of photos in menubar and title

plg wrote:

I perfectly agree with that. First let's have a CSS class, that's easy to implement and very powerful. The UI option is important for user who don't know about CSS (the vast majority) but can be postponed.

I looked at this yesterday... the css rule has to be added in the php code.
In the template, we just have a <h2>{$TITLE}</h2>.

Offline

 

#9 2013-03-26 16:25:45

Bonnie
Member
2013-03-25
19

Re: hide number of photos in menubar and title

Where in the PHP code (which file) do I change this in please? Does anyone know? I'd like to style it a bit differently but can't figure out where to look...

This is in my template:

Code:

<h2>{$TITLE}</h2>

It outputs as Home -> Album Name -> Sub-Album Name -> [123]

I'd like to change it to say "(123 photos)".

Any ideas?

Offline

 

#10 2013-03-29 21:45:32

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

Re: hide number of photos in menubar and title

I would like to the know if the query for listing the number of files puts a little bit of pressure on the server I know a another gallery host used to cache that kind of query as it caused quite a bit of stress on a big setup.

Personally I would like the option to turn it off on the main page but have the option to see it on the admin page.

Offline

 

#11 2013-04-23 11:42:06

Godot
Member
2013-04-05
4

Re: hide number of photos in menubar and title

Any solution? Where $TITLE come from, where it is defined?

Offline

 

#12 2013-04-23 14:10:18

flop25
Piwigo Team
2006-07-06
7037

Re: hide number of photos in menubar and title

Hello all
this current issue of "tittle" is not related to the initial one
Open a new thread

An advice: use a text editor which can search inside multiple file, so you would be able to find what you want much easier


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

 

#13 2013-08-31 11:49:16

charley
Member
2013-08-28
4

Re: hide number of photos in menubar and title

Hello

Did the hiding of numbers ever get implemented, I expect it did but I have searched and not found anything ?

Thank you.

Offline

 

#14 2013-08-31 19:41:22

flop25
Piwigo Team
2006-07-06
7037

Re: hide number of photos in menubar and title

It can be done with templates and Smarty tags
But we also are currently thinking of a better way to implement it to allow greater customizations


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

 

#15 2013-12-23 10:01:03

kurkov
Member
2013-12-17
16

Re: hide number of photos in menubar and title

For theme "stripped" - file menubar_categories.tpl
Add comment from 18 to 22 line. And 27 line.

Code:

<dt>
  <a href="{$block->data.U_CATEGORIES}">{'Albums'|@translate}</a>
</dt>
<dd>
  {assign var='ref_level' value=0}
  {foreach from=$block->data.MENU_CATEGORIES item=cat}
    {if $cat.LEVEL > $ref_level}
      <ul>
    {else}
      </li>
      {'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
    {/if}
    <li {if $cat.SELECTED}class="selected"{/if}>
      <a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if} title="{$cat.TITLE}">{$cat.NAME}</a>
      {if !empty($cat.icon_ts)}
        <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
      {/if}
<!--
      {if $cat.count_images > 0}
        <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if}" title="{$cat.TITLE}">[{$cat.count_images}]</span>
      {/if}
-->
      {assign var='ref_level' value=$cat.LEVEL}
  {/foreach}
  {'</li></ul>'|@str_repeat:$ref_level}

<!--  <p class="totalImages">{$pwg->l10n_dec('%d photo', '%d photos', $block->data.NB_PICTURE)}</p> -->
</dd>

Last edited by kurkov (2013-12-23 10:04:27)

Offline

 
  •  » Engine
  •  » hide number of photos in menubar and title

Board footer

Powered by FluxBB

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