LV:Viewer: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
No edit summary
update to template text by GUYTU6J, with some adjustments
 
Line 1: Line 1:
<noinclude>[[Category:LifeViewer templates]]This is a template for including a LifeViewer in a wiki page, which lets a user manipulate a pattern right in the wiki page itself. This is the same viewer that is used on the ConwayLife.com forums, and it is briefly summarized [http://www.conwaylife.com/forums/viewtopic.php?f=3&t=1622 here]. The template takes either one or two unnamed parameters:
<noinclude>[[Category:LifeViewer templates]]
 
This is a template for including a [[LifeViewer]] in a LifeWiki page, which is the same viewer that is used on the [https://www.conwaylife.com/forums/ ConwayLife.com forums]. It allows a user to manipulate a pattern right in the wiki page itself. A full description of the viewer's features can be found in the [[LifeViewer]] article.
 
This template takes either one or two unnamed parameters:


# The (usually [[RLE]]) code that generates the pattern.
# The (usually [[RLE]]) code that generates the pattern.
# An optional parameter that specifies what should be displayed if the user has JavaScript disabled (defaults to the plaintext message "Please enable Javascript to view this LifeViewer.").
# An optional parameter that specifies what should be displayed if the user has JavaScript disabled (defaults to the plaintext message "Please enable Javascript to view this LifeViewer.").


An example is: <tt><nowiki>{{LV:Viewer|bo$2bo$3o}}</nowiki></tt>, which generates the following LifeViewer:</noinclude><html><div class="rle"><div class="codebox"><div style="display:none;"><code></html>{{#tag:nowiki|{{{1|x={{{x|3,y=3
Note that primitive LifeViewer instances generated by this template use solely internal default settings/configs; they do not rely on any other ones listed in [[:Category:LifeViewer default configs]]. This template is used as the core of other [[:Category:LifeViewer templates|LifeViewer templates]], especially [[Template:EmbedViewer]], which has a better layout and is therefore recommended for general LifeWiki use.
 
An example of this template is: <tt><nowiki>{{LV:Viewer|bo$2bo$3o}}</nowiki></tt>, which generates the following LifeViewer:</noinclude><html><div class="rle"><div class="codebox"><div style="display:none;"><code></html>{{#tag:nowiki|{{{1|x={{{x|3,y=3
bo$2bo$3o}}}}}}}}<html></code></div></div><canvas width="200" height="300" style="margin-left:1px;"><noscript></html>{{{2|<div style="border-width:1px;border-color:#888888;border-style:solid;padding:8px;">Please enable Javascript to view this LifeViewer.</div>}}}<html></noscript></canvas></div></html>
bo$2bo$3o}}}}}}}}<html></code></div></div><canvas width="200" height="300" style="margin-left:1px;"><noscript></html>{{{2|<div style="border-width:1px;border-color:#888888;border-style:solid;padding:8px;">Please enable Javascript to view this LifeViewer.</div>}}}<html></noscript></canvas></div></html>

Latest revision as of 15:48, 6 November 2021


This is a template for including a LifeViewer in a LifeWiki page, which is the same viewer that is used on the ConwayLife.com forums. It allows a user to manipulate a pattern right in the wiki page itself. A full description of the viewer's features can be found in the LifeViewer article.

This template takes either one or two unnamed parameters:

  1. The (usually RLE) code that generates the pattern.
  2. An optional parameter that specifies what should be displayed if the user has JavaScript disabled (defaults to the plaintext message "Please enable Javascript to view this LifeViewer.").

Note that primitive LifeViewer instances generated by this template use solely internal default settings/configs; they do not rely on any other ones listed in Category:LifeViewer default configs. This template is used as the core of other LifeViewer templates, especially Template:EmbedViewer, which has a better layout and is therefore recommended for general LifeWiki use.

An example of this template is: {{LV:Viewer|bo$2bo$3o}}, which generates the following LifeViewer:

x=3,y=3 bo$2bo$3o