Keyword

Change Cache folder for different Image resizes

  • Duran Keeley
  • Duran Keeley's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 weeks ago #102988 by Duran Keeley
I would like to make the M XL and so on cache in different folders, so "\media\k2\items\cache\M" for the med, and so on for the sizes. Running a watermark script but I only wanna put it on the Large images so the small (preview image) has no watermark.

I tried editing components\com_k2\models\item.php
were i found the cache kinda referenced as
"if (JFile::exists(JPATH_ROOT.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.'XS'.DS.$filename.'_XS.jpg')"

I added the ".DS.'XS'" but I really have no clue how to do this.

Please Log in or Create an account to join the conversation.

More
12 years 4 weeks ago #102989 by Lefteris
Hi. It's not that easy. I recommend you to not change the location of the images. If you want to apply some processing to specific images ( using your own script ) you can get the desired file for each image size by looking at the filenames. The part after the last underscore is the size of the image.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Duran Keeley
  • Duran Keeley's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 weeks ago #102990 by Duran Keeley
Replied by Duran Keeley on topic Re: Change Cache folder for different Image resizes
I understand that the_M and so on is the Image size.

The script from here:
dolcepixel.com/how-to-watermark-all-your-uploaded-images/

it watermarks a folder, I wanna make like a Shutterstock kinda vibe. so the small is clear, but when you click on the image the one in the lightbox is watermarked.

Please Log in or Create an account to join the conversation.

More
12 years 3 weeks ago #102991 by Lefteris
This is an issue of the script. You need to look at the script code and see where it fails. Anotherway to add watermark is to develop a K2 plugin triggered on the "onK2AfterSave" event. The plugin will be able this way to add the watermark every time an item gets saved.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Duran Keeley
  • Duran Keeley's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 weeks ago #102992 by Duran Keeley
Replied by Duran Keeley on topic Re: Change Cache folder for different Image resizes
Thank you, will look into this.

Sorry i'm such a newbie to this all.

Please Log in or Create an account to join the conversation.

More
12 years 3 weeks ago #102993 by Lefteris
It's fine. That's why this forum is. You are welcome.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum