vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=182884

PB Watermark Album images
by RLShare
18 Jun 2008 21:08

3 Attachment(s)
There is a new version of this modification available Here that has been confirmed to work in version 3.7.x

------------------------------------------------------------------------------------

This mod is in beta, it was inspired by this thread yesterday.
http://www.vbulletin.org/forum/showthread.php?t=178296

I'm hoping that posting this beta version in here will help me gather useful feedback on what kind of features might be useful in such a hack.

What does it do:
-Adds a watermark to the bottom right of all images uploaded to users albums.

Planned changes:
1. Allow the url of the watermark image to be changed via admincp
2. Allow location of where the watermark image is placed to be changed via admincp

Installation Instructions:
1. Create or Use the watermark.png I attached, and upload it to your forum root before anything.

2. Edit the file forum_root/includes/functions_album.php and add these functions. I added them right below the Vbulletin Copyright notice.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

3. Import the plug-in attached

Fırtına 18 Jun 2008 21:14

Thanks :)

xxalexkimxx 18 Jun 2008 21:28

Yay thank u so much for this hack.
I will install it now

xxalexkimxx 18 Jun 2008 21:36

Where do i go to set:
1. Allow the url of the watermark image to be changed via admincp
2. Allow location of where the watermark image is placed to be changed via admincp

RLShare 18 Jun 2008 21:41

Quote:

Originally Posted by xxalexkimxx (Post 1552933)
Where do i go to set:
1. Allow the url of the watermark image to be changed via admincp
2. Allow location of where the watermark image is placed to be changed via admincp

I haven't implemented that yet, Thats why its listed under planned changes. I will be implementing it soon. I put that up there so people know the changes that I already plan to make and so they do not suggest changes that are in the works.


Right now you will have to create a 'watermark.png' and upload it to the forum root directory. And it will always show up on the bottom right.

xxalexkimxx 18 Jun 2008 21:43

oh ok let me do that now
thanks

xxalexkimxx 18 Jun 2008 21:50

i got this message came up when upload image
Quote:

This PNG image has the incorrect file extension.

Fırtına 18 Jun 2008 21:59

Quote:

Originally Posted by xxalexkimxx (Post 1552943)
i got this message came up when upload image

+1 And me...

*********


Is location in forum_root/includes/functions_album.php ?

http://img337.imageshack.us/img337/3...nctionssf6.png

7lanet 18 Jun 2008 23:00

Quote:

2. Edit the file forum_root/includes/functions_album.php and add this function. I added it right below the Vbulletin Copyright notice.
where exactly add

7lanet 18 Jun 2008 23:13

I Upload img type gif , JPEG

It show msg
Quote:

This PNG image has the incorrect file extension.

RLShare 18 Jun 2008 23:44

Ive updated the original post to reflect the changes that should fix your problems, thank you for letting me know. You will need to add one more function to the file and re-upload the new plug-in I just attached.



Quote:

Originally Posted by Fırtına (Post 1552945)
Is location in forum_root/includes/functions_album.php ?

http://img337.imageshack.us/img337/3...nctionssf6.png

^^Thats exactly it, let me know if the update still does not fix it.

7lanet 18 Jun 2008 23:59

Fatal error: Call to undefined function imagesavetofile() in /home/joker/public_html/vb/album.php(794) : eval()'d code on line 9

RLShare 19 Jun 2008 00:07

Did you add the function 'imagesavetofile' I posted below the other function to the functions_album.php file?

I just noticed that its easy to look over, the section of my post that contains the code to be pasted to the other file now has 2 functions in it so you will need to delete what you pasted into the file before and copy whats up there now into its place.

bxbigt 19 Jun 2008 03:02

can we get this for all images uploaded to the site

Zeb Zoober 19 Jun 2008 03:38

Quote:

Originally Posted by bxbigt (Post 1553182)
can we get this for all images uploaded to the site

+1

Would love to see this work for attachment pictures too.

GaiLoan 19 Jun 2008 03:41

this nice, i belive everyone waiting for this :) thanks

RvG2 19 Jun 2008 04:00

holy cow... I've been waiting for this long time ago.

RvG2 19 Jun 2008 04:11

how to create my own watermark .png?

RLShare 19 Jun 2008 04:22

Quote:

Originally Posted by RvG2 (Post 1553222)
how to create my own watermark .png?

Gimp is a powerful free image editing program.
http://gimp.org/downloads/

TimberFloorAu 19 Jun 2008 06:03

Tried. Doesnt Work.

Perhaps, rather than use this as a beta area for developing a mod, you should get everything working ok, get it tested, do some instructions.
Looks promising. :)

