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

Reply
 
Thread Tools
Watermark Generator Details »»
Watermark Generator
Version: 1.1, by Disasterpiece Disasterpiece is offline
Developer Last Online: Oct 2019 Show Printable Version Email this Page

Category: Social Group and Album Enhancements - Version: 4.0.x Rating:
Released: 05-17-2011 Last Update: 06-08-2011 Installs: 154
DB Changes Uses Plugins
Additional Files Is in Beta Stage  
No support by the author.

Quick Info

This mod adds a watermark to album and attachment images.
The watermark is customizable via image files or specified text.
Processed images are cached and the original files remain untouched, so you can modify or remove the watermark anytime you want.


Features

- Intelligent Caching
- Uses standard vBulletin methods, therefore no file modifications necessary
- Settings-Preview with a sample image in Adminpanel
- Generative plugin behaviour, works with most other mods which use the same hooks or use attachment images elsewhere

Installation

Code:
Step 1)

Upload files inside upload directory according to their structure:

> forum root
	> admincp
		+ pl_watermark_admin.php
	> images
		> misc
			+ plwm_sample.jpg
	> includes
		> cron
			+ pl_watermark_cron.php
		> xml
			+ cpnav_plwatermark.xml
		+ pl_watermark_functions.php
		+ pl_watermark_imagemanipulation.php


Step 2)

Import "product-plwatermark.xml" as addon into your vBulletin AdminCP


Step 3)

Navigate in your vBulletin AdminCP to PL Watermark Generator -> Plugin Settings.
Define the settings how you see fit. The options should be self-explanatory, if you need help with certain things, ask in the modification thread.

Changelog
Code:
v1.1
- Fixed potential security flaw on certain webserver configurations
- Improved install/updatescript
- (hopefully) fixed the grey-bar bug which occured on certain webserver configurations

v1.0
- Initial Beta Release
Additional Info

The Mod is currently in BETA. This means, that we tested it on a test environment (vb 4.0.x to 4.1.3) but has not yet undergo excessive stress test.
Keep an eye out for updated versions until the final release!
If you encounter any bugs, missing or misplaced features, let us know!

F.A.Q

- I don't see changes in my live images!
> To see changes on the image files you have to clear your browser's cache!
In firefox it's enough to force a fresh reload via STRG+F5 and on other browsers STRG+F5 or SHIFT+F5 should work.
If you don't perform this step, your browser will show the old cached version and maybe the watermark won't show or changes won't apply.

- My png/gif watermark isn't transparent, instead I get a black background!
> PNG-8 is known for having transparency problems, GIF in some cases as well.
Fall back to PNG-24 with Alpha channel (all modern image tools should be able to save as PNG-24)
If you have trouble creating a working png-24 with alpha channel, you can send me a PM with a link to your watermark and I'll convert it to png-24 for you.

- I have trouble with special characters or non-latin charactersets!
> The addon is using standard php functionalities for the text. If for any reason you have trouble with special chars, I suggest using a transparent png-24 with the text from an external image tool instead.

Support / Branding

We provide quality vbulletin software modifications for zero costs. To help our mod to be well-known, a backlink is added to your forum footer by the plugin, where the plugin is used in any way.
You must not remove the copyright/backlink code!
However, if you like to support us, you are allowed to remove the footer note with a small donation (10$ minimum).
If you choose to do so, we'll contact you via the email provided by paypal with instructions on how to remove the footer note.
A link to paypal donation service can be found on the top right area of this post.

Feel free to contact an author of the mod if you have any questions or suggestions.

Download Now

File Type: zip vb4-product-plwatermark_1_0.zip (216.1 KB, 222 views)
File Type: zip vb4-product-plwatermark_1_1.zip (216.4 KB, 1221 views)

Screenshots

