Photonic form inserts [gallery] shortcode with bad attribute

Reports about issues that you encounter in Photonic

Photonic form inserts [gallery] shortcode with bad attribute

Postby freeballoon » 03 Oct 2011, 07:20

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.

Workaround:
In plugins/photonic/photonic-form.php, replace lines 128-150 with the following
Code: Select all
array(
   'id' => 'thumb_width',//'thumbnail_width',
   'name' => __('Thumbnail width', 'photonic'),
   'type' => 'text',
   'std' => 75,
   'hint' => __('In pixels', 'photonic')
),

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

array(
   '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
freeballoon
 
Posts: 1
Joined: 03 Oct 2011, 06:58
Location: UK

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

Postby sayontan » 24 Oct 2011, 14:03

Thanks. I have taken care of this for the next version.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest