• Resolved sportsnapper

    (@sportsnapper)


    Hi,

    I love your plugin, but do find it difficult to use!* However, within this forum are lots of nuggets of information. I found this thread https://www.ads-software.com/support/topic/displaying-dimensions-widht-height/ and implemented the dimension field. I then went on tofield add a size field (for the original image. But it displays the size in bytes (quite correctly). Is there any way to manipulate this field to be able to display the size in Mb (eg 3.56 Mb). It seems just visually easier to scan through and get an idea of the images size like this.

    *I know there is extensive documentation, but I think what would help (me, at least) is screenshots, or real life examples of some of the ways in which you can use MLA. I suspect that this is not in your remit – after all, you wrote this as a tool for your own requirements, not as a plugin for all.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for the good words and for your gracious understanding of the documentation’s state. I will admit the writing code is so much more fun than documenting it. As you can see, I use the support forum to compensate for the density of the Documentation tab.

    Re-formatting the file size has come up before, and it inspired an MLA improvement some time back. Sifting through the “Field-level option/format values” section of the Documentation tab you will find:

    ,kbmb(t,k,m) – Some data values, e.g., file size, are better expressed in kilobytes and megabytes. The “kbmb” format provides this conversion. There are three optional arguments; “t” (threshold), “k” (kilobyte suffix) and “m” (megabyte suffix). The threshold argument (default 10240; ten kilobytes) sets the dividing amount between bytes and kilobytes. For example, a value of 1536 bytes would display as “1,536”, not “1.50 KB” and 15360 bytes would display as “15.5 KB”. The “k” and “m” arguments replace the default ” KB” and/or ” MB” suffix displayed following the numeric value.

    You should be able to use the kbmb format to get the results you want. Try something like these:

    
    [+file_size,kbmb+]
    [+file_size,kbmb( 1024 )+]
    [+file_size,kbmb( 10240,'kb', 'mb' )+]
    

    I hope that gives you enough to go on. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thanks for your continued interest in the plugin.

    Thread Starter sportsnapper

    (@sportsnapper)

    That’s great – thanks for getting back to me so quickly – esp when the answer was there in the documentation ??

    What I couldn’t work out was how to get the MLA table display to refresh with the new values – but I couldn’t – using update rule, and map all attachments. I ended up deleting the old field and inserting a new one.

    But, I do have a much better idea of how it works now….

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news.

    You wrote “I ended up deleting the old field and inserting a new one. ” The “Existing Text” dropdown for the rule controls this behavior. If you select “Replace” rather then “Keep” the new values should replace anything already in the custom field. Also, make sure the “Option” selection is “Text” or “Single” (not “Multi”).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File size (mb)’ is closed to new replies.