lazytown 19 Jun 2008 06:11

Looking forward to this when it's completed. It would be nice if it could watermark existing album images.

-vissa

waza 19 Jun 2008 08:36

It's nice, but have a look at class_image.php and class_upload.php in the includes folder. You could probably integrate it better into the vbulletin system with modifying these classes.

RLShare 19 Jun 2008 12:58

Quote:

Originally Posted by TimberFloorAu (Post 1553267)
Tried. Doesnt Work.

Perhaps, rather than use this as a beta area for developing a mod, you should get everything working ok, get it tested, do some instructions.
Looks promising. :)

'Tried doesn't work' DOESN'T help me. A more detailed explanation of what happened would. I doubt you even tried with a reply like that. And what exactly do you think it means to be a Beta? That means I want it tested. Maybe you should learn a thing about the terminology of this before you start telling me what to do.

RLShare 19 Jun 2008 13:02

Quote:

Originally Posted by waza (Post 1553354)
It's nice, but have a look at class_image.php and class_upload.php in the includes folder. You could probably integrate it better into the vbulletin system with modifying these classes.

Will do, thanks for the direction.

ShiZoPhreN 19 Jun 2008 15:06

Thanks RLShare

*clicks installed*

Tboy_forum 19 Jun 2008 20:54

+1 for all images uploaded please

Clicks 'installed'

Mr.samy 19 Jun 2008 22:01

thanks dear ,

but can i add text on picture without photos ( .png ) such that doamin .

balance12 19 Jun 2008 23:36

If i want that the watermark.. be placed from side to side from the picture... like a large bar.... i have to midifed something++

ALSALAFE 19 Jun 2008 23:49

Thanks :up:

balance12 20 Jun 2008 14:07

Done everythinh....
Place watermark png on forumrrot
Edite funciton_album
Import Plugin

Parse error: syntax error, unexpected T_STRING in /home/reinodra/public_html/includes/functions_album.php on line 17

balance12 20 Jun 2008 14:19

Work Greattttttttt

balance12 21 Jun 2008 00:31

It only adss me the watermark, in the first picture of the uploaded pohoton in an album.. imean.. in the album you can upload 3 simultaneous pictures.. and only the first one gets tthe watermak...

Jdm Ej1 Coupe 21 Jun 2008 01:25

interesting will wait to see if it gets better before installing

RLShare 21 Jun 2008 01:41

Quote:

Originally Posted by balance12 (Post 1555003)
It only adss me the watermark, in the first picture of the uploaded pohoton in an album.. imean.. in the album you can upload 3 simultaneous pictures.. and only the first one gets tthe watermak...

lol. See a simple thing like this and I overlooked it. Thats why I posted it, thanks for pointing it out. Will fix later tonite or tommorow.

Catmag 22 Jun 2008 02:58

Works well. Haven't tried to upload multiple images yet.

Any way to increase the size of the watermark?

RLShare 22 Jun 2008 13:25

Updated so that it now works when uploading multiple images....Delete the old plugin and import the new one.


Quote:

Originally Posted by Catmag (Post 1555774)
Works well. Haven't tried to upload multiple images yet.

Any way to increase the size of the watermark?

You can use a larger watermark.png image. It places the watermark image in the bottom right corner based on the dimensions of the watermark.png so it will work with any size image.

Alfa1 22 Jun 2008 19:05

The problem with watermarks is that they normally are a fixed size. This means that a large pic will get a relatively tiny watermark and a small pic may get butchered by a watermark.

Please make the size of the watermark relative to the size of the picture.

RaMMz 22 Jun 2008 22:12

Thanks, it works perfect.

You should upload watermark.png to the forum root directory, edit that simple .php and it works fine & upload the plugin.

RaMMz @ BlackTouch NETWORK.-

TimberFloorAu 22 Jun 2008 22:26

Is this backwards compatible.

In essence, does it watermark all existing uploaded images, or only new ones?

RaMMz 22 Jun 2008 22:34

Quote:

Originally Posted by TimberFloorAu (Post 1556345)
Is this backwards compatible.

In essence, does it watermark all existing uploaded images, or only new ones?

Only new ones.

Mr.samy 22 Jun 2008 23:50

After i install it .... and try to upload animated photo ... i see the plugins put the watermark on it but the photo become not animated and stop from work

balance12 23 Jun 2008 22:29

I upgrade it, and work grate with massive uploads, but it shows me different Size of watermark.. you upload an albun it shows you great, the other shows it shorter.. then good.....

One good one smaller....

What could it be?

xxalexkimxx 23 Jun 2008 23:04

Quote:

Originally Posted by 7lanet (Post 1553015)
I Upload img type gif , JPEG

