news module and resize of images...
news module and resize of images...
Hi guys...
Still didn't see the code of news-module but i was wandering does news module has capabilities to resize upload image with GD? Cause i'm using file uploader for showing image in index page but if i want to keep design clean i have to resize the image I didn't see option for resizing in module... did i miss something or they wrote that way?
Still didn't see the code of news-module but i was wandering does news module has capabilities to resize upload image with GD? Cause i'm using file uploader for showing image in index page but if i want to keep design clean i have to resize the image I didn't see option for resizing in module... did i miss something or they wrote that way?
-
- Forum Members
- Posts: 106
- Joined: Thu Oct 05, 2006 11:27 am
Re: news module and resize of images...
Image resizing is in image manager..threre is a small edit button below each image.
Though I am not sure if that is what you need?
Though I am not sure if that is what you need?
Re: news module and resize of images...
im also interested in an integrated or related resize function in news module.
i am using the module to upload images to every newsdrop. but allways have to resize them before uploading. thats not pretty smart. has got someone an idea?
i am using the module to upload images to every newsdrop. but allways have to resize them before uploading. thats not pretty smart. has got someone an idea?
Re: news module and resize of images...
no, it's not what i need.
I need when user will upload the image the news module (only news module) will resize it so it will fit to my needs.
I need when user will upload the image the news module (only news module) will resize it so it will fit to my needs.
-
- Forum Members
- Posts: 106
- Joined: Thu Oct 05, 2006 11:27 am
Re: news module and resize of images...
You can resize image via the wysiwyg so eg on tinymce you get the 'appearance' tab where you can resize Dimensions but not crop..
Not ideal as images should really be reduced in weight as well.
If you are looking to upload very large files and reduce/crop via the browser - i wouldn't want that on my server.
You can check this on the admin demo link from the top menu above.. news is in Admin menu/content.
Hope that helps.
Not ideal as images should really be reduced in weight as well.
If you are looking to upload very large files and reduce/crop via the browser - i wouldn't want that on my server.
You can check this on the admin demo link from the top menu above.. news is in Admin menu/content.
Hope that helps.
Re: news module and resize of images...
well, i'm using file upload system of news module to upload the image. The same image i'm using in my template so i'll show in index.
I call it, ex: {news template="index_with_image.tpl"}.
using wysiwyg is not a option.
I guess news module can't help me on this one...
Just wanted to check if something like this exist...
p.s. using <img for resizing picture is also not soooo good idea.
p.s.s. i think it should not be so hard to write, if i write it i'll post the patch.
best regards
I call it, ex: {news template="index_with_image.tpl"}.
using wysiwyg is not a option.
I guess news module can't help me on this one...
Just wanted to check if something like this exist...
p.s. using <img for resizing picture is also not soooo good idea.
p.s.s. i think it should not be so hard to write, if i write it i'll post the patch.
best regards
Re: news module and resize of images...
here is it....
It took me few hours just to find where and what to edit... i hope it helps somebody...
Code: Select all
[confiq@server News]$ diff News.module.php News.module.php.backup
681,693c681,687
< // start - generate thumbnail image
< if ($_POST[m1_category] == 2 && @getimagesize($_FILES[$fieldname]['tmp_name'])) {
< $dest = cms_join_path($config['uploads_path'],'news','id'.$itemid,"index_$itemid.jpg");
< $this->image_transform($_FILES[$fieldname]['tmp_name'],$dest,135);
< }
< // end
< else {
< if( @cms_move_uploaded_file($_FILES[$fieldname]['tmp_name'], $dest) === FALSE )
< {
< $error = $this->Lang('error_movefile',$dest);
< return FALSE;
< }
< }
---
>
> if( @cms_move_uploaded_file($_FILES[$fieldname]['tmp_name'], $dest) === FALSE )
> {
> $error = $this->Lang('error_movefile',$dest);
> return FALSE;
> }
>
742d735
<
Re: news module and resize of images...
i'd love to try out this patch, where should it be applied?confiq wrote:It took me few hours just to find where and what to edit... i hope it helps somebody...

Re: news module and resize of images...
You may want to let anyone know if they use this they render their install of news unsupportable...
How come you didn't just use css to make it the size you wanted?...
How come you didn't just use css to make it the size you wanted?...
Re: news module and resize of images...
Cause at that time i didn't know that i can fix resized image in MSIE with
The question still reminds, does all modern browsers know to resize image without destroying it?
[1]http://css-tricks.com/ie-fix-bicubic-sc ... or-images/
Code: Select all
img { -ms-interpolation-mode: bicubic; }[1]
[1]http://css-tricks.com/ie-fix-bicubic-sc ... or-images/
Re: news module and resize of images...
I was just saying that if you can target the image like .NewsSummary img then you can set one value, width or height, and the other will change proportionately in any browser...
Re: news module and resize of images...
Are these tricks useful for your needs?confiq wrote: ...Still didn't see the code of news-module but i was wandering does news module has capabilities to resize upload image with GD?

regards
blast