Code snippets
3 posters
Page 1 of 1
Code snippets
Hi, i found this question https://help.forumotion.com/t11400-code-snippet in archive when i search for my problem, and it is similiar question that i want to ask. Is it possible to post code snippet in some topic and be viewable by other members? For example i want to put this code snippet:
<div id="lrep950718626" style="width: 600px;">Data loading....<a href="http://fel01.leaguerepublic.com/l/fg/1_221131450.html">click here for European forces</a><br/><br/><a href="http://www.leaguerepublic.com">LeagueRepublic</a></div>
<script language="javascript" type="text/javascript">
var lrcode = '950718626'
</script>
<script language="Javascript" type="text/javascript" src="http://api.leaguerepublic.com/l/client/api/cs1.js"></script>
<div id="lrep950718626" style="width: 600px;">Data loading....<a href="http://fel01.leaguerepublic.com/l/fg/1_221131450.html">click here for European forces</a><br/><br/><a href="http://www.leaguerepublic.com">LeagueRepublic</a></div>
<script language="javascript" type="text/javascript">
var lrcode = '950718626'
</script>
<script language="Javascript" type="text/javascript" src="http://api.leaguerepublic.com/l/client/api/cs1.js"></script>
Dekatron- Forumember
- Posts : 26
Reputation : 1
Language : English
Re: Code snippets
i would suggest putting the code in a html page then display it in the forum with a iframe
im pretty sure iframes display with or without html being turned on.. i could be wrong
<iframe src="/url2page" width="300px" height="300px"></iframe>
im pretty sure iframes display with or without html being turned on.. i could be wrong
<iframe src="/url2page" width="300px" height="300px"></iframe>
Re: Code snippets
Hello Dekatron,
With HTML enabled some content is allowed in posts. Event handlers and inline scripts are blocked from formatting for security reasons. You can however, use the method twisted posted above, you just need to make sure HTML is enabled.
With HTML enabled some content is allowed in posts. Event handlers and inline scripts are blocked from formatting for security reasons. You can however, use the method twisted posted above, you just need to make sure HTML is enabled.
Re: Code snippets
Thanks for quick answers, but i'm not sure if i understand how i put this iframe around my code in the post, or how u said to display it with iframe. Ok, i understand that i needed to allow HTML in messages and emails configuration. After i done that i went to my topic where i want to post this code snippet. Copy and paste code snippet in post field, and than what? Sorry, but i don't have much knowlegde about this code thing:)
Dekatron- Forumember
- Posts : 26
Reputation : 1
Language : English
Re: Code snippets
What you would do is create a new HTML page :
Administration Panel > Modules > HTML page management > Create a new HTML page
Fill in the details, then paste your code and save.
After that you can link to the page that has the code with an iframe. e.g.
Administration Panel > Modules > HTML page management > Create a new HTML page
Fill in the details, then paste your code and save.
After that you can link to the page that has the code with an iframe. e.g.
- Code:
<iframe src="/h1-my-first-html-page"></iframe>
Re: Code snippets
Intresting, i manage to get this code snippet in preview mode, but when i press send i see only this
<iframe src="/h1-first-experimental-league"></iframe> without a picture, only text. I realize that i must unchecked "Disable HTML in this post" in edit mode, than i see picture in preview but when i send post again this field "Disable HTML in this post" is checked. I suppose this is a problem, but i don't know why this happening, box is again checked. I hope that u understand me what i try to say.
<iframe src="/h1-first-experimental-league"></iframe> without a picture, only text. I realize that i must unchecked "Disable HTML in this post" in edit mode, than i see picture in preview but when i send post again this field "Disable HTML in this post" is checked. I suppose this is a problem, but i don't know why this happening, box is again checked. I hope that u understand me what i try to say.
Dekatron- Forumember
- Posts : 26
Reputation : 1
Language : English
Re: Code snippets
See this topic for enabling HTML : https://help.forumotion.com/t35636-enabling-html
Re: Code snippets
Thank u, i'm very close to solve problem:) however just one thing makes problem still. After following yours tutorial links in previous post i managed to show picture of this table that i want, but i don't satisfy with appereance when header and footer of forum is shown also. After that i went to HTML pages management and choose No in option Do you wish to use your forum header and footer. But now i don't know how to insert properly code snippet to shown table picture. I was trying same way like previous time when i choose to use forum header and footer, but now it's not working.
Dekatron- Forumember
- Posts : 26
Reputation : 1
Language : English
Re: Code snippets
Delete all the code that is currently in the HTML page, and then paste your code again. After that click the magnify glass, or the preview button to see if it works.
Re: Code snippets
Thank u man, thank u very much for your patience. Finally it works!
Dekatron- Forumember
- Posts : 26
Reputation : 1
Language : English
Similar topics
» code snippets context support
» When i paste a long code via [code][/code] the page expands
» Adding code into CSS Stylesheet but when saved less than half of the whole code gets saved! Help!
» i want to disable a css code on the code box
» Hide Code? or Post to See Content Code?
» When i paste a long code via [code][/code] the page expands
» Adding code into CSS Stylesheet but when saved less than half of the whole code gets saved! Help!
» i want to disable a css code on the code box
» Hide Code? or Post to See Content Code?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum