Use the exclamation mark to address forums as well

This commit is contained in:
Michael 2017-10-31 19:33:23 +00:00
parent 22aa7f9f07
commit 5222606602
4 changed files with 52 additions and 18 deletions

View file

@ -203,6 +203,15 @@ function string2bb(element) {
template: contact_format,
};
// Autocomplete forums
forums = {
match: /(^|\s)(!\!*)([^ \n]+)$/,
index: 3,
search: function(term, callback) { contact_search(term, callback, backend_url, 'f'); },
replace: editor_replace,
template: contact_format,
};
// Autocomplete smilies e.g. ":like"
smilies = {
match: /(^|\s)(:[a-z]{2,})$/,
@ -213,7 +222,7 @@ function string2bb(element) {
};
this.attr('autocomplete','off');
this.textcomplete([contacts,smilies], {className:'acpopup', zIndex:10000});
this.textcomplete([contacts, forums, smilies], {className:'acpopup', zIndex:10000});
};
})( jQuery );