コード例 #1
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element 
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string 
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('size' => 'featured', 'animation' => 'slide', 'ids' => '', 'autoplay' => 'false', 'interval' => 5, 'handle' => $shortcodename, 'src' => '', 'position' => 'top left', 'repeat' => 'no-repeat', 'attach' => 'scroll', 'stretch' => '', 'content' => ShortcodeHelper::shortcode2array($content, 1)), $atts, $this->config['shortcode']);
     extract($atts);
     $output = "";
     $background = "";
     $class = "";
     if ($src != "") {
         if ($repeat == 'stretch') {
             $background .= "background-repeat: no-repeat; ";
             $class .= " avia-full-stretch";
         } else {
             $background .= "background-repeat: {$repeat}; ";
         }
         $background .= "background-image: url({$src}); ";
         $background .= "background-attachment: {$attach}; ";
         $background .= "background-position: {$position}; ";
     }
     if ($background) {
         $params['bg'] = "style = '{$background}'";
     }
     $skipSecond = false;
     avia_sc_slider_full::$slide_count++;
     $params['class'] = "avia-fullwidth-slider main_color avia-shadow " . $meta['el_class'] . $class;
     $params['open_structure'] = false;
     //we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before
     if ($meta['index'] == 0) {
         $params['close'] = false;
     }
     if (!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section)) {
         $params['close'] = false;
     }
     if ($meta['index'] != 0) {
         $params['class'] .= " slider-not-first";
     }
     $params['id'] = "full_slider_" . avia_sc_slider_full::$slide_count;
     $output .= avia_new_section($params);
     $slider = new avia_slideshow($atts);
     $slider->set_extra_class($stretch);
     $output .= $slider->html();
     $output .= "</div>";
     //close section
     //if the next tag is a section dont create a new section from this shortcode
     if (!empty($meta['siblings']['next']['tag']) && in_array($meta['siblings']['next']['tag'], AviaBuilder::$full_el)) {
         $skipSecond = true;
     }
     //if there is no next element dont create a new section.
     if (empty($meta['siblings']['next']['tag'])) {
         $skipSecond = true;
     }
     if (empty($skipSecond)) {
         $output .= avia_new_section(array('close' => false, 'id' => "after_full_slider_" . avia_sc_slider_full::$slide_count));
     }
     return $output;
 }
コード例 #2
0
ファイル: obeysection.php プロジェクト: spokehq/emprise
 function avia_mynew_section($params = array())
 {
     global $avia_section_markup, $avia_config;
     $defaults = array('class' => 'main_color', 'bg' => '', 'close' => true, 'open' => true, 'open_structure' => true, 'open_color_wrap' => true, 'data' => '', "style" => '', 'id' => "", 'main_container' => false, 'video' => '', 'video_ratio' => '16:9', 'video_mobile_disabled' => '', 'attach' => "", 'before_new' => "", 'custom_markup' => '');
     $defaults = array_merge($defaults, $params);
     extract($defaults);
     $post_class = "";
     $output = "";
     $bg_slider = "";
     $container_style = "";
     if ($id) {
         $id = "id='{$id}'";
     }
     if ($close) {
         $cm = avia_obeysection_close_markup();
         $output .= "<!-- after firstsection-->" . avia_sc_section::$add_to_closing . avia_sc_section::$close_overlay;
     }
     //start new
     if ($open) {
         if (function_exists('avia_get_the_id')) {
             $post_class = "post-entry-" . avia_get_the_id();
         }
         if ($open_color_wrap) {
             if (!empty($video)) {
                 $slide = array('shortcode' => 'av_slideshow', 'content' => '', 'attr' => array('id' => '', 'video' => $video, 'slide_type' => 'video', 'video_mute' => true, 'video_loop' => true, 'video_ratio' => $video_ratio, 'video_controls' => 'disabled', 'video_section_bg' => true, 'video_format' => '', 'video_mobile' => '', 'video_mobile_disabled' => $video_mobile_disabled));
                 $bg_slider = new avia_slideshow(array('content' => array($slide)));
                 $bg_slider->set_extra_class('av-section-video-bg');
                 $class .= " av-section-with-video-bg";
                 $class .= !empty($video_mobile_disabled) ? " av-section-mobile-video-disabled" : "";
                 $data .= "  data-section-video-ratio='{$video_ratio}'";
             }
             // add parallax div
             $output .= $attach;
             $output .= apply_filters('avf_section_container_add', '', $defaults);
         }
     }
     return $output;
 }
