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

XF 1.4 Can I use BBCode to..

Discussion in 'XenForo Questions and Support' started by AGD-Andy, Feb 10, 2015.

  1. AGD-Andy

    AGD-Andy Member

    I want to be able to type in a BBCode like this:


    In the backend of that BBCode, I would like to run a query which will pull my ads out of the database and then push them to the interface. The ads are basic HTML and Script.

    Is that possible or should I be thinking of some other way to do this?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, you could do that with a PHP callback, which is one of the options when creating a custom bb code.
  3. AGD-Andy

    AGD-Andy Member

    Thank you, I will look into that to see what I come across. Any example code out there?
  4. cclaerhout

    cclaerhout Well-Known Member

    A quick message: using DB with Bb Codes means several potential requests that can't be prevented. I've done a demo Bb Code (which is working with the Bbm) that first browses all tags to collect needed data (ie: 321 in your case), send this data to a listener (would be executed only once) in which you can make a DB request, the go back in the Bb Code callback to parse it this time.

    If you're used to code, it should be ok. If you're not, just apply a permission to this Bb Code (available in the Bbm).

    Good luck.
    AGD-Andy likes this.

Share This Page