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

How to make Code bbcode like Quote bbcode

Discussion in 'XenForo Questions and Support' started by Veer, Aug 6, 2011.

  1. Veer

    Veer Well-Known Member

    Hi guys,

    Looking for way [template or file edit] to make Code bbcode work like Quote bbcode, I mean using Code bbcode I want to allow html formatting (i.e link tags, line break, font size etc) same as Quote bbcode does.

    Hope there's a way to do this.
     
    Jake Bunce likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The Code BB Code tag is specifially designed not to parse HTML content.
    Why not just use Quote in that case?

    You could do it with file edits but they would need to be redone every upgrade.

    Otherwise you would be better off asking for an add-on to be created.
     
    ragtek likes this.
  3. Veer

    Veer Well-Known Member

    Actually I need a bbcode that parse HTML content other than the Quote bbcode, Im gonna use it on usergroup permission base, and in that case I can't use Quote bbcode.
    Yeah, I know its a pain but at the moment I don't see a better solution.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. Veer

    Veer Well-Known Member

    I'm already using that add-on but I don't know how to make a custom bbcode that not only parse HTML content but also have 2 different permission based result. (1) show actual content under bbcode to logged in users only and (2) on guest view show different message to them.

    In Code bbcode case I've done both things by editing template but yet I'm not successful with HTML parsing.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

  7. Veer

    Veer Well-Known Member

    I tried it but didn't get it.

    Hope someone share their knowledge on original question.
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Thank you sooooo much for asking this question. You made me look in the code where I discovered a 'rich' option for the code tag. I have long wished for such an option when posting my guides and whatnot.

    Use this:

    [code=rich]

    [/code]​

    That allows bbcode to function inside of the code tag. For example:

    Code:
    blah blah blah, bold text, link to apple's site
    
     
    Fuhrmann, Brogan, Trombones13 and 2 others like this.
  9. Veer

    Veer Well-Known Member

    Its really amazing Jake, wow thank you so much.

    Code:
    Line 1
    Line 2
    Line 3
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Oh man, I forgot all about that :oops:

    Then again, it was posted about over a year ago so that's my excuse...
     

Share This Page