"Maximum width/height (in pixels) of posted pictures" does not work with <img>

Started by Solrik, October 04, 2015, 01:16:19 PM

Previous topic - Next topic

Solrik

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.

Illori

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.

Oldiesmann

SMF doesn't really touch anything within the html bbcode tags to my knowledge, particularly since only admins can use that tag.
Michael Eshom
Christian Metal Fans

Solrik

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.

margarett

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
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Illori

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.

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: