@@ -22,7 +22,7 @@ function register() {
2222 $ this ->name = plugin_lang_get ( 'title ' );
2323 $ this ->description = plugin_lang_get ( 'description ' );
2424 $ this ->page = 'config ' ;
25- $ this ->version = '2.1.6 ' ;
25+ $ this ->version = '2.1.7 ' ;
2626
2727 $ this ->requires ['MantisCore ' ] = '2.0.0 ' ;
2828 # this plugin can coexist with MantisCoreFormatting.
@@ -254,8 +254,9 @@ function add_tags() {
254254 $ t_extra_link_tags = 'target="_blank" ' ;
255255 # BBCode parsers.
256256 $ this ->t_bbCode ->addParser ('link ' , '/\[url\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1">$1</a> ' , '$1 ' );
257- $ this ->t_bbCode ->addParser ('namedlink ' , '/\[url\=(.*?)(\smention)?\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1">$3</a> ' , '$3 ' );
258- $ this ->t_bbCode ->addParser ('mention ' , '/\[url\=([^\s]*)\ mention\](.*?)\[\/url\]/s ' , '<span class="mention"><a ' . $ t_extra_link_tags . ' href="$1">$2</a></span> ' , '$2 ' );
257+ $ this ->t_bbCode ->addParser ('namedlink ' , '/\[url\=([^\s]*?)\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1">$2</a> ' , '$2 ' );
258+ $ this ->t_bbCode ->addParser ('mentionlink ' , '/\[url\=([^\s]*)\ mention\](.*?)\[\/url\]/s ' , '<span class="mention"><a ' . $ t_extra_link_tags . ' href="$1">$2</a></span> ' , '$2 ' );
259+ $ this ->t_bbCode ->addParser ('resolvedlink ' , '/\[url\=([^\s]*)\ resolved\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1" class="resolved">$2</a> ' , '$2 ' );
259260 $ this ->t_bbCode ->addParser ('email ' , '/\[email\]([a-z0-9\-_\.\+]+@[a-z0-9\-]+\.[a-z0-9\-\.]+?)\[\/email\]/s ' , '<a ' . $ t_extra_link_tags . ' href="mailto:$1">$1</a> ' , '$1 ' );
260261 $ this ->t_bbCode ->addParser ('named-email ' , '/\[email=([a-z0-9\-_\.\+]+@[a-z0-9\-]+\.[a-z0-9\-\.]+?)\](.+?)\[\/email\]/s ' , '<a ' . $ t_extra_link_tags . ' href="mailto:$1">$2</a> ' , '$2 ' );
261262 $ this ->t_bbCode ->addParser ('color ' , '/\[color=([\#a-z0-9]+?)\](.*?)\[\/color\]/s ' , '<span class="bbcolor-$1">$2</span> ' , '$2 ' );
@@ -292,6 +293,8 @@ function string_process_bbcode( $p_string, $p_multiline = TRUE ) {
292293 // convert mentions and titled links to BBCode mentions (if available).
293294 $ p_string = preg_replace ( '/<span class="mention"><a .*?href="(.*?)">(.*?)<\/a><\/span>/is ' , '[url=$1 mention]$2[/url] ' , $ p_string );
294295 $ p_string = preg_replace ( '/<a href="([^"]*)" title="([^"]*)">([^"]*)<\/a>/is ' , '[url=$1]$3[/url] ' , $ p_string );
296+ $ p_string = preg_replace ( '/<a href="([^"]*)" title="([^"]*)" class="resolved">([^"]*)<\/a>/is ' , '[url=$1 resolved]$3[/url] ' , $ p_string );
297+ echo $ p_string ;
295298 # strip all the auto generated URLs by MantisCoreFormatting plugin to avoid mangling.
296299 if ( ON == $ this ->t_MantisCoreFormatting_process_urls ) {
297300 $ p_string = string_strip_hrefs ( $ p_string );
0 commit comments