Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [superseded] rah_format_size

#1 2009-12-06 04:01:14

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

[superseded] rah_format_size

This plugin has been superseded by rah_function. Since Textpattern version 4.5.0 r4027 the core has offered it’s own file size formatting function, format_filesize. As there is a general function available for this, rah_function can now be used to do the same and more as the old rah_format_size could.

As of r4027 rah_function can be used to format a numeric byte value:

<txp:rah_function call="format_filesize" bytes="107895" />

You can use the following to calculate a contained statements size using rah_function:

<txp:rah_function call="strlen, format_filesize">
	...contained statement...
</txp:rah_function>

Old download

Last edited by Gocom (2012-07-30 14:21:52)

Offline

#2 2009-12-06 09:12:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,821
Website GitHub

Re: [superseded] rah_format_size

Nice.

I see you’ve included an option for YB (which I still think should stand for Yompabytes instead of the boring Yottabytes) so people can display the size of my next plugin successfully ;-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

  1. Index
  2. » Archives
  3. » [superseded] rah_format_size

Board footer

Powered by FluxBB