コード例 #3
0
ファイル: slideshow.php プロジェクト: DylanPeti/socialize
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('size' => 'featured', 'animation' => 'slide', 'ids' => '', 'autoplay' => 'false', 'interval' => 5, 'handle' => $shortcodename, 'content' => ShortcodeHelper::shortcode2array($content, 1), 'class' => $meta['el_class'], 'custom_markup' => $meta['custom_markup']), $atts, $this->config['shortcode']);
     $slider = new avia_slideshow($atts);
     return $slider->html();
 }
コード例 #4
0
 /**
  * This function helps iterating over a post and displaying it for page and category columns
  *
  * @param array $data is an array with all the data necessary for creating the html code
  * @return string $output the string returned contains the html code generated within the method
  */
 function column_helper_loop_over_posts($data)
 {
     wp_reset_query();
     $output = "";
     $additional_loop = new WP_Query($data['query_post']);
     if ($additional_loop->have_posts()) {
         while ($additional_loop->have_posts()) {
             $additional_loop->the_post();
             if ($data['value'] != $this->post_id) {
                 global $more;
                 $more = 0;
             }
             if (empty($data['link'])) {
                 $link = get_permalink();
             } else {
                 $link = $data['link'];
             }
             //check if we can/should display image
             if (isset($data['image']) && $data['image'] != "" && strpos($data['display'], 'img') !== false) {
                 $slider = new avia_slideshow(get_the_ID());
                 if (!empty($data['link'])) {
                     $slider->set_links($link);
                 }
                 $output .= $slider->display_small($data['image'], $data['caption'], true);
             }
             //check if we should display post content
             if (strpos($data['display'], 'title') !== false) {
                 $output .= "<div class='entry-content'>";
                 $output .= "<h3 class='dynamic-column-title'><a href='" . $link . "' rel='bookmark' title='" . __('Permanent link:', 'avia_framework') . " " . get_the_title() . "'>" . get_the_title() . "</a></h3>";
                 $output .= '</div>';
             }
             //check if we should display post content
             if (strpos($data['display'], 'post') !== false) {
                 $output .= "<div class='entry-content'>";
                 $output .= "<h3 class='dynamic-column-title'><a href='" . $link . "' rel='bookmark' title='" . __('Permanent link:', 'avia_framework') . " " . get_the_title() . "'>" . get_the_title() . "</a></h3>";
                 if (!$additional_loop->post->post_excerpt || $data['value'] == $this->post_id) {
                     $content = get_the_content('<span class="inner_more">' . __('Read more  &rarr;', 'avia_framework') . '</span>');
                     $content = apply_filters('the_content', $content);
                     $content = str_replace(']]>', ']]&gt;', $content);
                 } else {
                     $content = apply_filters('the_excerpt', get_the_excerpt());
                     $content .= '<p><a class="more-link" href="' . get_permalink() . '"><span class="inner_more">' . __('Read more  &rarr;', 'avia_framework') . '</span></a></p>';
                 }
                 $output .= $content;
                 $output .= '</div>';
             }
         }
     }
     wp_reset_query();
     return $output;
 }
