View Full Version : Attached Image Watermark
Ntfu2
04-11-2006, 10:00 PM
This plugin will watermark attached images on your forums. works on 3.5.3 for sure, probably works on others as well.
Simply upload new Plugin, Then Edit the Three Following lines, then Activate plugin.
Edit this line to match your watermark file:
$WATERMARK_PNG_FILE = '/home/ntfu2/public_html/watermark.png';
Edit this line for bottom or centered
$WATERMARK_POSITION = 'bottom_left';
You can test with your userid only first, Edit this line
$VB_USER_ID = 0;
ATTACHMENTS MUST BE IN FILESYSTEM
does not support .gif since it will stop any animated gif from playing. watermarks, .jpg and .jpeg You can probably add code to watermark others.
If you use it click install, i'll try to give support, but only to those who install
Edit: UkJimbo made this modification for me, i paid for it, so therefore i am releasing it to the public
Enjoy!
Hemanth
04-12-2006, 04:17 PM
Great Plugin. Thanks.
Daniel
04-12-2006, 04:34 PM
Nice one. :)
steadicamop
04-12-2006, 04:37 PM
woohoo first install, thanks, been waiting for this from 3.0.0.
The Chief
04-12-2006, 05:13 PM
screenshots??
akanevsky
04-12-2006, 05:22 PM
Does this work with files stored in the filesystem?
dan35
04-12-2006, 06:20 PM
Thank you! Clicked installed!
Barakat
04-12-2006, 06:49 PM
installed >
Ntfu2
04-12-2006, 07:41 PM
Does this work with files stored in the filesystem?
yes, thats where mine are stored.
Screenshot
Its just a watermark? Really cant take a screen shot of it(that and all i have is adult attachments atm :D)
The Chief
04-12-2006, 08:01 PM
yes, thats where mine are stored.
Its just a watermark? Really cant take a screen shot of it(that and all i have is adult attachments atm :D)
I don't even know what's a watermark that's why... :(
ConqSoft
04-12-2006, 08:57 PM
Thanks. Any chance you'll be releasing an add-on to watermark all existing attachments too? ;)
ConqSoft
04-12-2006, 09:02 PM
Nevermind. Didn't notice it was an on-the-fly watermark. ;)
ConqSoft
04-12-2006, 09:09 PM
Hmm. Interesting. Do you see anything strange with this JPG? It doesn't get watermarked on my site. Is it a Progressive JPEG perhaps? Hmm.
I've ran across a few others also. The others are really strange, since they're all the same size, and all came off the same camera phone. 3 of them watermark fine, the other 2 don't.
ConqSoft
04-12-2006, 09:20 PM
Any way to add an option for the minimum size image to process?
If someone attaches a small image (smaller than the thumbnail size, for example), it still tries to add the watermark. (See Attached)
PabloAM
04-12-2006, 09:24 PM
NOT RUN IN MY WEB.
http://www.xboxers360.net/showthread.php?p=4551#post4551
WHY??? :(
Deska
04-12-2006, 09:52 PM
Very nice hack Ntfu2 :)
* Deska click install ;)
Btw, I second request with ConqSoft's post above.
apfparadise
04-12-2006, 11:34 PM
A couple of questions
1. Is it possible to make it so that a certain usergroup (premium members) dont have a watermark on their images attached?
2. I am also looking for the same exact thing for the Photopost VBGallery (formerly VBAdvanced Gallery), where it does it but NOT for a certain usergroup. THat one I had put out a paid request for and was not able to get it done.
Hey
I have tried and tried and tried and cannot seem to get this to work. I upload the plugin, change the address, and NOTHING. no change on my images, no watermark, not even an error. Nothing.
I have tried reuploading multiple times, and I have tried making my watermark a 8 bit, 24, and 32 bit PNG.
What bit should it be?
The forum is www.finishingtalk.com, help me out. I will click install once I get it working.
Thanx in advance,
-Griffe
Snake
04-13-2006, 01:39 PM
Sweet, I've been waiting for this! :)
Ntfu2
04-13-2006, 02:14 PM
Hmm. Interesting. Do you see anything strange with this JPG? It doesn't get watermarked on my site. Is it a Progressive JPEG perhaps? Hmm.
I've ran across a few others also. The others are really strange, since they're all the same size, and all came off the same camera phone. 3 of them watermark fine, the other 2 don't.
That is strange, and i'm not real sure of the problem
any way to set a minium site
I'm sure there is, but my coding skills are extremly lacking to say the least, but i will try to figure something out.
Ntfu2
04-13-2006, 02:17 PM
Hey
I have tried and tried and tried and cannot seem to get this to work. I upload the plugin, change the address, and NOTHING. no change on my images, no watermark, not even an error. Nothing.
I have tried reuploading multiple times, and I have tried making my watermark a 8 bit, 24, and 32 bit PNG.
What bit should it be?
The forum is www.finishingtalk.com, help me out. I will click install once I get it working.
Thanx in advance,
-Griffe
these are obvisous answers, But make sure your watermark is uploaded to the correct directory,
are you using /home/xxxx/watermark.png type file path, or http://www.site.com/watermark.png type? Try both, that may help.
Let me know how that works
Ntfu2
04-13-2006, 02:19 PM
A couple of questions
1. Is it possible to make it so that a certain usergroup (premium members) dont have a watermark on their images attached?
2. I am also looking for the same exact thing for the Photopost VBGallery (formerly VBAdvanced Gallery), where it does it but NOT for a certain usergroup. THat one I had put out a paid request for and was not able to get it done.
1. I couldnt figure out how to do it, but i'm sure a more experience coder with more vBulletin history can probably modify this to do it.
2. I have 0 experience with Photopost VBGallery or its former self, so i'm no help there either
Ntfu2
04-13-2006, 02:21 PM
NOT RUN IN MY WEB.
http://www.xboxers360.net/showthread.php?p=4551#post4551
WHY??? :(
not sure, if you could set me up with Admin privlages over just the plugin manager i can take a look for you
PabloAM
04-13-2006, 04:05 PM
not sure, if you could set me up with Admin privlages over just the plugin manager i can take a look for you
I have vbulletin 3.5.2, plugin accelerator, template comprees, template cache system, and I updated han refresh...
More information??
sorry but privilegis not
these are obvisous answers, But make sure your watermark is uploaded to the correct directory,
are you using /home/xxxx/watermark.png type file path, or http://www.site.com/watermark.png type? Try both, that may help.
Let me know how that works
I have tried both, even though in the code it says not to use http://
What bit should the PNG's be? Could someone please send me their watermark png (that is working) to zurv{at}zurv.com
If I do get it working, will all thumbnails and attached images be updated? Or only ones uploaded from that point on?
-Griffe
ConqSoft
04-13-2006, 04:25 PM
It's done on-the-fly; no images are modified. So, it will work for all images, past and present.
UK Jimbo
04-13-2006, 06:39 PM
Hi Dave - when I wrote this code I thought it was just for your forum. I wasn't expecting you to release it publically.
Seems a bit odd if you can't support it too.
kofoid
04-13-2006, 07:44 PM
this kicks butt!!!! I wonder if there is any way to get it to show a watermark across https://vborg.vbsupport.ru/ images - if so, sign me up!
XanTrax
04-14-2006, 02:49 AM
What exactly is a watermark? Is it like a tag from your site that gets put on every image?
ConqSoft
04-14-2006, 02:50 AM
Yes.
Hi Dave - when I wrote this code I thought it was just for your forum. I wasn't expecting you to release it publically.
Seems a bit odd if you can't support it too.
lol, so you wrote it for him, but he posted it as his hack? No wonder it says "ill try and support it"
utw-Mephisto
04-14-2006, 05:41 AM
Hi Dave - when I wrote this code I thought it was just for your forum. I wasn't expecting you to release it publically.
Seems a bit odd if you can't support it too.
Busted ! LOL :bunny:
lol and hes asking for donations!
Neo198x
04-14-2006, 11:15 AM
not work :((
it's my watermark image: http://www.loveyahu.org/forum/watermark.png
My code
// the path to the PNG file that you want to overlay with
// must be on the local machine, not an http:// URL
$WATERMARK_PNG_FILE = '/home2/loveyahu/public_html/forum/watermark.png';
// how you want to position the watermark enter either center or bottom_left
$WATERMARK_POSITION = 'bottom_left';
// user you want to see watermarking on - this is just for testing
// set to 0 to work for all users
$VB_USER_ID = 807;
// end variables - you shouldn't need to edit below here
Ahsin1
04-14-2006, 03:10 PM
where do we have to edit lines
bada_bing
04-15-2006, 02:45 AM
pretty cool will reserve for an install
Ntfu2
04-15-2006, 03:09 AM
Yea UkJim coded it, but i paid for the modification and was under the impression that since i paid for the code essentially i could release it, and whats wrong with asking for a donation to recoup some of the cost?
not work :((
it's my watermark image: http://www.loveyahu.org/forum/watermark.png
My code
// the path to the PNG file that you want to overlay with
// must be on the local machine, not an http:// URL
$WATERMARK_PNG_FILE = '/home2/loveyahu/public_html/forum/watermark.png';
// how you want to position the watermark enter either center or bottom_left
$WATERMARK_POSITION = 'bottom_left';
// user you want to see watermarking on - this is just for testing
// set to 0 to work for all users
$VB_USER_ID = 807;
// end variables - you shouldn't need to edit below here
Make sure thats your user id
lol nothing wrong with it.. I just think its funny. If you paid for it you can do anything you want :)
btw I am having the same problem as Neo198x. And I know thats my correct username.
beezo
04-15-2006, 08:19 AM
I have 3.5.4 and it is not working for me. Anyone on this version have it working? If so, what type of PNG do you have (i.e. PNG 8, PNG 32, GIF, JPG) and did you have to do something else besides edit those 3 lines.
Ntfu2
04-15-2006, 04:11 PM
Forgot to Add Make sure you have GD2+ in the vBulletin options.
I'll add a watermark file i know works later today when i get a chance for people to test.
If anyone wishes to have me take a look at it if it doesnt work, simply add a admin account with privlages over the plugin system for a couple of minutes.
Dr.Viggy
04-17-2006, 12:53 AM
so i can't get this thing to work on mine either. i have a folder called watermark with watermark.png in it. it's right off the root of my forums folder so i set the code for /forums/watermark/watermark.png as well as trying it with /watermark/watermark.png and i get nothin both ways. any ideas?
Everyone who does not have this hack working.... WHat version of VB are you using? I have a feeling that this hack does not work with 3.5.4
-Griffe
Dr.Viggy
04-17-2006, 02:13 AM
Everyone who does not have this hack working.... WHat version of VB are you using? I have a feeling that this hack does not work with 3.5.4
-Griffe
i think you're right. i'm on 3.5.4
GrendelKhan{TSU
04-17-2006, 12:33 PM
Yea UkJim coded it, but i paid for the modification and was under the impression that since i paid for the code essentially i could release it, and whats wrong with asking for a donation to recoup some of the cost?
What's wrong with it is that you made it seem like you wrote the code. Owning RIGHTS to code (for release and "recouping" revenue) and writing the original code yourself are very different. In least, you should have a least credited him for it. Ideally, you asked him about him thoughts on you reselling it before doing so. Nothing can really stop you if you don't (er... didn't), but that seems like standard business ethics.
or maybe that's just me. :surprised:
Ntfu2
04-17-2006, 01:50 PM
so i can't get this thing to work on mine either. i have a folder called watermark with watermark.png in it. it's right off the root of my forums folder so i set the code for /forums/watermark/watermark.png as well as trying it with /watermark/watermark.png and i get nothin both ways. any ideas?
You'll need something like /home/drviggy/public_html/forums/watermark/watermark.png
Ntfu2
04-17-2006, 01:58 PM
Everyone who does not have this hack working.... WHat version of VB are you using? I have a feeling that this hack does not work with 3.5.4
-Griffe
Here is a board running it with 3.5.4, just fine. Make sure you are creating the watermark.png file and placing it where it needs to be
http://www.FightRice.com
Here is a watermark test all should be able to view:
http://www.fightrice.com/forums/attachment.php?attachmentid=666&d=1145285752
Thread:
http://www.fightrice.com/forums/showthread.php?p=154000#post154000
Dr.Viggy
04-17-2006, 02:28 PM
You'll need something like /home/drviggy/public_html/forums/watermark/watermark.png
the first directory i can see off of root is forums so /forums/watermark/watermark.png is as high to the root as i can go. any suggestions?
Ntfu2
04-17-2006, 04:29 PM
I'll PM you on your site :D
grains
04-17-2006, 05:22 PM
Here is a board running it with 3.5.4, just fine. Make sure you are creating the watermark.png file and placing it where it needs to be
http://www.FightRice.com
Here is a watermark test all should be able to view:
http://www.fightrice.com/forums/attachment.php?attachmentid=666&d=1145285752
Thread:
http://www.fightrice.com/forums/showthread.php?p=154000#post154000
WTH am i doin wrong...*sigh*
Dr.Viggy
04-17-2006, 05:41 PM
yeah i even enabled phpinfo and went to "http://www.drviggy.com/forums/?do=phpinfo" to get the environment value of DOCUMENT_ROOT which gave me the exact path to where my file is and still no dice. i'm completely confused as to why this won't work now.
bashy
04-17-2006, 05:57 PM
Dont work for me :(
This is the path i have $WATERMARK_PNG_FILE = '/home/bashy/public_html/watermark.png';
Any ideas?
Ntfu2
04-17-2006, 06:03 PM
I dunno, its hard to tell what anyone is doing wrong? Are you activating the plugin? Are you uploading it to correct directory?
Like i said, i'd be more then happy to help anyone with their issues, if you just give me plugin access for a moment or two, to look at what you have
bashy
04-17-2006, 06:11 PM
Will Pm you admin deets m8 let you take a gander....
Ps.(good luck in there, If i dont see you in 20 minutes i will send in some backup pmsl)
bashy
04-17-2006, 06:34 PM
Jist tried your watermark m8 and still no go for launch :(
Dr.Viggy
04-17-2006, 08:56 PM
it all works now. thanks for the tremendous help dave.
fyi - for the rest of you, my issue was that i still had my attachments stored in the database instead of file system and that will NOT work. plus moving them to the file system will keep the db smaller and subsequently faster.
bashy
04-17-2006, 09:00 PM
Hi m8 mine already are stored in the FS so that rules that out for me :(
grains
04-17-2006, 09:06 PM
it all works now. thanks for the tremendous help dave.
fyi - for the rest of you, my issue was that i still had my attachments stored in the database instead of file system and that will NOT work. plus moving them to the file system will keep the db smaller and subsequently faster.
Hmm...where can we change that? *under which option name?*
kartik786
04-17-2006, 09:07 PM
neway this can watermark .doc , and .pdf files as well ?
Ntfu2
04-17-2006, 09:25 PM
.doc are generally text files, so a watermark would be useless
Ntfu2
04-17-2006, 09:46 PM
Hmm...where can we change that? *under which option name?*
Create a folder on your FTP, chmod to 777
Go into AdminCP -> Attachments -> Storage and should be in there.
grains
04-17-2006, 09:52 PM
WELP...that fixed MY issue. CHEERS!
XFSImperial
04-18-2006, 02:26 AM
Thanks for the mod, works fine
*installs*
dbembibre
04-18-2006, 05:36 PM
Thanks man work ok in my site
beebi
04-20-2006, 09:35 PM
beebi clicked install
leeman
04-23-2006, 03:56 PM
Installed ... Works great ...
Now if a better coder them me could tell us how to get it to mark -bmp's too it would be great :D
plateau
04-25-2006, 01:53 AM
one question:
how about the uploaded image is smaller than the watermark image size?
kurtbarker
04-25-2006, 12:01 PM
Hey guyz, i'm using the 'Files Upload Center'
I allow all the image file-types. Is it possible to implement this with the files upload system. So that any images uploaded that way also gets the watermark?
mike12345
04-25-2006, 01:05 PM
thanks!!
plateau
04-26-2006, 01:45 AM
seems no support for this work anyanyanymore...............
Ntfu2
04-26-2006, 01:48 AM
seems no support for this work anyanyanymore...............
No one has asked for support about this hack recently, and to my knowledge everyone that did now as it working.
If you can not get yours working, i'd be more then happy to help, or post any problems you are having here.
kurtbarker
04-26-2006, 05:04 AM
Hey guyz, i'm using the 'Files Upload Center'
I allow all the image file-types. Is it possible to implement this with the files upload system. So that any images uploaded that way also gets the watermark?
Ntfu2 > is that possible?
Ntfu2
04-26-2006, 03:44 PM
can you give me a link to the file upload center?
plateau
04-27-2006, 02:55 AM
No one has asked for support about this hack recently, and to my knowledge everyone that did now as it working.
If you can not get yours working, i'd be more then happy to help, or post any problems you are having here.
hi mate thanks for ur reply, i just got one simple question: how about the uploaded image is smaller than the watermark image size?
cheers!
j1time
04-27-2006, 04:45 AM
Nice Thanks.
kurtbarker
04-27-2006, 05:13 AM
hey mate, here's a link to the hack on vB.org:
https://vborg.vbsupport.ru/showthread.php?t=113583
i'll PM you a username and password so you can test it on my forum if you wish.
the link to the Files Upload Center on my forum is: http://www.commodorelife.com/forums/uploader.php
upload a file or 2, click the link again, and you can click the thumbnails below the browse button to view the uploaded files...
what i'm after, is the watermark to appear on the FULL uploaded pic, not the thumbnail...
let me know mate, thanks
Kurt
cannabis-world
04-29-2006, 02:29 PM
I tried it on 2 forums on different servers, one worked the other didn't
the one that didn't work showed the text file path to the attachment instead of the image, it's running php5, the server that did work is running php4
Ntfu2
04-29-2006, 03:50 PM
i used it on php5 just fine.
make sure you edited the path correctly
cannabis-world
04-29-2006, 04:22 PM
yes I did, also tried the http://site.com/watermark.png in the path and that just ignored the watermark altogether
Ntfu2
04-30-2006, 12:09 AM
is the watermark where you pointed it to? ie in the correct directory?
or do you have any other mods installed on the board?
defcon_420
04-30-2006, 03:53 AM
"Clicks Install"
love the plugin but i really think Ntfu2 should go back and edit the first post and update the install information about where the attachments storage option is.. i had to read thru alot of this thread and it could have been much easier if it was in the first post.
SupremeWeapon
04-30-2006, 01:15 PM
didnt work for me.
clicked install in hopes that this can be rectified. why it didnt work is beyond me.
cannabis-world
04-30-2006, 01:17 PM
is the watermark where you pointed it to? ie in the correct directory?
yes
or do you have any other mods installed on the board?
I have a couple of plugins, for now I think I'll just uninstall it and wait to see what vb4 has to offer
moonclamp
04-30-2006, 03:44 PM
Works fine for me ... (bottom_left appears on the bottom right though)
Is there anyway to only add a watermark if the image is over a certain size?
If someone attaches a small image then the watermark may obscure it altogether.
Ntfu2
05-01-2006, 04:02 AM
"Clicks Install"
love the plugin but i really think Ntfu2 should go back and edit the first post and update the install information about where the attachments storage option is.. i had to read thru alot of this thread and it could have been much easier if it was in the first post.
I thought it already said that
kurtbarker
05-01-2006, 09:31 PM
hey mate, here's a link to the hack on vB.org:
https://vborg.vbsupport.ru/showthread.php?t=113583
i'll PM you a username and password so you can test it on my forum if you wish.
the link to the Files Upload Center on my forum is: http://www.commodorelife.com/forums/uploader.php
upload a file or 2, click the link again, and you can click the thumbnails below the browse button to view the uploaded files...
what i'm after, is the watermark to appear on the FULL uploaded pic, not the thumbnail...
let me know mate, thanks
Kurt
Hey mate, did you get a chance to look into this?
haytham
05-02-2006, 10:09 AM
it all works now. thanks for the tremendous help dave.
fyi - for the rest of you, my issue was that i still had my attachments stored in the database instead of file system and that will NOT work. plus moving them to the file system will keep the db smaller and subsequently faster.
and how can we do that?
UK Jimbo
05-02-2006, 10:16 AM
and how can we do that?
I'd have thought that the vBulletin docs (http://www.vbulletin.com/docs/html/) would be a good starting point ;)
Look under Attachments then Storage. Who'd have ever guessed? :D
haytham
05-02-2006, 10:41 AM
Got it ... it's working ok now..By the way the idea to remove the attachements did a lot for the speed of my forum..but when now I want to do a backup of the forum, the attachements won't be included..right?
Clicked install..and thanks go out to the coder and the person who paid for it :)
UK Jimbo
05-02-2006, 10:53 AM
when now I want to do a backup of the forum, the attachements won't be included..right?
that's right - you'd need to backup all of the files in your attachments directory by FTP, SCP, SFTP or rsync.
haytham
05-02-2006, 10:56 AM
Ok but the path to the attachments will always be there if like I upgrade or change hosts right?
UK Jimbo
05-02-2006, 11:01 AM
Ok but the path to the attachments will always be there if like I upgrade or change hosts right?
If you upgrade or change ISPs you may need to change the vBulletin configuration to point to the new attachment directory. Just post a separate help thread up on here if you get stuck at such a time, probably not 100% appropriate to this thread.
haytham
05-02-2006, 11:03 AM
yeah you are right...thanks a lot
plateau
05-09-2006, 08:48 AM
any clues for adding code to support the other image file type? thanks!
haytham
05-11-2006, 06:43 PM
why would you need another file type?Just convert any image to png. I use ACDsee.
HuangA
05-11-2006, 07:48 PM
Does it detect image sized and shrink watermark as needed? What would happen if the image is smaller or very close to the size of your watermark?
Ntfu2
05-12-2006, 11:45 PM
then watermark would cover it up
Garfiled
05-16-2006, 04:21 PM
works ok, installed, thanks!!
grains
05-16-2006, 05:34 PM
Is there a way to make the watermark clearer and not so.....distorted?
Beller
05-16-2006, 07:43 PM
I'm getting this error
XML Error: xml declaration not at start of external entity at Line 1
I'm sure it's something stupid..
Ntfu2
05-16-2006, 09:19 PM
Is there a way to make the watermark clearer and not so.....distorted?
make a better watermark?
Ntfu2
05-16-2006, 09:19 PM
I'm getting this error
XML Error: xml declaration not at start of external entity at Line 1
I'm sure it's something stupid..
Not sure, maybe try uploading the plugin again?
Beller
05-16-2006, 09:32 PM
Thats the thing it wont upload....The message shows as soon as it starts to upload.
Ntfu2
05-16-2006, 09:56 PM
Do you have any other plugins mod installed that effect the plugin system?
UK Jimbo
05-16-2006, 10:18 PM
Thats the thing it wont upload....The message shows as soon as it starts to upload.
Download the XML file to your computer again then try installing it again. The file is corrupt.
Gooses
05-17-2006, 04:29 AM
Beautiful. :D! Thanks for your work.
ryancooper
05-21-2006, 07:46 PM
Nice. Just wanted to point out that in firefox it does not work for me. In IE is works good.
Ntfu2
05-22-2006, 12:30 AM
Its not a browser related hack though. Should work in every browser
UK Jimbo
05-22-2006, 07:56 AM
It's unlikely but the image could get rendered in different ways on different browsers. It's more likely to be something different like an old version of the image has been cached on the user's system.
hypnoticpimp
05-31-2006, 01:32 AM
Hey, I tried this hack, but nothing happens. still the same http://www.worldstarhiphop.com/forums/attachment.php?attachmentid=1684&d=1149042135
Ntfu2
05-31-2006, 02:40 PM
Make sure you made your watermark.png uploaded it to the server, and then set the correct path and variables in the plugin
hypnoticpimp
05-31-2006, 04:33 PM
yes it here, check it
// begin variables
// the path to the PNG file that you want to overlay with
// must be on the local machine, not an http:// URL
$WATERMARK_PNG_FILE = '/home/wshh/public_html/watermark.png';
// how you want to position the watermark enter either center or bottom_left
$WATERMARK_POSITION = 'bottom_left';
// user you want to see watermarking on - this is just for testing
// set to 0 to work for all users
$VB_USER_ID = 0;
// end variables - you shouldn't need to edit below here
// if there's no filepath to work with there's nothing we can do
// we also need the watermark file to exist
// if $VB_USER_ID is specified (for testing) show it just them
if(! empty($attachpath) && file_exists($WATERMARK_PNG_FILE) && ( $VB_USER_ID == 0 || $GLOBALS['vbulletin']->userinfo['userid'] == $VB_USER_ID )) {
// derive output name
$fo = preg_replace('/\.attach$/', '.marked', $attachpath);
// image doesn't exist or thumbnail is newer than the cached file - create a watermarked version
if( (! file_exists($fo) || filemtime($WATERMARK_PNG_FILE) > filemtime($fo) || true) && $fo != $attachpath ) {
// decide what image type it is
if( preg_match('/\.png$/i', $attachmentinfo['filename']) ) {
$im = @imagecreatefrompng($attachpath);
} elseif( preg_match('/\.jpg$/i', $attachmentinfo['filename']) ) {
$im = @imagecreatefromjpeg($attachpath);
// create an empty truecolor container
$tempimage = @imagecreatetruecolor(@imagesx($im), @imagesy($im));
// copy the 8-bit gif into the truecolor image
@imagecopy($tempimage, $im,
0, 0, 0, 0,
@imagesx($im), @imagesy($im)
);
// copy the source_id int
$im = $tempimage;
}
// open the watermark image
$wm = @imagecreatefrompng($WATERMARK_PNG_FILE);
@imagealphablending($wm, false);
@imagesavealpha($wm, true);
// catch opening problems
if($im && $wm) {
if($WATERMARK_POSITION == 'center') {
$pos_x = (imagesx($im) / 2) - (imagesx($wm) / 2);
$pos_y = (imagesy($im) / 2) - (imagesy($wm) / 2);
} else {
$pos_x = imagesx($im) - imagesx($wm) - 10;
$pos_y = imagesy($im) - imagesy($wm) - 10;
}
// merge the files together
$copy_worked = @imagecopy($im,$wm,
$pos_x, $pos_y,
0, 0, imagesx($wm), imagesy($wm)
);
}
// write out the new image
if($copy_worked) {
// decide what image type it is
if( preg_match('/\.png$/i', $attachmentinfo['filename']) ) {
@imagepng($im,$fo);
} elseif( preg_match('/\.jpg$/i', $attachmentinfo['filename']) ) {
@imagejpeg($im,$fo);
} elseif( preg_match('/\.gif$/i', $attachmentinfo['filename']) ) {
@imagegif($im,$fo);
}
}
}
// check that the new file is there - if so open the file pointer to it
if( @filesize($fo) > 0 && $fp2 = fopen($fo,'rb') ) {
// re-send image size header
header('Content-Length: '. filesize($fo));
@fclose($fp);
$fp = $fp2;
}
}
so please tell me now why nothing happens?
Ntfu2
06-01-2006, 11:02 PM
link to your site please
Do you have GD2+ installed on server?
chipdien
07-23-2006, 01:28 PM
i use vbb 3.5.3. And nothing happens like hypnoticpimp
http://diendan.svvn-dresden.org/showthread.php?p=28304#post28304
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Ntfu2
07-23-2006, 08:26 PM
Try uploading a fresh image,
make sure your attachments are in the filesystem and not the database.
if viewing old attachments press CTRL+F5 to maybe try to recache it
shadyninja
07-24-2006, 02:53 AM
what does this need to be changed to....
to be able to move them to the file system
We attempted to write a test file to /path/to/your/attachment/directory, but we were unsuccessful. Please verify that the web server has write/delete permissions for this path.
?
Ntfu2
07-24-2006, 03:43 AM
You'll need to chmod the directory to 0777 that you set in the adminCP, you can do it either FTP usually with a right click -> permissions or via SSH command
chmod -R 0777 /path/to/your/attachment/directory/
shadyninja
07-24-2006, 03:47 AM
You'll need to chmod the directory to 0777 that you set in the adminCP, you can do it either FTP usually with a right click -> permissions or via SSH command
chmod -R 0777 /path/to/your/attachment/directory/
Im kind of a noob when it comes to this stuff , want to explain this to me as if I were 5 years old.
Ntfu2
07-24-2006, 03:56 AM
Im kind of a noob when it comes to this stuff , want to explain this to me as if I were 5 years old.
*I'll assume a 5 year old got far enough to import the plugin*
1. Login to your site using your FTP program (the way you uploaded your vbulletin files)
2. Create a new directory outside of the public_html (or www) folder called 'attachments'
3. Right click on that new folder you just created and look for a way to change its permissions, enter 0777 for its new permissions
4. Go to your site
5. Find the AdminCP link
6. Login using your administrator details.
7. On the left hand side look for ATtachments
8. Hit the Blue arrow to make a drop down, and reveals Attachment Storage Type
9. either move them from the Database into the filesystem, Hit the go button
10. set the folder to your attachment folder you created in step 2, should look something like /home/site/attachments
That should move your attachments from database into the file system
shadyninja
07-24-2006, 10:06 AM
ok thanks
I now feel 6 years old!
shadyninja
07-24-2006, 03:24 PM
hmmm
"Right click on that new folder you just created and look for a way to change its permissions, enter 0777 for its new permissions"
I thought I knew what you were talking about, but when I got to the folder, there wasnt a way to change permissions
Ntfu2
07-24-2006, 07:46 PM
What FTP program are you using.
It may be under properties, permissions, options, but its usually accessed with a right click on the folder. Just finding the correct term for it based on your FTP program will be the only difference.
Don.Hanks
08-06-2006, 04:52 PM
VBB version was upgraded to 3.6.0, and I found this plugin doesn't work now. NTFU2, could tell me if it works under 3.6.0?
Eagle Creek
08-08-2006, 01:31 AM
How do I have to make the watermark file (.PNG)?
Msozer
08-08-2006, 10:34 PM
I`m waiting this plugin for 3.6.0 version.. Thanks !
Ntfu2
08-09-2006, 12:40 AM
Its working for me just fine under vB 3.6
http://www.theautoforums.com/forums/site-annoucements-testing-forum-suggestions/attachment-test-2116.html
login if asked test/test
Msozer
08-09-2006, 09:39 AM
I installed it yesterday but i have a bug like when i click thumb, it loads %60 of picture. Picture`s bottom cant load. How can i fix it ?
Msozer
08-09-2006, 12:04 PM
And when i click thumbnail, i see blank page. When i refresh the page, picture loads but not completely
Here`s the sample :
Ntfu2
08-09-2006, 02:02 PM
May i have a link to your forums, and what version of GD do you have installed.
Msozer
08-09-2006, 04:37 PM
I don`t enable the attachments for users in my forum for now. Just admin`s can use this function right now.
Here`s my GD detail in php info :
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Ntfu2
08-09-2006, 08:10 PM
hmm, make sure attachmetns are being stored in the file system.
Msozer
08-09-2006, 08:35 PM
They are stored in the file system :(
Ntfu2
08-10-2006, 12:48 AM
hmm, i'm not real sure.
If it does it for all attachments then its clearly a problem with this modification and i wouldnt be real sure why,
Maybe try uploading a few new attachments and see what happens then :-\
cbr929rrerion
08-10-2006, 04:46 PM
I cant get it to work either...
cbr929rrerion
08-10-2006, 04:52 PM
nevermind, it works, just not on small images
mhoooodi
08-10-2006, 07:36 PM
Thanks
davis31b
08-13-2006, 11:34 PM
I can not for the life of me move items from database into file system !
It reads:
We attempted to write a test file to /" ", but we were unsuccessful. Please verify that the web server has write/delete permissions for this path.
I have tried every possible combination to the path but no luck can anyone please provide help? Thanks. VB 3.6.0
UK Jimbo
08-14-2006, 07:56 AM
I can not for the life of me move items from database into file system !
It reads:
We attempted to write a test file to /" ", but we were unsuccessful. Please verify that the web server has write/delete permissions for this path.
I have tried every possible combination to the path but no luck can anyone please provide help? Thanks. VB 3.6.0
Have you been following instructions/help from the vBulletin documentation? http://www.vbulletin.com/docs/html/
davis31b
08-14-2006, 04:57 PM
Have you been following instructions/help from the vBulletin documentation? http://www.vbulletin.com/docs/html/
I looked at: http://www.vbulletin.com/docs/html/attachment_storage_db_to_fs1
As well as sent a support ticket to Dreamhost (no response yet) to see if its something on the servers end.
This watermark on images is like the last thing I need before I am going to let the site open. Thanks everyone.
Ntfu2
08-15-2006, 10:29 PM
Dreamhost support....good luck. Anyway try to follow along
Connect to your site via FTP
Create new folder called attachments
Set the CHMOD value to 0777 usually done with a right click -> properties, or CHMOD command.
Login to AdminCP -> Attachments -> Attachment Storage Type
Select move to filesystem (should be only option)
Set the "Attachment File Path" to the folder you just create (/home/sitename.com/attachments)
Hit the Go button, and simply read the on screen instructions.
tips: try not to set your attachment path to simply "/" that wont work, make sure to create a folder, for them or you'll have a file system mess for sure :)
matt3830
08-16-2006, 12:30 AM
I have VB 3.6.0 with ImageMagick. Will this work? Anyone using it with a similar vb installation?
RZ500
08-16-2006, 12:44 AM
I have 3.6 and I can't make it work any help?
matt3830
08-16-2006, 12:46 AM
Are there any other watermarkers for VB 3.6.0?
Ntfu2
08-17-2006, 06:48 AM
No this will only work with GD2+
GD is almost standard on all hosting accounts.
RZ500
08-17-2006, 03:03 PM
No this will only work with GD2+
GD is almost standard on all hosting accounts.
The 3.6 only has GD, but not GD2+.
Ntfu2
08-17-2006, 03:53 PM
huh?
RZ500
08-17-2006, 04:09 PM
huh?
Sorry, I think I did not explain myself, in my admincp when I try to chose GD it only said GD, but no GD2+ is there a diference betwen or are the same?
Sorry my English is a little rusty, I'm from Mexico.
ferreo
08-17-2006, 04:59 PM
Works perfectly, many thanks. I've been looking for a solution like this for months.
ferreo
08-17-2006, 05:01 PM
Sorry, I think I did not explain myself, in my admincp when I try to chose GD it only said GD, but no GD2+ is there a diference betwen or are the same?
Sorry my English is a little rusty, I'm from Mexico.
Your host needs to compile PHP with the GD2+ library, currently it's not installed.
murrtex
08-17-2006, 08:50 PM
is it possible to apply this to img tags??
ztempuser
08-18-2006, 09:50 PM
3.6.0?
cjwinternet
08-21-2006, 11:05 AM
Works a treat, a small point though, the image appears in the bottom right, although the plugin specifies bottom_left ?
Calibre_k
08-24-2006, 09:38 PM
Does this work with vb 3.6?
Nope, not working on v3.6.0 :( :(
Ntfu2
08-29-2006, 06:01 AM
it works fine on 3.6
gilbert
08-30-2006, 10:21 PM
howd you get it to work on vb3.6? I get a php error when i try to view the uploaded attachements
gilbert
08-30-2006, 10:22 PM
Also what is the hook location? I tried attachment_display. Basically when i upload the image now and view it, it takes me to a url image? I am using vb3.6
Ntfu2
08-30-2006, 11:27 PM
shouldnt cause any php error.
you shouldnt have to set the hook location manually. All you have to do is upload the plugin, and change the few options
gilbert
08-31-2006, 01:40 AM
how do i upload the pluggin? My vb 3.6 only allows me to upload products. where do i go to upload a pluggin?
EasyTarget
08-31-2006, 02:53 PM
Admincp > Plugins & Products > Download / Upload Plugins > bottom of the page
RFViet
08-31-2006, 11:56 PM
ATTACHMENTS MUST BE IN FILESYSTEM => what do you mean ??
Bulent Tekcan
09-03-2006, 04:21 PM
ATTACHMENTS MUST BE IN FILESYSTEM => what do you mean ??
It must in Attachments directory...Not in Database..
Kanustep
09-06-2006, 11:03 PM
You have 3.5.2 version of vBulletin, this plug-in is for version 3.5.4, which might not work on previous versions.
cjwinternet
09-16-2006, 09:05 PM
working fine in 361, thanks
cjwinternet
09-17-2006, 10:15 AM
Actually, it's not fully loading the image in 361, can this be fixed?
Cheers
Chris
Actually, it's not fully loading the image in 361, can this be fixed?
Cheers
Chris
Same problem here but author is saying its working fine :tired:
Ntfu2
09-23-2006, 05:12 AM
Works good for me one one site using 3.6
My other site on 3.6 it does the same problem with only loading part of the image. Not sure whats causing it
Bulent Tekcan
09-23-2006, 08:02 PM
Works good for me one one site using 3.6
My other site on 3.6 it does the same problem with only loading part of the image. Not sure whats causing it
Same problem here,but not all images...only some images occured.
keithluneau
10-04-2006, 01:17 AM
Same here, after upgrading from 3.5.4 to 3.6.1, I had to turn this off to get attachments to load all the way. I really hope it's updated as I really miss the feature, and am unable to find an alternative!
cjwinternet
10-11-2006, 07:05 AM
Real shame this doesn't work in 361 - uninstalled.
ConqSoft
10-11-2006, 04:23 PM
Here's a modified version I came up with. Works fine for me in 3.6.2, and should work in 3.6.1 also.
Thanks ConqSoft, installing it :)
ConqSoft
10-11-2006, 05:32 PM
Make sure you clear your browser cache too, as I was still seeing leftover incomplete images from before I changed it.
ConqSoft
10-11-2006, 06:04 PM
Hmm. After doing more testing, it still breaks on some images, though most seem to work fine. Not sure....
Bulent Tekcan
10-12-2006, 07:08 AM
Yes,this problem occured only some images :(
Robru
10-26-2006, 08:53 AM
Works fine for me with 3.6.2
woodysfj40
11-02-2006, 11:48 AM
Here's a modified version I came up with. Works fine for me in 3.6.2, and should work in 3.6.1 also.
still partial-loads images on my 3.6.2 install....nuts....
cjwinternet
11-09-2006, 11:54 AM
Hey, I just found this...
The file should be a PNG-8 format file, not PNG-24. There's a bug in the current version of GD, which doesn't support PNG-24 correctly.
Maybe worth a go.
Question is, how do you convert between PNG-24 and PNG-8 ?
Ntfu2
11-11-2006, 05:21 AM
Just make a new one thats PNG-8 probably be easier.
Or open your PNG-24 and save it as a PNG-8. I know fireworks has this option, im not sure about photoshop
MoMan
11-19-2006, 03:31 AM
The watermarker trims even more of my pics on vb 3.6.3 now, so it really needs updating to work properly...:(
cjwinternet
11-20-2006, 02:05 PM
Just make a new one thats PNG-8 probably be easier.
Or open your PNG-24 and save it as a PNG-8. I know fireworks has this option, im not sure about photoshop
I can't see this option in Fireworks?
cjwinternet
11-20-2006, 02:07 PM
Sorry, the options appear when you save as 'flattened png'
cjwinternet
11-20-2006, 02:43 PM
It doesn't work. I think it's clear that this does not work with 363 or 362. which is a shame. There's people crying out for this and you could make a few $$$ if you upgraded it as a paid mod.
DrHUS
12-02-2006, 01:13 AM
you need GD to make it work ..
zmanz
12-06-2006, 06:08 PM
can anyone tell me how to turn my site logo image into a watermark logo image?
Use Adobe photoshop to make a png file with your logo ;)
zmanz
12-07-2006, 01:35 AM
Use Adobe photoshop to make a png file with your logo ;)
it just needs to be png? how do i get that "transparent" look to it?
BamaStangGuy
12-09-2006, 11:48 PM
It doesn't work. I think it's clear that this does not work with 363 or 362. which is a shame. There's people crying out for this and you could make a few $$$ if you upgraded it as a paid mod.
Yea I am one of those. Even when offered 250 dollars and the ability to release it to everyone else no one bites. It doesn't even have to be a plugin. I just want something that works :(
Bulent Tekcan
12-14-2006, 03:28 PM
Actually, it's not fully loading the image in 361, can this be fixed?
Cheers
Chris
I was test something today...
10K between 90K gif not correctly loaded (half view) but 91K and up working normal.Anyone test this ?
Thanks
yingzhou
12-14-2006, 10:08 PM
can it work with 3.6.4 fresh install?
Bulent Tekcan
12-26-2006, 08:22 PM
Any news for corrupt images ?
Qwest
01-16-2007, 05:18 PM
The author abandoned this a long time ago.
UK Jimbo
01-16-2007, 05:28 PM
If there's enough interest I'll rework this and re-release the code.
Bulent Tekcan
01-16-2007, 05:54 PM
If there's enough interest I'll rework this and re-release the code.
Of course it is very good for our forums,because nobody use our images anywhere.But this problem very boring realy.İf you release this code we'll be happy.
Thanks
dizzine
01-31-2007, 08:17 AM
very nice simple plugin..works great on 354..thanks..
RZ500
01-31-2007, 02:07 PM
Is there anything for 3.6? I can not make it work.
Red Spider
02-18-2007, 07:26 AM
Can someone port this to 3.6.4 plz :p
Sychev_S
02-22-2007, 06:07 PM
bump. could anyone port this for 3.6 please?
milsirhc
02-28-2007, 11:45 AM
hmm.. no one making this to work on 3.6.4?
ConqSoft
03-12-2007, 03:45 PM
I hired a programmer to do this hack for me. Everything is done and working well. I'll be posting it as a free, unsupported, modification soon.
RZ500
03-12-2007, 03:49 PM
I hired a programmer to do this hack for me. Everything is done and working well. I'll be posting it as a free, unsupported, modification soon.
Cool
ConqSoft
03-12-2007, 07:44 PM
Posted: https://vborg.vbsupport.ru/showthread.php?t=141883
TrannyD?LL?
05-17-2007, 08:54 AM
Sick little mod.
I also got to learn about 777 a file and moving attachments from database.
Weeeeeeeeee!
This is my first forum and I'm RTFMing just fine.
It's working on 3.6.5
http://trannydxll.com/vb/attachment.php?attachmentid=172&d=1179370451
Took forever but *bows anyway*.
If any of you are still having problems the error is definately between the keyboard and the chair. Just keep clicking til it works.
geevest.com
06-07-2007, 08:26 AM
why i cant see my watermark image in my attachment forum? what happen?
UK Jimbo
06-07-2007, 08:28 AM
why i cant see my watermark image in my attachment forum? what happen?
What's an attachment forum?
geevest.com
06-07-2007, 08:33 AM
sorry in attachment picture...my watermark not show.
UK Jimbo
06-07-2007, 08:37 AM
You'll have to give more information if you want anyone to be able to help.
What the config section shows, a copy of your watermark and details of how your attachments are stored (database/filesystem).
Have you thread through the rest of this thread in case there are any helpful posts there?
geevest.com
06-07-2007, 08:43 AM
watermark.png file located : public_html/watermark.png
geevest.com
07-11-2007, 03:25 AM
anyone can hepl?
geevest.com
07-11-2007, 03:47 AM
its not work on 3.67 PL1 ?
fishhub
08-26-2007, 04:52 PM
what is the difference for attachments in data storage and attachements in file system?
does file system slow down the uploading of web page? TIA. Need some advice.:o
ConqSoft
08-26-2007, 04:53 PM
You should only store attachments in the database if your site is running on a server that is in Safe Mode and doesn't allow you to store attachments in the file system. File system is always the better choice.
This hack doesn't work in all cases though. Here's one that works: https://vborg.vbsupport.ru/showthread.php?t=141883
fishhub
08-27-2007, 04:50 PM
You should only store attachments in the database if your site is running on a server that is in Safe Mode and doesn't allow you to store attachments in the file system. File system is always the better choice.
This hack doesn't work in all cases though. Here's one that works: https://vborg.vbsupport.ru/showthread.php?t=141883
thanks for the advice. I'm using 3.5.x. will your link work on mine? TIA
Mrdby
09-20-2007, 12:59 PM
this work with pics uploaded with photoplog and 3.6.8?
Acrobat
01-10-2008, 11:13 PM
I had this mod installed on 3.6.8 and it caused problems.
logicuk
06-08-2008, 06:57 AM
Can someone update this for vb3.7 please
RZ500
06-09-2008, 02:59 PM
I install it in 3.6.8 and now I´m in 3.7.1 and is working fine
logicuk
06-12-2008, 11:01 AM
can anyone else confirm this is working on vb 3.7 i dont want to mess my forum up
geevest.com
06-24-2008, 10:26 AM
yeah i need for vb.3.7.1 version too.
because im always get some issue about this.
PERFORMANCE
09-14-2008, 07:16 PM
can we use it with vb 3.7.2 ??
ugr|dual
09-17-2008, 09:40 AM
installed at 3.73pl1 - works.
does not place the watermark good when images are too small though.
merkaz
05-05-2009, 08:45 PM
You are a HERO .
amaarvell
08-12-2009, 07:19 AM
how about 3.8.3 ??
z0diac
08-30-2009, 01:38 PM
KIND OF working on 3.8.4 (http://www.ontariostorms.com)
Sometimes it works ok, but on some images the watermark is half off the bottom of the screen.
Now I just have to test my image "views" counter. The last watermark product I used turned off all my images "times viewed"
Times Viewed on images is working properly. Working on 3.8.4. Thank you.
GokhanT
12-03-2009, 03:48 PM
Thank you :)
installed at 3.8.2 - works :up:
HondaATC
12-28-2009, 04:39 PM
Any chance we could get this on 4.0?
HondaATC
01-02-2010, 09:40 PM
Just managed to get this working on 4.0. Not sure exactly what I did, but its going :D
Edit: Wow, this is weird. Does anyone know how the image caching works? Somehow, when I enable this for 4.0, Its doing a mixture of watermarking with my new image, and also the old watermark image from back when I was on 3.6.5, even though its been deleted? Funky stuff.
sticky
01-27-2010, 02:21 AM
Tried this on 4.0... can't seem to get it to work :(
sticky
01-27-2010, 05:40 AM
Got it to work! HURRAY! :)
talonguy
02-01-2010, 04:35 AM
how are you guys getting this to work?
sticky
02-01-2010, 05:33 AM
how are you guys getting this to work?
Just install it like it says....
HondaATC
03-04-2010, 09:03 PM
I ended up having to turn it off on mine. I don't know what the exact conflict was, but there were about 25 images, in different articles on my site that as soon as this was turned on, it killed and they would not display until I uninstalled the plugin and ran the thumbnail rebuilder. Everything else seemed to work fine, though.
I've made a request for this @ .com in the projects section to be a native part of VB. Feel free to reply to it: http://www.vbulletin.com/forum/project.php?issueid=36738
dearinfinity
04-17-2010, 03:43 PM
can anyone get this running on 4.0.2? please enlighten thanks
dearinfinity
04-19-2010, 02:59 AM
anyone?
dearinfinity
05-28-2010, 05:45 AM
I am willing to pay $100 to have someone code this and update it to work with 4.0.x. please pm me here, thank you.
dearinfinity
06-15-2010, 07:54 AM
still no one? wow, this place is really dead
nicutdk
08-16-2010, 09:29 AM
Hi,
Can you make to work in VB4 CMS PLEASE
Best Regards,
ehsanix
12-04-2010, 07:53 PM
just vb 4.0.x
Blade-uk
12-13-2010, 08:20 AM
Working here on the latest vb 4.1.0 PL2
Just wondering how i would get it to ONLY show on images that are 400px wide or above.
Really need this feature please people.
Thanks,
Andy
malmazan
12-14-2010, 04:38 PM
Vote on vB.com to make watermarking a standard feature:
http://tracker.vbulletin.com/browse/VBIV-5646
not working for me, on 4.1.0 PL2
just try in manage products, but it show error : This file appears to be a Plugin, not a Product. Please use the Plugin Manager to add this file.
anyone can help how to add in plugin manager? how to browse the xml file?
rughis
01-06-2011, 08:08 AM
not working for me, on 4.1.0 PL2
just try in manage products, but it show error : This file appears to be a Plugin, not a Product. Please use the Plugin Manager to add this file.
anyone can help how to add in plugin manager? how to browse the xml file?
I have the same problem with 4.0.8 version :(
Edit: I have successfully installed the plug-in on my 4.0.8 board, it seems to work, but it introduces some critical side effects on viewing attachments.
So.... don't waste your time and don't try to use it.
futurist
05-11-2011, 03:46 PM
Such a shame for a paid product with tons of errors and not enough features.
Watermarking MUST be a standart feature.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.