Prefixing/suffixing content plugin fields
Moderators: white, Hacker, petermad, Stefan2
Prefixing/suffixing content plugin fields
Hello.
The TC help for "Dialog box: Custom columns" says:
---
[="prefix"pluginname.fieldname.unit"suffix"]
The strings prefix and/or suffix will only be shown when the field "fieldname" exists and has a valid value in plugin pluginname. For example, you can use this to show a measurement unit when the field is present, and nothing when the field is not present.
---
This is great.
Not sure this is a bug, but: new line chars (and other escaped chars) are not interpret in the prefix/suffix string (TC 10.00).
I can understand this if the feature is used for creating custom views (where most escape sequences don't make sense).
However, it would be great to have such escape sequences in tooltips (here, "\n" is displayed instead of a line break).
Maybe it is an option to simply ignore escape sequences for the custom views but accept them for tooltips?
What do you think?
BR
funkymonk
The TC help for "Dialog box: Custom columns" says:
---
[="prefix"pluginname.fieldname.unit"suffix"]
The strings prefix and/or suffix will only be shown when the field "fieldname" exists and has a valid value in plugin pluginname. For example, you can use this to show a measurement unit when the field is present, and nothing when the field is not present.
---
This is great.
Not sure this is a bug, but: new line chars (and other escaped chars) are not interpret in the prefix/suffix string (TC 10.00).
I can understand this if the feature is used for creating custom views (where most escape sequences don't make sense).
However, it would be great to have such escape sequences in tooltips (here, "\n" is displayed instead of a line break).
Maybe it is an option to simply ignore escape sequences for the custom views but accept them for tooltips?
What do you think?
BR
funkymonk
Re: Prefixing/suffixing content plugin fields
2funkymonk
Have you tried putting the new lines between the content values - like:
See also: https://www.ghisler.ch/board/viewtopic.php?p=402833#p402833
Have you tried putting the new lines between the content values - like:
Code: Select all
[="prefix"pluginname.fieldname.unit"suffix"]\n[="prefix2"pluginname.fieldname2.unit"suffix2"]
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Prefixing/suffixing content plugin fields
Yes. This works and is often sufficient -- but not always.
Sometimes, a "conditional newline" would be helpful, which creates a new line only on case a certain content field is available for the file.
Therefore, "\n" within the prefix/suffix would be nice to structure the tooltips.
---
Here is one (out of several) scenarios I have:
Let's assume we apply several content plugins to a file to create the tooltip.
For an assumed pdf that is part of a git repository, the tooltip could look like this:
Code: Select all
--- PDF ---
Author: <name>
Title : <title>
...
--- GIT ---
Repo : <repo>
Age : <age>
...
--- General ---
Type:
Size:
Date:
The git plugin needs to be set up for all files (*.*) but only makes sense for files that belong to a git repository.
Thus, I want the GIT section to appear only if the file belongs to a git, i.e, if "gitcmd.Branch" is valid. I would therefore use
Code: Select all
[="--- GIT ---\n"gitcmd.Branch" @ "][=gitcmd.FirstRemoteUrl]
If I put the "\n" outside of the prefix then I have to put "--- GIT ---" outside of the prefix as well.
This makes "--- GIT ---\n" unconditional and the section will always be displayed even if the file is not part of a repository.
---
What do you think?
BTW: I use a monospaced font (Consolas) in addition to consistently structuring tooltips this way. The resulting visual layout helps me a lot to get the required information very fast, even if a lot of information is available for some file types. Maybe this approach is helpful to other users as well.
BR
funkymonk
Re: Prefixing/suffixing content plugin fields
2funkymonk
I can see the benefit of support for \n inside the prefix of postfix in situations like this - but maybe it is rather a feature request, than a bug.What do you think?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Prefixing/suffixing content plugin fields
You are probably right.
I was not sure if escape sequences were supposed to work in suffix/prefix strings (then it would have been a bug) or not (then it is a feature request).
Can someone move this post to the suggestions forum (I cannot)?
Thank you.
Re: Prefixing/suffixing content plugin fields
Moderator message from: Hacker
Moved to the suggestions forum.
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.