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

Embedding

Discussion in 'XenForo Questions and Support' started by EchoThruMe, May 25, 2012.

  1. EchoThruMe

    EchoThruMe Member

    Hey guys. I am trying to embed a code from a template that will host a giveaway I am running on my forum. When I go to the embed tool I do not get the image that is supposed to show. I only get the code boxed in. I was wondering if anyone knows how to do this better than I do. It is an html code and i selected html when embedding. A hand please. Thanks
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What are you trying to embed? What code are you using?
     
  3. EchoThruMe

    EchoThruMe Member

    I am using an html code from rafflecopter. simple html
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    If I understand correctly, you're trying to post code that looks like this:

    HTML:
    <a id="rc-7a52bd0" class="rafl" href="http://www.rafflecopter.com">a Rafflecopter giveaway</a>
    <script src="//d12vno17mo87cx.cloudfront.net/embed/rafl/cptr.js"></script>
    Into a forum post?

    Or are you trying to put it into a template? Or on a page?

    There's no reason why it wouldn't work in a site template or on a static page. But if you want to put it into a forum post you have to remember that internet forums do not support HTML code as it is potentially a massive security risk.

    That's why we have BB Code.
     
    EchoThruMe likes this.
  5. Digital Doctor

    Digital Doctor Well-Known Member

    You want to make a Page. It will dipslay the HTML.
    You access that from the Admin panel.
    http://xenforo.com/community/threads/pages.489/
     
    EchoThruMe likes this.
  6. EchoThruMe

    EchoThruMe Member

    Thanks I will try. I was under the impression that I was able to insert html code into a forum post since there is an html insert option. I will try the page avenue.
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    The HTML insert option is for forums like this where you demonstrate a lot of HTML code. It doesn't actually parse HTML.

    You might be interested in this.

    This add on creates a new bbcode called [raffle]

    If you generate the code and it looks like this:

    HTML:
    <a id="rc-7a52bd0" class="rafl" href="http://www.rafflecopter.com">a Rafflecopter giveaway</a>
    <script src="//d12vno17mo87cx.cloudfront.net/embed/rafl/cptr.js"></script>
    See where it says id="rc-7a52bd0"?

    Well rc-7a52bd- is the unique code for your raffle.

    So, to display that code and the raffle properly in a forum post, install my add-on and type in your forum post:

    [raffle]rc-7a52bd0[/raffle]

    Just replace "rc-7a52bd0" with whatever your id is in the code you generate on their website :)
     

    Attached Files:

    Varma and Jake Bunce like this.
  8. kjaonline

    kjaonline Member

    Hi, does this code still work?
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    I have no idea. You will have to try it. I don't see why not.
     
    kjaonline likes this.

Share This Page