Skip to content

Add new params to media field: preview_width / preview_height #1187

Merged
merged 2 commits into from Jun 19, 2012

3 participants

@benjaminpick

Improvement of #1105 : Allowing full-size preview.

Benjamin Pick added some commits May 4, 2012
Benjamin Pick Add new params to media field: preview_width / preview_height
(Allowing full-size preview)
c1ba28c
Benjamin Pick fix phpcs 6380e52
@timoline

Hi, ok thx
I tested it, but directory="folder" isnt working correct for me anymore,
I mean: when pressing select it not goes to the folder.........can you can confirm that?
if I change back the code to:(line 130)
array_shift($folder);

it works ok....but maybe it has someting todo with the getParams('com_media') setting

Also a new param "default" would be nice

default = the default image to use

@benjaminpick
@timoline

Hi, I read it a few times, but I think the first one

Just show the image which is set by default, when the user select a new image then show the new image
The default value is like a placeholder

@benjaminpick

For the directory-Folder-Bug: Which exactly are your values in the XML as well as the getParams('com_media') ? It should be a regression of #728 .

@timoline
timoline commented Jun 4, 2012
        <field
            name="logo_small"
            type="media"            
            label="COM_JOOMLEAGUE_ADMIN_CLUB_LOGO_SMALL"
            description="COM_JOOMLEAGUE_ADMIN_CLUB_LOGO_SMALL_DESC"
            class="inputbox"
            preview="yes"
            directory="/com_joomleague/database/clubs/small"/>  

echo JComponentHelper::getParams('com_media')->get('image_path', 'images');

images

@benjaminpick

From documentation: "This attribute should be relative to the top level /images/ folder." http://docs.joomla.org/Media_form_field_type

@chdemko chdemko merged commit 27eaaba into joomla:staging Jun 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.