diff --git a/e107_core/shortcodes/batch/bbcode_shortcodes.php b/e107_core/shortcodes/batch/bbcode_shortcodes.php index b7bffdb2b..dbcfac4f4 100644 --- a/e107_core/shortcodes/batch/bbcode_shortcodes.php +++ b/e107_core/shortcodes/batch/bbcode_shortcodes.php @@ -53,7 +53,7 @@ class bbcode_shortcodes // Format: $bbcode['UNIQUE_NAME'] = array(ONCLICK_FUNC, ONCLICK_VAR, HELPTEXT, ICON, INCLUDE_FUNC, INCLUDE_FUNCTION_VAR); $bbcode['newpage'] = array($bbcode_func,"[newpage]", LANHELP_34, "newpage.png"); - $bbcode['link'] = array($bbcode_func,"[link=".LANHELP_35."][/link]", LANHELP_23,"link.png"); + $bbcode['link'] = array('addinput',"[link=".LANHELP_35."][/link]", LANHELP_23,"link.png"); $bbcode['b'] = array($bbcode_func,"[b][/b]", LANHELP_24,"bold.png"); $bbcode['i'] = array($bbcode_func,"[i][/i]", LANHELP_25,"italic.png"); $bbcode['u'] = array($bbcode_func,"[u][/u]", LANHELP_26,"underline.png"); diff --git a/e107_files/jslib/e107.js.php b/e107_files/jslib/e107.js.php index 163686218..e08794e8f 100644 --- a/e107_files/jslib/e107.js.php +++ b/e107_files/jslib/e107.js.php @@ -1707,6 +1707,21 @@ var addtext = function(text, emote) { e107Helper.BB.insert(text, emote); return; } +// Prompt for user input value +var addinput = function(text) { + + var rep = text.match(/=([a-z0-9, ]*)]/); + var val = prompt(rep[1]); + + if(!val) + { + return; + } + var newtext = text.replace(rep[1], val); + emote = ''; + e107Helper.BB.insert(newtext, emote); return; +} + //@see e107Helper.BB#help var help = function(help,tagid) { e107Helper.BB.help_old(help, tagid, true);