コード例 #5
0
ファイル: section.php プロジェクト: DylanPeti/socialize
function avia_new_section($params = array())
{
    global $avia_section_markup, $avia_config;
    $defaults = array('class' => 'main_color', 'bg' => '', 'close' => true, 'open' => true, 'open_structure' => true, 'open_color_wrap' => true, 'data' => '', "style" => '', 'id' => "", 'main_container' => false, 'min_height' => '', 'video' => '', 'video_ratio' => '16:9', 'video_mobile_disabled' => '', 'attach' => "", 'custom_markup' => '');
    $defaults = array_merge($defaults, $params);
    extract($defaults);
    $post_class = "";
    $output = "";
    $bg_slider = "";
    if ($id) {
        $id = "id='{$id}'";
    }
    //close old content structure. only necessary when previous element was a section. other fullwidth elements dont need this
    if ($close) {
        $cm = avia_section_close_markup();
        $output .= "</div></div>{$cm}</div></div>";
    }
    //start new
    if ($open) {
        if (function_exists('avia_get_the_id')) {
            $post_class = "post-entry-" . avia_get_the_id();
        }
        if ($open_color_wrap) {
            if (!empty($min_height)) {
                $class .= " av-minimum-height av-minimum-height-" . $min_height;
            }
            if (!empty($video)) {
                $slide = array('shortcode' => 'av_slideshow', 'content' => '', 'attr' => array('id' => '', 'video' => $video, 'slide_type' => 'video', 'video_mute' => true, 'video_loop' => true, 'video_ratio' => $video_ratio, 'video_controls' => 'disabled', 'video_section_bg' => true, 'video_format' => '', 'video_mobile' => '', 'video_mobile_disabled' => $video_mobile_disabled));
                $bg_slider = new avia_slideshow(array('content' => array($slide)));
                $bg_slider->set_extra_class('av-section-video-bg');
                $class .= " av-section-with-video-bg";
                $class .= !empty($video_mobile_disabled) ? " av-section-mobile-video-disabled" : "";
                $data .= "  data-section-video-ratio='{$video_ratio}'";
            }
            $output .= "<div {$id} class='{$class} container_wrap " . avia_layout_class('main', false) . "' {$bg} {$data} {$style}>";
            $output .= !empty($bg_slider) ? $bg_slider->html() : "";
            $output .= $attach;
            $output .= apply_filters('avf_section_container_add', '', $defaults);
        }
        //this applies only for sections. other fullwidth elements dont need the container for centering
        if ($open_structure) {
            if (!empty($main_container)) {
                $markup = 'main ' . avia_markup_helper(array('context' => 'content', 'echo' => false, 'custom_markup' => $custom_markup));
                $avia_section_markup = 'main';
            } else {
                $markup = "div";
            }
            $output .= "<div class='container'>";
            $output .= "<{$markup} class='template-page content  " . avia_layout_class('content', false) . " units'>";
            $output .= "<div class='post-entry post-entry-type-page {$post_class}'>";
            $output .= "<div class='entry-content-wrapper clearfix'>";
        }
    }
    return $output;
}
コード例 #6
0
ファイル: header.php プロジェクト: eddiewilson/new-ke
<style type='text/css'> .one_fourth	{ width:21.5%;} div{zoom:1;}</style>
<![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 ####### -->
			
コード例 #7
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element 
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string 
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('size' => 'featured', 'animation' => 'slide', 'ids' => '', 'autoplay' => 'false', 'interval' => 5, 'handle' => $shortcodename, 'stretch' => '', 'bg_slider' => 'true', 'slide_height' => "100", 'scroll_down' => '', 'control_layout' => '', 'perma_caption' => '', 'content' => ShortcodeHelper::shortcode2array($content, 1)), $atts, $this->config['shortcode']);
     extract($atts);
     $output = "";
     $class = "";
     $skipSecond = false;
     avia_sc_slider_full::$slide_count++;
     $params['class'] = "avia-fullscreen-slider main_color " . $meta['el_class'] . $class;
     $params['open_structure'] = false;
     //we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before
     if ($meta['index'] == 0) {
         $params['close'] = false;
     }
     if (!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section)) {
         $params['close'] = false;
     }
     if ($meta['index'] != 0) {
         $params['class'] .= " slider-not-first";
     }
     $params['id'] = $atts['css_id'] = "fullscreen_slider_" . avia_sc_slider_fullscreen::$slide_count;
     $output .= avia_new_section($params);
     $slider = new avia_slideshow($atts);
     $slider->set_extra_class($stretch);
     $output .= $slider->html();
     $output .= "</div>";
     //close section
     //if the next tag is a section dont create a new section from this shortcode
     if (!empty($meta['siblings']['next']['tag']) && in_array($meta['siblings']['next']['tag'], AviaBuilder::$full_el)) {
         $skipSecond = true;
     }
     //if there is no next element dont create a new section.
     if (empty($meta['siblings']['next']['tag'])) {
         $skipSecond = true;
     }
     if (empty($skipSecond)) {
         $output .= avia_new_section(array('close' => false, 'id' => "after_full_slider_" . avia_sc_slider_fullscreen::$slide_count));
     }
     return $output;
 }
コード例 #8
0
ファイル: loop-page.php プロジェクト: eddiewilson/new-ke
<?php

