1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Text Shadow Custom BB Code help

Discussion in 'XenForo Questions and Support' started by Placid, Jun 26, 2015.

  1. Placid

    Placid Member

    Hey guys
    so on my site i been working on a custom BB code like this [shadow]Text[/shadow]
    this would add shadow to the text like in css or html styling like this, [shadow]Shadow'ed text[/shadow] would look like this [​IMG]

    So yea i have managed to get it working but i need help, i want to add options for the bb code for different colors, so like so far the default one is just green (as shown above) i want to do that like [shadow=green]Shadow'ed text[/shadow] and a few other colors, in the html replacement box i did span style: text shadow... etc
    i set that as green for testing purposes, so can you guys help me add options to it with different colors.. would i need to use php callbacks? if so please specify. :)

    - Placid
  2. Placid

    Placid Member

  3. Chris D

    Chris D XenForo Developer Staff Member

    You would only need a PHP Callback if you wanted to make the option parameter more complicated, but assuming you just want it to be a single colour:


    Notice this probably isn't completely correct, but it demonstrates how the {option} parameter can be passed in to the HTML replacement.
    Placid likes this.
  4. Placid

    Placid Member

    thank you, i will give this a shot. :D
  5. Placid

    Placid Member

    Ok i got it working but how do i add more than on option? like one option is [shadow=green] how can i do a different one like [shadow=red] ? thnks for your help :)

Share This Page