PHP Template Function: StdImage
Posted by Mark [Elevated X Support], Last modified by kayako kayako on 02 November 2018 10:38 AM
|
|
Description: This will print an image for a specific set that is passed to it. Common Location: /cms_admin/phptemplate/<templatefolder>/functions/standard.tpl Usage: <?php foreach ($sets as $set) { ?> <?php StdImage(array("set" => $set, "usepriority" => "14,20,21,22,23,24,25", "alt" => "", "class" => "update_thumb thumbs")); ?> <?php } ?> Arguments There is only one argument that is passed to StdImage(), however, it is an associative array with the following possible elements: set: This is an array containing all of the metadata for a set (which comes from the CMS) Output Here's an example of the output this function will do: <img id="set-target-133" alt="" class="update_thumb thumbs stdimage" src="/members_php/content//contentthumbs/760.jpg" src0="/members_php/content//contentthumbs/760.jpg" src1="/members_php/content//contentthumbs/9275.jpg" src2="/members_php/content//contentthumbs/9276.jpg" src3="/members_php/content//contentthumbs/9277.jpg" src4="/members_php/content//contentthumbs/9280.jpg" src5="/members_php/content//contentthumbs/9279.jpg" src6="/members_php/content//contentthumbs/9278.jpg" cnt="7" v="0" height="170" width="235"> The standard CMS template has JavaScript functionality that takes all image tags with the class "stdimage", and rotates through src0, src1... src6 when the user mouses over the image. | |
|