Skip to:
Content
Pages
Categories
Search
Top
Bottom

To display [Resolved], by the thread’s title

  • I’m not sure why, or what’s going on, maybe I missed something.. =/ But, when trying to mark a thread [Resolved] in here, it doesn’t seem to show up as [Resolved].. like it does on the WordPress.org forums..? =/ Is this supposed to happen, or.. ?

    spencerp

Viewing 6 replies - 1 through 6 (of 6 total)
  • Nevermind, I’m sorry tonight people.. I’m so behind on sleep, the brain is in bed, but I’m not.. The [Resolved] being added by the “thread titles” was a modification to the WP.ORG forums and so forth.. it’s not by “default” in the download of bbpress..

    Is there any chance of maybe having that a plugin or not, maybe? I wouldn’t mind getting a hold of that.. ;) =P

    spencerp

    Anyone? Do you think we can get the “file changes” or whatever, to be able to display [Resolved], by the thread’s title, that are marked Resolved? Just was wondering.. ;) :)

    I noticed this in: formatting-functions.php near the end, for [Closed]..

    function closed_title( $title ) {

    global $topic;

    if ( '0' === $topic->topic_open )

    return sprintf(__('[closed] %s'), $title);

    return $title;

    }

    Maybe if there’s a way to add one for [Resolved]… ? lol!!

    spencerp


    so1o
    Participant

    @so1o

    Hey Spencer

    create a plugin with this code.. that should do the trick.. i think..

    function my_resolve_title($id){

    global $topic;

    if ('yes' == $topic->topic_resolved)

    return sprintf(__('[resolved] %s'), $topic->topic_title);

    return $topic->topic_title;

    }

    add_filter( 'topic_title', 'my_resolve_title');

    You’re so awesome!! It works!! Thanks a ton!!

    <?php

    /*

    Plugin Name: My Resolve Title

    Plugin URI: https://bbpress.org/forums/topic/338?replies=4#post-1764

    Description: Puts [Resolved] by the thread's title, for threads that are marked as Resolved.

    Author: so1o

    Version: 0.1

    Author URI: http://www.adityanaik.com/forums/

    */

    function my_resolve_title($id){

    global $topic;

    if ('yes' == $topic->topic_resolved)

    return sprintf(__('[Resolved] %s'), $topic->topic_title);

    return $topic->topic_title;

    }

    add_filter( 'topic_title', 'my_resolve_title');

    ?>

    spencerp

    where does this plugin code get dropped exactly?

    In your forum’s root directory.. you have to make a folder called: my-plugins and then upload the file there.. Call a blank file: my_resolve_ title.php and add the above codes into it.. make sure there isn’t white space before the: <?php and after the last: ?>

    Save it, and upload it to your my-plugins folder.. Good luck!

    spencerp

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar