The Arcive of vBulletin Modifications Site. |
|
Watermark images (on upload) Details »»
|
|||||||||||||||||||||||||
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) *** Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
been waiting a few days but thx and great hack im gonna go test it now.
|
|
#3
|
|||
|
|||
|
my forum doesnt have function/ folder or the file www.hl2insider.net latest vb
|
|
#4
|
||||
|
||||
|
i belieave me meant to type includes folder instead of function folder
|
|
#5
|
|||
|
|||
|
okay, done it all, i dont see my logo in my attachments
|
|
#6
|
|||
|
|||
|
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);
}
}
|
|
#7
|
|||
|
|||
|
someone reply :9
|
|
#8
|
||||
|
||||
|
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
|
|
#9
|
|||
|
|||
|
yes, i uploaded 4 new images, didnt work, visit my forum and try for yourself =0
|
|
#10
|
|||
|
|||
|
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); |
![]() |
|
|