Watermark

  • Posts: 32
  • Thank you received: 0
5 years 5 months ago #182327

-- 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.

  • Posts: 13201
  • Thank you received: 2319
  • MODERATOR
5 years 5 months ago #182351

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.

  • Posts: 32
  • Thank you received: 0
5 years 5 months ago #182419

And where can I find it? wherein the file?

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

  • Posts: 13201
  • Thank you received: 2319
  • MODERATOR
5 years 5 months ago #182615

Hi,

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

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

  • Posts: 39
  • Thank you received: 0
  • Hikashop Business
5 years 4 months ago #184943

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.

  • Posts: 24128
  • Thank you received: 3735
  • MODERATOR
5 years 4 months ago #184987

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

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 39
  • Thank you received: 0
  • Hikashop Business
5 years 4 months ago #185074

OK, to be clear, I've created an empty file called image.php and put it here.

/MYTEMPLATE/com_hikashop/administrator/helpers/
Into that file I added the usual:
<?php
defined('_JEXEC') or die('Restricted access');
Then
include_once "/administrator/components/com_hikashop/helpers/image.php";
followed by a copy of the function in question:
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: 5 years 4 months ago by toolie.

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

  • Posts: 24128
  • Thank you received: 3735
  • MODERATOR
5 years 4 months ago #185077

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 27
  • Thank you received: 0
  • Hikaauction Standard Hikamarket Multivendor Hikaserial Subscription Hikashop Business
4 months 4 weeks ago #314298

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.

  • Posts: 69451
  • Thank you received: 10401
  • MODERATOR
4 months 4 weeks ago #314305

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.091 seconds
Powered by Kunena Forum