Difference between revisions of "ImageUser Element (Data)"
From HLKitWiki
(New page: ==The "image_user" Element== The role of the "image_user" element is to allow the user to select the image to be displayed and show it within the portal. Until the user selects an image, ...) |
(→The "image_user" Element) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{context|Kit Reference|Data File Reference|Portal Element (Data)}} | ||
+ | |||
==The "image_user" Element== | ==The "image_user" Element== | ||
Line 5: | Line 7: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|field | |class="leftnormal"|field | ||
− | | | + | |Id – Specifies the unique id of the field whose contents manage the image to to be displayed within the portal. The field must be a value-based field of "user" style, and its contents should never be modified by script. The field must exist within the pick/thing associated with the containing template. If this portal is not defined within a template, a field-based image is not allowed.<br> |
{{note}}User-selected images are tracked internally with the portfolio, so no link to the original image file exists. | {{note}}User-selected images are tracked internally with the portfolio, so no link to the original image file exists. | ||
|- | |- | ||
|} | |} | ||
+ | |||
+ | ==Example== | ||
+ | |||
+ | The following example demonstrates what a user image portal might look like. All default values are assumed for optional attributes. | ||
+ | |||
+ | <pre> | ||
+ | <portal id="image" style="imgNormal"> | ||
+ | <image_user field="userimage"/> | ||
+ | </portal> | ||
+ | </pre> |
Latest revision as of 18:04, 1 December 2008
Context: HL Kit Kit Reference Data File Reference Portal Element (Data)
The "image_user" Element
The role of the "image_user" element is to allow the user to select the image to be displayed and show it within the portal. Until the user selects an image, a placeholder image is shown instead. This portal type is intended for use in allowing the user to select a character portrait and related situations. The complete list of attributes for this element is below.
field Id – Specifies the unique id of the field whose contents manage the image to to be displayed within the portal. The field must be a value-based field of "user" style, and its contents should never be modified by script. The field must exist within the pick/thing associated with the containing template. If this portal is not defined within a template, a field-based image is not allowed.
NOTE! User-selected images are tracked internally with the portfolio, so no link to the original image file exists.
Example
The following example demonstrates what a user image portal might look like. All default values are assumed for optional attributes.
<portal id="image" style="imgNormal"> <image_user field="userimage"/> </portal>