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
  #22  
Old 06-19-2008, 05:11 AM
lazytown lazytown is offline
 
Join Date: Feb 2004
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looking forward to this when it's completed. It would be nice if it could watermark existing album images.

-vissa
Reply With Quote
  #23  
Old 06-19-2008, 07:36 AM
waza waza is offline
 
Join Date: Apr 2005
Location: Belgium
Posts: 341
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's nice, but have a look at class_image.php and class_upload.php in the includes folder. You could probably integrate it better into the vbulletin system with modifying these classes.
Reply With Quote
  #24  
Old 06-19-2008, 11:58 AM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TimberFloorAu View Post
Tried. Doesnt Work.

Perhaps, rather than use this as a beta area for developing a mod, you should get everything working ok, get it tested, do some instructions.
Looks promising.
'Tried doesn't work' DOESN'T help me. A more detailed explanation of what happened would. I doubt you even tried with a reply like that. And what exactly do you think it means to be a Beta? That means I want it tested. Maybe you should learn a thing about the terminology of this before you start telling me what to do.
Reply With Quote
  #25  
Old 06-19-2008, 12:02 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by waza View Post
It's nice, but have a look at class_image.php and class_upload.php in the includes folder. You could probably integrate it better into the vbulletin system with modifying these classes.
Will do, thanks for the direction.
Reply With Quote
  #26  
Old 06-19-2008, 02:06 PM
ShiZoPhreN ShiZoPhreN is offline
 
Join Date: Apr 2008
Location: Germany/Hamburg
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks RLShare

*clicks installed*
Reply With Quote
  #27  
Old 06-19-2008, 07:54 PM
Tboy_forum Tboy_forum is offline
 
Join Date: May 2008
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

+1 for all images uploaded please

Clicks 'installed'
Reply With Quote
  #28  
Old 06-19-2008, 09:01 PM
Mr.samy's Avatar
Mr.samy Mr.samy is offline
 
Join Date: Feb 2008
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks dear ,

but can i add text on picture without photos ( .png ) such that doamin .
Reply With Quote
  #29  
Old 06-19-2008, 10:36 PM
balance12 balance12 is offline
 
Join Date: Sep 2007
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If i want that the watermark.. be placed from side to side from the picture... like a large bar.... i have to midifed something++
Reply With Quote
  #30  
Old 06-19-2008, 10:49 PM
ALSALAFE ALSALAFE is offline
 
Join Date: Jun 2008
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks :up:
Reply With Quote
  #31  
Old 06-20-2008, 01:07 PM
balance12 balance12 is offline
 
Join Date: Sep 2007
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Done everythinh....
Place watermark png on forumrrot
Edite funciton_album
Import Plugin

Parse error: syntax error, unexpected T_STRING in /home/reinodra/public_html/includes/functions_album.php on line 17
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 07:57 PM.


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.14215 seconds
  • Memory Usage 2,338KB
  • 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
  • (2)bbcode_quote
  • (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