File Type: jpg plwatermark_2.jpg (105.4 KB, 0 views)
File Type: jpg plwatermark_3.jpg (120.2 KB, 0 views)
File Type: jpg plwatermark_admin12.jpg (108.0 KB, 0 views)
File Type: jpg plwatermark_admin11.jpg (68.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
6 благодарности(ей) от:
Ethelbert, furnival, Mopar1973Man, Ramzesik, Teascu Dorin

Comments
  #32  
Old 05-22-2011, 01:53 PM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BaanFarsang View Post
Problems on VB4 which installed of vB Optimise, all cache flushed too.
Hi

Can you elaborate how the problem shows itself?

Do you see no watermark, do the attachment images appear or not?

Does the admincp settings page show any warnings or errors?

Do you see the sample image with watermark on it? It should appear in the admincp plugin's settings at the bottom of the page.
Quote:
Originally Posted by Stefan118 View Post
haven't tried it, but maybe you have to set your cache directory to 777 (writable)
I did that at forehand, and it works on my vB 4.1.3
Right, the cache directory must be writable (CHMOD 777), however the admincp displays a warning if the cache dir is not writable
Quote:
Originally Posted by BadgerDog View Post
Hi ...

Ok, the output is an SQL error. For security and privacy, I have replaced our site name with xxxx's.



The SQL error doesn't appear when I run the "Preview" or try to view the same attachment with the mod's code, just run I run your special testattachments.php program.

By the way, I have re-installed the mod twice just in case something went wrong with the original install.

Does this help?

Regards,
Doug
Yes, apparently the settings table for the plugin doesn't exist. This is odd, maybe there was a problem with the install process? did you see any warnings displayed while installing the addon?
I'll make it more verbose in regards of errors in the next version.

Please check manually if the table exists in your database. I assume that your mysql user hasn't enough permissions to create a table. So you have to create the table manually.

To do so, go to your mysql administrative system (like phpmyadmin) and run these sqls, but only run them if and ONLY if the table doesn't exist yet:
Code:
CREATE TABLE `{TABLE_PREFIX}plwmsettings` (
`varname` VARCHAR( 100 ) NOT NULL ,
`value` MEDIUMTEXT NULL ,
`defaultvalue` MEDIUMTEXT NULL
) ENGINE = MYISAM
Code:
ALTER TABLE `{TABLE_PREFIX}plwmsettings` ADD PRIMARY KEY ( `varname` )
Code:
INSERT INTO `{TABLE_PREFIX}plwmsettings` (
`varname` ,
`value` ,
`defaultvalue`
)
VALUES (
'plwm_cache_basedir', NULL , NULL
), (
'plwm_cache_lifetime', '604800', '604800'
), (
'plwm_watermark_method', 'text', 'text'
), (
'plwm_watermark_path', 'path/to/watermark.png', 'path/to/watermark.png'
), (
'plwm_watermark_text', 'Don''t steal plz!', 'Don''t steal plz!'
), (
'plwm_watermark_font', '3', '3'
), (
'plwm_watermark_ttf', 'path/to/customfont.ttf', 'path/to/customfont.ttf'
), (
'plwm_watermark_size', '10', '10'
), (
'plwm_watermark_color', '#ABE7F4', '#ABE7F4'
), (
'plwm_watermark_shadecolor', '#000000', '#000000'
), (
'plwm_watermark_alpha', '45', '45'
), (
'plwm_watermark_attid', '0', '0'
), (
'plwm_watermark_posinfo', '3,10,10', '3,10,10'
), (
'plwm_lru_max_entries', '50', '50'
), (
'plwm_watermark_quality', '80', '80'
), (
'plwm_watermark_minpicsize', '200', '200'
);
(replace {TABLE_PREFIX} with your according vb table prefix)
Reply With Quote
  #33  
Old 05-22-2011, 03:56 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Disasterpiece View Post
Yes, apparently the settings table for the plugin doesn't exist. This is odd, maybe there was a problem with the install process? did you see any warnings displayed while installing the addon?
I'll make it more verbose in regards of errors in the next version.

Please check manually if the table exists in your database. I assume that your mysql user hasn't enough permissions to create a table. So you have to create the table manually.
Sorry, you're way past my skillset ..

I did uninstall and re-install, but still have the same problem.

I don't know why I wouldn't have permissions to add a table, as I've added dozens of mods that have tables to the sql databse and never had a problem.

Regards,
Doug
Reply With Quote
  #34  
Old 05-22-2011, 09:12 PM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have access to a database administration tool by your hoster for example?
If not, I'd suggest to ask them for assistance.

It's important to find out why the script doesn't find the table. If it doesn't exist, it's easy to create it with these mentioned sql queries.
Reply With Quote
  #35  
Old 05-22-2011, 10:58 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Disasterpiece View Post
Do you have access to a database administration tool by your hoster for example?
If not, I'd suggest to ask them for assistance.

It's important to find out why the script doesn't find the table. If it doesn't exist, it's easy to create it with these mentioned sql queries.
I have phpmyadmin installed and I can see both our live and development databases in it, but fear of wiping out our site keeps me from using it.

Regards,
Doug

Edit: I viewed the devforum database in phpmyadmin and I see this list in the attached pic. I don't see any table starting with "plw", so can I assume it doesn't exist?
Attached Images
File Type: png Screen shot 2011-05-23 at 6.39.03 AM.png (215.1 KB, 0 views)
Reply With Quote
  #36  
Old 05-23-2011, 02:49 PM
demo7up demo7up is offline
 
Join Date: Apr 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This does not work at all for me i have verified directories, i do see my watermark images in the settings but thats all .... nothing gets watermarked

my attachment images just display the spinning loading symbol?
Attached Images
File Type: jpg screenshot.jpg (38.6 KB, 0 views)
Reply With Quote
  #37  
Old 05-23-2011, 06:32 PM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BadgerDog View Post
I have phpmyadmin installed and I can see both our live and development databases in it, but fear of wiping out our site keeps me from using it.

Regards,
Doug

Edit: I viewed the devforum database in phpmyadmin and I see this list in the attached pic. I don't see any table starting with "plw", so can I assume it doesn't exist?
Hm, seems like it really doesn't exist.
Might be an issue with the fact that you don't use any table prefix, but I'm not sure.

However, execute the 3 queries I posted above, removing the {TABLE_PREFIX} part completely and tell me if it helped. (Make backups before running those queries), you can do that in the phpmyadmin via tab "SQL" or in the vb admincp, given that your userid is defined in the according config.php entry allowing to run sql queries.

Quote:
Originally Posted by demo7up@gmail.c View Post
This does not work at all for me i have verified directories, i do see my watermark images in the settings but thats all .... nothing gets watermarked

my attachment images just display the spinning loading symbol?
Do you use any other mods which hook into any kind of attachment or album functions?

Please upload the testattachments.php file into your vbulletin root file, navigate to the file via browser, add a ?i1=13 to the url that it looks like:
Code:
http://myforumurl.com/forum/testattachments.php?i1=13
Where 13 is the id from any image attachment which is big enough for the watermark to get applied.
You can see the id of any attachment image by opening the file (rightclick -> Show image) and reading the id from the url.

If all runs smoothly, the script should answer with:
Quote:
Watermark system finished
Script end.
If any errors occur, you should get them displayed.

This is the only way to display php warnings/errors, because the standard attachment system has them disabled completely.
Attached Files
File Type: php testattachments.php (5.8 KB, 17 views)
Reply With Quote
  #38  
Old 05-24-2011, 11:34 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Disasterpiece View Post
H
However, execute the 3 queries I posted above, removing the {TABLE_PREFIX} part completely and tell me if it helped. (Make backups before running those queries), you can do that in the phpmyadmin via tab "SQL" or in the vb admincp, given that your userid is defined in the according config.php entry allowing to run sql queries.
You mean wherever the phrase {TABLE_PREFIX} appears in your sql commands, remove it?

Regards,
Doug
Reply With Quote
  #39  
Old 05-24-2011, 11:49 AM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes.

Normally you'd replace it with your table prefix, like "vb4_" for example so the correct table name gets created, but since you don't use table prefixes for your vbulletin tables, just the table name would be the correct name convention.

.
Reply With Quote
  #40  
Old 05-24-2011, 12:11 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Disasterpiece View Post
yes.

Normally you'd replace it with your table prefix, like "vb4_" for example so the correct table name gets created, but since you don't use table prefixes for your vbulletin tables, just the table name would be the correct name convention.

.
Ok, crossed my fingers and executed the three sql command sequences above, removing the {TABLE_PREFIX} thing

I now have a table in the database and nothing seemed to blow up. (see pic)

However, when I run preview or look at attachments, no watermark shows. In preview, I still don't see demo pic.

Regards,
Doug
Attached Images
File Type: png Screen shot 2011-05-24 at 9.09.06 AM.png (115.2 KB, 0 views)
File Type: png Screen shot 2011-05-24 at 9.14.20 AM.png (210.2 KB, 0 views)
Reply With Quote
  #41  
Old 05-24-2011, 01:28 PM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks good to me.

I updated the test script yesterday so it should be more verbose now. Download it from her: https://vborg.vbsupport.ru/showpost....1&postcount=36
Put it into your root dir and navigate to the script, adding ?i1=*number* to the url where *number* is the id from an image where the watermark should appear.
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 06:04 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.05445 seconds
  • Memory Usage 2,394KB
  • Queries Executed 28 (?)
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
  • (6)bbcode_code
  • (10)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
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (5)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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