Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: dougiefresh on December 10, 2016, 10:01:06 PM

Title: Need assistance with "SVG as Image Attachment" mod.....
Post by: dougiefresh on December 10, 2016, 10:01:06 PM
I've been trying to write a SMF 2.1 Beta 2 version of my SVG As Image AttachMent (http://custom.simplemachines.org/mods/index.php?mod=4085) mod.  I've run into a roadblock and need some help getting around it.  Maybe someone can help?

When the SMF 2.0.x version of the mod does is when it is processing a SVG image, it writes a "thumbnail" with slightly different markup to indicate the "thumbnail" size.  Originally, I've tried altering the SVG image itself, and gave up after messing up the SVG image so many times.... But that's way off-topic.   Anyways, when the SVG image is displayed, the "thumbnail" size stored in the database is used to dictate how large the SVG image is shown, and JavaScript was written to change the dimensions so that it would be shown correctly when clicked on.

The first time I added the SMF 2.1 Beta stuff to the mod, the SVG image would be displayed full size, without storing a "thumbnail" of the image.  This last time I attempted it, all I am getting is a white screen without any errors in the error log.

I've uploaded the mod (along with the entire mod history) to GitHub (https://github.com/douglasorend/SVG_As_Image_Attachment_Support) in the hopes that someone might be able to help me with this particular project.  I've also attached the beta version available on GitHub to this post....

Anyone who makes a contribution to this project will be properly credited with such assistance in the readme, changelog and mod description.....  Thank you in advance for your assistance!
Title: Re: Need assistance with "SVG as Image Attachment" mod.....
Post by: Bob Perry of Web Presence Consulting on December 10, 2016, 11:48:42 PM
Although I am not qualified to help you with your dilemma, my recommendation would be to forget about SMF 2.1 beta 2 and get the latest beta from github and maybe its improvements will give you clues into resolving your issues...
Title: Re: Need assistance with "SVG as Image Attachment" mod.....
Post by: dougiefresh on December 11, 2016, 10:49:46 AM
Never mind.  It's been solved.  Turns out the support file for SVG functions wasn't loaded before the functions were used....  O:)