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

Embedding

#1
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
 

Chris D

XenForo developer
Staff member
#4
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.
 

Digital Doctor

Well-known member
#5
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
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/
 
#6
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.
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/
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.
 

Chris D

XenForo developer
Staff member
#7
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 :)
 

Attachments

#8
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 :)
Hi, does this code still work?