global $avia_config;
if (isset($avia_config['new_query'])) {
    query_posts($avia_config['new_query']);
}
// check if we got posts to display:
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $slider = new avia_slideshow(get_the_ID());
        $image_size = "page";
        ?>

		<div class='post-entry'>
			
			
			<?php 
        //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';
        }
        if (strpos($avia_config['layout'], 'medium_image') !== false) {
            $image_size = 'blog';
        }
        $slideHtml = $slider->display_small($image_size);
        if ($slideHtml) {
            echo $slideHtml;
コード例 #9
0
ファイル: piecemaker.xml.php プロジェクト: eddiewilson/new-ke
<?php

header("Content-Type:text/xml");
$paths = array(".", "..", "../..", "../../..", "../../../..", "../../../../..", "../../../../../..", "../../../../../../..", "../../../../../../../..");
foreach ($paths as $path) {
    if (@(include $path . '/wp-load.php')) {
        break;
    }
}
$post_id = $_GET['post_id'];
$slider = new avia_slideshow($post_id);
$slider->generate_xml();
echo $slider->slideshow_xml;
コード例 #10
0
ファイル: loop-archive.php プロジェクト: eddiewilson/new-ke
        the_post();
        ?>

		<div class='post-entry'>
			

			<!--meta info-->
	        <div class="blog-meta grid3">
	        	
	        	<?php 
        //force to display small inline content slider on archive pages. Single pages and posts are allowed to display the 3d slider
        $force_small_slider = true;
        if (is_singular()) {
            $force_small_slider = false;
        }
        $slider = new avia_slideshow(get_the_ID());
        echo $slider->display_small('portfolio', $force_small_slider);
        ?>
	        	
				<span class='post-date-comment-container'>
					<span class='date-container'><strong><?php 
        the_time('d');
        ?>
 <?php 
        the_time('M');
        ?>
</strong><span><?php 
        the_time('Y');
        ?>
</span></span>
					<span class='comment-container'><?php 
コード例 #11
0
ファイル: loop-index.php プロジェクト: eddiewilson/new-ke
<?php

global $avia_config;
if (isset($avia_config['new_query'])) {
    query_posts($avia_config['new_query']);
}
// check if we got posts to display:
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $slider = new avia_slideshow(get_the_ID());
        if (empty($avia_config['layout'])) {
            $avia_config['layout'] = "big_image sidebar_right";
        }
        ?>

		<div class='post-entry'>
		
		<?php 
        if (strpos($avia_config['layout'], 'big_image') !== false) {
            $slideHtml = $slider->display_small('page');
        }
        if (strpos($avia_config['layout'], 'dual-sidebar') !== false) {
            $slideHtml = $slider->display_small('blog');
        }
        if (isset($slideHtml) && $slideHtml) {
            echo $slideHtml;
            $avia_config['slider_first_post_active'] = true;
        }
        if (!is_single()) {
            ?>
コード例 #12
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element 
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string 
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('size' => 'featured', 'animation' => 'slide', 'ids' => '', 'autoplay' => 'false', 'interval' => 5, 'handle' => $shortcodename, 'stretch' => '', 'bg_slider' => 'true', 'slide_height' => "100", 'content' => ShortcodeHelper::shortcode2array($content)), $atts);
     extract($atts);
     $output = "";
     $class = "";
     $skipSecond = false;
     avia_sc_slider_full::$slide_count++;
     $params['class'] = "avia-fullscreen-slider main_color " . $meta['el_class'] . $class;
     $params['open_structure'] = false;
     if ($meta['index'] == 0) {
         $params['close'] = false;
     }
     if ($meta['index'] != 0) {
         $params['class'] .= " slider-not-first";
     }
     if ($meta['index'] == 0 && get_post_meta(get_the_ID(), 'header', true) != "no") {
         $params['class'] .= " slider-not-first";
     }
     $params['id'] = "fullscreen_slider_" . avia_sc_slider_fullscreen::$slide_count;
     $output .= avia_new_section($params);
     $slider = new avia_slideshow($atts);
     $slider->set_extra_class($stretch);
     $output .= $slider->html();
     $output .= "</div>";
     //close section
     //if the next tag is a section dont create a new section from this shortcode
     if (!empty($meta['siblings']['next']['tag']) && in_array($meta['siblings']['next']['tag'], array('av_layerslider', 'av_section', 'av_slideshow_full', 'av_fullscreen'))) {
         $skipSecond = true;
     }
     //if there is no next element dont create a new section.
     if (empty($meta['siblings']['next']['tag'])) {
         $skipSecond = true;
     }
     if (empty($skipSecond)) {
         $output .= avia_new_section(array('close' => false, 'id' => "after_full_slider_" . avia_sc_slider_fullscreen::$slide_count));
     }
     return $output;
 }