Page 1 of 1
CGSmartImage + CGExtensions: variable watermark [closed]
Posted: Wed Apr 22, 2015 2:28 pm
by HarmO
Hello,
i'm building a reference gallery for my client in ListIt2, containing text and pictures.
Some pictures have copyrights that need mentioning.
Since i use the CGSmartImage module to resize the pictures trough out the website i think it would be ideal to use the watermark filter to add the copywrite on the pictures.
Code: Select all
{CGSmartImage src=$headerimgurl alias="ref_default" filter_watermark="$copywriteText"}
BUT i can't tell the filter to put the name x, y or Z on the picture, instead it takes the default text set in CGExtensions.
is there a way to override this?
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Wed Apr 22, 2015 2:39 pm
by Jo Morg
HarmO wrote:Code: Select all
{CGSmartImage src=$headerimgurl alias="ref_default" filter_watermark="$copywriteText"}
It seems that the Smarty syntax is not entirely correct...
Try:
Code: Select all
{CGSmartImage src=$headerimgurl alias="ref_default" filter_watermark=$copywriteText}
or
Code: Select all
{CGSmartImage src=$headerimgurl alias="ref_default" filter_watermark="{$copywriteText}"}
If that doesn't work something else might be wrong then...
HTH
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Wed Apr 22, 2015 3:05 pm
by HarmO
Hi Jo Morg,
that was indeed not correct, i changed it to
Code: Select all
{CGSmartImage src=$headerimgurl alias="ref_default" filter_watermark=$copyright}
Where $copyright equals to "All Rights Reserved by X"
But i get 'copyrighted' instead ->
http://com.imperbel.net/en/references/novi-park/65
It works as mentioned in the CGSmartImage documentation:
filter_watermark="" - (anything), Specify that the watermark (as specified in the CGExtensions admin panel) should be applied to the image
My question:
How can i override the default value of the 'Watermark Text' per request i make.
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Wed Apr 22, 2015 3:17 pm
by Jo Morg
HarmO wrote:My question:
How can i override the default value of the 'Watermark Text' per request i make.
According to the module's help text you can't:
CGSmartImage Help wrote:(...) {CGSmartImage src='uploads/images/picture.jpg' filter_watermark=1}. This will read the image, apply the watermark according to the settings in CGExtensions, cache the altered image, and then embed it into your output.
Meaning that
filter_watermark will look for either
1 or
0 meaning
true or
false.
However it could be an interesting Feature Request.
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Wed Apr 22, 2015 3:31 pm
by Rolf
I use a image and do it this way
http://www.cmscanbesimple.org/blog/buil ... ade-simple image in the /uploads/ folder
might help...
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Wed Apr 22, 2015 3:43 pm
by HarmO
Would it work with cg menu hint ? (never used that function before)
Code: Select all
{cge_module_hint module=CGExtensions watermark_text=$copyrigth}
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Wed Apr 22, 2015 4:03 pm
by Jo Morg
HarmO wrote:Would it work with cg menu hint ? (never used that function before)
Code: Select all
{cge_module_hint module=CGExtensions watermark_text=$copyrigth}
No.
cge_module_hint is meant to
preset some of the
existing action parameters of a module for the duration of the request. If the parameter doesn't exist it won't work...
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Wed Apr 22, 2015 4:28 pm
by calguy1000
CGSmartImage doesn't support watermarking with dynamic text at this time.
Re: CGSmartImage + CGExtensions: variable watermark
Posted: Mon Apr 27, 2015 8:27 am
by HarmO
Ok,
for now i've put the copyright in the img-tag with the Title-element, in the hope it is sufficient.
I'll post a feature request for this.
(
http://dev.cmsmadesimple.org/feature_request/view/10503 )
Thanks for the feedback and keep up the work.
Regards