Page 1 of 1

Photonic form inserts [gallery] shortcode with bad attribute

Posted: 03 Oct 2011, 07:20
by freeballoon
When creating a gallery using the Photonic form (not typing the [gallery] shortcode by hand) and specifying thumbnail width and height (my theme doesn't define thumbnail sizes), the resulting [gallery] attributes are wrongly specified:
thumbnail_width instead of thumb_width
thumbnail_height instead of thumb_height
(also) thumbnail_size instead of thumb_size

Therefore the shortcode is inserted as:
[gallery columns='3' thumbnail_width='75' thumbnail_height='75' ... ]
instead of:
[gallery columns='3' thumb_width='75' thumb_height='75' ... ]

Discovered this when attempting to insert a gallery using thumbnails of 150x150 and ending up with thumbnails of 75x75.

In plugins/photonic/photonic-form.php, replace lines 128-150 with the following

Code: Select all

	'id' => 'thumb_width',//'thumbnail_width',
	'name' => __('Thumbnail width', 'photonic'),
	'type' => 'text',
	'std' => 75,
	'hint' => __('In pixels', 'photonic')

	'id' => 'thumb_height',//'thumbnail_height',
	'name' => __('Thumbnail height', 'photonic'),
	'type' => 'text',
	'std' => 75,
	'hint' => __('In pixels', 'photonic')

	'id' => 'thumb_size',//'thumbnail_size',
	'name' => __('Thumbnail size', 'photonic'),
	'type' => 'raw',
	'std' => Photonic::get_image_sizes_selection('thumb_size', false),//Photonic::get_image_sizes_selection('thumbnail_size', false),
	'hint' => __('Sizes defined by your theme. Image picked here will be resized to the dimensions above.', 'photonic')
Evidence: inserted a gallery using Photonic form into one blog post, preview post.
Stats: WordPress 3.2.1, Elegant Themes Modest Theme 2.1, Photonic 1.04 @ php 5.2.17

Re: Photonic form inserts [gallery] shortcode with bad attri

Posted: 24 Oct 2011, 14:03
by sayontan
Thanks. I have taken care of this for the next version.