Having a look to the full filter screen, we have 17 items, right?
The array $media.sort_order delivers 15 items, which are of two differing sorts:
Code: Select all
Array
(
[i.date] => Array
(
[desc] => Upload-Datum
[type] => date
)
[i.name] => Array
(
[desc] => Dateiname
)
[i.authorid] => Array
(
[desc] => Autor
[type] => authors
)
[i.extension] => Array
(
[desc] => Dateiendung
)
[i.size] => Array
(
[desc] => Dateigröße
[type] => intrange
)
[i.dimensions_width] => Array
(
[desc] => Bildbreite
[type] => intrange
)
[i.dimensions_height] => Array
(
[desc] => Bildhöhe
[type] => intrange
)
[bp.DPI] => Array
(
[desc] => DPI
[type] => int
)
[bp.RUN_LENGTH] => Array
(
[desc] => Laufzeit
[type] => intrange
)
[bp.DATE] => Array
(
[desc] => Verknüpftes Datum
[type] => date
)
[bp.COPYRIGHT] => Array
(
[desc] => Copyright
)
[bp.TITLE] => Array
(
[desc] => Titel
)
[bp.COMMENT1] => Array
(
[desc] => Kurzer Kommentar
)
[bp.COMMENT2] => Array
(
[desc] => Langer Kommentar
)
[bp.ALT] => Array
(
[desc] => Bildinhalt (Zusammenfassung für das ALT-Attribut)
)
)
The labels are set via <label for="serendipity_filter_{$filter@key}">{$filter.desc}</label>.
As you can see by yourself, there are some, which do not show up as a name + (bp.desc) in parenthesis.
This is, while the code only sets those as fieldset span information headers, if of type "date" or "intrange". This makes the full filter item types not really good to understand and seperated from each other. Its OK if you think its all-in-one. But as far as I think it works, the bp.items are only available if being exemplarily set by user per item. And what happens if you start mixing them...?
Keep this in mind and let us find some other related questions:
If you look to the filter collapsible box en detail, you'll see "Dateiname" is shown twice. The first is the i.name (see array), the second is hardcoded (not array deflated) to the media_pane.tpl as
Code: Select all
<div id="media_filter_file" class="form_field left">
<label for="serendipity_only_filename">{$CONST.SORT_ORDER_NAME}</label>
<input id="serendipity_only_filename" name="serendipity[only_filename]" type="text" value="{$media.only_filename|escape}">
</div>
This is followed by another hardcoded filter, which is media keywords:
Code: Select all
<div id="media_filter_keywords" class="form_field center">
<label for="keyword_input">{$CONST.MEDIA_KEYWORDS}</label>
<input id="keyword_input" name="serendipity[keywords]" type="text" value="{$media.keywords_selected|escape}">
</div>
- Are these two extraParems a rest of some old or some 2.0-dev smartifying coding state?
- Was that perhaps meant as an approach for the simplified filter simple filter option? (Simple filter btw currently delivers i.date and i.name and the 2 hardcoded items)
- Is there maybe a (plugin?) filter state where these two hardcoded items are the only items showing up?
- Why is or was "media keywords" not placed in the sort_order (bp?) array?
- The hardcoded "Dateiname" is based to only_filename, which is set and added to the $parems array by and latterly added to the $media full array. What are both array items for? (Originally meant and currently used?) (*)
Code: Select all
function serendipity_generateImageSelectorParems($format = 'url') { .... $standaloneFilterParams = array('only_path', 'only_filename');
- In full filter view, you can't really distinguish between i.items and bp.items, per extending option or per design?! (I think it would be nice to have at least one of this!)
- Having cleared this, how can we seperate i.* from bp.*, or make the media items better readable.
PS. Btw the Personal Preferences simple filter option talks about having influence to entries too. This is not true, IMHO, except that it enables the checks for delete. We should change that in this case.
(*) It is easy to just disable the hardcoded "only_filename" in media_pane.tpl, but I am not that sure what all these related backend core code does. So its better to clear the upper questions first in detail to make it right.
To make this section even more featuresk, I would like to have a simple reset button for the filters. (By javascript for the best. But I still need some more ideas on how to do this in this case. [Solved])