vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Social Group and Album Enhancements - PB Watermark Album Images (https://vborg.vbsupport.ru/showthread.php?t=214798)

RLShare 05-28-2009 10:00 PM

PB Watermark Album Images
 
1 Attachment(s)
yeah, so I forgot that I updated this until I just came across it. So here she is updated and confirmed working on 3.7.x- 3.8.x

What does it do:
-Adds a watermark to all images uploaded to user albums and optionally profile pictures.

Features:
-Option to watermark album images
-Option to watermark profile pictures
-Can set whether to watermark thumbnails or just full size images.
-Can position watermark in 1 of 4 corners.
-watermark image gets resized when it is larger then the image to be watermarked
-Completely changed functionality so that it now adds the watermark at runtime and makes no more permanent changes to images.

Notes:
- If after you first install you do not notice a difference then clear your browser cache.
- It works with all 3 storage types for album images, but will not watermark thumbnails if you have the storage type set to 'Keep pictures in file system, but allow direct access to thumbnails'
- It only works for profile pictures that are stored in the database. I will attempt to see if I can create a workaround for this when I get a chance.
- If you want to watermark attachments there already exists 2 modifications that I have tested first hand and know work on the latest version of VB.
- This has been tested and confirmed working in VB 3.7.x as well.
- Again please clear your browser cache and test before you report problems to me.

Installation Instructions:
1. Create or Use the watermark.png I attached, and upload it to your forum root before anything. You will receive 'file does not exist' or no images will display(depending on the browser) if you do not first upload an image named 'watermark.png' to your forum root( The folder you have vbulletin installed in).
2. Import the 'product-pb_watermarkalbumimages.xml' file through the product manager.
3. Go to AdminCP->Vbulletin Options->Vbulletin Options->PB Watermark Settings and configure the settings.

Screenshots have been attached.

Megatr0n 05-29-2009 01:03 AM

Will you later on include an option that can watermark all profile pictures/album pictures in one go?

RLShare 05-29-2009 01:04 AM

This is done dynamically when the image is shown so it does watermark all profile pictures/album images now. The old version actually watermarked all of the images permanently at the point of them being uploaded, this one does not. It now does it dynamically when the image is being requested by the users browser.

smooth-c 05-29-2009 07:17 AM

Quote:

-Completely changed functionality so that it now adds the watermark at runtime and makes no more permanent changes to images.
I just enabled this mod, whenever I save an image that contains my watermark it saves the image with the watermark on top?

merkaz 05-29-2009 10:20 AM

JPEG only ?

TNCclubman 05-29-2009 11:41 AM

If someone hotlinks your image on another site, does your watermark still display there?

RLShare 05-29-2009 04:19 PM

Quote:

Originally Posted by smooth-c (Post 1819325)
I just enabled this mod, whenever I save an image that contains my watermark it saves the image with the watermark on top?

Um yeah, it is supposed to work in that manner. You are saving the image you see and the image you see has a watermark.

I think you are a little bit confused. When I say it makes no permanent changes that means it makes no permanent changes to the actual image files that are stored on your server or in your DB. Change the watermark image or turn the script off and notice the watermark will be changed or will no longer show up on the images.

Quote:

Originally Posted by TNCclubman (Post 1819445)
If someone hotlinks your image on another site, does your watermark still display there?

Yes

RLShare 05-29-2009 04:21 PM

Quote:

Originally Posted by merkaz (Post 1819411)
JPEG only ?

Is this you reporting a problem or is this a question? It should work for all images, with the exception of animated gifs.

smooth-c 05-29-2009 06:59 PM

Thanks RLShare for clearing that up :) great mod, clicked install and nominated! :)

Not sure if it's possible - would there be a way to link the watermark on the image?

For example -

User can click the watermark image (saying Click here for this site) and you can define the address within the options.

Sorry if i'm not making myself clear.

RLShare 05-29-2009 07:25 PM

I understand what you are asking but it would defeat the purpose of this mod. I could overlay a watermark over the image that is linked but then people could still just hotlink directly to the image itself bypassing that. Its not possible to embed a link directly into an image.

smooth-c 05-29-2009 07:49 PM

No problem. Sorry for putting you on the grill here. Do you have any plans to make an option to watermark attachments aswell as album images? That would be great.

I just tried donating btw but it said you're currently unavailable to accept donations.

Megatr0n 05-29-2009 11:17 PM

RLShare, this works flawlessly on albums but nothing appears on profile pictures? I have enabled to watermark profile pictures but I don't see anything on none of my user's profiles.

Megatr0n 05-29-2009 11:46 PM

Details, sent.

RLShare 05-30-2009 12:07 AM

Quote:

Originally Posted by smooth-c (Post 1819783)
No problem. Sorry for putting you on the grill here. Do you have any plans to make an option to watermark attachments aswell as album images? That would be great.

I just tried donating btw but it said you're currently unavailable to accept donations.

