Watermark on 1.3

72 views
Skip to first unread message

Ivan Rivera

unread,
Dec 7, 2012, 9:15:52 AM12/7/12
to ica-ato...@googlegroups.com
Hi again,

I was reading the documentation about the implementation of the watermarks. I look into my files and notice that this feature was already implemented at {root}/lib/model/QubitDigitalObject.php lines 338 to 347.

What i don't know is, in which folder I have to put the watermark.png ?

I'm not sure where is 'sf_web_dir',  i tried at root level and in the images folder without success.

Thanks again,

Iván Rivera


Jesús García Crespo

unread,
Dec 7, 2012, 10:18:31 AM12/7/12
to ica-ato...@googlegroups.com
Hi Ivan,

I hope that this helps:

More help about directory constants (like sf_web_dir) in the Symfony 1.4 docs:
(see directory constants)

Regards,



--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To post to this group, send email to ica-ato...@googlegroups.com.
To unsubscribe from this group, send email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/ica-atom-users/-/T6oGXOMICgQJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jesús García Crespo,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056
Message has been deleted

Ivan Rivera

unread,
Dec 8, 2012, 2:40:23 PM12/8/12
to ica-ato...@googlegroups.com, je...@artefactual.com
Here is what i did, for future references.

1. If you are not in a shared host install imagemagick.
  •  If you are in a shared host verify that you have it, with a php document that contains <?php phpinfo(); ?>
  • Look in your browser the address of the phpinfo document you just created; now find "imagick".
  • If you cannot find it, you need to move your ica atom installation to another host, designed specially for symfony, that includes the imagick module.  
  • If you find it and is enabled you are lucky as me :) 
  • Erase the phpinfo document.
2. Open /{root}/apps/qubit/config/qubitConfiguration.class.php; In ica atom v1.3 find the line 32

And change this code:

public function configure()
  {   
    $this->dispatcher->connect('response.filter_content', array($this, 'responseFilterContent'));
}

For this one:

  public function configure()
  {
    putenv("PATH=".'/opt/local/bin:/opt/local/sbin:'.$_ENV['PATH']);
   
    $this->dispatcher->connect('response.filter_content', array($this, 'responseFilterContent'));
  }

3. To create a watermark you need an image editor, I recommend you http://pixlr.com/editor/ that is similar to Photoshop but free and online.

  • I recommend to use colors (no Black, Gray  or White).
  • The image width should be between 150-160 pixels and for the height, i recommend to, add 15pixels of margin in the top and bottom of the Art.

4. After you create the image save it as watermark.png and store it in the ica-atom root (same place as qubit_dev.php).

5. If you have images already you don't need to erase them.

  • Go to "Edit digital object"  and click on the save button; that is the only thing you need to do.
  • After you save it you wont see the watermarked image. Reload/Refresh your browser and Voila!


Reply all
Reply to author
Forward
0 new messages