1 (edited by Source Code 2009-12-14 12:19)

Topic: Is It Possible To Display contents of a post on external page?

Hi

I'd like to show the original post of a topic on my home page, along with a link to the thread and if possible a number of replys, I've seen one site thats using such a script on a punbb 1.2 board ( http://www.dubterrain.net/ ) but cannot find anything for 1.3 - any ideas?

Re: Is It Possible To Display contents of a post on external page?

Please specify what exactly you want to display on the main page of your site. Headers, as on http://www.dubterrain.net, or the full text of the first post?

Re: Is It Possible To Display contents of a post on external page?

Gordei4ik wrote:

Please specify what exactly you want to display on the main page of your site. Headers, as on http://www.dubterrain.net, or the full text of the first post?

Hi

Just the full text of the first please

Re: Is It Possible To Display contents of a post on external page?

Database query looks like this:

$topic_id=1234;
$query = array(
    'SELECT'    => ' posts.id AS pid, message, num_replies',
    'FROM'        => 'topics, posts',
    'WHERE'        => 'posts.id = topics.first_post_id AND topics.id ='.$topic_id,
);

Post link is formed as follows:

<a href="'.forum_link($forum_url['post'], $pid).'">Link Text</a>