lol.. No problem man, its my mod I expect questions about it. I have actually looked into watermarking attachements in the past when I first created this. I do eventually plan on adding that ability in. Its just right now I am really busy with some other things, when I get a spare few minutes I will attempt to add it as well as fix what Megatron just brought to my attention. Oh and I fixed the paypal link..lol

Ok and to note, as I mentioned to Megatron in a pm, I just noticed that when profile pictures are stored in the filesystem then it will not watermark the image. The problem comes from the fact that VB serves up a direct link to the images on the server when they are stored in the filesystem and are not processed first like album images are. I will make a note of it above in the original post and see if I can work up a fix when I get a free minute or two.

Megatr0n 05-30-2009 12:12 AM

If you do not mind me making these suggestions for new features:

- I was wondering maybe an add option where we can also CENTRE the watermark on the pictures?
- An option to allow the user to choose whether his/her profile & album pictures can be watermarked?
- And, an option in the AdminCP to prevent an album picture from being watermarked that's been configured to be used as the user's backround otherwise you see Watermark logo scattered all over the page and it looks messy.

fluentdesigns 05-30-2009 07:03 PM

Installed and Nominated.. works perfectly! Thanks been waiting for something like this for weeks.

smooth-c 05-31-2009 06:57 PM

Quote:

Originally Posted by RLShare (Post 1819894)
lol.. No problem man, its my mod I expect questions about it. I have actually looked into watermarking attachements in the past when I first created this. I do eventually plan on adding that ability in. Its just right now I am really busy with some other things, when I get a spare few minutes I will attempt to add it as well as fix what Megatron just brought to my attention. Oh and I fixed the paypal link..lol

Ok and to note, as I mentioned to Megatron in a pm, I just noticed that when profile pictures are stored in the filesystem then it will not watermark the image. The problem comes from the fact that VB serves up a direct link to the images on the server when they are stored in the filesystem and are not processed first like album images are. I will make a note of it above in the original post and see if I can work up a fix when I get a free minute or two.

Do you expect the ability to watermark attachments will be added in the next month or so? I have some high profile events coming up that I wish to gain as much exposure for the site I co-own as possible :D

I've donated, i'm sorry it's such a small amount but i'm very greatfull of your support and for creating such a great product.

I'm not sure if this is doable, but is it possible to watermark over images that are externally sourced?

Quote:

Originally Posted by Megatr0n (Post 1819896)
If you do not mind me making these suggestions for new features:

- I was wondering maybe an add option where we can also CENTRE the watermark on the pictures?
- An option to allow the user to choose whether his/her profile & album pictures can be watermarked?
- And, an option in the AdminCP to prevent an album picture from being watermarked that's been configured to be used as the user's backround otherwise you see Watermark logo scattered all over the page and it looks messy.

-Centre watermark would be awesome.
-Option to allow users to choose (i'm guessing by bitfield) is a cool feature, i'd use it - would be cool to be usergroup defineable.
-I've just noticed a user is using an album picture for his signature, doesn't look too nice with a watermark slapped on. Is there anything that can be done?

Good suggesting Megatr0n!

furst 06-02-2009 12:05 AM

It would be nice to have the option to only display the watermark on images that are being displayed on other websites. It would keep the host website looking clean and would still work to drive traffic from other sites that hotlink the images.

http://blog.makezine.com/archive/200...watermark.html

smooth-c 06-02-2009 10:54 AM

Great idea :) What do you think RLShare? Did you receive my donation okay?

goxy63 06-02-2009 08:19 PM

Two words

Just Great

And few more :D
Nominated, rated, installed
_____________________________
"small" problem
well my users are using some images for background of their profile(those images are uploaded on my forums), this watermark is messing that up :(
any ideas how to resolve this !?

RLShare 06-03-2009 05:47 AM

Quote:

Originally Posted by smooth-c (Post 1821934)
Great idea :) What do you think RLShare? Did you receive my donation okay?

I probably did but I have not checked as of yet.


As for the suggestions made I will take them all into account when I get a chance to work on this again. I have been a tied up the last couple days in a project that I hoped would be finished by now. As soon as I finish this project up I will attempt to make some of the suggested changes.

goxy63 06-04-2009 04:21 PM

Please
would it be possible to exclude from watermark pictures attached in user profile as their background ?

hymoo 06-04-2009 07:38 PM

I tried to edit both the plugins u use for this to move the image slightly 10px from the corners (so its not directly on the edge. looks better I think).

But it kinda breaks the entire thing if I try that :)

Could you explain to me which values I have to edit? I tried editing the following:
From
Code:

$destx=    imagesx($theimage)-imagesx($newwater);
To
Code:

