Attributes-Info under a thumb, and Formating Variables

Started by sinus, September 04, 2014, 11:25:16 AM

Previous topic - Next topic

sinus

The variable for the formats works very good, thanks for this.

With the following code I get the formating of the attached thumb

<Run FontSize='10pt' Foreground='AliceBlue'  Background='{File.Ext|is:NEF,#9400d3,}{File.Ext|is:JPG,#228b22,}{File.Ext|is:GIF,#00ff00,}{File.Ext|is:TXT,#00bb00,}'>{File.Ext|to_upper} </Run>   
{File.AT.Bild-Datei.Eintrag-Bem|cast:int;is:0,Nope;is:1,ATT}

Now you can see in the attachement the formated format (extension), and behind the Text "ATT".
This is the output of the bold line above.

I want to realise an "icon" under the thumb, where I can see, that there is an Attributes-Entry or not.
Because I did not see another possibility, I created a boolean-field in Attributes, what I check on, if I write some other entries in the Attrbutes.
This boolean-field calls "Eintrag-Bem" and this file is in the line above
{File.AT.Bild-Datei.Eintrag-Bem|cast:int;is:0,Nope;is:1,ATT}

First remark:
This line is from the helpfile, but it does ONLY disply, when the boolean is true, the word (from Mario) NOPE will never display, if the value is not true.
But this is not a problem for me, in contrary, if there is an entry, the word is displayed, if not, nothing is displayed.

Second remark/question:
I tried everyhing to get the same result as the neat colorbox of the extension, but without success. All my tries with colors and <Run and so on does not work.
Has everbody an idea, how to get this working.

Third questions, and why I want realise this, related to Attributes:
If we have several panels of attributes, like in the helpfile (see attachement 2) Info and Submissions and even more, it is even more difficult to see, if there is an entry or not!

Because like in the attached example is the "Submission" displayed, but if there is no entry in Submissions, only in "Info", then we cannot see this.

So my idea is to create for each panel (here Info and Submission) such a boolean-field, what I would display under the thumb.
On this way I could see immediately, if and where are Attributes-entries.


Sorry, it is not easy to explain in English, hope, you know, what I mean. Maybe I am blind and you know an another, easy solution for this.


[attachment deleted by admin]
Best wishes from Switzerland! :-)
Markus

Mario

For first remark:

If you want to show A when an Attribute has a value, and B if it has none, use the standard combination of hasvalue and default:

{File.AT.Image.Type|hasvalue:A;default:B}

For second remark:

This works exactly as for the extension. Replace A and B in the variable above with the color values, and put a <Run.... around it.

Third remark.
You don't need to create an extra Attribute for your tests. Just use one you usually fill when you add attributes to a file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Hi Mario,
you remember, your sentence "That's quite easy" about formating variables?  8)

Well, your post above helped me a lot! But what for you is easy (This works exactly as for the extension. Replace A and B in the variable above with the color values, and put a <Run.... around it.)
took me 50 minutes to get the result!  :-[ :-\

But now it works and the correct (at least it works  :D) line is this:

<Run FontSize='10pt' Foreground='AliceBlue'  Background='{File.AT.Bild-Datei.Eintrag-Bem|hasvalue:#00bb00;default:#0f0000}'>{File.AT.Bild-Datei.Eintrag-Bem|hasvalue:Yes;default:nope} </Run> 

Thanks a lot, Mario!
Best wishes from Switzerland! :-)
Markus

Mario

50 minutes is not back. I've spent 10 minutes to figure out a sample for you, and write my reply.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on September 04, 2014, 06:48:04 PM
50 minutes is not back. I've spent 10 minutes to figure out a sample for you, and write my reply.

Thanks.
As a lot of other users and me are saying: You have a superb support, the best what I know!  :D
Best wishes from Switzerland! :-)
Markus