function tile_TheTileName($group, $x, $y, $width, $height, $background, $url, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; ?> <a <?php echo makeLink($url); ?> class="tile group<?php echo $group; ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px; background:<?php echo $background; ?> ;" <?php posVal($marginTop, $marginLeft, $tileWidth); ?> > <?php if ($labelText != "") { if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'><div class='tileLabel top' >" . $labelText . "</div></div>"; } else { echo "<div class='tileLabelWrapper bottom'><div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div></div>"; } } ?> </a> <?php }
function tile_slide($group, $x, $y, $width, $height, $background, $url, $text, $img, $imgSize, $slidePercent, $slideDir, $doSlideText, $doSlideLabel, $border, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); switch ($slideDir) { case "left": case "right": $d = 'hor'; break; case "down": case "up": $d = 'ver'; break; } ?> <a <?php echo makeLink($url); ?> class="tile tileSlide <?php echo $slideDir; ?> group<?php echo $group; ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px; background:<?php echo $background; ?> ; <?php if (!$border) { echo "padding:0;"; } ?> " <?php posVal($marginTop, $marginLeft, $tileWidth); ?> data-doslide="<?php echo $doSlideText; ?> "> <div class='slideText' style=' <?php if ($d == "ver") { ?> height:<?php echo $tileHeight * $slidePercent; ?> px; width:100%;<?php } else { ?> width:<?php echo $tileWidth * $slidePercent; ?> px; height:100%;<?php } if ($doSlideText) { switch ($slideDir) { case "left": echo "left:" . $tileWidth . 'px;'; break; case "right": echo "left:" . -$tileWidth * $slidePercent . 'px;'; break; case "down": echo "top:" . -$tileHeight * $slidePercent . 'px;'; break; case "up": echo "top:" . $tileHeight . 'px;'; break; } } else { switch ($slideDir) { case "left": echo "right"; break; case "right": echo "left"; break; case "down": echo "top"; break; case "up": echo "bottom"; break; } echo ":0;"; } echo "'>" . $text; ?> </div> <div class="imageWrapper"> <div class="imageCenterer" style="width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px;line-height:<?php echo $tileHeight - 2; ?> px;"> <img src='<?php echo $img; ?> ' style="width:<?php echo $tileWidth * $imgSize; ?> px;" /> </div> <?php if (!$doSlideLabel) { echo "</div>"; } if ($labelText != "") { if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'><div class='tileLabel top' >" . $labelText . "</div></div>"; } else { echo "<div class='tileLabelWrapper bottom'><div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div></div>"; } } if ($doSlideLabel) { echo "</div>"; } ?> </a> <?php }
function tile_slideshow($group, $x, $y, $width, $height, $background, $url, $images, $alts, $texts, $effect, $speed, $arrows, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $id = str_replace(".", "_", $group . "-" . $x . "-" . $y); $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); if (count($alts) != count($images)) { $alts = array_fill(count($alts), count($images) - count($alts), ""); } ?> <a <?php echo makeLink($url); ?> id="tileSlideshow<?php echo $id; ?> " class="tile tileSlideshow group<?php echo $group; ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px; background:<?php echo $background; ?> ;" <?php posVal($marginTop, $marginLeft, $tileWidth); ?> data-n=0> <div class='imgWrapperBack' style="width: <?php echo $tileWidth + 2; ?> px; height:<?php echo $tileHeight + 2; ?> px"><img src='<?php echo $images[0]; ?> ' alt=''/></div> <div class='imgWrapper' style="width: <?php echo $tileWidth + 2; ?> px; height:<?php echo $tileHeight + 2; ?> px"><img src='<?php echo $images[0]; ?> ' alt='<?php echo $alts[0]; ?> ' /></div> <?php if ($texts != "" && count($texts) > 0) { echo "<div class='imgText'>" . $texts[0] . "</div>"; } ?> <script type="text/javascript">slideshowTiles["tileSlideshow<?php echo $id; ?> "] = [<?php echo json_encode($images); ?> ,<?php echo json_encode($alts); ?> ,<?php echo json_encode($texts); ?> ,<?php echo '"' . $effect . '"'; ?> ,<?php echo $speed; ?> ]</script> <?php if ($arrows) { echo '<img id="sl_arrowRight" src="' . PATH_FOLDER . 'img/arrows/simpleArrowRight.png" alt="Slideshow - right"><img id="sl_arrowLeft" src="<?php echo PATH_FOLDER;?>img/arrows/simpleArrowLeft.png" alt="Slideshow - left">'; } if ($labelText != "") { if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'><div class='tileLabel top' >" . $labelText . "</div></div>"; } else { echo "<div class='tileLabelWrapper bottom'><div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div></div>"; } } ?> </a> <?php }
function tile_flipText($group, $x, $y, $width, $height, $background, $backgroundHover, $url, $title, $text, $direction, $img, $imgAlt, $imgTitle, $imgSize, $imgToTop, $imgToLeft, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; ?> <a <?php echo makeLink($url); ?> class="tile tileFlipText <?php echo $direction; ?> group<?php echo $group; ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px;" <?php posVal($marginTop, $marginLeft, $tileWidth); ?> > <div class='flipContainer'> <div class='flipFront' style="background:<?php echo $background; ?> ;"> <?php if ($labelText != "") { if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'><div class='tileLabel top' >" . $labelText . "</div></div>"; } else { echo "<div class='tileLabelWrapper bottom'><div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div></div>"; } } ?> <h3> <?php if ($img != "") { ?> <img title='<?php echo $imgTitle; ?> ' alt='<?php echo $imgAlt; ?> ' style='margin-top:<?php echo $imgToTop; ?> px;margin-left:<?php echo $imgToLeft; ?> px;' src='<?php echo $img; ?> ' height="<?php echo $imgSize; ?> " width="<?php echo $imgSize; ?> "/> <?php } ?> <?php echo $title; ?> </h3></div> <div class='flipBack' style="background: <?php if ($backgroundHover == "") { echo $background; } else { echo $backgroundHover; } ?> ;"><h5><?php echo $text; ?> </h5></div> </div> </a> <?php }
function tile_img($group, $x, $y, $width, $height, $background, $url, $img, $desc, $showDescAlways, $imgWidth, $imgHeight, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); $imgWidthPx = $imgWidth * $scaleSpacing - $spacing; $imgHeightPx = $imgHeight * $scaleSpacing - $spacing; ?> <a <?php echo makeLink($url); ?> class="tile tileImg group<?php echo $group; ?> <?php if (!$showDescAlways && $desc != "") { echo $labelPosition; } ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px; background:<?php echo $background; ?> ;" <?php posVal($marginTop, $marginLeft, $tileWidth); ?> > <img src='<?php echo $img; ?> ' width="<?php echo $imgWidthPx; ?> " style='margin-left:-<?php echo $imgWidthPx * 0.5; ?> px; margin-top: -<?php echo $imgHeightPx * 0.5; ?> px; max-height:<?php echo $imgHeightPx; ?> px;'/> <?php /* echo label */ if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'>"; if ($labelText != "") { echo "<div class='tileLabel top' >" . $labelText . "</div>"; } } else { echo "<div class='tileLabelWrapper bottom'>"; if ($labelText != "") { echo "<div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div>"; } } if ($desc != "") { echo "<div class='imgDesc' "; if (!$showDescAlways) { echo "style='display:none;'"; } echo ">" . $desc . "</div>"; } ?> </div> </a> <?php }