Skip to main content

Watermark

More
11 years 10 months ago #182327 by piotreczek100
Watermark was created by piotreczek100
-- Joomla version -- : 3.3.6

Welcome
Customer page, and I do have a question. How to change the position of the watermark on the pictures? At the moment, are recorded on the bottom right, the client wants her to be on the top left.
Please help.
Yours
Peter

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

More
11 years 10 months ago #182351 by Xavier
Replied by Xavier on topic Watermark
Hi,

This will require the edition of the image helper, a core file.
The values to change are "$dest_x" and "$dest_y".

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

More
11 years 10 months ago #182419 by piotreczek100
Replied by piotreczek100 on topic Watermark
And where can I find it? wherein the file?

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

More
11 years 10 months ago #182615 by Xavier
Replied by Xavier on topic Watermark
Hi,

The file is "administrator/components/com_hikashop/helpers/image.php"

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

More
11 years 9 months ago #184943 by toolie
Replied by toolie on topic Watermark
Xavier, changes to this file would be overwritten with updates to Hikashop, correct? Is it possible to add that file to our template so that Joomla uses it instead? Or should we just plan to update the file after we update Hikashop?

Toolie

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

More
11 years 9 months ago #184987 by Jerome
Replied by Jerome on topic Watermark
Hi,

That's right.

To override an HikaShop class (or helper), you can create an "image.override.php" in the folder :
YOUR_FRONT_END_TEMPLATE/html/com_hikashop/administrator/helpers/

With the code
Code:
include_once $originalFile; class hikashopImageHelperOverride extends hikashopImageHelper { }
You can re-declare just the function you want thanks to PHP extends.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 9 months ago - 11 years 9 months ago #185074 by toolie
Replied by toolie on topic Watermark
OK, to be clear, I've created an empty file called image.php and put it here.
Code:
/MYTEMPLATE/com_hikashop/administrator/helpers/
Into that file I added the usual:
Code:
<?php defined('_JEXEC') or die('Restricted access');
Then
Code:
include_once "/administrator/components/com_hikashop/helpers/image.php";
followed by a copy of the function in question:
Code:
class hikashopImageHelperOverride extends hikashopImageHelper { function _resizeImage($file_path, $newWidth, $newHeight, $dstFolder = '', $type = 'thumbnail', $watermark = '') { ...full copy of the main function code with changes goes here ... } } ?>
Does that look right?

Toolie
Last edit: 11 years 9 months ago by toolie.

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

More
11 years 9 months ago #185077 by Jerome
Replied by Jerome on topic Watermark
Hi,

No...
1/ Path is no the right one ; please check my previous post.
2/ include is not right ; please use the code I provide in my previous post ; Just need to copy past, no need to improvise.

But for the rest, the override class looks good.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
6 years 9 months ago #314298 by cworthen75
Replied by cworthen75 on topic Watermark
would you always create it in this folder even if you were over riding a class rather than a helper?
"YOUR_FRONT_END_TEMPLATE/html/com_hikashop/administrator/helpers/"
or if it was a class would it be YOUR_FRONT_END_TEMPLATE/html/com_hikashop/administrator/class/

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

More
6 years 9 months ago #314305 by nicolas
Replied by nicolas on topic Watermark
Hi,

It would be YOUR_FRONT_END_TEMPLATE/html/com_hikashop/administrator/classes/
The following user(s) said Thank You: cworthen75

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

Time to create page: 0.243 seconds
Powered by Kunena Forum