How get file size [Solved]

More
10 years 9 months ago - 10 years 9 months ago #49077 by tevez15
Hello, Im using FLEXIcontent version 2.2.0 r1945, and I want show the file size to the user, but I can't find in array this value.

Where I can put this value in array? :D

PS: I find other error.

When I have a category page, give that error:
Code:
Fatal error: Cannot pass parameter 2 by reference in /home/[HOST]/[SITE]/[ROOT]/components/com_flexicontent/classes/flexicontent.fields.php on line 708


Possible Solution:

In the old version, you have this:
Code:
$field = FlexicontentFields::renderField($item, $field, $custom_values, $method='display', $view);

And the new version:
Code:
FlexicontentFields::renderField($item, 'text', $custom_values, $method='display', $view);

I change this to the last version and works. :)
Attachments:
Last edit: 10 years 9 months ago by tevez15.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49080 by ggppdk
Replied by ggppdk on topic How get file size [Solved]
Hello

new version render the field's HTML of ALL items for the 'text' (description) field at once, for performance reasons,

the fix is a little different

fixed in r1947


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49092 by tevez15
Replied by tevez15 on topic How get file size [Solved]
Thank you.

And about the file size?

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49106 by ggppdk
Replied by ggppdk on topic How get file size [Solved]
Hello

inside your template, you can do a filesize() on the absolute path of the file:
Code:
echo filesize($item->fields['field27']->abspath[0]) . "Bytes";

NOTE: have added size as a new DISPLAY parameter for next revision


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago - 10 years 9 months ago #49123 by tevez15
Replied by tevez15 on topic How get file size [Solved]
YES! I love FC :D thank you one moreeeee time!

PS: The preview (screenshot) :)
Attachments:
Last edit: 10 years 9 months ago by tevez15.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49124 by micker
Replied by micker on topic How get file size [Solved]
cool think to edit your title post to add [solved]
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.369 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save