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
  #12  
Old 06-18-2008, 10:44 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ive updated the original post to reflect the changes that should fix your problems, thank you for letting me know. You will need to add one more function to the file and re-upload the new plug-in I just attached.



Quote:
Originally Posted by Fırtına View Post
Is location in forum_root/includes/functions_album.php ?

http://img337.imageshack.us/img337/3...nctionssf6.png
^^Thats exactly it, let me know if the update still does not fix it.
Reply With Quote
  #13  
Old 06-18-2008, 10:59 PM
7lanet's Avatar
7lanet 7lanet is offline
 
Join Date: Aug 2007
Location: YeMeN
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fatal error: Call to undefined function imagesavetofile() in /home/joker/public_html/vb/album.php(794) : eval()'d code on line 9
Reply With Quote
  #14  
Old 06-18-2008, 11:07 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you add the function 'imagesavetofile' I posted below the other function to the functions_album.php file?

I just noticed that its easy to look over, the section of my post that contains the code to be pasted to the other file now has 2 functions in it so you will need to delete what you pasted into the file before and copy whats up there now into its place.
Reply With Quote
  #15  
Old 06-19-2008, 02:02 AM
bxbigt bxbigt is offline
 
Join Date: Oct 2007
Location: The Bronx
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can we get this for all images uploaded to the site
Reply With Quote
  #16  
Old 06-19-2008, 02:38 AM
Zeb Zoober Zeb Zoober is offline
 
Join Date: Aug 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bxbigt View Post
can we get this for all images uploaded to the site
+1

Would love to see this work for attachment pictures too.
Reply With Quote
  #17  
Old 06-19-2008, 02:41 AM
GaiLoan GaiLoan is offline
 
Join Date: Dec 2007
Location: California,US
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this nice, i belive everyone waiting for this thanks
Reply With Quote
  #18  
Old 06-19-2008, 03:00 AM
RvG2 RvG2 is offline
 
Join Date: Jan 2007
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

holy cow... I've been waiting for this long time ago.
Reply With Quote
  #19  
Old 06-19-2008, 03:11 AM
RvG2 RvG2 is offline
 
Join Date: Jan 2007
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how to create my own watermark .png?
Reply With Quote
  #20  
Old 06-19-2008, 03:22 AM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RvG2 View Post
how to create my own watermark .png?
Gimp is a powerful free image editing program.
http://gimp.org/downloads/
Reply With Quote
  #21  
Old 06-19-2008, 05:03 AM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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:32 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.05609 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
  • (3)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
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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