$destx=    imagesx($theimage)-imagesx($newwater)-10;
(on both x and y. so it should be 10 PX from the lower right corner (which we choose as our location).

Thanks in forward.

BBR-APBT 06-11-2009 02:37 AM

I found a bug as well. On profile images/Profile Albums images for the custom profile when you have a small image on there like a gradient for the bars etc. the image don't show.

I was thinking if there is a way to not do private or profile albums that would be great.

BBR-APBT 06-13-2009 04:25 PM

Any idea if the exclude for private albums would be implemented.

danyz81 06-15-2009 03:50 PM

Hello,
Nice hack!
I would like to know if is possible that a user can chose or not to put the watermark on tje own images, because (in my case) not all users want to use the watermark feature

Thanks!

SirHappy 06-20-2009 03:15 PM

Nice Hack. Thx:)

7lanet 06-23-2009 12:59 AM

1 Attachment(s)
dear the gif not good

can u use this

PHP Code:

function is_ani($filename)
{
        
$filecontents=file_get_contents($filename);
        
$str_loc=0;
        
$count=0;
        while (
$count 2# There is no point in continuing after we find a 2nd frame
        
{
                
$where1=strpos($filecontents,"\x00\x21\xF9\x04",$str_loc);
                if (
$where1 === FALSE)
                {
                        break;
                }
                else
                {
                        
$str_loc=$where1+1;
                        
$where2=strpos($filecontents,"\x00\x2C",$str_loc);
                        if (
$where2 === FALSE)
                        {
                                break;
                        }
                        else
                        {
                                if (
$where1+== $where2)
                                {
                                        
$count++;
                                }
                                
$str_loc=$where2+1;
                        }
                }
        }
        if (
$count 1)
        {
                return(
true);
        }
        else
        {
                return(
false);
        }
}
exec("ls *gif" ,$allfiles);
foreach (
$allfiles as $thisfile)
{
        if (
is_ani($thisfile))
        {
                echo 
"$thisfile gif mobile <BR>\n";
        }
        else
        {
                echo 
"$thisfile Fixed <BR>\n";
        }


plese look Attach

7lanet 06-23-2009 03:39 AM

dear ,


Proposal
Zoom in or zoom out watermark depending on the size of image
For example,
When the image size 600 * 400 is the size of watermark 60 * 40
When the image size is 1200 * 800 is the size of watermark 120 * 80
When the image size 200 * 180 is the size of watermark 20 * 18

or
make 3 or 4 watermark.png(watermark1.png -watermark2.png-watermark3.png ....atc )


Options
Image size and the size of watermark
Placed in the Options Forum
admin can modify

enoobz 06-23-2009 07:17 AM

How to disable watermark for profile background images?

It will be nice to have an option to disable this features in certain folder(s).

goxy63 07-04-2009 11:45 PM

Quote:

Originally Posted by enoobz (Post 1835430)
How to disable watermark for profile background images?

It will be nice to have an option to disable this features in certain folder(s).

Yes I already posted about this 'bug'
if you can fix that this mod is good to go, without this is ....

Cheers

fiveflat 07-08-2009 01:27 PM

Will this mod watermark attached images as well?

What about linked pictures using the [img] tag ?

fiveflat 07-10-2009 04:38 AM

Apologize for the above question. I see the answer right in the description of the mod.

Now I have another issue. Some member upload 640X480 images and some upload large 2048X whatever and the watermark is very tiny on those large images and huge on the smaller images. How do I make the watermark proportional to the image???

BBR-APBT 07-28-2009 04:50 PM

still no fix for this. Guess Ill uninstall it. it shouldn't work on private folders.

smooth-c 08-26-2009 01:01 PM

Any luck?

z0diac 08-30-2009 01:19 PM

delete

z0diac 08-30-2009 01:21 PM

Does NOT work on 3.8.4

eg:

http://www.ontariostorms.com/showthread.php?t=114


I created a png file, transparent background. Saved it to my forum root, chmod 0777 the file. As you can see from that link, there's no watermark. (click images at bottom of page, some images have a perm. watermark on them from before)

(ps - there was a problem with vBulletin here. I edited my msg ^^above a couple times and it appended new posts each time instead of just saving the one I was working on) ??

Kelmar 09-03-2009 09:05 AM

Great mod.

I changed the png to my own one, the name of my website, so it's a bit more transparent instead of the white wording.

Just wondering any joy in making an option to center the watermark or even have it diagonal, as it is at the moment it's not doing much as a watermark as it could be very earily cropped out.

thanks.

goxy63 09-05-2009 01:21 PM

OMG
Please do help us to avoid showing watermark within profile background images

This is only issue with this modification if you ask me, very usefull for websites/forums where you got plenty of images...but it mess up my users profiles :(

RLShare thanks once again for this awesome mod

SamirDarji 09-07-2009 07:59 PM

Neat mod. Adding mental note to look at this laters.


All times are GMT. The time now is 11:03 PM.

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.01357 seconds
  • Memory Usage 1,849KB
  • 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
  • (1)bbcode_php_printable
  • (9)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