Re: How to send forum posts to email
Can you give me the current source of the plugin you have made?
You can get the post text (of the first post of the topic) by:
global $bbdb;
$topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
$first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
$content = urlencode(substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0,300));
$content = str_replace('+','%20', $content);
$content = str_replace("’","'", $content);
$post_summary = stripslashes($content);