Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Watermark Attachments Details »»
Watermark Attachments
Version: 1.00, by bjhuang bjhuang is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.0 Rating:
Released: 01-15-2009 Last Update: 01-15-2009 Installs: 141
Uses Plugins
Re-useable Code  
No support by the author.

Product: 1
Plugin: 2
Query: 0

tested only on the pure installation of vbulletin. install at your own risk to work with other attachment mods.

Feature

* put a logo (watermark) on your attachments.
* option to watermark only attachments after X days of creation. this helps your hotlinked images become free ads.
* option to watermark thumbnails but stop hotlinking to full size image (return a blank image instead)
* option NOT to watermark images for traffic from certain sites

Install

Step 1: import product-watermark.xml
Step 2: create and upload your own watermark logos. one for top and one for bottom.
Step 3: put the absolute path of watermark images into options. (/var/www/html/.../watermark.png)
Step 4 (optional) : if you don't want the attachments watermarked viewing on your own site or some other friend sites (like google image), just put the domains into "Skip Referer" option.

Not working
1. set the "Days Delay" option to 0
2. refresh your cache by press Ctrl-F5.
3. the watermark images should be in PNG format with transparent background.
4. check the "Safe Mode Temporary Directory" option. the directory should be writable.
5. only works for PNG, GIF, JPG attachments.
6. only works if the attachments are stored in the filesystem.
7. GD library should be installed.

Todo
* currently, we have to create a temp file while sending a watermarked attachment. It will be appreciate if anybody can help me to get rid of this.




The most famous travel forum in chinese world - www.bbkz.com

Download Now

File Type: xml product-watermark.xml (6.1 KB, 1292 views)

Screenshots

File Type: png example_watermark_bottom.png (4.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-16-2009, 10:24 PM
bjhuang bjhuang is offline
 
Join Date: Jul 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xmobile View Post
what format to use in "Path of top watermark"?:
images/logo.png or http://mydomain/forums/images/logo.png
/var/www/html/forum....
Reply With Quote
  #23  
Old 01-16-2009, 10:32 PM
bjhuang bjhuang is offline
 
Join Date: Jul 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sweeks View Post
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.
Reply With Quote
  #24  
Old 01-17-2009, 06:37 AM
netcommander netcommander is offline
 
Join Date: Dec 2004
Location: Turkey/Antalya
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can we change watermark position ? is it possible
Reply With Quote
  #25  
Old 01-17-2009, 07:57 AM
denman75 denman75 is offline
 
Join Date: Aug 2006
Location: Netherlands
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is not working ,thats to bad
Reply With Quote
  #26  
Old 01-17-2009, 09:23 AM
bjhuang bjhuang is offline
 
Join Date: Jul 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by netcommander View Post
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));
    
            } 
Reply With Quote
  #27  
Old 01-17-2009, 09:42 AM
glennybee glennybee is offline
 
Join Date: Feb 2008
Location: Scotland
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice mod, tagged for later.
Reply With Quote
  #28  
Old 01-17-2009, 01:38 PM
vemkeit vemkeit is offline
 
Join Date: Apr 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks nice mod... it works great in Firefox and IE 7
Reply With Quote
  #29  
Old 01-18-2009, 05:34 PM
devilsown devilsown is offline
 
Join Date: Aug 2006
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #30  
Old 01-18-2009, 11:43 PM
bjhuang bjhuang is offline
 
Join Date: Jul 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 View Post
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
Reply With Quote
  #31  
Old 01-19-2009, 06:55 AM
sleepyboy2004 sleepyboy2004 is offline
 
Join Date: Nov 2008
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not working for me
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09354 seconds
  • Memory Usage 2,347KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete