CGSmartImage + CGExtensions: variable watermark [closed]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

CGSmartImage + CGExtensions: variable watermark [closed]

Post 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?
Last edited by HarmO on Tue Apr 28, 2015 10:38 am, edited 1 time in total.
Kind regards,
HarmO
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGSmartImage + CGExtensions: variable watermark

Post 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
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: CGSmartImage + CGExtensions: variable watermark

Post 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.
Kind regards,
HarmO
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGSmartImage + CGExtensions: variable watermark

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: CGSmartImage + CGExtensions: variable watermark

Post 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...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: CGSmartImage + CGExtensions: variable watermark

Post 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}
Kind regards,
HarmO
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGSmartImage + CGExtensions: variable watermark

Post 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...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGSmartImage + CGExtensions: variable watermark

Post by calguy1000 »

CGSmartImage doesn't support watermarking with dynamic text at this time.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: CGSmartImage + CGExtensions: variable watermark

Post 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
Kind regards,
HarmO
Post Reply

Return to “Modules/Add-Ons”