Current time: 19-09-2017, 18:38:58 Hello There, Guest! (LoginRegister)
Advertisement

CF Image Host 1.6.5

Download link Fixed 1.6.5 is out and can be found here-> http://forum.codefuture.co.uk/showthread.php?tid=73141

CF Image Host Pro 0.4.5

Download CF Image Host Pro 0.4.5 can be found here-> http://forum.codefuture.co.uk/showthread.php?tid=73481

Making the Watermark visible all the time
Author Message
Post: #1
Making the Watermark visible all the time
Hi everyone

I have 1 question - in watermark section it is noted, that "watermark is only add to the image when viewed from any other site then yours."

Is it possible, to add watermark in all cases, not depending on site ?

I insalled this script on my site in subdir site.com/pix and when I upload image and post it to main site site.com/, watermark dissapears Sad and I need to have this watermarks on images on my main site too Sad

Can anyone help me ?

Thanks in advance

George
(This post was last modified: 03-03-2011 22:55:25 by imgcandy.)
Quote
Advertisement
Post: #2
Making the Watermark visible all the time
To have a watermark on all the time,

open config.php (you can find this file in inc folder) find the code below (from line 561 to 572)
PHP Code
  1. if(!hotlink()){
  2. header('Content-type: image/'.$img_ext);
  3. readfile($img_address);
  4. }else{
  5. not_max_bandwidth($img_id,$type);
  6. if($settings['SET_WATERMARK']){
  7. watermarkImage($img_address);
  8. }else{
  9. header('Content-type: image/'.$img_ext);
  10. readfile($img_address);
  11. }
  12. }



and replace it with
PHP Code
  1. not_max_bandwidth($img_id,$type);
  2. if($settings['SET_WATERMARK']){
  3. watermarkImage($img_address);
  4. }else{
  5. header('Content-type: image/'.$img_ext);
  6. readfile($img_address);
  7. }

Quote
Post: #3
Making the Watermark visible all the time
admin Wrote:To have a watermark on all the time,

open config.php (you can find this file in inc folder) find the code below (from line 561 to 572)

Great Cool

Thanks
Quote
Post: #4
Making the Watermark visible all the time
why this is not working for me?
after i replace the code above, seem can load any image??
is ther something wrong?

i found error log in www folder as follow:
Quote:[14-Jun-2011 21:53:37] PHP Notice: Undefined variable: img_id in /xxx/inc/config.php on line 661
[14-Jun-2011 21:53:37] PHP Warning: Missing argument 3 for not_max_bandwidth(), called in /xxx/inc/config.php on line 661 and defined in /xxx/inc/config.php on line 375
[14-Jun-2011 21:53:37] PHP Notice: Undefined variable: image in /xxx/inc/config.php on line 394
[14-Jun-2011 21:53:37] PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx/inc/config.php:661) in /xxx/lib/watermark.class.php on line 319
[14-Jun-2011 21:53:37] PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx/inc/config.php:661) in /xxx/lib/watermark.class.php on line 320
[14-Jun-2011 21:53:37] PHP Warning: Cannot modify header information - headers already sent by (output started at /hxxx/inc/config.php:661) in /xxx/lib/watermark.class.php on line 321
[14-Jun-2011 21:53:37] PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx/inc/config.php:661) in /xxx/lib/watermark.class.php on line 322
[14-Jun-2011 21:53:37] PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx/inc/config.php:661) in /xxx/lib/watermark.class.php on line 274
(This post was last modified: 14-06-2011 14:56:15 by thepj.)
Quote
Post: #5
Making the Watermark visible all the time
i think this was you 1.4, what version are you running?
Quote
Post: #6
Making the Watermark visible all the time
i used the latest version i think, here is the version number?

// Author: codefuture.co.uk
// Version: beta 0.25
// Date: 05/05/2011

which i can see the version of my site?

thanks,
topan
Quote
Post: #7
Making the Watermark visible all the time
admin Wrote:To have a watermark on all the time,

open config.php (you can find this file in inc folder) find the code below (from line 561 to 572)
PHP Code
  1. if(!hotlink()){
  2. header('Content-type: image/'.$img_ext);
  3. readfile($img_address);
  4. }else{
  5. not_max_bandwidth($img_id,$type);
  6. if($settings['SET_WATERMARK']){
  7. watermarkImage($img_address);
  8. }else{
  9. header('Content-type: image/'.$img_ext);
  10. readfile($img_address);
  11. }
  12. }



and replace it with
PHP Code
  1. not_max_bandwidth($img_id,$type);
  2. if($settings['SET_WATERMARK']){
  3. watermarkImage($img_address);
  4. }else{
  5. header('Content-type: image/'.$img_ext);
  6. readfile($img_address);
  7. }



tweak dont work for me here........

got x on picture and say can find image txt
Quote
Post: #8
Making the Watermark visible all the time
admin Wrote:To have a watermark on all the time,

open config.php (you can find this file in inc folder) find the code below (from line 561 to 572)
PHP Code
  1. if(!hotlink()){
  2. header('Content-type: image/'.$img_ext);
  3. readfile($img_address);
  4. }else{
  5. not_max_bandwidth($img_id,$type);
  6. if($settings['SET_WATERMARK']){
  7. watermarkImage($img_address);
  8. }else{
  9. header('Content-type: image/'.$img_ext);
  10. readfile($img_address);
  11. }
  12. }



and replace it with
PHP Code
  1. not_max_bandwidth($img_id,$type);
  2. if($settings['SET_WATERMARK']){
  3. watermarkImage($img_address);
  4. }else{
  5. header('Content-type: image/'.$img_ext);
  6. readfile($img_address);
  7. }



tweak dont work for me v1.4.1 here........

got x on picture and say can find image txt
(This post was last modified: 09-08-2011 12:55:40 by twc.)
Quote
Post: #9
RE: Making the Watermark visible all the time
Have anywhere a idea for permanent watermark on CF Image Host Pro 0.4.5 ?
Quote
Post: #10
RE: Making the Watermark visible all the time
Problem already done...
Quote


Forum Jump: