This mod uses javascript to resize avatars, attachments and pictures inserted using the [img] tag if they exceed a maximum size, while maintaining the original aspect ratio of the image. Original code written by BHRA Webmaster. Every effort has been made to contact BHRA Webmaster in seeking permission to port his mods from 1.3 t YaBB 2.1, but with no response. Approval has been given by Michael Prager to post this mod.
FYI: 1 -- The mod below has been converted from 2 YaBB 1.3 mods, the smart_resize_SP12-13 & smart_resize_attachments mods 2 -- I take credit for the convertion, and not for the logic - this must got to BHRA Webmaster & Michael Prager 3 -- This mod replaces the option of "User Pic" in Forum Settings with the "Avatar" setting, so as to keep such common functionalities in one area. 4 -- Laslty, this my first attempt at mod writing, so dont shoot the messenger !!
Notes: 1 -- The maximum allowed image width and height is now set under the banner of Installed Mods. 2 -- There are seperate settings for: avatars, attachments, images in messages and images in signatures. 3 -- The [img] tag can now contain width, height, align and alt attributes in any order or combination. 4 -- The align attribute can take the standard align values of the <img> tag (left, right, top, texttop, middle, absmiddle, baseline, bottom, absbottom). 5 -- If you specify the width or height, the image will be resized to that width or height while maintaining the aspect ratio of the original image. 6 -- If you specify both the width and height, the image will be resized to the size specified, adopting the specified aspect ratio. 7 -- If the image exceeds the maximum allowed size, it will be resized to the maximum allowed size while maintaining it's original aspect ratio or the specified aspect ratio. 8 -- If the users browser does not support javascript, the normal (unresized) image will be displayed. 9 -- Includes the [img] tag bugfix by Michael Prager, and images are restricted to files with a .gif, .jpg, .png or .bmp extension.
Installation: 1 -- VERY IMPORTANT that you uninstall any previous versions of this mod 2 -- Install new version and upload files to their appropiate directory in ASCII.
AdminIndex.pl Admin/ModList.pl Admin/Admin.pl Admin/AdminSubList.pl Admin/AdminEdit.pl Templates/default/default.html Sources/Display.pl Sources/Load.pl Sources/Printpage.pl Sources/Profile.pl Sources/YaBBC.pl
3. Upload the Smart_Image_Resize.txt file to the Variable directory in ASCII. 4. Upload the Language files into their repective directories in ASCII.
Many thanks to Larian - German Translation Language File. Many thanks to RuKo - Dutch Translation Language File.
History: Beta 1 -- Initial Mod Beta 2 -- Resolve issues with avatars not showing. Code inserted to resolve this, into Load.pl file Beta 3 -- Re-wrote Mod to conform to BoardMod Mod writing standards - as a Mod under the "Installed Mods" banner in Admin Center Beta 4 -- Added German Language File Beta 5 -- Added Dutch Language File
|