vBulletin.org mods

PB Watermark Album images

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:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////// -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
 
No, there is probably a version check, but you can remove it by going to your product manager, click edit next to the hacks you want to delete the links from and delete the URLs found in Product URL and Version Check URL but that isn't really much of a risk.
 
Back
Top