vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Watermark images (on upload) (https://vborg.vbsupport.ru/showthread.php?t=68438)

Robbban 08-16-2004 10:00 PM

Watermark images (on upload)
 
Here is an improved version of Watermark. Saves a lot of serverload on big sites like mine (since it's an adult site I won't paste the URL here. Send me an PM if you would like to know).

Currently only works if you have thumbnail creation enabled.

*** All that plan to install this modifcation are advised to read the posts in this thread prior to installation (vB.org Staff) ***

Johnny 08-17-2004 02:39 PM

been waiting a few days but thx and great hack im gonna go test it now.

kingady 08-17-2004 02:50 PM

my forum doesnt have function/ folder or the file www.hl2insider.net latest vb

Johnny 08-17-2004 02:53 PM

i belieave me meant to type includes folder instead of function folder

kingady 08-17-2004 03:02 PM

okay, done it all, i dont see my logo in my attachments

kingady 08-17-2004 03:04 PM

Code:

        else if (!empty($thumbnail['filedata']))
                                {
                                        // write out thumbnail now
                                        $filename = fetch_attachment_path($posterid, $attachmentid, true);
                                        $fp = fopen($filename, 'wb');
                                        fwrite($fp, $thumbnail['filedata']);
                                        fclose($fp);
                                        unset($thumbnail);
/* WATERMARK by Robbban*/
                                        $wmark = "http://www.hl2insider.net/forums/watermark.png";
                                         
                                        $im = imagecreatefromjpeg(fetch_attachment_path($posterid, $attachmentid));
                                        imagealphablending($im, true);

                                            $watermark = imagecreatefrompng($wmark);

                                        $y = imagesy($im) - imagesy($watermark);

                                        $w = imagesx($watermark);
                                        $h = imagesy($watermark);

                                        imagecopy($im, $watermark, 0, $y, 0, 0, $w, $h);
                                        imagejpeg($im, fetch_attachment_path($posterid, $attachmentid), 100);
                                }
                        }

correct?

kingady 08-17-2004 03:38 PM

someone reply :9

Johnny 08-17-2004 03:51 PM

the watermark will only appear if only u upload a new image.. have u done that. all other uploaded images already on the site wont have a watermark

kingady 08-17-2004 03:53 PM

yes, i uploaded 4 new images, didnt work, visit my forum and try for yourself =0

ranger2kxlt 08-17-2004 07:26 PM

How about for 3.0.0?

none of this is in my functions_file

// write out thumbnail now
$filename = fetch_attachment_path($posterid, $attachmentid, true);
$fp = fopen($filename, 'wb');
fwrite($fp, $thumbnail['filedata']);
fclose($fp);
unset($thumbnail);

Johnny 08-17-2004 07:30 PM

currently it only works for 3.0.3 so u will need to upgrade ur board for this hack to work.

kingady 08-17-2004 09:27 PM

doesnt work at all tbh, unless you can set it up for me?

Skyline_GT 08-18-2004 06:10 AM

I sue vb 3.0.3 but still doesn't work..

Robbban 08-18-2004 06:57 AM

Oh yeha, this hack only works if you have thumbnails enabled witch I hope you have :)

N8R 08-18-2004 07:40 AM

I am getting nothing, and I have done everything and have met all the requirements, I must be missing something, but I have no idea what?

kingady 08-18-2004 12:50 PM

okay enabled it, see no difference at ALL!

Johnny 08-18-2004 12:53 PM

Quote:

Originally Posted by Robbban
Oh yeha, this hack only works if you have thumbnails enabled witch I hope you have :)


is their a way around without using thumbnails?

Ming Keong 08-19-2004 01:38 AM

Doesn't work for me either. I'm on 3.0.3 and have thumbnails enabled.

HostBet 09-08-2004 11:49 PM

is not working here either .....

Johnny 09-09-2004 12:17 AM

pretty much sad, someone creates something but fails to give support eventhough it works for no one except the person that created it

