- Posts: 23
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- creat thumbnail by width and height. you can input height value on K2 control center
creat thumbnail by width and height. you can input height value on K2 control center
- vanshion
- Topic Author
- Offline
- Junior Member
Less
More
14 years 10 months ago #75420
by vanshion
Replied by vanshion on topic creat thumbnail by width and height. you can input height value on K2 control center
add these code to 33 line on config.xml
param menu="hide" name="catImageHeigh" type="text" default="100" size="4" label="Category image height (in px)" description="" /
add these code to 33 line on config.xml
param menu="hide" name="userImageHeight" type="text" default="100" size="4" label="User image (avatar) width (in px)" description="" /
these can set height value about category image and userimage.
param menu="hide" name="catImageHeigh" type="text" default="100" size="4" label="Category image height (in px)" description="" /
add these code to 33 line on config.xml
param menu="hide" name="userImageHeight" type="text" default="100" size="4" label="User image (avatar) width (in px)" description="" /
these can set height value about category image and userimage.
Please Log in or Create an account to join the conversation.
- vanshion
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
14 years 10 months ago #75421
by vanshion
Replied by vanshion on topic creat thumbnail by width and height. you can input height value on K2 control center
i think so..
$handle->image_ratio_crop = true; //crop image
$handle->image_ratio_crop = false; //don't crop image
this line code can do this! but I haven't found which XML is. Maybe we should add a new XML file. I believe Lukas can achieve it
Sébastien said:Yes ! I think the original settings were good for some people or for some content (for exemple for DVD reviews when you l
$handle->image_ratio_crop = true; //crop image
$handle->image_ratio_crop = false; //don't crop image
this line code can do this! but I haven't found which XML is. Maybe we should add a new XML file. I believe Lukas can achieve it
Sébastien said:Yes ! I think the original settings were good for some people or for some content (for exemple for DVD reviews when you l
Please Log in or Create an account to join the conversation.
- vtiger
- Offline
- Premium Member
Less
More
- Posts: 83
14 years 8 months ago #75422
by vtiger
Replied by vtiger on topic creat thumbnail by width and height. you can input height value on K2 control center
Hi, no. You will need to reapload only images (in your case category imgs) intended to have a new setting...
Regards,
l
panagiotis said:However I have a question: If I apply this hack will I need to re-upload all the images in my K2 items?
Regards,
l
panagiotis said:However I have a question: If I apply this hack will I need to re-upload all the images in my K2 items?
Please Log in or Create an account to join the conversation.
- vtiger
- Offline
- Premium Member
Less
More
- Posts: 83
14 years 8 months ago #75423
by vtiger
Replied by vtiger on topic creat thumbnail by width and height. you can input height value on K2 control center
You're right. Reason is that if you add new item via K2 admin UI "function save" (in item.php) is called ...
"function save" seems to be responsible for thumbs creation...
I don't know how exactly your "hack for the automatically cache rebuild" works... But, you are on good way ;)
l
"function save" seems to be responsible for thumbs creation...
I don't know how exactly your "hack for the automatically cache rebuild" works... But, you are on good way ;)
l
Please Log in or Create an account to join the conversation.
- vtiger
- Offline
- Premium Member
Less
More
- Posts: 83
14 years 8 months ago #75424
by vtiger
Replied by vtiger on topic creat thumbnail by width and height. you can input height value on K2 control center
I'll keep my fingers crossed ;)
l
l
Please Log in or Create an account to join the conversation.
- miquel
- Offline
- New Member
Less
More
- Posts: 5
14 years 3 months ago #75425
by miquel
Replied by miquel on topic creat thumbnail by width and height. you can input height value on K2 control center
Cool, its works perfect!!!! thanks
Please Log in or Create an account to join the conversation.
- A Schlumberger
- Offline
- New Member
Less
More
- Posts: 4
13 years 10 months ago #75426
by A Schlumberger
Replied by A Schlumberger on topic creat thumbnail by width and height. you can input height value on K2 control center
I just tried for the image in the item, and it crops the image perfectly ! Just what I wanted.
I will need to try with the category images.
Thanks !
I will need to try with the category images.
Thanks !
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 8 months ago #75427
by BBC
Replied by BBC on topic creat thumbnail by width and height. you can input height value on K2 control center
It is better to leave height in config.xml empty for images in item-detailed. Because crop makes them not proportional by height. Not so beautiful. But it depends what man will achieve.
I removed comment "//" from $handle->image_ratio_y = true; for those large images. Category thumbs are not sa important. They can be cropped.
I removed comment "//" from $handle->image_ratio_y = true; for those large images. Category thumbs are not sa important. They can be cropped.
Please Log in or Create an account to join the conversation.
- juju
- Offline
- Premium Member
Less
More
- Posts: 119
13 years 4 months ago #75428
by juju
Replied by juju on topic creat thumbnail by width and height. you can input height value on K2 control center
Thanks for these hacks, but it's a little hard to all understand :/
For now, I use the hack for cache image here :
community.getk2.org/forum/topics/image-cache-questions?commentId=3536014%3AComment%3A19447
And I want to add your hack to add possibility to fix height in config files, What I need to do ?
Thanks ;)
For now, I use the hack for cache image here :
community.getk2.org/forum/topics/image-cache-questions?commentId=3536014%3AComment%3A19447
And I want to add your hack to add possibility to fix height in config files, What I need to do ?
Thanks ;)
Please Log in or Create an account to join the conversation.
- juju
- Offline
- Premium Member
Less
More
- Posts: 119
13 years 4 months ago #75429
by juju
Replied by juju on topic creat thumbnail by width and height. you can input height value on K2 control center
I do the modif, but It don't take the size I define in config pop-up in backend... It takes the default size that I put in the code files...
Could you post all the files you've modify to have the complete hack ?
Thanks ;)
Could you post all the files you've modify to have the complete hack ?
Thanks ;)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- creat thumbnail by width and height. you can input height value on K2 control center