-
AuthorPosts
-
perdu Friend
perdu
- Join date:
- June 2007
- Posts:
- 227
- Downloads:
- 0
- Uploads:
- 26
- Thanks:
- 10
- Thanked:
- 20 times in 1 posts
August 8, 2008 at 10:46 am #131965Currently the image resizing does not work correctly and is completely pointless as instead of resizing it just recreates the images not only on the front page but also in sections and categories – it’s just a waste of server resources.
I’ve tried setting the parameters for images to -1 as instructed in JA-NewsFP but this just leaves an error on the page and no images – the error relates to ja-news which I don’t even have published:
<blockquote>Warning: imageantialias(): supplied argument is not a valid Image resource in W:wwwjoom15modulesmod_janewshelper.php on line 129</blockquote>
I also have articles where I don’t want an image in the intro text as well so how can image resizing be completely disabled?
Joomla 1.5.5
John Wesley Brett ModeratorJohn Wesley Brett
- Join date:
- July 2013
- Posts:
- 2142
- Downloads:
- 17
- Uploads:
- 26
- Thanks:
- 175
- Thanked:
- 645 times in 426 posts
August 8, 2008 at 2:28 pm #264530Well I’m a little confused. :confused:
Your first sentence says…”resizing does not work correctly”…but then you correctly state exactly what resizing does. What are you wanting it to do if not resize your image?
And my recommendation for articles with no images:…just don’t include any. If you don’t include an image in the intro of an article, I’m not sure I understand your thinking on how “resizing” would play a role.
Any further clarification is appreciated!
Thanks,
John.perdu Friendperdu
- Join date:
- June 2007
- Posts:
- 227
- Downloads:
- 0
- Uploads:
- 26
- Thanks:
- 10
- Thanked:
- 20 times in 1 posts
August 8, 2008 at 2:47 pm #264534It just recreates the image in exactly the same size as it appears in the main text rather than resizing it as it is supposed to.
Therefore in articles with no image in the intro text but an image in the main text it just recreates the first image it finds in the main text and reproduces it in the intro text without scaling it down – so as you can imagine an image that’s say 300×200 px isn’t going to fit in the introtext on category or section blog views.
As I have around 1000 articles I really don’t want to edit each one just to include an image in the intro text so it would be better/easier (as the image resizing doens’t work) to disable it all together.
bossep Friendbossep
- Join date:
- April 2008
- Posts:
- 262
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 50
- Thanked:
- 15 times in 3 posts
August 8, 2008 at 3:26 pm #264540Hello perdu and John.,
First of all the resized images does get created. Check in your file system under
/images/resized/images/stories or something like that.perdu, I don’t understand your problem! What JA-news does is to grab the first image in the article.
Resize it according to your settings in the control panel. Let’s say your picture is 600X400 and your settings are 300X300 it will create an image of 300X200 in the first article in JANews_fp.
Then if you post a new article it will create a thumb nail image according to your setting.Then if you have the article appearing in your JA-News section it creates a thumbnail for that as well.
Well, then if you have an image of 150X150? It doesn’t resize it “upwards” just creates a copy of it in the resized folder ware News_fp looks. But it creates a thumbnail later on for your right column in News_fp and for the articles in News.
So yes, you get a lot of Images in the resized folder.
Bosse
John Wesley Brett ModeratorJohn Wesley Brett
- Join date:
- July 2013
- Posts:
- 2142
- Downloads:
- 17
- Uploads:
- 26
- Thanks:
- 175
- Thanked:
- 645 times in 426 posts
August 8, 2008 at 3:27 pm #264541OH! I’m understanding a little better.
You’ve got one of two things going on. First it appears as though you are not taking advantage of the READ MORE piece of code. If you were, there is no way an image that appears in the MAIN area of the article could ever appear in the intro text. READ MORE acts as sort of a blocker.
Yes READ MORE will appear automatically if you don’t insert it manually depending on the length of your article…BUT you are not saved from separating the intro from the main as far as the image is concerned. So include a READ MORE tag manually BEFORE the image and see if that doesn’t correct your not wanting an image.
And there is also an ARTICLE PARAMETER called HIDE INTRO…should you not want the intro to reappear in your main article.
Finally in your MENUS > MAIN MENUS (or wherever your Sections and Categories are referenced in a menu) your find PARAMETERS – BASIC which includes # LEADING. This denotes the number of articles to display at full width in a Section or Category listing. If you set this to 0 (zero) then your artcles will be forced into a columnar width. And depending on the number of articles listed it should force everything down to a thumbnail size.
John.
1 user says Thank You to John Wesley Brett for this useful post
John Wesley Brett ModeratorJohn Wesley Brett
- Join date:
- July 2013
- Posts:
- 2142
- Downloads:
- 17
- Uploads:
- 26
- Thanks:
- 175
- Thanked:
- 645 times in 426 posts
August 8, 2008 at 3:37 pm #264545bossep,
Thanks for that! So now I will back off on my earlier opinion regarding the waste of server resources. That really doesn’t seem very efficient after all.
Hmmm… and I’m wondering…
Suppose I go back in later and decide, “You know, that picture would probably look better if it cropped it a bit. So I do, which resizes my original image. The template then decides a new resize is needed…and creates them. It would then appear I’m going to be left down the road with all sorts of orphaned image files and database references. Not very efficient indeed.
Thanks for pointing that out!
John.bossep Friendbossep
- Join date:
- April 2008
- Posts:
- 262
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 50
- Thanked:
- 15 times in 3 posts
August 8, 2008 at 4:00 pm #264550Regarding image storage.
Yes John,
You will end up with a LOT of images! I have not checked the database references but I do THINK it will be corrected. If you have the time and knowledge could you check that?
To do this on “the fly” eats up a lot of resources! Just think about it. If you have something like 20 images that needs to go through the process each time someone loads the front page and then if you have 10 visitors doing the same! That is 200 images to process.
I have not done a test on Joomla (PHP) but did it on ColdFusion (a lot more powerful engine than php) and it really took a process hit and slowed down my page rendering significantly.
So I do think we have to deal with the amount of pictures.
Perhaps someone could write a clean-up routine for it (I have not checked if it exists)? Perhaps I should put it on my To-Do list?Bosse
bossep Friendbossep
- Join date:
- April 2008
- Posts:
- 262
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 50
- Thanked:
- 15 times in 3 posts
August 8, 2008 at 4:03 pm #264551<em>@jbrett 72481 wrote:</em><blockquote>OH! I’m understanding a little better.
You’ve got one of two things going on. First it appears as though you are not taking advantage of the READ MORE piece of code. If you were, there is no way an image that appears in the MAIN area of the article could ever appear in the intro text. READ MORE acts as sort of a blocker.
Yes READ MORE will appear automatically if you don’t insert it manually depending on the length of your article…BUT you are not saved from separating the intro from the main as far as the image is concerned. So include a READ MORE tag manually BEFORE the image and see if that doesn’t correct your not wanting an image.
And there is also an ARTICLE PARAMETER called HIDE INTRO…should you not want the intro to reappear in your main article.
Finally in your MENUS > MAIN MENUS (or wherever your Sections and Categories are referenced in a menu) your find PARAMETERS – BASIC which includes # LEADING. This denotes the number of articles to display at full width in a Section or Category listing. If you set this to 0 (zero) then your artcles will be forced into a columnar width. And depending on the number of articles listed it should force everything down to a thumbnail size.
John.</blockquote>
got lost on this one! But in general always do a readmore well down in the article or strange things might happend.
Bosse
perdu Friendperdu
- Join date:
- June 2007
- Posts:
- 227
- Downloads:
- 0
- Uploads:
- 26
- Thanks:
- 10
- Thanked:
- 20 times in 1 posts
August 8, 2008 at 6:17 pm #264573I’m using the ‘read more’ but the images are still not getting resized just re-created in the ‘resized’ image folder, they’re not scaled down at all to any of the settings in JA-NewsFP – even if JA-NewsFP is unpublished the image resize function(or not resized as in my case) continues, so I think something else in the template functions is doing it. Does anyone know how to disable it ?
By the way I don’t mean on the front page in the Ja-news or ja-newsfp modules I mean the images in the section and category blog views.
bossep Friendbossep
- Join date:
- April 2008
- Posts:
- 262
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 50
- Thanked:
- 15 times in 3 posts
August 8, 2008 at 7:10 pm #264579perdu,
Could you please provide your URL?
It is really hard to understand when you cant see the page it self.Bosse
perdu Friendperdu
- Join date:
- June 2007
- Posts:
- 227
- Downloads:
- 0
- Uploads:
- 26
- Thanks:
- 10
- Thanked:
- 20 times in 1 posts
August 8, 2008 at 10:23 pm #264620Sorry no url as I’m doing it locally – but I’ve found the code that’s responsible for the image resizing.
I will try to explain again 😉There’s no problem with the front page or the image sizing within the ja-news & ja-newsFP modules it’s on menu items that are ordinary joomla category or section blog views and do not utilise the 2 modules.
If there is no image present within the intro text / read more break then the template looks for an image in the main body of the article which it then places in the intro text/read more bit that’s viewable under the section/category blog menu items.
But instead of resizing/scaling down the image it just creates a copy of it and places it in the images/resized folder – so larger images obviously wont fit within the confines of the blog layout making it a pointless exercise. If it actually scaled them down it would be pretty useful but it doesn’t it only resizes images that are shown within the 2 modules.
Anyway for anyone else frustrated by this and doesn’t want to mess around creating loads of new images or editing loads of articles to remove them or is worried about server strain you need to remove this bit of code from:
templatesja_teline_iihtmlcom_contentsection
templatesja_teline_iihtmlcom_contentcategoryin both folders open up blog.php & blog_item.php
in the two blog.php files remove:
//Get module ja magazin frontpage parameter:
if(file_exists(JPATH_SITE .DS.'modules'.DS.'mod_janews'.DS.'helper.php'))
require_once (JPATH_SITE .DS.'modules'.DS.'mod_janews'.DS.'helper.php');
else
require_once ('../helper.php');in the two blog_item.php files remove:
<?php
$this->image = modJANewsHelper::replaceImage ($this->item, $this->img_align, 1, $this->maxchar, 1, $this->img_w, $this->img_h, $this->hiddenClasses);
?>
Not sure if this will mess anything else up…but it seems to be ok. Maybe someone from JA can confirm that it wont break anything else.
1 user says Thank You to perdu for this useful post
John Wesley Brett ModeratorJohn Wesley Brett
- Join date:
- July 2013
- Posts:
- 2142
- Downloads:
- 17
- Uploads:
- 26
- Thanks:
- 175
- Thanked:
- 645 times in 426 posts
August 11, 2008 at 2:11 pm #264901Perdu,
I have been trying to replicate what you are describing with no success. It seems this is not so much a problem of JA Teline as perhaps your installation of it.
I’ve attached examples from a website I’m developing…and the resizing seems to work perfectly on front page and section / category page…and runs full rez on the content page. I’d love to see the site you’re working on to see why it’s not working for you.
One thought…since you are working on a development site…I’m wondering perhaps if there might be something amiss there…and once loaded on a web server it might all be good. I’ve seen stranger things.
As for your workaround…it seems like that would do what you want.
John.
questbg Friendquestbg
- Join date:
- May 2008
- Posts:
- 1912
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 146
- Thanked:
- 339 times in 197 posts
August 11, 2008 at 2:36 pm #264903Hi Bosse and Perdu
This sounds really familiar. I had the same problem a few weeks ago, although not with the whole site, just one Section:
http://www.joomlart.com/forums/topic/articles-not-going-to-correct-category/
In the end, Menalto, one of the JA Mod’s PM’d me a ‘hack’ to make to the js.news.css file :
Basically, open this file and find the following:
}
.jazin-content img {
padding: 5px 10px 0 0;
}
and change it to:
}
.jazin-content img {
float:left;
padding: 5px 10px 0 0;
}
It worked for me, but I’m still not sure how exactly! 🙂
Cheers
Chrischeckmate40 Friendcheckmate40
- Join date:
- February 2008
- Posts:
- 104
- Downloads:
- 0
- Uploads:
- 19
- Thanks:
- 15
- Thanked:
- 3 times in 1 posts
March 4, 2009 at 9:44 pm #294470<em>@perdu 72430 wrote:</em><blockquote>how can image resizing be completely disabled?[/B]</blockquote>
Looking for the answer.
Using cooper, carbon theme. 1.5
The blog.php file is different for cooper so not sure what I should replace/change. I just want to turn off resizing all together and determine the size/styling of the picture myself please…
checkmate40 Friendcheckmate40
- Join date:
- February 2008
- Posts:
- 104
- Downloads:
- 0
- Uploads:
- 19
- Thanks:
- 15
- Thanked:
- 3 times in 1 posts
April 1, 2009 at 6:16 pm #299520…please…
-
AuthorPosts
This topic contains 24 replies, has 8 voices, and was last updated by micrantha 15 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum