Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Can I remove features from BBCODE BUTTONS?

Alright can someone help me remove some features from this?

I want to remove List, Unordered List, Close, Center, ORdered list, Code, URL, Strike through:

<?php
/*
Plugin Name: BBcode Buttons Toolbar
Plugin URI: https://bbpress.org/plugins/topic/114
Description: Automatically adds an easy access button toolbar above the post textarea to allow quick tags in BBcode. This is an enhanced replacement for the Comment Quicktags plugin. No template editing required.
Author: _ck_
Author URI: http://bbShowcase.org
Version: 0.0.9

License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/

Donate: http://bbshowcase.org/donate/
*/

add_action('post_form','bbcode_buttons',11);
add_action('edit_form','bbcode_buttons',11);
add_action('bbcode_buttons','bbcode_buttons');

function bbcode_buttons() {
$tags = bb_allowed_tags();
echo "<scr"."ipt type='text/javascript' defer='defer'>
function BBcodeButtons_init() {
BBcodeButtons.push(new BBcodeButton('ed_bold','Fet','','','b','font-weight:bold;','Fete bokstaver'));
BBcodeButtons.push(new BBcodeButton('ed_italic','Kursiv','','','i','padding-right:7px;font-style:italic;','Kursive bokstaver'));
BBcodeButtons.push(new BBcodeButton('ed_under','U','','','u','text-decoration:underline;','underline'));
BBcodeButtons.push(new BBcodeButton('ed_strike','S','','','s','text-decoration:line-through;','strike through'));
BBcodeButtons.push(new BBcodeButton('ed_link','URL','','[/url]','a','text-decoration:underline;','make a link'));
BBcodeButtons.push(new BBcodeButton('ed_block','“Sitat”','
Quote:
','
','q','padding:0 1px 1px 1px;','Siter tekst'));";
if (isset($tags['img'])) {echo "BBcodeButtons.push(new BBcodeButton('ed_img','Bilde','[img]','[/img]','m',-1));";}
echo "BBcodeButtons.push(new BBcodeButton('ed_ul','UL','
    ','
','u','','unordered list'));
BBcodeButtons.push(new BBcodeButton('ed_ol','OL','
    ','
','o','','ordered list'));
BBcodeButtons.push(new BBcodeButton('ed_li','LI','[*]','[/*]','l','','list item'));";
if (isset($tags['center'])) {echo "BBcodeButtons.push(new BBcodeButton('ed_center','center','
','
','c','','center'));";}
echo "BBcodeButtons.push(new BBcodeButton('ed_code','CODE','
Code:
','
','p','line-height:160%;font-size:80%;letter-spacing:1px;font-family:anadale,serif;','unformatted / code'));
BBcodeButtons.push(new BBcodeButton('ed_close','close','','','c',' ','auto-close any tags you left open'));
}</scr"."ipt>
<scr"."ipt src='" .bb_get_option('uri').trim(str_replace(array(trim(BBPATH,"/\"),".php","\"),array("",".js","/"),__FILE__),"/\")."?0.0.9' type='text/javascript' defer='defer'></scr"."ipt>";
}
?>

Skip to toolbar