Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: walliny120 - kesäkuu 25, 2014, 03:06:13 AP

Otsikko: Hello to all, I am walliny120
Kirjoitti: walliny120 - kesäkuu 25, 2014, 03:06:13 AP
Hey all.

I am making my own little plugin, but I need some help.

I would like to get the body of the first post from a given topic_ID. I have looked in the functions database, but I don't know which one to use.
My guess is that I would first need to somehow find which post_ID is the first one to link the given topic_ID? and once I have the post_ID I'll call the appropriate fetch_function to get the body?

Does someone know how to do this? All I need is a direction of which functions I need to use - I'll hadle it from there on. add me with my facebook  okaygoodscom

Thanks!
Otsikko: Re: Hello to all, I am walliny120
Kirjoitti: kat - kesäkuu 25, 2014, 01:05:38 IP
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSMF%2Fwelcome.gif&hash=64d0bdab41bf056c5af638442124afd2cc58a5fb)

Dunno if it'll help you... But, SimplePortal had a preconfigured block that does exactly that.

You could either use the portal or, perhaps, borrow the code, from there?

Otsikko: Re: Hello to all, I am walliny120
Kirjoitti: Burke ♞ Knight - kesäkuu 25, 2014, 04:06:54 IP
Also, please try to use a subject title that describes what you need.

LainaaHello to all, I am walliny120
That is more an introduction post title.