I'm hoping that posting this beta version in here will help me gather useful feedback on what kind of features might be useful in such a hack.
What does it do:
-Adds a watermark to the bottom right of all images uploaded to users albums.
Planned changes:
1. Allow the url of the watermark image to be changed via admincp
2. Allow location of where the watermark image is placed to be changed via admincp
Installation Instructions:
1. Create or Use the watermark.png I attached, and upload it to your forum root before anything.
2. Edit the file forum_root/includes/functions_album.php and add these functions. I added them right below the Vbulletin Copyright notice.
PHP Code:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////// -ALBUM WATERMARK MOD - image createfrom/saveto file functions-////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
function imagecreatefromfile($path)
{
$info = @getimagesize($path);
After i install it .... and try to upload animated photo ... i see the plugins put the watermark on it but the photo become not animated and stop from work
I upgrade it, and work grate with massive uploads, but it shows me different Size of watermark.. you upload an albun it shows you great, the other shows it shorter.. then good.....
After i install it .... and try to upload animated photo ... i see the plugins put the watermark on it but the photo become not animated and stop from work
Im working with the GD imaging library for PHP and it does not support animated GIFS. I might look into adding support for animated GIFs myself in the future but that will not be until after I work on getting the other features I want done.
Quote:
Originally Posted by balance12
I upgrade it, and work grate with massive uploads, but it shows me different Size of watermark.. you upload an albun it shows you great, the other shows it shorter.. then good.....
One good one smaller....
What could it be?
The only reason I could think of is that Your uploading images that are larger then the max size, VB will automatically resize images that are larger then the Max size and my code applies watermarks to the images that get uploaded before VB processes them. So Im guessing that my code is adding the watermark, then VB is shrinking the image after making it look like the watermark is of a different size.
Warning: imagecreatefrompng(watermark.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in [path]/album.php(795) : eval()'d code on line 1
Fatal error: Call to undefined function: imagecreatefromfile() in ....... on line 6
I've uploaded everything as suggested...... Its a great mod, hope it can get sorted as I'd love to use it!
Warning: imagecreatefrompng(watermark.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in [path]/album.php(795) : eval()'d code on line 1
Fatal error: Call to undefined function: imagecreatefromfile() in ....... on line 6
I've uploaded everything as suggested...... Its a great mod, hope it can get sorted as I'd love to use it!
You either messed up putting the functions in the functions_album.php file or you did not put the functions in that file.
Quote:
Originally Posted by 7lanet
in 3.7.2
Fatal error: Out of memory (allocated 22806528) (tried to allocate 8192 bytes) in /home/joker/public_html/vb/includes/functions_album.php on line 40
I have not upgraded to 3.7.2 yet, when I do I will look into this.
You either messed up putting the functions in the functions_album.php file or you did not put the functions in that file.
Thats a great help, thanks. I know I'm stupid, but I do know how to copy & paste into a file that you actually name!
The only problem I had was where to put it as you said right after the vBulletin copyright notice. Well, I found one, right at the top of the file - I assume that's where you meant it to go
Thats a great help, thanks. I know I'm stupid, but I do know how to copy & paste into a file that you actually name!
The only problem I had was where to put it as you said right after the vBulletin copyright notice. Well, I found one, right at the top of the file - I assume that's where you meant it to go
This is an image someone posted earlier in this thread.. It shows how the top of the file functions_album.php should look after you paste the functions in.
The top part is the copyright notice I mentioned pasting the code in after.
That's where I originally posted it... and it didn't work
However, I have to say after perserverance, and popping it in different places, I managed to get it to work! The code did go further down the page tho!
Now if you could just sort out the watermark scale issue on differing sized photos