Scot's Scripts FAQs and Module Support

If you don't find the answers here contact us.
Documentation and support for our Miva modules is found here. If you can't find the answer you're looking for contact us and we'll add the information.

Watermark / Page Items and Functions

Page Items and Functions

These function and page items give you more control over the watermarking process. Please note the following:

  • If writing a new watermark, images that are already watermarked will not be watermarked twice.
  • If displaying watermarked image data then it is possible to have a double watermark.
  • if the image is a product image you can put the filename in by itself, such as my_image.jpg
  • If the image is not a product image you must use the full path, such as /images/my_images.jpg
  • g.watermark_text_override will replace the text in your configuration.
  • g.watermark_overlay_override will replace the image overlay. This needs the full path, such as /images/my_overlay.jpg
  • g._watermark_debug to 1 will display a table of information regarding the watermarking process.

An override or debug setting should be set above the watermark page item or function call so that the watermark module can read it.

Set a text override:

<mvt:assign name="g.watermark_text_override" value=" 'This is my new text.' " />

If you are going to use an apostrophe it must be escaped like this:

<mvt:assign name="g.watermark_text_override" value=" 'This isn\'t my new text.' " />

Watermark Existing Product Images

<mvt:item name="watermark" />

If auto-watermarking is turned on, this page item will watermark the image. This is used for sites that want old non-watermarked images to be watermarked. This goes in the HEAD area ofthe product page above the image machine call -
<mvt:item name="product_display_imagemachine" param="head" />

Watermark Images for Particular Product

<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_product_images(product_id)" />

This will watermark all image machine images associated with the product id entered. Images that the system has already processed will be skipped. Older stores using legacy images will need to use one of the functions below.

Example: if you're on the product page you can manually watermark your images like this:

<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_product_image(l.settings:product:id)" />

Display Image Tag with Watermarked Image

<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_image_tag(image_path)" />

This will display the image with the watermark. This is non-destructive, the image is not physically watermarked. This is a good way to test but it does not work well for SEO.

Return Watermarked Image Data for Display in Image Tag

<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_image_return(image_path)" />

This returns watermarked image data that can be used in an image tag. This is good for testing but not for SEO.

Example:

<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc;" name="l.settings:image_data" value="watermark_image_return('/images/my_image.jpg') />

<img src="&mvt:image_data;" alt="my image" />

Display Watermarked Image Data in Image Tag

<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_image_display(image_path)" />

This can be used inside an image tag to display the watermarked imaged ata. This is good for testing but not SEO.

<img src="<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc;" name="l.settings:image_data" value="watermark_image_display('/images/my_image.jpg') />" />

Write Watermark to Image

<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_write(image_path)" />

This will physically watermark the image.

updated December 24, 2017