Example #1
0
 function checkImages()
 {
     // if the thumbnail generation is enabled
     if ($this->config['generate_thumbnails'] == 1) {
         // basic images params
         $img_width = $this->config['config']->gk_university->gk_university_image_width;
         $img_height = $this->config['config']->gk_university->gk_university_image_height;
         $img_bg = $this->config['config']->gk_university->gk_university_image_bg;
         $quality = $this->config['config']->gk_university->gk_university_quality;
         // check the slides
         foreach ($this->config['image_show_data'] as $slide) {
             $stretch = $slide->stretch == 'nostretch' ? false : true;
             GKIS_University_Image::createThumbnail($slide->image, $this->config, $img_width, $img_height, $img_bg, $stretch, $quality);
         }
     }
 }
Example #2
0
		</div>
	</div>

	<?php 
for ($i = 0; $i < count($this->config['image_show_data']); $i++) {
    ?>
	<?php 
    if ($this->config['image_show_data'][$i]->published) {
        ?>
		<?php 
        unset($path, $title, $link, $content);
        // creating slide path
        $path = '';
        // check if the slide have to be generated or not
        if ($this->config['generate_thumbnails'] == 1) {
            $path = $uri->root() . 'modules/mod_image_show_gk4/cache/' . GKIS_University_Image::translateName($this->config['image_show_data'][$i]->image, $this->config['module_id']);
        } else {
            $path = $uri->root();
            $path .= $this->config['image_show_data'][$i]->image;
        }
        $content = '';
        if ($this->config['image_show_data'][$i]->type == "k2") {
            if (isset($this->articlesK2[$this->config['image_show_data'][$i]->artK2_id])) {
                $title = htmlspecialchars($this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["title"]);
                $content = htmlspecialchars($this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["introtext"]);
                $link = $this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["link"];
            } else {
                $title = 'Selected article doesn\'t exist!';
                $content = $title;
                $link = '#';
            }