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
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)
Offline
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
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)
Offline
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
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
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
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
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:
<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
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
Any solution? Where $TITLE come from, where it is defined?
Offline
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
Offline
Hello
Did the hiding of numbers ever get implemented, I expect it did but I have searched and not found anything ?
Thank you.
Offline
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
Offline
For theme "stripped" - file menubar_categories.tpl
Add comment from 18 to 22 line. And 27 line.
<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