Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
TXP Tag txp:file_download_size
For me <txp:file_download_size format="k" decimals="0"/>
renders file size 244units_k. I want it to produce file size 244 kb. What do I have to do to make it happen? I have updated EN_GB and EN_US and tried both, each produce the same undesired result: file size 244units_k. (Textpattern version: 4.4.1 (r3575).
Last edited by joebaich (2012-09-01 03:05:12)
Offline
#2 2012-09-01 04:17:54
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: TXP Tag txp:file_download_size
Inside the function the text for the “format” attribute for that would appear to be ‘KB’ try <txp:file_download_size format=“KB” decimals=“0”/>
No format attribute lets the tag assign by file size automatically.
and yes, judging from the output I would question the language files?
I can’t reproduce that so I might check plugins and such.
It might be a good idea to check the tag example on the tag reference, it looks misleading along with the settings suggestions.
The Documentaion example is correct at revision 4027
Last edited by rsilletti (2012-09-02 00:57:01)
Offline
Re: TXP Tag txp:file_download_size
You should get your desired result when your language prefs is ‘en-gb’ or ‘en-us’ and language strings are up-to-date.
Try this:
- Assert that en-gb and en-us are installed
- Switch your language preferences to the language you are not likely to keep in the future (en-gb I assume)
- Delete en-us in the prefs panel (“Show details” is needed)
- Install en-us once again so it starts with a clean slate
- Switch to en-us
- Everything cosy now?
Offline
Re: TXP Tag txp:file_download_size
wet wrote:
You should get your desired result when your language prefs is ‘en-gb’ or ‘en-us’ and language strings are up-to-date.
Try this: …
Thank you Robert, I followed your instructions more or less, and everything is cosy now. Getting the clean slate was the answer I think, the site is long established and has been through many TXP version upgrades. Thanks for your help too, Rick.
Last edited by joebaich (2012-09-01 12:34:52)
Offline
Pages: 1