Ejemplo n.º 1
0
 function thb_slideshow()
 {
     // $config = thb_config('core/slideshows');
     $page_id = thb_get_page_ID();
     $slideshow_shortcode = thb_get_post_meta($page_id, 'slideshow');
     if (empty($slideshow_shortcode)) {
         return;
     }
     if (thb_text_contains($slideshow_shortcode, 'thb_')) {
         $slideshow_id = thb_get_shortcode_attribute($slideshow_shortcode, 'id');
         $thb_slideshow = new THB_Slideshow($slideshow_id);
         $slideshow_type = $thb_slideshow->getType();
         if (thb_is_page_template(thb_config('core/slideshows/submodules/' . $slideshow_type, 'templates'))) {
             if (!empty($slideshow_shortcode) && trim($slideshow_shortcode) != '') {
                 echo thb_do_shortcode($slideshow_shortcode);
             }
         }
     } else {
         echo thb_do_shortcode($slideshow_shortcode);
     }
 }
Ejemplo n.º 2
0
<?php

$thb_page_id = thb_get_page_ID();
$image_sizes = thb_config('core/photogallery', 'image_sizes');
$image_size = thb_config('core/photogallery', 'image_size');
$item_thumb_rel = thb_config('core/photogallery', 'item_thumb_rel');
$slideshow = new THB_Slideshow($thb_page_id, 'photogallery_slide');
if ($image_sizes != '') {
    $slides_size = thb_get_post_meta($thb_page_id, 'slides_size');
    if (is_array(current($image_sizes))) {
        $columns = thb_get_post_meta($thb_page_id, 'portfolio_columns');
        if (isset($image_sizes[$columns])) {
            $slideshow->setSize($image_sizes[$columns][$slides_size]);
        } else {
            reset($image_sizes);
            $image_size = current($image_sizes);
            if (isset($image_size[$slides_size])) {
                $slideshow->setSize($image_size[$slides_size]);
            } else {
                $slideshow->setSize($image_size);
            }
        }
    } else {
        $slideshow->setSize($slides_size);
    }
} else {
    $slideshow->setSize($image_size);
}
$slides = $slideshow->getSlides();
$slides_per_page = thb_get_post_meta($thb_page_id, 'slides_per_page');
$ajaxloading = !empty($slides_per_page);
Ejemplo n.º 3
0
<?php

if (empty($id)) {
    $id = 0;
}
$slideshow_type = thb_get_post_meta($id, 'slideshow_type');
$slideshow_path = thb_get_module_path('core/slideshows/submodules/' . $slideshow_type);
$slideshow = new THB_Slideshow($id);
$slideshow->setBaseTemplate($slideshow_path . '/templates');
$slideshow->setSize(thb_config('core/slideshows/submodules/' . $slideshow_type, 'image_size'));
$slideshow->setMarkupId($markup_id);
$slideshow->render();
Ejemplo n.º 4
0
 function listTablePicsColumnContent($column_name, $id)
 {
     if ($column_name == 'slides') {
         $slideshow = new THB_Slideshow($id);
         foreach ($slideshow->getSlides() as $slide) {
             $thumb = $slide['thumb'];
             echo '<img src="' . $thumb . '" alt="" class="list-thumb ' . $slide['type'] . '">';
         }
     } elseif ($column_name == 'shortcode') {
         echo '<code>[thb_slideshow id="' . $id . '"]</code>';
     } elseif ($column_name == 'type') {
         $types = thb_slideshows_types();
         if (isset($types[thb_get_post_meta($id, 'slideshow_type')])) {
             echo $types[thb_get_post_meta($id, 'slideshow_type')];
         }
     }
 }