vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Watermark Attachments (https://vborg.vbsupport.ru/showthread.php?t=201972)

bjhuang 01-16-2009 10:24 PM

Quote:

Originally Posted by xmobile (Post 1714694)
what format to use in "Path of top watermark"?:
images/logo.png or http://mydomain/forums/images/logo.png

/var/www/html/forum....

bjhuang 01-16-2009 10:32 PM

Quote:

Originally Posted by Sweeks (Post 1714778)
I am sure some of our attachments are no longer opening properly too and I have never witnessed this prior to installation and still happens on uninstallation.

this mod watermark attachments on the fly. it won't write or modify anything back to the database. maybe you should check your plugins to see if there are other mods hooked to attachment_display or attachment_complete. if they write data back to the db after watermarked attachments were created, there is a probability causing some problems.

netcommander 01-17-2009 06:37 AM

can we change watermark position ? is it possible

denman75 01-17-2009 07:57 AM

is not working ,thats to bad

bjhuang 01-17-2009 09:23 AM

Quote:

Originally Posted by netcommander (Post 1715474)
can we change watermark position ? is it possible

well, it's not hard with a little coding PHP coding knowledge.

Try to modify these lines in plugin "Watermark Attachments - Display":

PHP Code:

            if($wm_t&&imagesx($im_a)>imagesx($wm_t)) {    
                
imagefilledrectangle($im_aimagesx($im_a) , imagesy($wm_t) , imagecolorallocatealpha($im_a000100) );
                
imagecopy($im_a$wm_timagesx($im_a)-imagesx($wm_t), 000imagesx($wm_t), imagesy($wm_t));
            }
            if(
$wm_b&&imagesx($im_a)>imagesx($wm_b)) {    
                
imagefilledrectangle($im_aimagesy($im_a)-imagesy($wm_b) , imagesx($im_a) , imagesy($im_a) , imagecolorallocatealpha($im_a000100) );
                
imagecopy($im_a$wm_bimagesx($im_a)-imagesx($wm_b), imagesy($im_a)-imagesy($wm_b), 00imagesx($wm_b), imagesy($wm_b));
    
            } 


glennybee 01-17-2009 09:42 AM

Nice mod, tagged for later. :)

vemkeit 01-17-2009 01:38 PM

Thanks nice mod... it works great in Firefox and IE 7

devilsown 01-18-2009 05:34 PM

I am not having any luck getting this to work.
my path is set to /var/www/images/watermark.png
which is how i find it in ftp client.

i have the image on my server at/ http://www.grandprixforums.net/images/watermark.png

i have my images stored in the file system.
this is my image. http://www.grandprixforums.net/attac...ntroller_s.jpg

bjhuang 01-18-2009 11:43 PM

this mod add watermarks on the fly. it won't modify your images. you browse the image with a direct link to the jpg, and of course there is no watermark on it.


Quote:

Originally Posted by devilsown (Post 1717071)
I am not having any luck getting this to work.
my path is set to /var/www/images/watermark.png
which is how i find it in ftp client.

i have the image on my server at/ http://www.grandprixforums.net/images/watermark.png

i have my images stored in the file system.
this is my image. http://www.grandprixforums.net/attac...ntroller_s.jpg


sleepyboy2004 01-19-2009 06:55 AM

Not working for me :(


All times are GMT. The time now is 12:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01136 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete