[solved] Where is the Custom Image Source

More
12 years 1 month ago #23732 by ggppdk
image field is bogus, it incorrectly ovewrittes the contents of $field->{"display_large"} with the contents of $field->{"display"} when asked to only create $field->{"display_large"} !!!

So open image.php and

replace
Code:
$field->{"display_small"} = JURI::root() . $srcs; $field->{"display_medium"} = JURI::root() . $srcm; $field->{"display_large"} = JURI::root() . $srcb;
with
Code:
$field->{"display_small_src"} = JURI::root().$srcs; $field->{"display_medium_src"} = JURI::root().$srcm; $field->{"display_large_src"} = JURI::root().$srcb; $field->{"display_small"} = '<img src="'.JURI::root().$srcs.'" alt ="'.$alt.'"'.$legend.' />'; $field->{"display_medium"} = '<img src="'.JURI::root().$srcm.'" alt ="'.$alt.'"'.$legend.' />'; $field->{"display_large"} = '<img src="'.JURI::root().$srcb.'" alt ="'.$alt.'"'.$legend.' />'; if ( in_array($prop, array("display_small","display_medium", "display_large", "display_small_src","display_medium_src", "display_large_src") ) ) { return $field->{$prop}; }

will commit fix, thanks for reporting.

A NOTE on appropriate field behavior ..., when a field is asked a specific HTML display, then it must only render this display to enhance performance, sometimes a field can create multiple displays if they do not involve performance hit, e.g. when asked for "display" , it could also create other variables that pose no performance hit e.g. variables that contain some html like display_*


-- 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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.288 seconds
Save
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