Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-09-01 02:54:43

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

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

#3 2012-09-01 07:20:05

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

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:

  1. Assert that en-gb and en-us are installed
  2. Switch your language preferences to the language you are not likely to keep in the future (en-gb I assume)
  3. Delete en-us in the prefs panel (“Show details” is needed)
  4. Install en-us once again so it starts with a clean slate
  5. Switch to en-us
  6. Everything cosy now?

Offline

#4 2012-09-01 12:32:01

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

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

Board footer

Powered by FluxBB