Info
- 7 posts
- 3 voices
- Started 5 years ago by spencerp
- Latest reply from spencerp
To display [Resolved], by the thread's title
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
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'); -
- Posted 5 years ago #
You're so awesome!! It works!! Thanks a ton!!
<?php
/*
Plugin Name: My Resolve Title
Plugin URI: http://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
-
- Posted 5 years ago #
where does this plugin code get dropped exactly?
-
- Posted 5 years ago #
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
-
You must log in to post.