Re: Post_Text Front Page
A bit surprised no one has chimed in yet, didn’t think it was that difficult to achieve.
Anyways here is the code that I found in another thread:
<?php
function get_post_teaser($chars = 200){
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 = substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0, $chars); //gets the first 200 chars of the post
return $content;
}
?>
I figured it’s the same basis, however since I’m pretty much brain dead in regards to php I can’t for the life of me make the post_text show fully. This code strips out html code so links don’t show, how can the code be altered to allow html? I figure this code is similar to WordPress’ content_excerpt. If there is another way, I’m open to suggestions.
Sorry for all the newbie questions, I assure you I’ve tried my best to track down my issues in the forum search before asking my questions, unfortunately due to lack of a codex and documentation I’m pretty much at a lost.