pagekeeper 09-09-2004 02:49 AM

yeh i could of sworn i've seen this hack already, but it was really slow or something ?

Johnny 09-09-2004 02:52 AM

theirs another hack just the other attachment watermark hack will add watermark to all the attachments you have without uploading which causes the server to load the images slow.

https://vborg.vbsupport.ru/showthread.php?t=68112

that works fine just loading time of the images is horrible just too bad this new version dont work atall

pagekeeper 09-09-2004 02:54 AM

yeh, we should protest ... but hey it aint going to change anything so i'll shut up :D

Idodo 09-12-2004 06:10 AM

can you make a version that work for ppl that don't have thumbnails enabled?

Blam Forumz 09-12-2004 06:47 AM

vB 3.0.2 here and it doesnt work

Johnny 09-12-2004 12:43 PM

Quote:

Originally Posted by Blam Forumz
vB 3.0.2 here and it doesnt work

because the title says clearly that its for 3.0.3

Blam Forumz 09-12-2004 04:30 PM

Ah! I got it to work.

Fear me

Johnny 09-12-2004 05:03 PM

Quote:

Originally Posted by Blam Forumz
Ah! I got it to work.

Fear me

im afraid, how did u get it to work

Blam Forumz 09-12-2004 06:30 PM

I have no clue lol, it just started working o_Omaybe becuase i used the watermark (on the fly) hack

jcbn1981 10-01-2004 03:37 AM

has anyone really gotten this thing to work? If so please help.

AlexanderT 10-01-2004 07:34 AM

How is this a "major addition" anyway?

PAINTBALLM 10-21-2004 02:07 AM

blah.. the hack author fails to respond? lol

dude, your hack sucks. Both of them.

PAINTBALLM 10-21-2004 02:17 AM

actually, im sorry I take that back. I have your on-the-fly hack working great, and fast ;)

lange 11-09-2004 09:54 AM

Give it a try. Thx

Bandolero 11-20-2004 11:14 PM

PAINTBALL can you please tell us how did you get this hack to work.

I keep getting images cut-off OR extremelly slow depending on the compression level of imagejpg().

I'm new at PHP but it seems either something I need to do in the Graphics library or maybe the watermark.png needs to be of a different type.

OR

Maybe this code should not be here and be placed somewhere else, somehow else.

Thanks.

PAINTBALLM 11-21-2004 12:10 AM

Well, it cuts off on some images for me. I think a quick solution would be to add an inch or so below the content in the png file. That away at most it would be flush with the bottom of the image, if not then it would be a little higher than the bottom but no big deal.

Bandolero 11-21-2004 06:57 AM

Quote:

Originally Posted by PAINTBALLM
Well, it cuts off on some images for me.

Ok so you have not gotten it to work 100%. Would this ever work?

Do they remove or otherwise flag hacks that do NOT work?
So that we can get other people to help us try.

I did a search on "watermarks" and all they links send you to this thread. This thread should be flagged as "don't waste your time" or "under construction"

oh well...

Johnny 11-21-2004 01:41 PM

actually this code really works, i tested the code out by making the watermark hack act like a regular php script file (no vb involved) and then ran it with any jpg, or jpeg image i can find and it worked. but when it comes to intergrating with vb on why it doesnt work correclty i still cant figure that one out. but what im thinking their is one or two more codes missing in the coding for this hack to work in vb or the creator just isnt telling us something on how to get it to work correctly.

PennylessZ28 11-22-2004 03:02 PM

I got this message when I upload images now

Code:

Warning: Missing argument 2 for fetch_thumbnail_from_image() in /disk3/home2/web/beginner/fbody/includes/functions_image.php on line 87

PennylessZ28 11-22-2004 03:07 PM

Great, now when I upload anything it goes to a blank page. Sigh.


All times are GMT. The time now is 06:07 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.01309 seconds
  • Memory Usage 1,790KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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