Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
PB Watermark Album images Details »»
PB Watermark Album images
Version: 0.1, by RLShare RLShare is offline
Developer Last Online: Aug 2011 Show Printable Version Email this Page

Category: Social Group and Album Enhancements - Version: 3.7.1 Rating:
Released: 06-17-2008 Last Update: 06-21-2008 Installs: 134
Uses Plugins
Code Changes Is in Beta Stage  
No support by the author.

There is a new version of this modification available Here that has been confirmed to work in version 3.7.x

------------------------------------------------------------------------------------

This mod is in beta, it was inspired by this thread yesterday.
https://vborg.vbsupport.ru/showthread.php?t=178296

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);
                           
                            if(!
$info)
                            {
                                return 
false;
                            }                           
                            
$functions = array(
                                
IMAGETYPE_GIF => 'imagecreatefromgif',
                                
IMAGETYPE_JPEG => 'imagecreatefromjpeg',
                                
IMAGETYPE_PNG => 'imagecreatefrompng',
                                
IMAGETYPE_WBMP => 'imagecreatefromwbmp',
                                
IMAGETYPE_XBM => 'imagecreatefromwxbm',
                                );
                            if(!
$functions[$info[2]])
                            {
                                return 
false;
                            }
                           
                            if(!
function_exists($functions[$info[2]]))
                            {
                                return 
false;
                            }
                           
                            return 
$functions[$info[2]]($path);
                        }


function 
imagesavetofile($image,$path)
                        {
                            
$info = @getimagesize($path);
                           
                            if(!
$info)
                            {
                                return 
false;
                            }                           
                            
$functions = array(
                                
IMAGETYPE_GIF => 'imagegif',
                                
IMAGETYPE_JPEG => 'imagejpeg',
                                
IMAGETYPE_PNG => 'imagepng',
                                
IMAGETYPE_WBMP => 'imagewbmp',
                                
IMAGETYPE_XBM => 'imagewxbm',
                                );
                            if(!
$functions[$info[2]])
                            {
                                return 
false;
                            }
                           
                            if(!
function_exists($functions[$info[2]]))
                            {
                                return 
false;
                            }
                           
                            return 
$functions[$info[2]]($image,$path);
                        }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////// -ALBUM WATERMARK MOD - image createfrom/saveto file functions-////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
3. Import the plug-in attached

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
caoducanh9x

Comments
  #72  
Old 07-22-2008, 03:05 AM
psylenced psylenced is offline
 
Join Date: May 2008
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic
Reply With Quote
  #73  
Old 07-23-2008, 11:19 AM
Megatr0n Megatr0n is offline
 
Join Date: Jul 2007
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RLShare, would it be possible for the watermark to be REMOVED from a picture when the user is selecting it to be a backround picture? Many of my users don't like the watermarking showing on their profiles.

Plus, I also think a user should be given the option whether he/she wants to have their pictures watermarked because some do their own. However, still with a seperate option to watermark all pictures in one go?
Reply With Quote
  #74  
Old 07-31-2008, 10:39 PM
rolloffhill rolloffhill is offline
 
Join Date: Aug 2007
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to remove this plugin after upgrading to vb 3.7.2 pl1. It kept the images from loading to the server. Just an fyi..
Reply With Quote
  #75  
Old 08-01-2008, 09:19 AM
flussmitteldj flussmitteldj is offline
 
Join Date: Sep 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need help!

Fatal error: Call to undefined function can_view_private_albums() in /www/htdocs/w009f45a/includes/class_profileblock.php on line 875

i need a Sample please !!
Reply With Quote
  #76  
Old 08-02-2008, 07:17 PM
BatMs.com BatMs.com is offline
 
Join Date: Jul 2008
Location: Melbourne, Australia
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey RLShare nice mod... Installed exactly how you explained and works straight away... However I see you are re-making the mod... PLEASE oh please add the relative size watermark that has been suggested numerous times...

Suggestion For Re-Haul:
Allow of placing wm on images already created (done with the update counters...photopost have it....)

Is it possible to make the plugin somehow put the watermark on AFTER the image gets re-sized? As it is now it seems the WM gets placed befor the image gets re-sized...

Example of why (my watermark image is 150X30... on a 600X450 image that was originally taken off 5mp phone camera):
Reply With Quote
  #77  
Old 08-05-2008, 10:32 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I said before I am rewriting this mod, It will watermark the images dynamically. So it will do it at the time the images are shown instead of when they are uploadedd. It should solve alot of problems, so if your having troubles with this version please be patient as I work out some bugs I have in the next version.

As far as the new version, just a word on its progress, I am having a little bit of trouble with one aspect of it. I have it working for images that are stored locally. But if the images are set to be stored in the database instead of locally on the server I am having some trouble. When I try to take the data from the blob it is only streaming in half of the data for the image and I cannot figure out why. As soon as I get this figured out I will release.

Also with this new version it will take alot of edits to one of VB's files because VB is sending the image data for album images directly to the users browser without anywhere to intercept the data before hand.
Reply With Quote
  #78  
Old 08-08-2008, 05:19 PM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works Perfectly. Thank you. However, it only works on pictures that are uploaded AFTER this is installed.
Reply With Quote
  #79  
Old 08-12-2008, 06:30 PM
JohnnieOO JohnnieOO is offline
 
Join Date: Sep 2007
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any update on this, very interested.

Johnnie
Reply With Quote
  #80  
Old 08-14-2008, 07:27 PM
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Location: Brazil
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been thinking in changing my album pictures storage from database (default on Vb) into the file system with direct access to thumbnails to save some queries at my board.

Question: Can I do that and still getting this working great ?
Reply With Quote
  #81  
Old 08-18-2008, 09:57 PM
Nineaxis Nineaxis is offline
 
Join Date: Jan 2008
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looking forward to the new version. Great mod!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05857 seconds
  • Memory Usage 2,342KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete