Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Post_Text Front Page

@hatter

Member

If I understand correctly, you are trying to get the first post of the topic in its entirety. If that is the case, use the function bb_get_first_post to get the first post for the topic, which is what is used by the RSS feed. Then, use the post_text function to get the text for the post based on post_id. Using your example above, you would use:

$post = bb_get_first_post(get_topic_id());

$post_text = post_text($post->post_id);

Whenever you can, you should use the built in functions instead of calling the db directly, unless you have a valid reason for doing so. When you use the built in functions, the appropriate filters are called so that any installed plugins can work (One example would be adding rel=no-follow, or target=blank within your links). Only if you are trying to avoid running the plugins, or you are doing something completely custom, should you not use the built in functions.

Skip to toolbar