Description
It is possible to use almost any HTML code on your Wikidot site - for security reasons it will be rendered inside an iframe though.
Example (aNobii embeded code)
You might be given some code that looks like this (in this case, it is a "book shelf" badge from aNobii):
<!-- 1 This is the HTML section of the badge --> <div id="badge"> <script type="text/javascript" src="http://www.anobii.com/anobi/badge_generator.php?p=012d64e5c2a5327d15&language=2,4&tag=0,11,9,1,8,5,6,4,10,3&count=5&recent=1&progress=3&title=title&subtitle=0&author=0&img=small&link_to=1&az_site=&a_id="></script> </div> <!-- Badge ends -->
Simply surround this with the HTML block syntax ([[html]] ... [[/html]]) and add it to your wikidot site's page, like this:
[[html]] <!-- 1 This is the HTML section of the badge --> <div id="badge"> <script type="text/javascript" src="http://www.anobii.com/anobi/badge_generator.php?p=012d64e5c2a5327d15&language=2,4&tag=0,11,9,1,8,5,6,4,10,3&count=5&recent=1&progress=3&title=title&subtitle=0&author=0&img=small&link_to=1&az_site=&a_id="></script> </div> <!-- Badge ends --> [[/html]]
In action
Using the above code should put something like this on your page:
Thanks to tsangk for this great snippet: conditional-blocks
text above inserted with:
[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]
Other snippets posted by Helmuti_pdorf
Advanced Search - 25 Feb 2012 12:29
Top Nav Menu with ListPages - 16 Feb 2012 01:48
Schedules - 16 Feb 2012 01:40
Find untagged pages - 15 Feb 2012 00:52
Rate this solution
If you think this solution is useful — rate it up!






You can also just attach a html file to a page and then load the html file in an iframe on that page.
An Innovator at heart.
But how do you reference the HTML attachment?
View the File Attachments and copy the link address for your html file. Then make an iframe on your page that loads the address of the html file.
An Innovator at heart.
I do everithing like you say, but In my page appears something like that:
The site does not exist.
I want to put some pub from affiliation and im unable to put the html code that they give to me.
http://statisticum.wikidot.com
thanks
if you make it so we can see the sourse code we might be able to help
.Goal NHGC
thanks for your answer
the code is
<!— START of the zanox affiliate HTML code >
<! ( The HTML code may not be changed in the sense of faultless functionality! ) >
<img src="http://ad.zanox.com/ppv/?12453608C1041503684" align="bottom" width="1" height="1" border="0" hspace="1"><a href="http://ad.zanox.com/ppc/?12453608C1041503684T">Ganha um iPhone Apple na tua cor favorita</a>
<! ENDING of the zanox-affiliate HTML-Code —>
Thanks
i ment the sorce code on your wiki page.
.Goal NHGC
I want a blank html page using the following code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
</head>
<body>
<h1>Introduction</h1>
<p>
Welcome …
</p>
</body>
</html>
I then create an html file and try in the wiki page:
But the result wiki page is a text box with the html code!
I want to use html.
And ? What have you done? ( means - have you a link for us to a page , a test example..or can you insert here a code block for us …. I have no idea what you have or have not done…
please - give us a hint here ! :)
Could be the explanation is better here: http://community.wikidot.com/howto:use-html-scripting ?
Edit_ I made a little copy & paste onto the page above and get this iframe-ed html code
( this is the 6. code block on this page..! :)
Done with > [[iframe http://snippets.wikidot.com/code:use-any-html-code-on-a-page/code/6 frameborder="1" scrolling="yes" width="340px" height="150px"]]
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Look at the source code of this page, the text box in my last post was …subdomainname.wikidot.com/local—files/home/filename.html
The html scripting explanation is poor; I want simple instructions to use html.
The text box in your message was created using …snippets.wikidot.com/code:use-any-html-code-on-a-page/code/6
I cannot see how this is added to a wiki page. Where is the number 6? Why can't you write the complete code plain text?
Exact this is not possible here to view the code of your post.!
- can you insert a "code" block with your iframe test ?
Done with
Exact this is happening onb a wikidot- page of your site… see my post below..
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
1. You need a page to "store" the html code
I have done this on this page code:use-any-html-code-on-a-page" with the Tilte "Use any html code on a page" at the last changes ( use the history button at the bottom to find out what I have inserted…)
2. You have to be careful to use [[code type="HTML"]]
to store your html code on such page - or you will get troubles.
3. Using such code-block in an "Iframe" needs an identifier
like /code/# - where the # equals the sequence number of such code block on the page.
In my example this is the 6. code block on the page http://snippets.wikidot.com/code:use-any-html-code-on-a-page and with teh extension /code/6 it takes (renders) only the content of this code block.
4. Every visitor can see this code block ?
if you do not want this readable by everyone than you can easily "hide" the code block behind a collapsible block or even in a comment!
5. Why not uese "files"
This has the problem that any changes on a html block are not documented - there is only ONE version of a file availabe ( attached).
In a code block you have all version automaticlly saved….
6. Have all such html code be stored on the used page?
No, could be perjhaps better to have it on an extra page ( like "all-files" for images or "all-html-codes" for a collections of used codes in a special namespace ( = category) "mycodes:" where nobody else the author is allowed to edit…
Hope this makes it clear ?
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
The correct terminology is verbatim text, not code block. My explanation of this function.
Wikidot software assigns automatically an indentification number for all verbatim text boxes within a wiki page. This number increases in series for each text box. For example, in this wiki page, the text box shown below the time stamp 30-06-09 7:28 bst has an identification number 6 (count each text box, which appears with a light coloured background, surrounded by dash (-) marks).
To convert verbatim text to appear as html in the wiki page:
[[code="html"]]
[[iframe …wikipage.wikidot.com/code/n]]
[[/code]]
where … is replaced by http:// and n is replaced by the identification number of the verbatim text box
The element iframe may have the following attributes, for example
frameborder="1" scrolling="yes" width="340px" height="150px"
I cannot get this instruction to work on this page!
[[code="html"]]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
</head>
<body>
<h1>Introduction</h1>
<p>
Another try …
</p>
</body>
</html>
[[/code]]
you can call it what you like, every one else calls it code block.
http://psc.wikidot.com/test:wikic
took me 15 secs
.Goal NHGC
If everyone misspelt your name you'd be fully within your rights to correct them accordingly, not change your name! I make this comment to aid clarification
This is the problem with this automatic id assignment
1. Sorry, but a code block inside a Forums post is not on the snippets page and cannot be used in an iframe.
2. exact your code block text is stored under code typ3e"html" on the snippets page with some running number…
3. This is complete wrong…:
[[code="html"]]
[[iframe …wikipage.wikidot.com/code/n]]
[[/code]]
is for documentation only (and renders to nothing…
Iframe should not be used inside a coblock WITH pure html codecs…
I think - you shoukld CREATE a page on your wiki ( wherever ) and store ONE CODE block type ="html" with your codes.
and tthan CREATE ANOTHER PAGE where you can iframe the first page with the cobe block (1 i think) .
This will never work with codblocks n Forum posts..
..
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
I do not want to create a wiki page containing all of my html and then refer to each verbatim text block in another wiki page.
I want to use html for each wiki page that I create. Below are the steps I have done, which fail to format the wiki page using html:
*create a new page
myhtmlpage
*add some text:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
*add the text box syntax:
*save new page
According to the instructions here, the first (and only!) verbatim text box will be converted to html when the iframe element includes the attribute '…wikidot.com/myhtmlpage/code/1'
This does not work. The verbatim text box shows the html in the standard wiki text box (dashed lines around text box)
*create a new page
myhtmlpage
*add some text:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
*add the text box syntax:
[[iframe ...wikidot.com/myhtmlpage/code/1]]
some text if you want…
and than ( or before the iframe line)
[[code type="HTML"]]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
</head>
<body>
<h1>Introduction</h1>
<p>
Another try …
</p>
</body>
</html>
[[/code]]
*save new page
This should work
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?