{init_picture}
Tag {init_picture} can be used to call out one specific picture with a defined ID number.
Parameters
- id - ID number of the picture. If ID is not defined then current page ID is used.
- name - variable name where the returned data is saved. Default value is "picture".
- on_create - allows to publish all objects immediately. If the parameter has value "on_create=publish", then a created object is published immediately. Default value is "hide". 4.0.2
- buttons - defines which action buttons are displayed to the site editor. Values can be "new,edit,hide,move,delete". 4.2.1
Attributes
- id - ID number of the picture to return.
- parent_id - ID number of parent object.
- album_href - ID numberof the album where this picture belongs.
- title - title of the picture.
- buttons - action-buttons, available only for editors.
- hit_count - returns page load count of the object. 3.3.1
- thumbnail - thumbnail of the image. 3.3.4
- created_user_id - user ID who initially created the object. 4.0.3
- created_user_name - user full name who initially created the object. 4.0.3
- changed_user_id - user ID who made the last object saving. 4.0.3
- changed_user_name - user full name who made the last object saving. 4.0.3
- created_time - creating time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fcreated_time - creating time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- changed_time - last saving time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fchanged_time - last saving time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- comment_count - the number of comments. 4.0.6
- last_commented_time - the last comment time in format dd.mm.yyyy hh:ii. 4.0.6
- show_headline - value is 1 if headline is visible for the article, 0 otherwise. 4.2.1
- image_width - image width in pixels, only for filesystem-based album. 4.2.3
- image_height - image height in pixels, only for filesystem-based album. 4.2.3
General tags
- <name>_source - html-tags which display the picture
- <name>_thumbnail - html-tags which display the picture thumbnail
- <name>_next - ID number of the next picture in the album
- <name>_previous - ID number of the previous picture in the album
Example
{init_picture name="pic" id=18148}
<h1>{$pic->buttons}{$pic->title}<h1>
{$pic_source}
{if $pic_next}
<a href="?id={$pic_next}">Previous</a>
{/if}
{if $pic_previous}
<a href="?id={$pic_previous}">Next</a>{/if}
{/if} {init_images}
Tag {init_images} is used for displaying images in Saurus4 gallery that is based on filesystem files instead of database records in v3. Since version 4.0.7.
Parameters
- parent - album ID where to get the images. If parent is not defined then current page ID is used.
- name - variable name where the returned data is saved. Default value is "images".
- start - the starting row number to return.
- limit - the number of rows to return. You must use this parameter always with "start" parameter.
- where - additional filtering criteria using WHERE SQL syntax.
Attributes
- id - ID number of the image
- parent_id - ID number of parent object
- title - title of the image
- buttons - action-buttons, available only for editors
- size - size of the displayed image in bytes
- actual_image_size - size of the original image in bytes
- filename - filename of the image
- thumb_path - relative path to the thumbnail image
- thumb_height - height of the thumbnail image in pixels
- thumb_width - width of the thumbnail image in pixels
- image_path - relative path to the image
- image_height - height of the image in pixels
- image_width - width of the image in pixels
- actual_image_path - relative path to the original image
- actual_image_height - height of the original image in pixels
- actual_image_width - width of the original image in pixels
General tags
- <name>_newbutton - allows to add new images to the albums selected folder. 4.5.3
- <name>_first_image - relative path to the first image in the album
- <name>_last_image - relative path to the first image in the album
- <name>_count - the number of returned objects 4.2.1
- <name>_counttotal - the total number of objects found, not affected by "limit" parameter. 4.2.1
- <name>_title - title of the album
Note: Images are ordered by the filenames.
Example
{init_images name="images" parent=$id}
{foreach from=$images item="image"}
<img src="{$image->thumb_path}" alt="{$image->title}" width="{$image->thumb_width}" height="{$image->thumb_height}">
{/foreach}
{init_album}
Tag {init_album} displayes the specific album with the uploaded pictures.
Parameters
- id - ID number of the album to return
- name - variable name where the returned data is saved. Default value is "album".
- start - the starting row number to return.
- limit - the number of rows to return. You must use this parameter always with "start" parameter.
- metadata - defines the metadata ID. Only used when metadata sets exist in a database.
This functionality is deprecated in version 4, please use profiles instead. - on_create - allows to publish all objects immediately. If the parameter has value "on_create=publish", then a created object is published immediately. Default value is "hide". 4.0.2
Attributes
- id - ID number
- parent_id - ID number of parent object
- buttons - action-buttons for section editing, available only for authorized editors
- thumbnail - HTML-code to display small thumbnails of the pictures
- href - link to the albums' detailed view, e.g. ?id=368. 3.3.3
- title - title of the album. 3.3.3
- date - the date of the album. 3.3.3
- fdate - the date of the album in format YYYY-MM-DD . 3.3.3
- datetime - date and time of the album format dd.mm.yyyy hh:mm. 4.4.1
- fdatetime - date and time of the album in database format, eg yyyy-mm-dd hh:mm:ss. 4.4.1
- created_user_id - user ID who initially created the object. 4.0.3
- created_user_name - user full name who initially created the object. 4.0.3
- changed_user_id - user ID who made the last object saving. 4.0.3
- changed_user_name - user full name who made the last object saving. 4.0.3
- created_time - creating time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fcreated_time - creating time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- changed_time - last saving time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fchanged_time - last saving time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- comment_count - the number of comments. 4.0.6
- last_commented_time - the last comment time in format dd.mm.yyyy hh:ii. 4.0.6
- forum_allowed - value is 1 if forum is allowed for the album, 0 otherwise. 4.2.1
General tags
- <name>_newbutton - prints "New" action-button for creating a new object.
- <name>_editbutton - prints "E-button" to edit current album.
- <name>_title - prints title of the album
- <name>_col - prints the number of columns in the album
- <name>_row - prints the number of rows in the album
- <name>_count - the number of returned objects. If parameter "limit" is set then count equals to "limit" value.
Examples
{init_album id=$id}
<h1>{$album_editbutton}{$album_title}</h1>
{foreach from=$album item=obj}
{$obj->buttons}
{$obj->thumbnail}
{foreachelse}
{$album_newbutton}
{/foreach}
{init_albums}
Tag {init_albums} allows developers to create picture albums.
Parameters
- parent - section ID value(s) where to get the albums. Multiple ID values must be comma separated. If parent is not defined then current page ID is used.
- name - variable name where the returned data is saved. Default value is "albumlist".
- metadata - defines the metadata ID. Only used when metadata sets exist in a database.
This functionality is deprecated in version 4, please use profiles instead. - start - the starting row number to return.3.3.3
- limit - the number of rows to return. You must use this parameter always with "start" parameter. 3.3.3
- order - field name asc|desc.3.3.3
- position - position number in the page, default value: 0. 3.3.3
- where - additional filtering criteria using WHERE SQL syntax. 3.3.3
- on_create - allows to publish all objects immediately. If the parameter has value "on_create=publish", then a created object is published immediately. Default value is "hide". 4.0.2
- thumbnail_type - how an intro-thumbnail image is chosen. Possible values are: first, random. Default value is "first". 4.0.7
Attributes
- id - album ID number
- parent_id - ID number of parent object
- href -the link to album detailed view, e.g. ?id=368. 3.3.3
- title - the title of the album. 3.3.3
- is_selected - value in case of active article equals 1, else 0. 3.3.3
- buttons - action-buttons, available only for editors. 3.3.3
- date - the date of the album. 3.3.3
- fdate - the date of the album in format YYYY-MM-DD . 3.3.3
- datetime - date and time of the album format dd.mm.yyyy hh:mm. 4.4.1
- fdatetime - date and time of the album in database format, eg yyyy-mm-dd hh:mm:ss. 4.4.1
- details_link - equals to "href" . 3.3.3
- details_title - the link title to album detailed view (system word).
- last_modified - the objects last modified time. 3.3.3
This functionality is deprecated in version 4, please use changed_time instead. - flast_modified - the objects last modified time in format YYYY-MM-DD. 3.3.3
This functionality is deprecated in version 4, please use fchanged_time instead. - class - class name of the object
- created_user_id - user ID who initially created the object. 4.0.3
- created_user_name - user full name who initially created the object. 4.0.3
- changed_user_id - user ID who made the last object saving. 4.0.3
- changed_user_name - user full name who made the last object saving. 4.0.3
- created_time - creating time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fcreated_time - creating time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- changed_time - last saving time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fchanged_time - last saving time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- comment_count - the number of comments. 4.0.6
- last_commented_time - the last comment time in format dd.mm.yyyy hh:ii. 4.0.6
- description - description of the album 4.0.7
- thumbnail - relative path to the first/random thumbnail image in album 4.0.7
- thumbnail_size - size of thumbnail images, in pixels 4.2.1
- image_size - size of images, in pixels 4.2.1
- folder_id - images source folder ID 4.2.1
- folder_path - images source folder path, eg "public/images" 4.2.1
General tags
- <name>_newbutton - prints "New" action-button for creating a new object.
- <name>_count - the number of returned objects. If parameter "limit" is set then count equals to "limit" value.
- <name>_rows - alias for <name>_count
- <name>_counttotal - the total number of objects found, not affected by "limit" parameter. 3.3.7
Examples
{init_albums name="albums" thumbnail_type="first"}
{foreach from=$albums item="album"}
<h1>{$album->buttons}<a href="?id={$album->id}">{$album->title}</a></h1>
<a href="?id={$album->id}"><img src="{$album->thumbnail}"></a><br>
{$album->description}
{foreachelse}
{$albums_newbutton}
{/foreach}
