Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

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
  #92  
Old 03-08-2010, 10:53 AM
dutchbb dutchbb is offline
 
Join Date: Nov 2003
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Requests:

- watermarks separate from image, so if changed old images show new watermark

- exclusion for forum IDs

- only add watermark if dimensions are greater than x and smaller than y

- add watermark on images hotlinked in image tags
Reply With Quote
  #93  
Old 08-15-2010, 09:15 PM
Mopar1973Man's Avatar
Mopar1973Man Mopar1973Man is offline
 
Join Date: Mar 2007
Location: New Meadows, Idaho
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love to see this mod re-done for the VB4 series...

I've enjoyed it while I was at 3.84... I've also help other Admins install this mod on there site too...

Hopefully the author checks and sees...
Reply With Quote
  #94  
Old 08-17-2010, 05:47 PM
FleXy FleXy is offline
 
Join Date: Dec 2006
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

show thums - enabled.

dowes not increase attachments views counder for me :-(
Reply With Quote
  #95  
Old 08-23-2010, 12:29 AM
Mopar1973Man's Avatar
Mopar1973Man Mopar1973Man is offline
 
Join Date: Mar 2007
Location: New Meadows, Idaho
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok...

I got this mod to work on vBulletin 4.0.6 it works just fine...

1. The watermark image can be either PNG 8 or a PNG 24.
2. The path to the image has to be a full path.

Then the water mark is added at post time...

Attached Images
File Type: jpg watermark test.jpg (134.3 KB, 0 views)
Reply With Quote
  #96  
Old 08-23-2010, 01:20 AM
sulasno sulasno is offline
 
Join Date: Feb 2010
Posts: 588
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what's the dimensions of the watermark ? will it be resize automatically?
Reply With Quote
  #97  
Old 09-01-2010, 01:42 AM
Mopar1973Man's Avatar
Mopar1973Man Mopar1973Man is offline
 
Join Date: Mar 2007
Location: New Meadows, Idaho
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sulasno View Post
what's the dimensions of the watermark ? will it be resize automatically?
Watermark image can be any size you wish but be reasonable. As for re-sizing the watermark no it not altered. Also it will not watermark small images (attachments). Also it will not watermark linked (offsite) images.

But just to update the thread...

* No you don't have to modify the script at all works as is.
* Just make sure you get a PNG image for a watermark and upload it to your server.
* Make sure you use a full path to the watermark image in the control panel.
* Yes it watermarks both gallery and the attachments both. (No control of it!)

This mod does work on vB 4.0.6 and doesn't require any editing...
Reply With Quote
  #98  
Old 09-05-2010, 02:37 PM
Frank T Frank T is offline
 
Join Date: Jun 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this with 4.0.6 and am not having much success. Every time it adds a watermark, it also creates a shaded bar across the entire top/bottom. Here's an example. This image only has a completely transparent background and no text whatsoever. If you look at the top and bottom of this image, you can see how the color shades are darker The transparaent image is 400x50 pixels.
Attached Images
File Type: jpg DSC04213.jpg (157.8 KB, 0 views)
Reply With Quote
  #99  
Old 09-05-2010, 07:27 PM
Mopar1973Man's Avatar
Mopar1973Man Mopar1973Man is offline
 
Join Date: Mar 2007
Location: New Meadows, Idaho
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Normal the way the script was written... Mine does the very same thing but I sure if someone has a bit of PHP experience could change the script to quit that...
Reply With Quote
  #100  
Old 09-28-2010, 06:20 PM
Breakthru Breakthru is offline
 
Join Date: Oct 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Confirmed working on 4.0.7

To get rid of that light gray background edit the plugin, Plugin Manager, Watermark Attachments - Display, attachment_display

You have to change the 100 to 127 like below...


Code:
if($wm_t&&imagesx($im_a)>imagesx($wm_t)) {	
				imagefilledrectangle($im_a, 0 , 0 , imagesx($im_a) , imagesy($wm_t) , imagecolorallocatealpha($im_a, 0, 0, 0, 127) );
				imagecopy($im_a, $wm_t, imagesx($im_a)-imagesx($wm_t), 0, 0, 0, imagesx($wm_t), imagesy($wm_t));
			}
			if($wm_b&&imagesx($im_a)>imagesx($wm_b)) {	
				imagefilledrectangle($im_a, 0 , imagesy($im_a)-imagesy($wm_b) , imagesx($im_a) , imagesy($im_a) , imagecolorallocatealpha($im_a, 0, 0, 0, 127) );
				imagecopy($im_a, $wm_b, imagesx($im_a)-imagesx($wm_b),
Reply With Quote
  #101  
Old 09-28-2010, 08:37 PM
Mopar1973Man's Avatar
Mopar1973Man Mopar1973Man is offline
 
Join Date: Mar 2007
Location: New Meadows, Idaho
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right on I'm going to add that mod to my setup... Thank you! :up:
Reply With Quote
Reply

Thread Tools

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 01:05 AM.


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.04566 seconds
  • Memory Usage 2,330KB
  • 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_code
  • (1)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
  • (4)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