@@ -21,7 +21,7 @@ function register() {
21
21
$ this ->name = plugin_lang_get ( 'title ' );
22
22
$ this ->description = plugin_lang_get ( 'description ' );
23
23
$ this ->page = 'config ' ;
24
- $ this ->version = '1.3.6 ' ;
24
+ $ this ->version = '1.3.7 ' ;
25
25
26
26
$ this ->requires ['MantisCore ' ] = '1.3.0 ' ;
27
27
# this plugin can coexist with MantisCoreFormatting.
@@ -231,8 +231,9 @@ function add_tags() {
231
231
$ t_extra_link_tags = 'target="_blank" ' ;
232
232
# BBCode parsers.
233
233
$ this ->t_bbCode ->addParser ('link ' , '/\[url\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1">$1</a> ' , '$1 ' );
234
- $ this ->t_bbCode ->addParser ('namedlink ' , '/\[url\=(.*?)(\smention)?\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1">$3</a> ' , '$3 ' );
235
- $ this ->t_bbCode ->addParser ('mention ' , '/\[url\=([^\s]*)\ mention\](.*?)\[\/url\]/s ' , '<span class="mention"><a ' . $ t_extra_link_tags . ' href="$1">$2</a></span> ' , '$2 ' );
234
+ $ this ->t_bbCode ->addParser ('namedlink ' , '/\[url\=([^\s]*?)\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1">$2</a> ' , '$2 ' );
235
+ $ this ->t_bbCode ->addParser ('mentionlink ' , '/\[url\=([^\s]*)\ mention\](.*?)\[\/url\]/s ' , '<span class="mention"><a ' . $ t_extra_link_tags . ' href="$1">$2</a></span> ' , '$2 ' );
236
+ $ this ->t_bbCode ->addParser ('resolvedlink ' , '/\[url\=([^\s]*)\ resolved\](.*?)\[\/url\]/s ' , '<a ' . $ t_extra_link_tags . ' href="$1" class="resolved">$2</a> ' , '$2 ' );
236
237
$ 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 ' );
237
238
$ 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 ' );
238
239
$ this ->t_bbCode ->addParser ('color ' , '/\[color=([\#a-z0-9]+?)\](.*?)\[\/color\]/s ' , '<span class="bbcolor-$1">$2</span> ' , '$2 ' );
@@ -269,6 +270,8 @@ function string_process_bbcode( $p_string, $p_multiline = TRUE ) {
269
270
// convert mentions and titled links to BBCode mentions (if available).
270
271
$ p_string = preg_replace ( '/<span class="mention"><a .*?href="(.*?)">(.*?)<\/a><\/span>/is ' , '[url=$1 mention]$2[/url] ' , $ p_string );
271
272
$ p_string = preg_replace ( '/<a href="([^"]*)" title="([^"]*)">([^"]*)<\/a>/is ' , '[url=$1]$3[/url] ' , $ p_string );
273
+ $ p_string = preg_replace ( '/<a href="([^"]*)" title="([^"]*)" class="resolved">([^"]*)<\/a>/is ' , '[url=$1 resolved]$3[/url] ' , $ p_string );
274
+ echo $ p_string ;
272
275
# strip all the auto generated URLs by MantisCoreFormatting plugin to avoid mangling.
273
276
if ( ON == $ this ->t_MantisCoreFormatting_process_urls ) {
274
277
$ p_string = string_strip_hrefs ( $ p_string );
0 commit comments