-
AuthorPosts
-
December 31, 2011 at 5:37 pm #172323
I am using the JA_Purity II template, version 1.2.1 on Joomla 1.5.25
My site http://www.bblopers.nl looks fine on a desktop computer, but on Iphone or other cell phone browser the images in articles are displayed too small, all images are cropped to a width of 199 or so pixels. Image height remains untouched.
I disabled the iphone -special layout for Iphone by choosing the default template for Iphone but you can see the effect in every other cell phone browser.
Disabling plugins, cache and changing img styles dit not make things better..
Help would be greatly appreciated.
Thank you very much and a good new year!January 1, 2012 at 2:12 pm #432080Yes. I did check that page. Please see the images on my site with a mobile browser to view the problem. The width of the images is always cropped to below 200px regardless of the height.
January 3, 2012 at 8:35 pm #432375The problem lies in the javascript in /templates/ja_purity_ii/layouts/blocks/handheld/head.php
This javascript seems to be the culprit:<blockquote><script type=”text/javascript”>
//update image size
function updateOrientation() {
var maxwidth = 200;
var orient = window.orientation
if (orient == 90 || orient == -90) {
bdcls = ‘landscape’;
maxwidth = Math.round(480*40/100); //IPhone
} else {
bdcls = ‘portrait’;
maxwidth = Math.round(screen.width*40/100);
}
document.body.className = bdcls;
//update images width
images = document.getElementsByTagName (‘img’);
for(i=0;i<images.length;i++) {
image = images;
if (!image._orgwidth) {
image._orgwidth = image.offsetWidth;
}
if (image._orgwidth > maxwidth) {
image.width = maxwidth;
} else if (image._orgwidth > image.offsetWidth) {
image.width = image._orgwidth;
}
}
}
window.addEvent(‘domready’, function() {
$(‘mod_search_searchword’).addEvents({
‘focus’:function(){
$(‘handheld-nav’).setStyle (‘display’, ‘none’);
$(‘ja-search’).setStyle (‘width’, ‘100%’);
},
‘blur’:function() {
$(‘handheld-nav’).setStyle (‘display’, ‘block’);
$(‘ja-search’).setStyle (‘width’, ‘30%’);
}
});
});
</script></blockquote>Byj deleting this script, at least the part I indented (see above ) my images are OK now.
I think it is a bug in the template.Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
January 11, 2012 at 7:13 am #433366Barre2011 ,
We checked and would like to confirm that this is one of our template features (Auto resize images for iphone layout), not bug. You can remove that script if you don’t want this feature.
Thanks.
January 11, 2012 at 10:10 pm #433450The problem is that onl;y the width of the pictures is adjusted, not the height, therefore the pictures look squeezed.
regards
barre2011Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
January 12, 2012 at 7:13 am #433514<em>@barre2011 294151 wrote:</em><blockquote>The problem is that onl;y the width of the pictures is adjusted, not the height, therefore the pictures look squeezed.
regards
barre2011</blockquote>Barre2011,
As our technical support service is only available for paid members only.
Please go ahead to join us at http://www.joomlart.com/member/signup.php for getting help on this.
Thanks.
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by Anonymous 12 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum