The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Code snippets

View previous topic View next topic Go down

Solved Code snippets

Post by Dekatron on December 8th 2014, 5:02 am

Hi, i found this question http://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>

Dekatron
Forumember

Posts : 26
Reputation : 1
Language : English

Back to top Go down

Solved Re: Code snippets

Post by _Twisted_Mods_ on December 8th 2014, 6:54 am

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>

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Code snippets

Post by Ange Tuteur on December 8th 2014, 7:19 am

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.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Code snippets

Post by Dekatron on December 8th 2014, 2:59 pm

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

Back to top Go down

Solved Re: Code snippets

Post by Ange Tuteur on December 8th 2014, 10:13 pm

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.
Code:
<iframe src="/h1-my-first-html-page"></iframe>
/h1-my-first-html-page would be the link to your HTML page.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Code snippets

Post by Dekatron on December 9th 2014, 2:40 am

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.

Dekatron
Forumember

Posts : 26
Reputation : 1
Language : English

Back to top Go down

Solved Re: Code snippets

Post by Ange Tuteur on December 9th 2014, 5:00 am

See this topic for enabling HTML : http://help.forumotion.com/t35636-enabling-html

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Code snippets

Post by Dekatron on December 9th 2014, 2:09 pm

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

Back to top Go down

Solved Re: Code snippets

Post by Ange Tuteur on December 9th 2014, 9:44 pm

You have chosen these settings for the HTML page ?

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Code snippets

Post by Dekatron on December 10th 2014, 1:11 am

Yes, these settings.

Dekatron
Forumember

Posts : 26
Reputation : 1
Language : English

Back to top Go down

Solved Re: Code snippets

Post by Ange Tuteur on December 10th 2014, 1:19 am

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.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Code snippets

Post by Dekatron on December 10th 2014, 2:03 am

Thank u man, thank u very much for your patience. Finally it works!

Dekatron
Forumember

Posts : 26
Reputation : 1
Language : English

Back to top Go down

Solved Re: Code snippets

Post by Ange Tuteur on December 10th 2014, 2:57 am

You're welcome ^^

Topic archived

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum