• Resolved THWright

    (@thw56)


    phpBB3 has an extension which adds oodles of bbCodes to its editor menu. One of these is the glow bbCode, which is essentially a text shadow which the user can color. I’d think its format would be:

    [glow color=”red”]text[/glow]
    [glow color=”#99000]text[/glow]

    https://ww.wp.xz.cn/plugins/bbcode-deluxe/

Viewing 1 replies (of 1 total)
  • Thread Starter THWright

    (@thw56)

    Adding the following to the class-bbcode.php creates the glow shortcode.

    `add_shortcode(‘glow’,array(&$this,’shortcode_glow’));
    add_shortcode(‘GLOW’,array(&$this,’shortcode_glow’));

    function shortcode_glow($atts=array(),$content=NULL){
    if(NULL===$content) return ”;
    $attribs = implode(”,$atts);
    $color=substr ($attribs, 1);
    if(ctype_xdigit($color))
    $color = ‘#’.$color;
    return ‘<span style=”text-shadow: 0px 0px 7px ‘.$color.'”>’.$this->do_shortcode($content).'</span>’;
    }`

Viewing 1 replies (of 1 total)

The topic ‘Add bbCode: glow’ is closed to new replies.