Difference between revisions of "Template:Test"

From Heroes Assemble MUSH
Jump to navigation Jump to search
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This is the "Book" form.
+
This is the "Book Template" template. It should be called in the following format:
To create a page with this form, enter the page name below;
+
<pre>
if a page with that name already exists, you will be sent to a form to edit that page.
+
{{BookHeader
{{#forminput:form=Book}}
+
| BookTitle          = What is the Book Title?
 +
| Img                = link to Book image
 +
| BookType          = What format Book is this? Movie? TV? Radio? News?
 +
| BookReleaseDate    = When was the Book released?
 +
| Synopsis          = What is the Book about?
 +
| BookAuthors        = Who Wrote the book?
 +
}}  
 +
</pre>
  
 +
Edit the page to see the template text.
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+
{| class="toccolours" style="width: 900px; float: left; margin-left:10px; margin-right:1px; margin-bottom:10px; text-align: left" cellspacing="2"  
{{{for template|BookHeader|label=Book}}}
 
{| class="formtable"
 
! Book Name:
 
| {{{field|BookTitle|input type=textarea|placeholder=What is the Title of the Book?}}}
 
 
|-
 
|-
 +
! style="background:{{{Color|black}}}; color:{{{TextColor|ffff66}}}; border: 1px ridge; font-size: 110%;" align="center" colspan="4" | '''{{{BookTitle|Untitled}}}'''
 
|-
 
|-
! Book Image Link (provide direct url):
+
! colspan="4" align="center" | <img src="{{{Img}}}" width="300">
| {{{field|Img|input type=textarea}}}
 
 
|-
 
|-
 +
! style="background:{{{Color|black}}}; color:{{{TextColor|ffff66}}}; border: 1px ridge; font-size: 110%;" align="center" colspan="4" | '''{{{BookType|Fiction}}}'''
 
|-
 
|-
! Book Type:
+
|- class="LogRow"
| {{{field|BookType|input type=textarea|placeholder=What type of book is this? Romance? NonFiction?}}}
+
! class="LogCell" | Start Date: || class="LogCell" | {{#set:Book Date={{{BookReleaseDate}}}}}{{#time: d F Y | {{{BookReleaseDate}}} }}  
 
|-
 
|-
 +
|- class="LogRow"
 +
! class="LogCell" | Synopsis: || class="LogCell" | {{#set:Book Synopsis={{{Synopsis}}}}}{{{Synopsis|}}}
 
|-
 
|-
! Release Date (DD/MM/CCYY format):
+
|- class="LogRow"
| {{{field|BookReleaseDate|mandatory|property=Book Date}}}
+
! class="LogCell" | Author(s): || class="LogCell" | {{#arraymap:{{{BookAuthors}}}|,|x|{{#set:Book Authors=x}}{{#if: {{#vardefineecho: x | {{#ask: [[Char_id::x]]}}}} | {{#var: x}} | x}}|,&#32;}}  
|-
+
|} [[Category:Books]]
|-
 
! Synopsis:
 
| {{{field|Synopsis|input type=textarea|mandatory|property=Book Synopsis|placeholder=Provide a brief synopsis.|autogrow|size=118px}}}
 
|-
 
|-
 
! Book Authors (Char/Book IDs, Not Names!):
 
| {{{field|BookAuthors|input type=textarea with autocomplete|autogrow|values from category=Characters|list}}}
 
|-
 
|}
 
{{{end template}}}
 
 
 
'''Free text:'''
 
 
 
{{{standard input|free text|rows=10}}}
 
 
 
 
 
{{{standard input|summary}}}
 
 
 
{{{standard input|minor edit}}} {{{standard input|watch}}}
 
  
{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+
----
</noinclude>
+
</includeonly>

Revision as of 00:11, 7 September 2022

This is the "Book Template" template. It should be called in the following format:

{{BookHeader
| BookTitle          = What is the Book Title?
| Img                = link to Book image
| BookType           = What format Book is this? Movie? TV? Radio? News?
| BookReleaseDate    = When was the Book released?
| Synopsis           = What is the Book about?
| BookAuthors        = Who Wrote the book?
}} 

Edit the page to see the template text.