Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

Vous parlez français ? par ici !
Image Cloaking ( how to protect images)
#1
Posted 28 July 2010 - 08:23 PM
I was wondering if anyone has found a solution to protect images from other vendors, Since I took the time to photograph them myself, I would like them to put a link to my site, which they wont do unless they have to contact me for the images.
Thanks!
#2
Posted 29 July 2010 - 01:25 AM
I see what you mean ... it's like www.limesurvey.org try to right click the logo on the top left corner and then save it, you will be saving a blank.png
http://www.limesurve...mages/blank.png
Does anyone know how to do this ?
#3
Posted 29 July 2010 - 01:39 AM
#4
Posted 29 July 2010 - 01:48 AM
#5
Posted 29 July 2010 - 02:26 PM
From 1280363144:
I see what you mean ... it's like www.limesurvey.org try to right click the logo on the top left corner and then save it, you will be saving a blank.png
http://www.limesurve...mages/blank.png
Does anyone know how to do this ?
The img tag in the source code is like this:
Then the CSS for the logo img tag is like this:
img#logo {
float: left;
margin-left: 38px;
width: 469px;
height: 150px;
background: url(../images/logo.png) 0 0 no-repeat;
}
#6
Posted 29 July 2010 - 02:30 PM
From 1280364510:
I don't think you can do it without using an inline style because the links to the product image are dynamic.
But if you use an inline style, they can circumvent your cloaking by viewing source to find the actual image link.
It is not fool-proof, either. I was able to see the way they did it by viewing the source of their site.
#7
Posted 29 July 2010 - 03:32 PM
Then get rid of thetags below that.
You do essentially the same thing in product-list.tpl, you are adding the background to the anchor and removing thetag:
<!---->
While this may not fully keep them from getting to your images, it does stop right-click->Save Image As... efforts, for sure.
Hope this helps you
#8
Posted 29 July 2010 - 07:53 PM
{if $have_image}
getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic"/>
{else}
name|escape:'htmlall':'UTF-8'}" />
{/if}
#9
Posted 29 July 2010 - 11:43 PM
{if $have_image}
getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic"/>
{else}
name|escape:'htmlall':'UTF-8'}" />
{/if}
#10
Posted 05 August 2010 - 06:06 AM
Thank a lot.
#11
Posted 26 October 2010 - 06:22 PM
I have to edit the product.tpl file with this:
in place of this:
{if $have_image}
name|escape:'htmlall':'UTF-8'}" />{/if} Then what do I edit in the product-list.tpl?
#12
Posted 27 October 2010 - 12:56 AM
#13
Posted 27 October 2010 - 07:32 AM
1. In post#6 I copied your code - (written in the first box)
2. I replaced the code of the product.tpl (in post#8) with your code.
Result: My product page gets messed up (Using 1.3.1)
From your posts I understand that I have to do exactly the same thing in the product-list.tpl - but in this file, the code written in post#8 does not exist.
#14
Posted 27 October 2010 - 10:09 AM
#15
Posted 27 October 2010 - 03:17 PM
#16
Posted 27 October 2010 - 03:28 PM
Change to:
delete these lines just below the line above:
{if $have_image}
getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />
{else}
name|escape:'htmlall':'UTF-8'}" />
{/if}
In product-list.tpl find line:getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}" />
And replace it with this:
getImageLink($product.link_rewrite, $product.id_image, 'home')}) 0 0 no-repeat;" alt="{$product.legend|escape:'htmlall':'UTF-8'}" >
You need to place a 1x1px transparent gif file in the /img directory.
#17
Posted 27 October 2010 - 05:45 PM
But.. I copied exactly the code as you put (even did it 3 times over to make absolutely sure), I added a 1x1px transparent gif to the theme image folder - called blank (blank.gif - made in corel photopaint by making a file with no background/transparent and resizing to 1x1px) and when I test my page, the thickbox image of my product is not available for the customer to zoom in and I can still use 'save as' on the smaller image which saves correctly.
I am not sure what the problem is (I am using pS 1.3.1). I do not want to take up much of your time if it's a hassle?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users













