Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

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
  #122  
Old 01-27-2011, 08:31 PM
serra00 serra00 is offline
 
Join Date: Mar 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it and nothing happened
to do some modification?
where it appears the album?
do not see anything !!!!!!!!
Reply With Quote
Reply

Thread Tools

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 08:32 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.03924 seconds
  • Memory Usage 2,244KB
  • Queries Executed 18 (?)
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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (2)post_thanks_box
  • (1)post_thanks_box_bit
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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