Post by yo99vld » Sun Oct 14, 2012 8:53 am

cum fac sa instalez programu acela de pus pe firecare poza la produse un logo.. as dori sa stiu cum se instaleaza ca am gasit ceva de genu watermark dar nu gasesc.. sa instalez ca nu e complet .. va multumesc astept mesajul dumneavoastra

New member

Posts

Joined
Fri Apr 06, 2012 8:34 pm

Post by vallentin24 » Sat Nov 10, 2012 6:30 am

instalezi vqmod daca nu-l ai

faci un text document la care ii modifici extensia din .txt in .xml

dai paste la astea in el si il salvezi.

Code: Select all

<modification>
<id>Add Watermark</id>
<version>1.0</version>
<vqmver>1.1.0</vqmver>
<author>Rob Horsfield and thread 3664</author>
<file name="catalog/model/tool/image.php">
<operation>
<search position="after"><![CDATA[
$image = new Image(DIR_IMAGE . $old_image);
]]></search>
<add><![CDATA[
if ($width > 90 || $height > 90) {   
   $image->watermark(DIR_IMAGE . 'watermark.png', 'center');
}
]]></add>
</operation>
</file>

   
<file name="system/library/image.php">

<operation>
<search position="replace"><![CDATA[
$watermark = $this->create($file);
]]></search>
<add><![CDATA[
$watermark = imagecreatefrompng($file);
]]></add>
</operation>

<operation>
<search position="before"><![CDATA[
case 'bottomright':
]]></search>
<add><![CDATA[
case 'center':
            $watermark_pos_x = ($this->info['width']- $watermark_width)/2;
            $watermark_pos_y = ($this->info['height']- $watermark_height)/2;
            break;
]]></add>
</operation>

<operation>
<search position="replace"><![CDATA[
imagecopy($this->image, $watermark, $watermark_pos_x, $watermark_pos_y, 0, 0, 120, 40);
]]></search>
<add><![CDATA[
imagecopy($this->image, $watermark, $watermark_pos_x, $watermark_pos_y, 0, 0, $watermark_width, $watermark_height);
]]></add>
</operation>
</file>
</modification>

il uploadezi in /vqmod/xml

iti faci un .png transparent cu logo si-l pui in /public_html/image

imi merge pe versiunile 1.5.1 - 1.5.4 , l-am gasit la extensii, gratuit.

Active Member

Posts

Joined
Fri Feb 03, 2012 1:00 am

Post by vallentin24 » Sat Nov 10, 2012 6:32 am

am uitat sa mentionez, png-ul sa aiba numele watermark.png

Active Member

Posts

Joined
Fri Feb 03, 2012 1:00 am
Who is online

Users browsing this forum: No registered users and 9 guests