X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fduepuntozero%2Ftheme.php;h=02882ca943ca91afe73c03c96a77e0f6d3e916e5;hb=f0c2b771570ba27cd1ee782fefc061cfe216b5cf;hp=c674a99d99ad848bb250c72667a8372860f80c97;hpb=8e12b159d947fb27ad6bdd5e06e3a90c1713687e;p=friendica.git diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index c674a99d99..02882ca943 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -1,12 +1,16 @@ set_template_engine('smarty3'); - $colorset = get_pconfig( local_user(), 'duepuntozero','colorset'); + $colorset = PConfig::get( local_user(), 'duepuntozero','colorset'); if (!$colorset) - $colorset = get_config('duepuntozero', 'colorset'); // user setting have priority, then node settings + $colorset = Config::get('duepuntozero', 'colorset'); // user setting have priority, then node settings if ($colorset) { if ($colorset == 'greenzero') $a->page['htmlhead'] .= ''."\n"; @@ -35,19 +39,11 @@ function insertFormatting(BBcode, id) { if (document.selection) { textarea.focus(); selected = document.selection.createRange(); - if (BBcode == "url") { - selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]"; - } else { - selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; - } + selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; } else if (textarea.selectionStart || textarea.selectionStart == "0") { var start = textarea.selectionStart; var end = textarea.selectionEnd; - if (BBcode == "url") { - textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); - } else { - textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); - } + textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); } return true;