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

BB Code Media Site - is it possible to call a template?

Discussion in 'XenForo Development Discussions' started by AndyB, Sep 9, 2015.

  1. AndyB

    AndyB Well-Known Member

    Hello,

    I'm creating a new add-on and currently I'm calling an <iFrame> from the BB Code Media Site (Embed HTML), this calls a PHP file on the same server.

    pic001.jpg

    Calling the PHP file works fine, but it would be so much easier if could call a template instead, is this possible without loading the entire page? I would like the output of the template displayed in the embedded HTML.

    Thank you.
     
    Last edited: Sep 9, 2015
  2. AndyB

    AndyB Well-Known Member

  3. AndyB

    AndyB Well-Known Member

    Well I got stuck trying to save the BB Code Media Site.

    pic001.jpg

    Andy/AudioList/Index.php
    pic002.jpg

    Why do I get an error trying to "Save BB Code Media Site" ?
     
    Last edited: Sep 9, 2015
  4. Chris D

    Chris D XenForo Developer Staff Member

    The class named you have entered isn't the same class name in the PHP file.
     
  5. AndyB

    AndyB Well-Known Member

    Thank you, Chris. :)
     
  6. AndyB

    AndyB Well-Known Member

    At this point I have this:

    pic001.jpg

    This returns the word "test" in the message. Now is it possible to add PHP code to call a template and have the output of that template be returned to this Index.php and then ultimately have the HTML entered into the message?
     

Share This Page