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

HTML in posts?

Discussion in 'XenForo Questions and Support' started by Steven UK, Jun 13, 2012.

  1. Steven UK

    Steven UK New Member


    It is possible to post HTML in threads? I know it is possible in pages, but not in posts? Is there a plug in for this?

    Also, what about scripts in posts? Paypal for example?

    Thanks in advance.
  2. Chris D

    Chris D XenForo Developer Staff Member

    This isn't possible unfortunately but there is an add-on which makes available a special BB Code which renders HTML.


    It works really well. I used an earlier version - but you know what - you learn to live without HTML quite quickly!

    Scripts in posts? That's always a big no no. Does IPB allow this? Are you literally talking about posts accepting <script> code? Potentially a massive security hole there if it's exploited.

    Not sure what script you're referring to with regards to PayPal. Donate buttons can be made with simple image and URLs:


    Anything more advanced is possible using things like BB Code and Media Sites.
    Steven UK likes this.
  3. Steven UK

    Steven UK New Member

    No IPB, does not either, they allow HTML though; although for the paypal buy now buttons, we created something using the BB code, and a bit of modifying.

    The scripts, I was really thinking about like Aweber email capture scripts, etc. as well as paypal.

    Thanks for your reply.
  4. Dinh Thanh

    Dinh Thanh Well-Known Member

    This is not safe if you allow your members post html.
    They can broadcast malware on your forum.

    If you need something special, you should make a BBCode to do.
    Learner and Steven UK like this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    Yeah I should have added this parsehtml add on is permission based - still not recommended for your users.

    You can do some really clever things with bbcode so just let me know if there's anything specific.
    rafass and Steven UK like this.
  6. Steven UK

    Steven UK New Member


    On the IPB, we just had admins capable of using HTML.
  7. Chris D

    Chris D XenForo Developer Staff Member

    Ok, great. That's what the parsehtml BB Code does then. You can allow any usergroups to use it, or just restrict it to admins.
  8. Zephyr

    Zephyr Well-Known Member

    Not present in xenforo by default ? :S
  9. Chris D

    Chris D XenForo Developer Staff Member

    Posts can only contain BB Code. The add-on I mentioned above (http://xenforo.com/community/resources/html-bbcode-permission-protected.731/) can allow you to parse HTML code within special BB Code tags and assign permissions to its use but it isn't a good idea to give your users the ability to render HTML. That's what BB Code is for.
  10. Zephyr

    Zephyr Well-Known Member

    Heu, I have +200 news :S


    In addition it is not sure that the bbcode works on xenportal (look screen) :S
  11. Chris D

    Chris D XenForo Developer Staff Member

    You would need to speak to DarkImmortal if it doesn't work on XenPorta.

    Remember I just said it's permissions based. You should check that the permissions are all setup ok first.
  12. Zephyr

    Zephyr Well-Known Member

    Permission has been configured.
    (html on for admin and redacteur)
  13. Zephyr

    Zephyr Well-Known Member

    But even this is problematic, forcing them to change more than 200 news at hand: s
  14. Chris D

    Chris D XenForo Developer Staff Member

    200 is nothing.

    I had about 10,000 HTML posts that I needed to convert to BB Code.

    I used this add-on, by Kier.


    You will need some knowledge/research of regular expressions though, and you need to be very careful not to incorrectly replace things or miss things.

    I'd say if it's only 200, it's probably not going to take that long to do it by hand by adding the Parsehtml tags if you can get help to get it to work on XenPorta. Obviously with 10,000 posts like I had, that wouldn't have been possible by hand.
  15. Zephyr

    Zephyr Well-Known Member

    But I have no knowledge of regular expression :S
  16. Chris D

    Chris D XenForo Developer Staff Member

    Doing it by hand then might be best.

    At least it's 200 and not 2000 :)

Share This Page