Topic: Mobile Splash Page image crop
My mobile gallery splash images seem to be cropped so it looks weird. Is there a way to have it show the full image (uncropped)?
Example:
http://goo.gl/fe9xP
You are not logged in. Please login or register.
Juicebox Support Forum → Juicebox-Pro Support → Mobile Splash Page image crop
My mobile gallery splash images seem to be cropped so it looks weird. Is there a way to have it show the full image (uncropped)?
Example:
http://goo.gl/fe9xP
There are no configuration options to control the cropping of the Splash Page image.
Rather than have Juicebox use the first image from your gallery (as it does by default), you could perhaps create a new image specifically for your Splash Page and use the splashImageUrl configuration option to display it.
For reference, the Splash Page configuration options can be found here.
Cool! Would it be possible to use
<?php the_post_thumbnail(); ?>
inside
splashImageUrl=""
PHP code will not be processed within the 'Pro Options' text area of WP-Juicebox and entering an option such as:
splashImageUrl="<?php the_post_thumbnail(); ?>"
... will simply result in the above text being entered directly into the gallery's 'config.xml' file.
However, if you wanted to use the post thumbnail as the splashImageUrl, you could edit the plugin's 'wp-juicebox/config.php' page in a plain text editor and add the following code on line 35 (which is currently empty):
if ($settings_tag->hasAttribute('postID')) {
$post_id = $settings_tag->getAttribute('postID');
if (has_post_thumbnail($post_id)) {
$sls = simplexml_load_string(get_the_post_thumbnail($post_id, 'large'));
$src = $sls->attributes()->src;
$new_settings_tag->setAttribute('splashImageUrl', $src);
}
}
Please note that the line number above refers to the current version of WP-Juicebox (v1.2.0).
Juicebox Support Forum → Juicebox-Pro Support → Mobile Splash Page image crop
Powered by PunBB, supported by Informer Technologies, Inc.