Esempio n. 1
0
 public static function thumb($image, $width, $height, $ratio = false, $uniqid)
 {
     // remove any / that begins the path
     if (substr($image, 0, 1) == '/') {
         $image = substr($image, 1);
     }
     // create a thumb filename
     $file_dir = dirname($image);
     $thumb_dir = $file_dir . DS . "tzslider_thumbs";
     if (!JFolder::exists($thumb_dir)) {
         JFolder::create($thumb_dir);
     }
     $file_name = JFile::stripExt(basename($image));
     $file_ext = JFile::getExt($image);
     $thumb_path = $thumb_dir . DS . $file_name . '_' . $uniqid . "_thumb." . $file_ext;
     // check to see if this file exists, if so we don't need to create it
     if (function_exists("gd_info")) {
         //Check existing thumbnails dimensions
         if (file_exists($thumb_path)) {
             $size = GetImageSize($thumb_path);
             $currentWidth = $size[0];
             $currentHeight = $size[1];
         }
         //Creating thumbnails
         if (!file_exists($thumb_path) || $currentWidth != $width || $currentHeight != $height) {
             modTzContentSliderCommonHelper::crop($image, $width, $height, $ratio, $thumb_path);
         }
     }
     return str_replace("\\", "/", $thumb_path);
 }
Esempio n. 2
0
														</a>
													<?php 
                    }
                    ?>
	
												<?php 
                }
                ?>
	
												
												<?php 
                /*Intro Text*/
                if ($links_show_intro) {
                    ?>
													<p class="tzcontentslider-introtext"><?php 
                    echo modTzContentSliderCommonHelper::cText($params, $list[$i]->introtext, $links_intro_count, $links_intro_text_limit);
                    ?>
</p>															
												<?php 
                }
                ?>
							
												<?php 
                /*Virtuemart*/
                if ($links_show_price || $links_show_cart_button) {
                    ?>
													<div class="tzcontentslider-vm-bar">
														<?php 
                    /*Show Price*/
                    if ($links_show_price) {
                        ?>