Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: 1st line of the first post in a topic?


so1o
Participant

@so1o

ok..

try this plugin

<?php

function your_function_name($where) {

global $topic;

if ($topic)

return $where . ' AND topic_id = ' . $topic->topic_id;

else

return $where;

}

function get_first_post_of_current_topic() {

global $bb_post;

add_filter('get_latest_posts_where','your_function_name');

$bb_post = get_latest_posts(1);

if(count($bb_post) == 1 ) {

$bb_post = $bb_post[0];

post_text();

}

}

?>

where you want call get_first_post_of_current_topic();

Skip to toolbar