Search

bbPress Showcase » Plugins by _ck_

Filter page for smilies

RSS
  1. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Hi,

    I have a page that pulls data from topics and displays them on a new page. This works, but smiley tags aren't filtered and replaced. Now I understood that you need to ad a filter, but I have no idea how to do this with my current output.

    This is how I get the text (this is in a foreach)
    <?php echo $blog_topic_posts[0]->post_text; ?>

    So this output needs to be filtered.

    Complete foreach code of the text output:
    <?php $blog_topics = get_blog_topics(); ?>
    <?php foreach($blog_topics as $topic) :
    $blog_topic_posts = get_thread( $topic->topic_id); ?>
    <h1>"><?php topic_title(); ?></h1>
    <?php printf(__('%1$s ago by %3$s'), get_topic_time(), get_user_profile_link($topic->topic_poster), get_topic_author()) ?>
    <?php echo $blog_topic_posts[0]->post_text; ?>
    <div align="right"><?php printf(__('Comments (%2$s)'), get_topic_last_post_link(), get_topic_posts()) ?></div>
    <?php endforeach; ?>

    Thank you for your time

    Posted 2 years ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 884

    offline

    <?php echo apply_filters('post_text',$blog_topic_posts[0]->post_text,0); ?>

    Posted 2 years ago #
  3. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Great! That worked!

    Thanks

    Posted 2 years ago #

RSS feed for this topic

Post a reply to “Filter page for smilies”

You must log in to post.

keep _ck_ coding >> donate $5 <<     Theme Switcher:
38 users online from in the past 30 minutes. 18 bots 20 guests
1,782 views today 8,665 yesterday 14,010 peak. Most at once 43 today 48 yesterday 131 peak. Visited today: Dickinsonjohn9, shairah27, xiaotian
2,245 posts in 385 topics over 63 months by 426 of 1,989 members. Latest: dxdiag02, Pablo01, Dickinsonjohn9