Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Solrik on October 04, 2015, 01:16:19 PM

Title: "Maximum width/height (in pixels) of posted pictures" does not work with <img>
Post by: Solrik on October 04, 2015, 01:16:19 PM
I've set it to 500/500 and the image is resized when linked inside an [img] tag but it doesn't work when inside a [ html]<img src=...>[/html] tag. Is there a quick way to edit a file to support the <img> tag?

I'm using RSS Feed Poster mod to make it create news topics, and it uses the [ html]  tag.
Title: Re: "Maximum width/height (in pixels) of posted pictures" does not work with <img>
Post by: Illori on October 04, 2015, 04:04:16 PM
i dont think it is possible as the img html tag is not run through the same process. i bet if you examine the page you could add some css to resize the images that way.
Title: Re: "Maximum width/height (in pixels) of posted pictures" does not work with <img>
Post by: Oldiesmann on October 04, 2015, 06:36:08 PM
SMF doesn't really touch anything within the html bbcode tags to my knowledge, particularly since only admins can use that tag.
Title: Re: "Maximum width/height (in pixels) of posted pictures" does not work with <img>
Post by: Solrik on October 05, 2015, 11:56:34 AM
Thank you for the reply.

Is there a RSS Feed poster that you can recommend?
The one I'm using is posting with the html tag so there isn't much I can do about it.

I used ".post img" to limit the displayed sizes, but the style applies to all img tags in a post.
Title: Re: "Maximum width/height (in pixels) of posted pictures" does not work with <img>
Post by: margarett on October 05, 2015, 02:06:44 PM
if the images format is always the same, you can hack the MOD's code and replace <img src="..... With <img width="xx" height="yy" src=".....

I think a preg_replace might also allow you to catch more random cases but that's out of my league :P
Title: Re: "Maximum width/height (in pixels) of posted pictures" does not work with <img>
Post by: Illori on October 05, 2015, 02:25:48 PM
Quote from: margarett on October 05, 2015, 02:06:44 PM
if the images format is always the same, you can hack the MOD's code and replace <img src="..... With <img width="xx" height="yy" src=".....

I think a preg_replace might also allow you to catch more random cases but that's out of my league :P

i dont think that will work, the mod does not really create the code, it is created from the RSS feed that is being basically copy/pasted with the mod.

a preg_replace or similar might work better. maybe if the op linked us to one of these messages on their forum we can offer some other suggestions.
Title: Re: "Maximum width/height (in pixels) of posted pictures" does not work with <img>
Post by: Kindred on October 05, 2015, 02:54:53 PM
except even a preg_replace probably won't work -- since the mod just takes the contents of the RSS feed and drops them into a post within the html tag...

so, replacing the contents of the feed <img> tag with the IMG BBC would still fail, since it would be within the HTML BBC tags....


basically, the entire RSS importer would need to be re-written to parse the contents as BBC instead of just an html dump