• Im sure theres a way to use the built in formatting plugins of WordPress, i need to parse my forum posts content thru the same things the comments use? I assume its some form of hook/action? but i have no idea what!

    Im currently just being a mess and using

    $post = $thread->post ;
    $post = wp_specialchars($post);
    $post = clean_pre($post);
    $post = wpautop($post);
    $post = wptexturize($post);
    $post = convert_smilies($post);

    But this is not what i wish to use! plus the wp_specialchars blocks all HTML

    Can anyone point me in the right direction?!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Phunky

    (@phunky)

    ? anyone ?

    Try asking in wp-hackers.

    Actually, it may just be an apply_filters() issue.

    yes, apply_filters() to the rescue.

    $post = apply_filters('the_content', $thread->post);

    that will apply all the filters that the_content() usually has applied.

    Thread Starter Phunky

    (@phunky)

    Arrr thanks i shall give that a go

    Thread Starter Phunky

    (@phunky)

    Any idea what filters used for the comments? i assume it one used before they submit the content to the database?

    Very little is done to any content before it’s placed into the database. It’s on the way out where the filters are applied.

    Default filters are listed in /wp-includes/default-filters.php.

    Thread Starter Phunky

    (@phunky)

    Even for comments? Surely it would make sense to remove the un-allowed tags before adding the comments to the database, so that it reduces the database file size.

    Yes, unallowed tags are stripped before insertation.

    Comments are inserted into the database via wp_new_comment() which is located in /wp-includes/functions-post.php. Check out what it does.

    Thread Starter Phunky

    (@phunky)

    Yeh thought as much, found the filter “pre_comment_content” which strips all i dont need

    http://eurocss.net/forum.php if anyone wants to go have a look. Still early alpha mind you!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Help Need] For WP-Forum Plugin’ is closed to new replies.