It show msg

change the all image type to LOWER CASE

RLShare 23 Jun 2008 23:41

Quote:

Originally Posted by Mr.samy (Post 1556381)
After i install it .... and try to upload animated photo ... i see the plugins put the watermark on it but the photo become not animated and stop from work

Im working with the GD imaging library for PHP and it does not support animated GIFS. I might look into adding support for animated GIFs myself in the future but that will not be until after I work on getting the other features I want done.


Quote:

Originally Posted by balance12 (Post 1557220)
I upgrade it, and work grate with massive uploads, but it shows me different Size of watermark.. you upload an albun it shows you great, the other shows it shorter.. then good.....

One good one smaller....

What could it be?

The only reason I could think of is that Your uploading images that are larger then the max size, VB will automatically resize images that are larger then the Max size and my code applies watermarks to the images that get uploaded before VB processes them. So Im guessing that my code is adding the watermark, then VB is shrinking the image after making it look like the watermark is of a different size.

7lanet 25 Jun 2008 07:03

in 3.7.2

Fatal error: Out of memory (allocated 22806528) (tried to allocate 8192 bytes) in /home/joker/public_html/vb/includes/functions_album.php on line 40

ErnieTheMilk 25 Jun 2008 08:24

I keep getting some error messages on upload :(

Warning: imagecreatefrompng(watermark.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in [path]/album.php(795) : eval()'d code on line 1

Fatal error: Call to undefined function: imagecreatefromfile() in ....... on line 6

I've uploaded everything as suggested...... Its a great mod, hope it can get sorted as I'd love to use it!

RLShare 25 Jun 2008 15:25

Quote:

Originally Posted by ErnieTheMilk (Post 1558356)
I keep getting some error messages on upload :(

Warning: imagecreatefrompng(watermark.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in [path]/album.php(795) : eval()'d code on line 1

Fatal error: Call to undefined function: imagecreatefromfile() in ....... on line 6

I've uploaded everything as suggested...... Its a great mod, hope it can get sorted as I'd love to use it!

You either messed up putting the functions in the functions_album.php file or you did not put the functions in that file.


Quote:

Originally Posted by 7lanet (Post 1558302)
in 3.7.2

Fatal error: Out of memory (allocated 22806528) (tried to allocate 8192 bytes) in /home/joker/public_html/vb/includes/functions_album.php on line 40

I have not upgraded to 3.7.2 yet, when I do I will look into this.

ErnieTheMilk 25 Jun 2008 15:34

Quote:

Originally Posted by RLShare (Post 1558643)
You either messed up putting the functions in the functions_album.php file or you did not put the functions in that file.

Thats a great help, thanks. I know I'm stupid, but I do know how to copy & paste into a file that you actually name!

The only problem I had was where to put it as you said right after the vBulletin copyright notice. Well, I found one, right at the top of the file - I assume that's where you meant it to go :confused: :rolleyes:

RLShare 26 Jun 2008 00:03

Quote:

Originally Posted by ErnieTheMilk (Post 1558654)
Thats a great help, thanks. I know I'm stupid, but I do know how to copy & paste into a file that you actually name!

The only problem I had was where to put it as you said right after the vBulletin copyright notice. Well, I found one, right at the top of the file - I assume that's where you meant it to go :confused: :rolleyes:

This is an image someone posted earlier in this thread.. It shows how the top of the file functions_album.php should look after you paste the functions in.

http://img337.imageshack.us/img337/3...nctionssf6.png

The top part is the copyright notice I mentioned pasting the code in after.

ErnieTheMilk 26 Jun 2008 06:49

That's where I originally posted it... and it didn't work

However, I have to say after perserverance, and popping it in different places, I managed to get it to work! The code did go further down the page tho!

Now if you could just sort out the watermark scale issue on differing sized photos :D

Megatr0n 26 Jun 2008 23:50

Can you please tell me how we can enable this main profile pictures?

Megatr0n 30 Jun 2008 14:42

Quote:

Originally Posted by ErnieTheMilk (Post 1559202)
That's where I originally posted it... and it didn't work

However, I have to say after perserverance, and popping it in different places, I managed to get it to work! The code did go further down the page tho!

Now if you could just sort out the watermark scale issue on differing sized photos :D

Yeah, I've been having that problem too.

goranbaxy 02 Jul 2008 13:38

works on last ver. of VB (3.7.2)

Megatr0n 02 Jul 2008 19:42

Still looking for a response...

Leo Brazil 04 Jul 2008 12:00

Installed after making my self a custom watermark.png

Does exactly was supposed too.

Keep the rocks rolling dude. :up:

Mr. Hoddz 04 Jul 2008 19:52

Can't see that it works dude. But if you could share the watermark.php file and give instructions on how to install it that would be good =]

Leo Brazil 04 Jul 2008 20:54

Mr. Hoddz

watermark is in fact a image, a png file and you can see a sample on the first post on screen shoots section.

To install this mod you will need to edit your functions_album.php that is on includes folder as described, up load this edited file to your ftp and after that install the plug in http://www.vbulletin.org/forum/attac...9&d=1214140995 that's in the first post.
Just a tip, this must me installed as a plug in not as a product.

I made my self a png file using photoshop, that in fact it's just my site name in a clear background. I used the same resulotion of the watermark sample here to see how it goes and it was good enough. This watermake.png must be up-loaded to your forum root.
That's just what I did, 5 minutes and work great.

Last thing. This will just work on your albums not in regular images or files you place in your forums. If you already has users with tons of pictures the watermark will be added just in photos up-load after you install this mod, there won't be any effect on old images.

DieselMinded 05 Jul 2008 03:09

i wonder if vBulletin is planing on implementing this ? i hate php edits come upgrade time , I would like all the images on my site to be water marked but only after they are downloaded

blogcrash 05 Jul 2008 03:47

Works like a charm.

Thanks. This is a great mod

zigojacko 05 Jul 2008 21:57

When will the below be implemented?

Planned changes:
1. Allow the url of the watermark image to be changed via admincp
2. Allow location of where the watermark image is placed to be changed via admincp

zigojacko 05 Jul 2008 21:58

I have followed all the steps accurately and a watermark is not being placed on my uploaded album images :(

7lanet 06 Jul 2008 19:14

Is it possible to print the watermark in center of the pic

zigojacko 08 Jul 2008 11:50

I have got this working now. Great mod. Many thanks. :)

Megatr0n 11 Jul 2008 20:10

Is this mod going to be updated or not?

Jase2 11 Jul 2008 20:19

Suggestion: Have an option for users when uploading to watermark the image. If not selected, no watermark image is used. :D

rolloffhill 13 Jul 2008 19:41

Quote:

Originally Posted by vissa (Post 1553271)
Looking forward to this when it's completed. It would be nice if it could watermark existing album images.

-vissa

Yes this would be a useful addition...

RLShare 22 Jul 2008 02:25

The hack is going to get a complete overhaul. As it stands its just a simple hack I threw together in an hour. After reading through alot of the suggestions I realize that it needs to be completely rewritten to achieve alot of the features that should exist is such a hack. As I am tied up with alot of work lately it might take me a week or two to release a new version with new features and administration options..

psylenced 22 Jul 2008 03:07

Having it create it on the fly i think is the best option. It means it works on existing albums, plus whenever you change the watermark in the admin all pictures are automatically updated.

RLShare 22 Jul 2008 03:38

^thats exactly what I'll be doing, hence it will be re-written completely

karlm 22 Jul 2008 04:00

Quote:

Originally Posted by RLShare (Post 1581077)
^thats exactly what I'll be doing, hence it will be re-written completely

Excellent. With the quotes in mind, I eagerly look forward to a rewritten release. Great job.

psylenced 22 Jul 2008 04:05

Fantastic :)

Megatr0n 23 Jul 2008 12:19

RLShare, would it be possible for the watermark to be REMOVED from a picture when the user is selecting it to be a backround picture? Many of my users don't like the watermarking showing on their profiles.

Plus, I also think a user should be given the option whether he/she wants to have their pictures watermarked because some do their own. However, still with a seperate option to watermark all pictures in one go?

rolloffhill 31 Jul 2008 23:39

I had to remove this plugin after upgrading to vb 3.7.2 pl1. It kept the images from loading to the server. Just an fyi..

flussmitteldj 01 Aug 2008 10:19

I need help!

Fatal error: Call to undefined function can_view_private_albums() in /www/htdocs/w009f45a/includes/class_profileblock.php on line 875

i need a Sample please !!

BatMs.com 02 Aug 2008 20:17

Hey RLShare nice mod... Installed exactly how you explained and works straight away... However I see you are re-making the mod... PLEASE oh please add the relative size watermark that has been suggested numerous times...

Suggestion For Re-Haul:
Allow of placing wm on images already created (done with the update counters...photopost have it....)

Is it possible to make the plugin somehow put the watermark on AFTER the image gets re-sized? As it is now it seems the WM gets placed befor the image gets re-sized...

Example of why (my watermark image is 150X30... on a 600X450 image that was originally taken off 5mp phone camera):
http://batms.com/forum-blog/picture....8&pictureid=44

RLShare 05 Aug 2008 23:32

As I said before I am rewriting this mod, It will watermark the images dynamically. So it will do it at the time the images are shown instead of when they are uploadedd. It should solve alot of problems, so if your having troubles with this version please be patient as I work out some bugs I have in the next version.


As far as the new version, just a word on its progress, I am having a little bit of trouble with one aspect of it. I have it working for images that are stored locally. But if the images are set to be stored in the database instead of locally on the server I am having some trouble. When I try to take the data from the blob it is only streaming in half of the data for the image and I cannot figure out why. As soon as I get this figured out I will release.

Also with this new version it will take alot of edits to one of VB's files because VB is sending the image data for album images directly to the users browser without anywhere to intercept the data before hand.

PGAmerica 08 Aug 2008 18:19

Works Perfectly. Thank you. However, it only works on pictures that are uploaded AFTER this is installed.

JohnnieOO 12 Aug 2008 19:30

Any update on this, very interested.

Johnnie

Leo Brazil 14 Aug 2008 20:27

I've been thinking in changing my album pictures storage from database (default on Vb) into the file system with direct access to thumbnails to save some queries at my board.

Question: Can I do that and still getting this working great ?

Nineaxis 18 Aug 2008 22:57

Looking forward to the new version. Great mod!

t.uzuner 22 Aug 2008 07:58

thanks friend installed

i156 23 Aug 2008 22:41

Good plugin, works perfectly.

Nineaxis 27 Aug 2008 00:33

Checking in for any updates. Thanks!

nightbloom 01 Sep 2008 06:13

Quote:

Originally Posted by flussmitteldj (Post 1589064)
I need help!

Fatal error: Call to undefined function can_view_private_albums() in /www/htdocs/w009f45a/includes/class_profileblock.php on line 875

i need a Sample please !!

Just download the functions_album.php again and put the code in. ^^ Your overwrote that file when you updated your forum to 3.7.3

laurens800 01 Sep 2008 11:51

Wow thanks works g000000000d,


only is it possible to make it for every images not only album?

i mean for every images that you upload to the site

Chris583 03 Sep 2008 01:56

I get the following error after install. VB Version 3.7.2


Fatal error: Call to undefined function imagecreatefromfile() in /home/......../public_html/album.php(808) : eval()'d code on line 6

xadoa 04 Sep 2008 03:01

hi,

how about profile picture? can it be done?

thanks

Barakat 05 Sep 2008 01:12

this version wont work on the 3.7.3 pl1 .....

laurens800 05 Sep 2008 17:19

it works only you got to reedit it because it deleted the file

nightbloom 05 Sep 2008 17:24

Unfortuantely, I had to uninstall this awsome hack. It's off the mark in such an important area. I love the hack but it puts the watermark on profile images. >=( No one wants the name of my site tiled on the BG of their profile and on my forum, a LOT of people use that feature. Please, PLEASE, PLEASE fix that so I can reup this hack!!!

Barakat 05 Sep 2008 17:52

its works again after i uninstall it and install it again ..........................


very happy for it thanks

Martell 06 Sep 2008 15:32

I get the following error after install. VB Version 3.7.3PL1

Fatal error: Call to undefined function: imagecreatefromfile() in /home/martell/xxxxxx/docs/album.php(811) : eval()'d code on line 6

Quote:

Excuse me. The Forum has updated, but file has not edited.:)

ivwe 14 Oct 2008 19:46

Noticed that if a image is, lets say, 2000*2000pixels then the watermark get rather tiny, you cant see the watermark. Is there an easy way to fix this issue?

lovechandigarh 08 Nov 2008 09:30

Great. Working and Tested for 3.8.0 Beta as well...

See it working here: Love Chandigarh

Megatr0n 08 Nov 2008 12:20

Is this hack ever going to be updated?

fun4all 10 Nov 2008 12:13

This hack not working when i have upload 2 or more images... waiting for updating...

joh 14 Nov 2008 18:07

just to let all know, it works just as describe on 3.8

joh 16 Nov 2008 17:06

I just uploaded 20 images all at once and they all got the watermark.

I have two questions that I hope someone can answer.

1: can this be made so it have one master watermark, but have it over ride per use album if they upload a logo at a set size?

2: Is there away to make the watermark X% of the image, this way if a small image is upload the watermark does not take it over?

ymy 22 Nov 2008 05:06

Thank a lot

INSTALLED

Nice its working with 3.7.3 and 3.7.4



ymy

.

daydie 22 Nov 2008 11:31

is it possible to re-build all images so they get water marked also?


All times are GMT. The time now is 11:06.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.