mirror of
https://github.com/e107inc/e107.git
synced 2025-07-27 01:40:22 +02:00
Link bbcode initial user input code.
This commit is contained in:
@@ -53,7 +53,7 @@ class bbcode_shortcodes
|
|||||||
// Format: $bbcode['UNIQUE_NAME'] = array(ONCLICK_FUNC, ONCLICK_VAR, HELPTEXT, ICON, INCLUDE_FUNC, INCLUDE_FUNCTION_VAR);
|
// 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['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['b'] = array($bbcode_func,"[b][/b]", LANHELP_24,"bold.png");
|
||||||
$bbcode['i'] = array($bbcode_func,"[i][/i]", LANHELP_25,"italic.png");
|
$bbcode['i'] = array($bbcode_func,"[i][/i]", LANHELP_25,"italic.png");
|
||||||
$bbcode['u'] = array($bbcode_func,"[u][/u]", LANHELP_26,"underline.png");
|
$bbcode['u'] = array($bbcode_func,"[u][/u]", LANHELP_26,"underline.png");
|
||||||
|
@@ -1707,6 +1707,21 @@ var addtext = function(text, emote) {
|
|||||||
e107Helper.BB.insert(text, emote); return;
|
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
|
//@see e107Helper.BB#help
|
||||||
var help = function(help,tagid) {
|
var help = function(help,tagid) {
|
||||||
e107Helper.BB.help_old(help, tagid, true);
|
e107Helper.BB.help_old(help, tagid, true);
|
||||||
|
Reference in New Issue
Block a user