vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Watermark Attached Images (https://vborg.vbsupport.ru/showthread.php?t=53693)

filburt1 05-31-2003 10:00 PM

Watermark Attached Images
 
This hack adds a watermark to attached images. The watermark, as specified by your own .png image, is added on image download, not when the image is attached. Requires GD2. Do not even try installing if you don't have GD2.

filburt1 06-01-2003 05:59 PM

A watermarked image (image and watermark shrunk in Photoshop):

Dan 06-01-2003 06:05 PM

This could be useful to prevent people from using my site as a sig host....

Little child: How many licks does it take to get to the center of the install Button?

Old Owl: One, Two, *crunch*, Three.

Announcer: The world may never know......

/me licks the install button

DPoole 06-01-2003 06:06 PM

any image added to any website is downloaded using right click so how will this work then ??

`Save Image as`

filburt1 06-01-2003 06:07 PM

This processes the image sent to the browser in any situation. It'll always be there, and there isn't anything the user can do about it short of faking a file extension (AFAIK).

jdmuniverse 06-01-2003 06:17 PM

Thanks alot!!! I am going to install right now!! You're the best :D

007 06-01-2003 06:31 PM

Pretty cool. I'll try it out. :)

jdmuniverse 06-01-2003 06:31 PM

Hmmm... I cannot delete those 2 lines because they are not there... what should I do?

Here is my attachment.php I am using 229

FFArmageddon 06-01-2003 06:34 PM

very nice :)

*clicks install

Mike11212 06-01-2003 06:35 PM

question just to make sure I understand.
It doesn't add the watermark unless its downloaded?
or lets say if i have images enabled to view in threads would it show the watermark as well?

assassingod 06-01-2003 06:37 PM

jdmuniverse, I can see you code fine,
it's under:
PHP Code:

header("Last-Modified: " gmdate("D, d M Y H:i:s",$attachmentinfo[dateline]) . "GMT"); 

And please keep from posting vB files.

jdmuniverse 06-01-2003 06:40 PM

Oops, sorry bout that.... Is that the line I should delete?

Edit.. I see it now! Thanks!

assassingod 06-01-2003 06:42 PM

No, the code you are looking for is under that line i posted.

Boofo 06-01-2003 07:29 PM

Quote:

Today at 01:59 PM filburt1 said this in Post #2
A watermarked image (image and watermark shrunk in Photoshop):
filburt. I have to know...what kind of Widescreen TV is that? And how big is it?

filburt1 06-01-2003 07:30 PM

It's not my picture...

Xenon 06-01-2003 07:41 PM

nice hack turtle :)

LavaNoX 06-01-2003 07:58 PM

He's actually Nibbler from Futurama now ;)

Xenon 06-01-2003 08:15 PM

he'll always be our turtle :)

snyx 06-01-2003 08:16 PM

awesome. simply awesome.

Chris M 06-01-2003 08:33 PM

Nice nibbler, I mean filby;):p

Satan

007 06-01-2003 08:47 PM

Grrr... I have GD2 but still after installing this all my attatchments show up as little X's...

Could it be that my .png file wasn't the right type?

Magic Spark 06-01-2003 09:03 PM

Thanks for this one, Filburt!

Great! ;)

Velocd 06-01-2003 09:47 PM

Awesome job filb! This should help with preventing people from hotlinking attachments (not that I think they can anyway, since .htaccess things I've applied).

Mike11212 06-01-2003 11:46 PM

can anyone tell me if this shows the watermark on every image or only when the image is hotlinked

WEForums 06-02-2003 12:18 AM

To my understanding, everytime the image is downloaded (viewed), you will get a watermark picture.I think (but don't quote me) it works for hotlinking as well as yoursite.

Anyway, how do you know if GD2 is enabled? Is there an easy way to find out? (I don't really know all the server details, I don't own the site/forum or anything.) Hopefully it's located somewhere on the site...

007 06-02-2003 12:44 AM

I found out by simply emailing my host and confirming it that way...

Email=good :)

Anyway, speaking of that I am using 2.2.9 and the code in attatchment.php is very similar.. Is that the reason this doesn't work for me? Has anyone else tried this in 2.2.9? What should I do? This is one of the coolest ideas ever and I can't use it :(

jdmuniverse 06-02-2003 12:49 AM

I'm having a small problem with gif files... the watermark shows all screwy :) On jpg it works like a charm though... Any ideas?

Heres a gif to see what I mean...

thanks again...

Austin Dea 06-02-2003 01:16 AM

Nice seat ;)

jdmuniverse 06-02-2003 01:17 AM

Not bad eh? LOL

filburt1 06-02-2003 01:20 AM

GIF support in PHP is generally horrible. However, I have a solution (which I don't have time to implement but anyone with GD2 experience can):

1. Load the gif using imagecreatefromstring
2. Create a new image via imagecreatetruecolor of the same dimensions
3. Copy the entire gif onto the new image
4. Destroy the original gif

The problem is likely a palette issue.

Mike11212 06-02-2003 02:18 AM

Quote:

Today at 02:18 AM WEForums said this in Post #25
To my understanding, everytime the image is downloaded (viewed), you will get a watermark picture.I think (but don't quote me) it works for hotlinking as well as yoursite.

Anyway, how do you know if GD2 is enabled? Is there an easy way to find out? (I don't really know all the server details, I don't own the site/forum or anything.) Hopefully it's located somewhere on the site...


If thats the case I can't use this hack :(
a lot of people upload wallpapers to my site and the watermark would damage them.

matthepepe 06-02-2003 02:47 AM

has anyone got this working w/ 2.2.9, when i search for the stuff it says to find it cant find it. Ive found similar code but wheni replace those w/ the new it doenst work.

Erwin 06-02-2003 04:14 AM

Very cool hack. :)

007 06-02-2003 06:01 AM

Quote:

Yesterday at 10:47 PM matthepepe said this in Post #32
has anyone got this working w/ 2.2.9, when i search for the stuff it says to find it cant find it. Ive found similar code but wheni replace those w/ the new it doenst work.
I'm having this same problem dude. :( Anyone know?

sabret00the 06-02-2003 08:01 AM

this is a great hack filburt, thank you

Dean C 06-02-2003 01:59 PM

An awesome idea filburt! :)

- miSt

Mickie D 06-02-2003 02:03 PM

fantastic hack filbert and probably the easy'st hack i have ever installed

*Mickie clicks install

thanks again

007 06-02-2003 07:30 PM

Anyone have problems with this in 2.2.9??? I can't get it to work and I do have GD2....

matthepepe 06-02-2003 07:39 PM

everyone thats posted so far w/ 2.2.9 is having a problem, im just getting red x's for my images when i install.

jdmuniverse 06-02-2003 08:12 PM

I have 2.2.9 and it is working fine... I had the same problem finding the code... read the first page and they told me where the lines were.

Delete the 2 lines below this...

Quote:

header("Last-Modified: " . gmdate("D, d M Y H:i:s",$attachmentinfo[dateline]) . "GMT");
The only problem I am having is with the gif files.... which I described on page 2.


All times are GMT. The time now is 01:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04260 seconds
  • Memory Usage 1,783KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete