PDA

View Full Version : Watermarking full size images in vBGarage 4.0.0


noppid
01-22-2005, 06:07 PM
This option is available and can be turned on in vbgconfig.php. You will need to set the path to your watermark image and the name of your watermark image. The watermark image must be a .png file. If anything goes wrong with watermarking after enabling it, the affect will be the image does not get watermarked. This will mostly be caused by not configuring something correctly.

By configured correctly we mean, the watermark image is a valid .png and the watermark option is enabled in vbgconfig.php and the path to the file is set correctly in vbgconfig.php and nothing went wrong in the file system. If any of the above does occur, then the image will not be watermarked. Rather then throwing errors when something went wrong we thought it best to just skip the step if a sanity check failed.

To enable watermarking you set "$vbg_use_wm = 1;" in the vbgconfig file and set the name of the watermark image file with "$vbg_wm = "watermark.png";". You also have to set the path to your image with "$vbg_path = "/home/ACCOUNT_NAME/vbg_images_folder/";" All of this is done in the vbgconfig.php.

There is one more setting in vbgconfig.php for positioning the watermark. Setting "$vbg_position = 0;" (default) will display the watermark top and center of the full size image. Setting "$vbg_position = 1;" will display the watermark on the bottom center of the full size image.

After setting the vbgconfig.php file and having uploaded your watermark image to the configured folder, upload the vbgconfig.php file to your forums ROOT folder. When an image is uploaded, if all is configured correctly, the full size image will be watermarked and show as so when viewed as a full size popup.

If you use file system mode, the folder should/will be the same folder that you choose to store your images in.

Images for watermarking should be .png. They should not be transparent and should have a background. Be judicious about sizing, you have to consider small images being watermarked. We are using 75x15 and 100x15 in our trial runs.

If you need help with enabling watermarking or configuring watermarking, please post in this thread.

Rhoads
01-24-2005, 10:06 PM
I think that my watermark.png is to big, I have a file of 800 x 600.
I try to make a small file like in description.
But now I'm going to sleep :squareeyed:

noppid
01-24-2005, 10:42 PM
I think that my watermark.png is to big, I have a file of 800 x 600.
I try to make a small file like in description.
But now I'm going to sleep :squareeyed:

I would make it ALOT smaller. :)

Rhoads
01-25-2005, 06:56 AM
Hello Noppid,

I have tried with another water mark, but without results.
I post here my watermark, can you verify of the image is oke.
Here my vbgconfig file, I think it's good, but the image I am not certainly of that.


<?php
// vBGarage 4.0.0 By Magnus
// Ugrades/congif file by noppid @ www.lakecs.com 1-23-2005

// set this to 1 to store vbgarage images in the filesystem.
// set this to 0 to store vbgarage images in the DataBase.
$vbg_use_fs = 0;

// path to files folder, include the trailing slash. Folder must be set 777 for FS mode.
// this must be set to use a watermark too. If using DB mode a read only folder is ok.
$vbg_path = "/var/www/homedir/forum/data/garage/";

// set this to 1 to enable watermarking of full size images
$vbg_use_wm = 1;

// set the name of the watermark file. It must be uploaded to the folder you set $vbg_path to point to.
// you must use a .png file.
$vbg_wm = "watermark.png";

// water mark position
// set this to 0 for top center of image OR set this to 1 for bottom center of image
$vbg_position = 0;

?>


I have put my watermark.png in the garage folder.

Here is my watermark image :

noppid
01-25-2005, 10:57 AM
I have to assume your path is correct. As for the watermark, what you want to do will not work, you can not use a transparent background PNG. So what would happen with your big watermark image is it would just overwrite the photo.

I'll look into transparent backgrounds. I'm no GD or graphics expert though.

In the mean time, try a watermark.png with a solid background of about 100x15.

Rhoads
01-25-2005, 06:14 PM
Oke, I have make a new watermark and tested, but I see nothing.
I think the watermark is oke now.

noppid
01-25-2005, 06:26 PM
Oke, I have make a new watermark and tested, but I see nothing.
I think the watermark is oke now.

I tried your watermark and it works fine. I used a png and a jpeg.

I would have to say there is and error is your path. That's my best guess.

Rhoads
01-25-2005, 06:37 PM
pffff, strange.
I see that you are using opera, I have IE, maby that can be the problem.

noppid
01-25-2005, 06:44 PM
pffff, strange.
I see that you are using opera, I have IE, maby that can be the problem.

No, I'm using FireFox and IE, that is just a png pic I pulled off the net to upload and test with. This is not a browser issue, the opertion is done on the server side in PHP.

What OS is running on your server? Maybe it's a string formatting issue if you are 100% certain you have the path correct.

Did the create thumbs process in the upgrader run ok on your site?

Rhoads
01-25-2005, 07:04 PM
The server is redhat-linux and I run not the updater because I have a clean install of vbgarage. But my test forum with vbgarage 4.0 is on a subdomein, but I think that can not the problem, the path is right to my subdomein.

noppid
01-25-2005, 07:09 PM
Maybe nobody needs read permissions to get the watermark.png? Try setting the folder 777 and see if that helps, it's worth a shot.

When you upload a pic, it does not get watermaked, that I'm clear on. You have a new install. Last question, when you upload a pic, do you see the thumbnail appear on the edit page when it's done uploading?

I'm with ya, holler back.

Rhoads
01-25-2005, 07:26 PM
Oke, I have tried the chmod 777, but with no results.

I get all tumbnails, everything are well, I get no errors nothing is there wrong, I become crazy (lol) look the screen.

noppid
01-25-2005, 07:36 PM
Oke, I have tried the chmod 777, but with no results.

I get all tumbnails, everything are well, I get no errors nothing is there wrong, I become crazy (lol) look the screen.

I hear ya, I'm perplexed too!

If it were me on my test server I would just put in a few echo statements, spit out the variables, halt execution, and see what's happening.

Hard to tell what's up from here. :banghead:

Rhoads
01-25-2005, 07:49 PM
I hear ya, I'm perplexed too!

If it were me on my test server I would just put in a few echo statements, spit out the variables, halt execution, and see what's happening.

Hard to tell what's up from here. :banghead:


hahaha, I have no idea how that would have all, but I think I can wait better, and look at there if more people with such problems, perhaps there still a solution comes.

Thnx for your help.

Oke there is well news ;)

I tested it with the filesystem ,and now I have a watermark.
I think I go back to the database system and look again, and I have also a watermark.

The problem was that I used the lower part as a watermarked, if I use a file of 1024 x 768, the watermark is not visible because the lower part of the full screen is 1 cm shortened, when I do the watermark to the top, and upload a new screen, than it is visible. When I upload a screen about max of 600 x 400 , then you can see the watermark on the top and the lower part (exactly what you have filled in in the vbgconfig). The problem is therefore photograph larger than 600 x 400 , the watermark is only visible on top, and when you edit it to the lowerpart, it is not visible because he shortened 1 cm.

I hope that you understand me, because my English is not well :squareeyed:
Is it possible change altitude of the water mark ,so that I can use them to te lower part, but a little bit higher, I think that the problem then has been solved.

Thnx

noppid
01-25-2005, 10:44 PM
In vBGarage.php find...


else
$dest_y = ($size_y - $wmh ) - 5;


Change the 5 to however high off the bottom you want the watermark in pixels.

Glad that worked out. :)

Rhoads
01-25-2005, 10:52 PM
In vBGarage.php find...


else
$dest_y = ($size_y - $wmh ) - 5;


Change the 5 to however high off the bottom you want the watermark in pixels.

Glad that worked out. :)
Oke thnx Noppid, it's working fine now :classic:

Turbo_WRX
03-23-2005, 05:02 PM
can't get watermark to work. I've tried everything!!!! I'm thinking my path isn't correct, but then what is? the watermark is here

www.mysite.com/forum/images/watermark/777/

then the image .png is in there, but I put that in the vbgconfig.php and it still doesn't work.. any suggestions?

also, how do you edit it so instead of vBGarage it's just "Garage"?

Heres the entire coding:


<?php
// vBGarage 4.0.0 By Magnus
// Ugrades/congif file by noppid @ www.lakecs.com 1-18-2005

// set this to 1 to store vbgarage images in the filesystem.
// set this to 0 to store vbgarage images in the DataBase.
$vbg_use_fs = 0;

// path to files folder, include the trailing slash. Folder must be set 777.
// this must be set to use a watermark too. If not using FS mode A read only folder is ok.
$vbg_path = "/forum/images/watermark/";

// set this to 1 to enable watermarking of full size images
$vbg_use_wm = 1;

// set the name of the watermark file. It must be uploaded to your images folder.
// you must use a .png file.

$vbg_wm = "watermark.png";

// water mark position
// set this to 0 for top center of image OR set this to 1 for bottom center of image
$vbg_position = 1;

?>


the png file i'm trying to use is this:

www.mysite.com/forum/images/watermark/watermark.png

and nothing works!

noppid
03-23-2005, 05:37 PM
$vbg_path = "/forum/images/watermark/";

Is not a fully qualified path. Check phpinfo() for your complete path.

Turbo_WRX
03-24-2005, 01:36 AM
alright i'll check that, also, how do you make it say "Garage" instead of "vBGarage" on the top link list place?

noppid
03-24-2005, 03:46 AM
change the navbar code. there are about 5 instances in vbgarage.php

do not rename the file.

Turbo_WRX
03-24-2005, 05:18 AM
i hate to be stupid, but can you please be more specific? I'm new to all this coding and stuff, so I don't know what to change

also again on me being dumb, how do i check the "phpinfo()"???

another question: is there a way to set seperate user group permissions for the garage? Like, I want reg. users to be able to only upload 2 pics, while another user group, Elite Members, can post 10. How can i do that? noppid i love you! lol j/p but yeah, your the smart guy, so i ask u

noppid
03-24-2005, 11:43 AM
i hate to be stupid, but can you please be more specific? I'm new to all this coding and stuff, so I don't know what to change

also again on me being dumb, how do i check the "phpinfo()"???

another question: is there a way to set seperate user group permissions for the garage? Like, I want reg. users to be able to only upload 2 pics, while another user group, Elite Members, can post 10. How can i do that? noppid i love you! lol j/p but yeah, your the smart guy, so i ask u

The features that are in there, beyond what magnus originally coded, are basically what "I" need. For a feature to be added, "I" need to need or want it or it needs to be a problem.

I took this over for two reasons, magnus was busy there I guess and I jumped in too help squash a few bugs, secondly I wanted some features for "me". Pretty selfish, I know. But that's where we are.

I have thought about granular permissions, but have not done anything about it. I probably won't do anything till I solve, what I think is an issue, the way the thumbs are displayed. I hate it. So till I'm convinced that is ok the way it is or improve it, we're in neutral as far as changes.

I don't thank magnus often enough, so Big thanks to magnus, let's not forget he started this and made it popular.