EditDate Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
New page: {{context|Kit Reference|Data File Reference|Portal Element (Data)}} ==The "edit_date" Element== The "edit_date" element allows the user to edit a structured date or time that adheres to ...
 
 
Line 13: Line 13:
|-
|-
|format
|format
|(Optional) Set – Designates the formatting behavior to be utilized. Must be one of these values:<br>
|(Optional) Set – Designates the formatting behavior to be utilized. Must be one of these values:
gamedate – The contents are edited as a game system date.<br>
<ul class="sets">
gametime – The contents are edited as a game system time.<br>
<li>gamedate – The contents are edited as a game system date.</li>
realdate – The contents are edited as a real world date.<br>
<li>gametime – The contents are edited as a game system time.</li>
realtime – The contents are edited as a real world time.<br>
<li>realdate – The contents are edited as a real world date.</li>
Default: "realdate".  
<li>realtime – The contents are edited as a real world time.</li>
<li>Default: "realdate".</li>
</ul>
|-
|-
|}
|}

Latest revision as of 09:27, 4 December 2008

Context: HL Kit &#133; Kit Reference &#133; Data File Reference &#133; Portal Element (Data) 

The "edit_date" Element

The "edit_date" element allows the user to edit a structured date or time that adheres to the syntactic rules defined for the game system. If a "game world" date or time is edited, then the proper pieces are presented to the user, as dictated by the structure specified for each within the definition file. If a "real world" date or time is edited, then the traditional pieces are presented. This makes it possible to ensure the user enters a syntactically valid date/time, although semantic rules are not currently enforced. The complete list of attributes for this element is below.

field Id – Specifies the unique id of the field where the date/time value to be edited is both retrieved and stored. The field must exist within the pick/thing associated with the containing template. If this portal is not defined within a template, an editdate portal is not allowed.
readonly (Optional) Boolean – Indicates whether the information within the portal can be edited by the user or is displayed as read-only. Default: "no".
format (Optional) Set – Designates the formatting behavior to be utilized. Must be one of these values:
  • gamedate – The contents are edited as a game system date.
  • gametime – The contents are edited as a game system time.
  • realdate – The contents are edited as a real world date.
  • realtime – The contents are edited as a real world time.
  • Default: "realdate".

Example

The following example demonstrates what an editdate portal might look like. All default values are assumed for optional attributes.

<portal id="date" style="editDate">
  <edit_date field="thedate" format="gamedate"/>
  </portal>