News:

Wondering if this will always be free?  See why free is better.

Main Menu

snippet to parse first post in topic

Started by roshaoar, May 05, 2015, 06:27:16 AM

Previous topic - Next topic

roshaoar

Hello,

Would anyone have a snippet example and where to put it to parse the first post in a topic. It's for something I'd like to add to my forum

many thanks

Illori

how exactly do you want to "parse" the first post? what do you want it to do? where do you want it to show? some details and maybe we can help you.

roshaoar

Hello Illori,

I'd like to be able to scan the first post in a thread for an external img, then to rewrite the url, add a parameter and use that url and parameter in messageindex.template. Basically image proxy use like in http://www.simplemachines.org/community/index.php?topic=527996.0 - but not for all images sitewide.

Kindred

so, what you ACTUALLY mean is - you want to add "post preview" to the message index which shows the first x characters from the topic post...

There is a mod for that.

You ALSO want to do something with an image in that first post...   that is MUCH more complicated.
Сл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."

roshaoar

Ahh - excellent. No I don't actually want to show anything, but by the looks of things MessagePreviewOnMouseOver  should at least show me the programming used to get data at like this. Then I'll see if I can bodge something that'll let me get the first image and alter it.

Thanks!

Advertisement: