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

Custom BBTags: Another placeholder

Discussion in 'XenForo Suggestions' started by sheel, Jul 3, 2016.

  1. sheel

    sheel Member

    Currently, there are {option} and {text}
    Code:
    [mybbcode]aaa[/mybbcode]
    {text}: aaa
    {option}: (empty)
    
    [mybbcode=bbb]aaa[/mybbcode]
    {text}: aaa
    {option}: bbb
    
    I suggest adding a third placeholder that has the option value "if" an option is given, else the text value
    Code:
    [mybbcode]aaa[/mybbcode]
    {text}: aaa
    {option}: (empty)
    {optionortext}: aaa
    
    [mybbcode=bbb]aaa[/mybbcode]
    {text}: aaa
    {option}: bbb
    {optionortext}: bbb
    
    Currently a full plugin would be required for getting one or the other value. And it's a pretty small change (I think)...
     
  2. EQnoble

    EQnoble Well-Known Member

    I'm not sure I follow that, but I don't think it is worth doing seeing that I can't tell what purpose it would actually serve. I see 2 values in both your examples so no matter what at best you describe adding an option for no reason.

    Why not just use a callback?

    Maybe if you can give a real world use example instead of aaa and bbb which mean nothing nor show why I need two fields to have the same value.
     

Share This Page