Пример #1
0
 /**
  * This function creates the html code necessary for a slideshow. It uses the avia_slideshow class located in includes/helper-slideshow.php to do that
  *
  * @param array $element is an array with all the data necessary for creating the html code (it contains the element data and the saved values for the element)
  * @uses avia_slideshow
  * @return string $output the string returned contains the html code generated within the method
  */
 function slideshow($element)
 {
     global $avia_config;
     if (!isset($element['saved_value'])) {
         return;
     }
     extract($element['saved_value'][0]);
     $id = $dynamic_slideshow_which_post_page == 'self' ? avia_get_the_ID() : $dynamic_slideshow_page_id;
     $type = avia_post_meta($id, '_slideshow_type');
     switch ($type) {
         case 'aviaslider':
         case 'piecemaker':
         case 'fade_slider fullwidth':
             $image_size = 'featured';
             $use_big = true;
             $avia_config['dynamic_slideshow_big'] = true;
             break;
         case 'caption_slider':
         case 'aviacordion':
             $image_size = 'aviacordion';
             $use_big = true;
             $avia_config['dynamic_slideshow_big'] = true;
             break;
         case 'fade_slider':
             //call the function that displays featured images and slideshows within posts
             if (strpos($avia_config['layout'], 'big_image') !== false) {
                 $image_size = 'page';
             }
             if (strpos($avia_config['layout'], 'fullwidth') !== false) {
                 $image_size = 'featured';
                 $use_big = true;
                 $avia_config['dynamic_slideshow_big'] = true;
             }
             if (strpos($avia_config['layout'], 'medium_image') !== false) {
                 $image_size = 'blog';
             }
             break;
     }
     $showcaption = true;
     $slider = new avia_slideshow($id, $showcaption);
     if (isset($use_big)) {
         return $slider->display();
     } else {
         return $slider->display_small($image_size);
     }
 }
Пример #2
0
<![endif]-->

</head>



<?php 
/*
 * prepare big slideshow if available
 * If we are displaying a dynamic template the slideshow might already be set
 * therefore we dont need to call it here
 */
if (!avia_special_dynamic_template()) {
    avia_template_set_page_layout();
    $slider = new avia_slideshow(avia_get_the_ID());
    $avia_config['slide_output'] = $slider->display();
}
$style = avia_get_option('boxed', 'boxed');
?>


<body id="top" <?php 
body_class($style . " " . avia_get_browser());
?>
>
	
	<div class='mobile_wrap'>
	
			<!-- ####### HEAD CONTAINER ####### -->
			
			<div class='container_wrap <?php