Example #1
0
function print_blog_thumbnail($post_id, $item_size)
{
    $thumbnail_types = get_post_meta($post_id, 'post-option-thumbnail-types', true);
    if ($thumbnail_types == "Image" || empty($thumbnail_types)) {
        $thumbnail_id = get_post_thumbnail_id($post_id);
        $thumbnail = wp_get_attachment_image_src($thumbnail_id, $item_size);
        $alt_text = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
        if (!empty($thumbnail)) {
            echo '<div class="blog-thumbnail-image">';
            echo '<a href="' . get_permalink() . '"><img src="' . $thumbnail[0] . '" alt="' . $alt_text . '"/></a></div>';
        }
    } else {
        if ($thumbnail_types == "Video") {
            $video_link = get_post_meta($post_id, 'post-option-thumbnail-video', true);
            echo '<div class="blog-thumbnail-video">';
            echo get_video($video_link, gdl_get_width($item_size), gdl_get_height($item_size));
            echo '</div>';
        } else {
            if ($thumbnail_types == "Slider") {
                $slider_xml = get_post_meta($post_id, 'post-option-thumbnail-xml', true);
                $slider_xml_dom = new DOMDocument();
                $slider_xml_dom->loadXML($slider_xml);
                echo '<div class="blog-thumbnail-slider">';
                echo print_flex_slider($slider_xml_dom->documentElement, $item_size);
                echo '</div>';
            }
        }
    }
}
Example #2
0
function video()
{
    get_video();
    video_categories();
    video_favorites();
    video_genres();
    video_link();
}
Example #3
0
 function widget($args, $instance)
 {
     global $wpdb;
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     $source = $instance['source'];
     $height = $instance['height'];
     echo $before_widget;
     // Widget Title
     echo $before_title . $title . $after_title;
     echo '<div class="video-widget1-1">';
     get_video($source, 300, $height);
     echo '</div>';
     // 1-1 Video Widget
     echo $after_widget;
 }
Example #4
0
 public function print_event_thumbnail($post_id, $item_size)
 {
     global $counter;
     //Get Post Meta Options
     $img_html = '';
     $event_thumbnail = '';
     $video_url_type = '';
     $select_slider_type = '';
     $event_detail_xml = get_post_meta($post_id, 'event_detail_xml', true);
     if ($event_detail_xml != '') {
         $cp_event_xml = new DOMDocument();
         $cp_event_xml->loadXML($event_detail_xml);
         $event_thumbnail = find_xml_value($cp_event_xml->documentElement, 'event_thumbnail');
         $video_url_type = find_xml_value($cp_event_xml->documentElement, 'video_url_type');
         $select_slider_type = find_xml_value($cp_event_xml->documentElement, 'select_slider_type');
         //Print Image
         if ($event_thumbnail == "Image" || empty($event_thumbnail)) {
             if (get_the_post_thumbnail($post_id, $item_size) != '') {
                 $img_html = '<div class="post_featured_image thumbnail_image">';
                 $img_html = $img_html . get_the_post_thumbnail($post_id, $item_size);
                 $img_html = $img_html . '</div>';
             }
             //echo '<div class="mask"><a href="'.get_permalink().'"#comments" class="anchor"><span> </span> <i class="fa fa-comment"></i></a><a href="'. get_permalink().'" class="anchor"> <i class="fa fa-link"></i></a></div>';
         } else {
             if ($event_thumbnail == "Video") {
                 //Print Video
                 if ($video_url_type != '') {
                     $img_html = '<div class="post_featured_image thumbnail_image">';
                     $img_html = $img_html . '<div class="blog-thumbnail-video">';
                     //echo cp_get_width($item_size);
                     if (cp_get_width($item_size) == '175') {
                         $img_html = $img_html . get_video($video_url_type, cp_get_width($item_size), cp_get_height($item_size));
                     } else {
                         $img_html = $img_html . get_video($video_url_type, '100%', cp_get_height($item_size));
                     }
                     $img_html = $img_html . '</div></div>';
                 }
             } else {
                 if ($event_thumbnail == "Slider") {
                     //Print Slider
                     $slider_xml = get_post_meta(intval($select_slider_type), 'cp-slider-xml', true);
                     if ($slider_xml != '') {
                         $slider_xml_dom = new DOMDocument();
                         $slider_xml_dom->loadXML($slider_xml);
                         $slider_name = 'bxslider' . $counter . $post_id;
                         //Included Anything Slider Script/Style
                         wp_register_script('cp-bx-slider', CP_PATH_URL . '/frontend/js/bxslider.min.js', false, '1.0', true);
                         wp_enqueue_script('cp-bx-slider');
                         wp_enqueue_style('cp-bx-slider', CP_PATH_URL . '/frontend/css/bxslider.css');
                         if (cp_get_width($item_size) == '175') {
                             $img_html = "<style>#'" . $slider_name . "'{width:'" . cp_get_width($item_size) . "'px;height:'" . cp_get_height($item_size) . "'px;float:left;}</style>";
                         } else {
                             $img_html = "<style>#'" . $slider_name . "'{width:100%;height:350px;float:left;}</style>";
                         }
                         $img_html = '<div class="post_featured_image thumbnail_image">';
                         $img_html = $img_html . print_bx_slider($slider_xml_dom->documentElement, $item_size, $slider_name);
                         $img_html = $img_html . '</div>';
                     }
                 }
             }
         }
     }
     return $img_html;
 }
Example #5
0
function print_anything_slider($slider_xml, $size = '980x360')
{
    if (empty($slider_xml)) {
        return;
    }
    global $gdl_is_responsive;
    echo '<ul id="slider" class="anythingSlider" style="width:' . gdl_get_width($size) . 'px; height:' . gdl_get_height($size) . 'px;">';
    foreach ($slider_xml->childNodes as $slider) {
        $title = find_xml_value($slider, 'title');
        $caption = html_entity_decode(find_xml_value($slider, 'caption'));
        $link = find_xml_value($slider, 'link');
        $link_type = find_xml_value($slider, 'linktype');
        $image_url = wp_get_attachment_image_src(find_xml_value($slider, 'image'), $size);
        echo '<li>';
        if ($link_type == 'Link to Video') {
            echo get_video($link, gdl_get_width($size), gdl_get_height($size));
        } else {
            if ($link_type == 'Lightbox') {
                $image_full_url = wp_get_attachment_image_src(find_xml_value($slider, 'image'), 'full');
                echo '<a href="' . $image_full_url[0] . '" data-rel="prettyPhoto" title=""  >';
            } else {
                if ($link_type != 'No Link') {
                    echo '<a href="' . $link . '" alt="" >';
                }
            }
            echo '<img src="' . $image_url[0] . '" alt="" />';
            if (!empty($title) || !empty($caption)) {
                echo '<div class="caption-bottom gdl-slider-caption">';
                echo '<div class="gdl-slider-title gdl-title">' . $title . '</div>' . $caption;
                echo '</div>';
            }
            if ($link_type != 'No Link') {
                echo '</a>';
            }
        }
        echo '</li>';
    }
    echo "</ul>";
}
Example #6
0
function print_portfolio($item_xml)
{
    wp_reset_query();
    global $paged;
    global $sidebar;
    global $port_div_size_num_class;
    global $class_to_num;
    if (empty($paged)) {
        $paged = get_query_var('page') ? get_query_var('page') : 1;
    }
    // get the item class and size from array
    $port_size = find_xml_value($item_xml, 'item-size');
    $item_class = $port_div_size_num_class[$port_size]['class'];
    if ($sidebar == "no-sidebar") {
        $item_size = $port_div_size_num_class[$port_size]['size'];
    } else {
        if ($sidebar == "left-sidebar" || $sidebar == "right-sidebar") {
            $item_size = $port_div_size_num_class[$port_size]['size2'];
        } else {
            $item_size = $port_div_size_num_class[$port_size]['size3'];
        }
    }
    // get the portfolio meta value
    $header = find_xml_value($item_xml, 'header');
    $num_fetch = find_xml_value($item_xml, 'num-fetch');
    $num_excerpt = find_xml_value($item_xml, 'num-excerpt');
    $category = find_xml_value($item_xml, 'category');
    $category_val = $category == 'All' ? '' : $category;
    $filterable = find_xml_value($item_xml, 'filterable');
    $filter_class = '';
    // portfolio header
    if (!empty($header)) {
        echo '<h3 class="portfolio-header-title title-color gdl-title">' . $header . '</h3>';
        $view_all_project = find_xml_value($item_xml, 'view-all-project');
        if ($view_all_project != 'No') {
            $view_all_project_link = get_permalink(get_page_by_title($view_all_project));
            echo '<div class="portfolio-view-all-project">';
            echo '<a href="' . $view_all_project_link . '">' . $translator_view_project . '</a>';
            echo '</div>';
        }
    }
    // category list for filter
    if ($filterable == "Yes") {
        $category_lists = get_category_list('portfolio-category', $category_val);
        echo '<ul id="portfolio-item-filter">';
        foreach ($category_lists as $category_list) {
            $category_term = get_term_by('name', $category_list, 'portfolio-category');
            if (!empty($category_term)) {
                $category_slug = $category_term->slug;
            } else {
                $category_slug = 'all';
            }
            echo '<li><a href="#" class="gdl-button" data-value="' . $category_slug . '">' . $category_list . '</a></li>';
        }
        echo '<div class="clear"></div>';
        echo "</ul>";
    }
    echo '<div class="clear"></div>';
    // start fetching database
    global $post, $wp_query;
    if (!empty($category_val)) {
        $category_term = get_term_by('name', $category_val, 'portfolio-category');
        $category_val = $category_term->slug;
    }
    $post_temp = query_posts(array('post_type' => 'portfolio', 'paged' => $paged, 'portfolio-category' => $category_val, 'posts_per_page' => $num_fetch));
    echo '<div id="portfolio-item-holder" class="portfolio-item-holder">';
    while (have_posts()) {
        the_post();
        // get the category for filter
        $item_categories = get_the_terms($post->ID, 'portfolio-category');
        $category_slug = " ";
        if (!empty($item_categories)) {
            foreach ($item_categories as $item_category) {
                $category_slug = $category_slug . $item_category->slug . ' ';
            }
        }
        // start printing data
        echo '<div class="' . $item_class . $category_slug . ' portfolio-item">';
        $thumbnail_types = get_post_meta($post->ID, 'post-option-thumbnail-types', true);
        if ($thumbnail_types == "Image") {
            $image_type = get_post_meta($post->ID, 'post-option-featured-image-type', true);
            $image_type = empty($image_type) ? "Link to Current Post" : $image_type;
            $thumbnail_id = get_post_thumbnail_id();
            $thumbnail = wp_get_attachment_image_src($thumbnail_id, $item_size);
            $alt_text = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
            if ($image_type == "Link to Current Post") {
                $hover_thumb = "hover-link";
                $pretty_photo = "";
                $permalink = get_permalink();
            } else {
                if ($image_type == "Link to URL") {
                    $hover_thumb = "hover-link";
                    $pretty_photo = "";
                    $permalink = get_post_meta($post->ID, 'post-option-featured-image-url', true);
                } else {
                    if ($image_type == "Lightbox to Current Thumbnail") {
                        $hover_thumb = "hover-zoom";
                        $pretty_photo = ' data-rel="prettyPhoto" ';
                        $permalink = wp_get_attachment_image_src($thumbnail_id, 'full');
                        $permalink = $permalink[0];
                    } else {
                        if ($image_type == "Lightbox to Picture") {
                            $hover_thumb = "hover-zoom";
                            $pretty_photo = ' data-rel="prettyPhoto" ';
                            $permalink = get_post_meta($post->ID, 'post-option-featured-image-url', true);
                            $permalink = $permalink;
                        } else {
                            $hover_thumb = "hover-video";
                            $pretty_photo = ' data-rel="prettyPhoto" ';
                            $permalink = get_post_meta($post->ID, 'post-option-featured-image-url', true);
                            $permalink = $permalink;
                        }
                    }
                }
            }
            if (!empty($thumbnail[0])) {
                echo '<div class="portfolio-thumbnail-image">';
                echo '<div class="overflow-hidden">';
                echo '<a href="' . $permalink . '" ' . $pretty_photo . ' title="' . get_the_title() . '">';
                echo '<span class="portfolio-thumbnail-image-hover">';
                echo '<span class="' . $hover_thumb . '"></span>';
                echo '</span>';
                echo '</a>';
                echo '<img src="' . $thumbnail[0] . '" alt="' . $alt_text . '"/>';
                echo '</div>';
                // overflow-hidden
                echo '</div>';
                // portfolio-thumbnail-image
            } else {
                echo '<div class="port-no-image" style="width:' . gdl_get_width($item_size) . 'px; height: ' . gdl_get_height($item_size) . 'px;"></div>';
            }
        } else {
            if ($thumbnail_types == "Video") {
                $video_link = get_post_meta($post->ID, 'post-option-thumbnail-video', true);
                echo '<div class="portfolio-thumbnail-video">';
                echo get_video($video_link, gdl_get_width($item_size), gdl_get_height($item_size));
                echo '</div>';
            } else {
                if ($thumbnail_types == "Slider") {
                    $slider_xml = get_post_meta($post->ID, 'post-option-thumbnail-xml', true);
                    $slider_xml_dom = new DOMDocument();
                    $slider_xml_dom->loadXML($slider_xml);
                    echo '<div class="portfolio-thumbnail-slider">';
                    echo print_flex_slider($slider_xml_dom->documentElement, $item_size);
                    echo '</div>';
                }
            }
        }
        $show_port_title = find_xml_value($item_xml, "show-title") == "Yes";
        $show_port_excerpt = find_xml_value($item_xml, "show-excerpt") == "Yes";
        if ($show_port_excerpt || $show_port_title) {
            echo '<div class="portfolio-thumbnail-context">';
            // portfolio title
            if ($show_port_title) {
                echo '<h2 class="portfolio-thumbnail-title port-title-color gdl-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
            }
            // portfolio excerpt
            if ($show_port_excerpt) {
                echo '<div class="portfolio-thumbnail-content">' . mb_substr(get_the_excerpt(), 0, $num_excerpt) . '</div>';
            }
            echo '</div>';
            // portfolio thumbnail context
        }
        echo '</div>';
        // portfolio item
    }
    echo "</div>";
    // portfolio item holder
    echo '<div class="clear"></div>';
    if (find_xml_value($item_xml, "pagination") == "Yes") {
        pagination();
    }
}
Example #7
0
    function get_portfolio_media($param)
    {
        global $post;
        $gallery_field = tt_getmeta('portfolio_gallery');
        $video_field = tt_getmeta('portfolio_video_mp4');
        if ($gallery_field != '') {
            ?>
<section class="portfolio-slider">
	<div class="swiper-container layout-<?php 
            echo $param['layout'];
            ?>
">
		<div class="swiper-wrapper">
			<?php 
            if ($video_field != '') {
                $fimage = '';
                if (has_post_thumbnail(get_the_ID())) {
                    $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'blog');
                    $fimage = $image[0];
                }
                $video_embed = get_video(array('video' => $video_field, 'poster' => $fimage));
                echo "<div class='swiper-slide video'><div class='entry-media video-wrapper' style='display:none;'>{$video_embed}</div></div>";
            }
            $gimages = explode(',', $gallery_field);
            foreach ($gimages as $img_id) {
                $img = wp_get_attachment_url($img_id);
                echo '<div class="swiper-slide" style="background-image:url(' . $img . ');"></div>';
            }
            ?>
		</div>

		<div class="swiper-control-prev"><i class="fa fa-angle-left"></i></div>
		<div class="swiper-control-next"><i class="fa fa-angle-right"></i></div>
		<div class="swiper-pagination"></div>

	</div>
</section>
<?php 
        }
    }
Example #8
0
function print_single_blog_thumbnail($post_id, $item_size)
{
    $thumbnail_types = get_post_meta($post_id, 'post-option-inside-thumbnail-types', true);
    if ($thumbnail_types == "Image" || empty($thumbnail_types)) {
        $thumbnail_id = get_post_meta($post_id, 'post-option-inside-thumbnial-image', true);
        $thumbnail = wp_get_attachment_image_src($thumbnail_id, $item_size);
        $thumbnail_full = wp_get_attachment_image_src($thumbnail_id, 'full');
        $alt_text = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
        if (!empty($thumbnail)) {
            echo '<div class="blog-media-wrapper gdl-image">';
            echo '<a href="' . $thumbnail_full[0] . '" data-rel="fancybox" title="' . get_the_title() . '">';
            echo '<img src="' . $thumbnail[0] . '" alt="' . $alt_text . '"/>';
            echo '</a>';
            echo '</div>';
            // blog-media-wrapper
        }
    } else {
        if ($thumbnail_types == "Video") {
            $video_link = get_post_meta($post_id, 'post-option-inside-thumbnail-video', true);
            echo '<div class="blog-media-wrapper gdl-video">';
            echo get_video($video_link, gdl_get_width($item_size), gdl_get_height($item_size));
            echo '</div>';
            // blog-media-wrapper
        } else {
            if ($thumbnail_types == "Slider") {
                $slider_xml = get_post_meta($post_id, 'post-option-inside-thumbnail-xml', true);
                $slider_xml_dom = new DOMDocument();
                $slider_xml_dom->loadXML($slider_xml);
                echo '<div class="blog-media-wrapper gdl-slider">';
                echo print_flex_slider($slider_xml_dom->documentElement, $item_size);
                echo '</div>';
                // blog-media-wrapper
            } else {
                if ($thumbnail_types == "HTML5 Video") {
                    $video = get_post_meta($post_id, 'post-option-inside-thumbnail-html5-video', true);
                    echo '<div class="blog-media-wrapper gdl-html5-video">';
                    get_html5_video($video);
                    echo '</div>';
                    // blog-media-wrapper
                }
            }
        }
    }
}
        echo "<li><div class=\"pageSlide\">\n\t\t\t\t\t\t<a href=\"{$url}\" title=\"{$symbol} - {$name}\">\n\t\t\t\t\t\t\t<img src=\"{$thumb}\" alt=\"{$symbol} - {$name}\"/>\n\t\t\t\t\t\t\t<div class=\"maskMv\"></div>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div></li>";
    }
    ?>
			</ul>
		</div>
	</div>
	<div class="watch-video">
		<div id="mainVideo" class="main">
			<div class="scroll">
				<span class="title hide_info"><a href="<?php 
    echo SITE_URL;
    ?>
/video/" title="Video Mới">DANH SÁCH VIDEO</a></span>
				<ul style="width: 1168px; margin-left: 0px;">
					<?php 
    echo get_video('id != 0', 8, 'rand');
    ?>
				</ul>
			</div>
			<div class="clear">
			</div>
		</div>
	</div>
	<div class="comment-box">
		<div class="perlink">
			<span>Phim mới gần đây: </span>
			<?php 
    echo li_film_h3("id != '0'", 10);
    ?>
		</div>
		<div class="comment-notice">
Example #10
0
 switch ($inside_thumbnail_type) {
     case "Image":
         $thumbnail_id = get_post_meta($post->ID, 'post-option-inside-thumbnial-image', true);
         $thumbnail = wp_get_attachment_image_src($thumbnail_id, $item_size);
         $thumbnail_full = wp_get_attachment_image_src($thumbnail_id, 'full');
         $alt_text = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
         if (!empty($thumbnail)) {
             echo '<div class="blog-thumbnail-image">';
             echo '<a href="' . $thumbnail_full[0] . '" data-rel="prettyPhoto" title="' . get_the_title() . '" ><img src="' . $thumbnail[0] . '" alt="' . $alt_text . '"/></a>';
             echo '</div>';
         }
         break;
     case "Video":
         $video_link = get_post_meta($post->ID, 'post-option-inside-thumbnail-video', true);
         echo '<div class="blog-thumbnail-video">';
         echo get_video($video_link, gdl_get_width($item_size), gdl_get_height($item_size));
         echo '</div>';
         break;
     case "Slider":
         $slider_xml = get_post_meta($post->ID, 'post-option-inside-thumbnail-xml', true);
         $slider_xml_dom = new DOMDocument();
         $slider_xml_dom->loadXML($slider_xml);
         echo '<div class="blog-thumbnail-slider">';
         echo print_flex_slider($slider_xml_dom->documentElement, $item_size);
         echo '</div>';
         break;
 }
 echo "<div class='clear'></div>";
 echo "<div class='single-content first-letter'>";
 echo the_content();
 echo "</div>";
Example #11
0
File: video.php Project: hyvs/bepro
<?php

foreach ($_GET as $key => $item) {
    if ($key != 'link' and $key != 'debug') {
        $_GET['link'] .= '&' . $key . '=' . $item;
    }
}
if ($_GET['link']) {
    if ($_GET['debug']) {
        echo '<script>';
    }
    echo "window.document.write('" . preg_replace('/<\\/script>/', '</scr\'+\'ipt>', addslashes(get_video($_GET['link']))) . "');";
    if ($_GET['debug']) {
        echo '</script>';
    }
}
function get_video($link)
{
    $values = array(array('/youtube\\.com.*v=([^&]*)/i', '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/{ID_VIDEO}"></param><embed src="http://www.youtube.com/v/{ID_VIDEO}" type="application/x-shockwave-flash" width="425" height="344"></embed></object>'), array('/video.google.*docid=([^&]*)/i', '<embed id="VideoPlayback" style="width:400px;height:326px" allowFullScreen="true" flashvars="fs=true" src="http://video.google.com/googleplayer.swf?docid={ID_VIDEO}" type="application/x-shockwave-flash"></embed>'), array('/(dailymotion)/i', '{DOWNLOAD%/<textarea id="video_player_embed_code_text" class="text" onclick="this\\.select\\(\\)" type="text">(.*?)<\\/textarea>/ism%html_entity_decode|}'), array('/metacafe\\.com\\/watch\\/(.*)\\//i', '<embed src="http://www.metacafe.com/fplayer/{ID_VIDEO}.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>'), array('/starsclips\\.net\\/videos\\.aspx\\/(.*)/i', '<object width="400" height="320"><param name="movie" value="http://www.starsclips.net/emb.aspx/{ID_VIDEO}"></param><param name="wmode" value="transparent"></param><embed src="http://www.starsclips.net/emb.aspx/{ID_VIDEO}" type="application/x-shockwave-flash" wmode="transparent" width="400" height="320"></embed></object>'), array('/vids\\.myspace\\.com.*?videoID=([^&]*)/i', '<object width="430px" height="386px"><param name="wmode" value="transparent"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://lads.myspace.com/videos/vplayer.swf"/><param name="flashvars" value="m={ID_VIDEO}"/><embed src="http://lads.myspace.com/videos/vplayer.swf" width="430" height="386" flashvars="m={ID_VIDEO}" type="application/x-shockwave-flash" allowscriptaccess="always" /></object>'), array('/myspacetv\\.com.*?videoID=([^&]*)/i', '<object width="430px" height="386px"><param name="wmode" value="transparent"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://lads.myspace.com/videos/vplayer.swf"/><param name="flashvars" value="m={ID_VIDEO}"/><embed src="http://lads.myspace.com/videos/vplayer.swf" width="430" height="386" flashvars="m={ID_VIDEO}" type="application/x-shockwave-flash" allowscriptaccess="always" /></object>'), array('/video\\.yahoo.*vid=([^&]*)/i', '<object width="512" height="323"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.2" /><param name="allowFullScreen" value="true" /><param name="flashVars" value="id={DOWNLOAD%/so\\.addVariable\\("id", "(.*?)"\\);/%}&vid={ID_VIDEO}&thumbUrl={DOWNLOAD%/so\\.addVariable\\("thumbUrl", "(.*?)"\\);/%}&embed=1" /><embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.2" type="application/x-shockwave-flash" width="512" height="323" allowFullScreen="true" flashVars="id={DOWNLOAD%/so\\.addVariable\\("id", "(.*?)"\\);/%}&vid={ID_VIDEO}&thumbUrl={DOWNLOAD%/so\\.addVariable\\("thumbUrl", "(.*?)"\\);/%}&embed=1" ></embed></object>'), array('/(photobucket\\.com)/i', '{DOWNLOAD%/<input name="txtThumbTag2" id="txtThumbTag2".*?value="(.*?)"/ism%html_entity_decode}'), array('/(filefront\\.com)/i', '{DOWNLOAD%/<input type"text" id="embedSrc" value=\'(.*?)\'/ism%}'), array('/veoh\\.com\\/videos\\/([^\\?]*)/i', '<embed src="http://www.veoh.com/videodetails2.swf?permalinkId={ID_VIDEO}&id=anonymous&player=videodetailsembedded&videoAutoPlay=0" allowFullScreen="true" width="540" height="438" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'), array('/(vidilife\\.com)/i', '{DOWNLOAD%/<input type="text" name="url1" value="(.*?)"/%}'), array('/gametrailers\\.com\\/player\\/(.*?).html/i', '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="480" height="392">      <param name="allowScriptAccess" value="sameDomain" />   <param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid={ID_VIDEO}"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid={ID_VIDEO}" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="392"></embed> </object>'), array('/vidiac\\.com\\/video\\/(.*?)\\.htm/i', '<embed src="http://www.vidiac.com/vidiac.swf" FlashVars="video={ID_VIDEO}" quality="high" bgcolor="#ffffff" width="428" height="352" name="ePlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'), array('/gamespot\\.com\\/video\\//i', '<embed id="mymovie" width="432" height="362" flashvars="playerMode=embedded&movieAspect=4.3&flavor=EmbeddedPlayerVersion&skin=http://image.com.com/gamespot/images/cne_flash/production/media_player/proteus/one/skins/gamespot.png&paramsURI={DOWNLOAD%/so\\.addVariable\\(\'paramsURI\', \'(.*?)\'\\);/ism%}" wmode="transparent" allowscriptaccess="always" quality="high" name="mymovie" style="" src="http://image.com.com/gamespot/images/cne_flash/production/media_player/proteus/one/proteus2.swf" type="application/x-shockwave-flash"/>'), array('/(megavideo\\.com)/i', '{DOWNLOAD%/<input type="text" value=\'(.*?)\'/%}'), array('/vimeo\\.com\\/([^&]*)/i', '<object class="swf_holder" type="application/x-shockwave-flash" width="506" height="380" data="http://www.vimeo.com/moogaloop_local.swf?clip_id={ID_VIDEO}&amp;server=www.vimeo.com&amp;autoplay=0&amp;fullscreen=1&amp;show_portrait=0&amp;show_title=0&amp;show_byline=0&amp;md5=&amp;color="><param name="quality" value="high" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop_local.swf?clip_id={ID_VIDEO}&amp;server=www.vimeo.com&amp;autoplay=0&amp;fullscreen=1&amp;show_portrait=0&amp;show_title=0&amp;show_byline=0&amp;md5=&amp;color=" /></object>'), array('/(gamevideos\\.com)/i', '{DOWNLOAD%/Embed: <input.*value="(.*?)"/%html_entity_decode}'), array('/(tu\\.tv)/i', '{DOWNLOAD%/<input name="html".*value=\'(.*?)\'/%}'), array('/godtube\\.com.*viewkey=([^&]*)/i', '<embed src="http://godtube.com/flvplayer.swf" FlashVars="viewkey={ID_VIDEO}" wmode="transparent" quality="high" width="330" height="270" name="godtube" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed>'), array('/myvideo.de\\/watch\\/(.*?)\\//i', "<object style='width:470px;height:406px;' width='470' height='406' type='application/x-shockwave-flash' data='http://www.myvideo.de/movie/{ID_VIDEO}'><param name='movie' value='http://www.myvideo.de/movie/{ID_VIDEO}'/><param name='AllowFullscreen' value='true' /><embed src='http://www.myvideo.de/movie/{ID_VIDEO}' width='470' height='406'></embed></object>"), array('/collegehumor.*video:(.*)/i', '<object type="application/x-shockwave-flash" data="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1819139&fullscreen=1" width="480" height="360" ><param name="allowfullscreen" value="true" /><param name="movie" quality="best" value="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id={ID_VIDEO}&fullscreen=1" /></object>'), array('/comedycentral.*videoId=([^&]*)/i', "<embed FlashVars='videoId={ID_VIDEO}' src='http://www.comedycentral.com/sitewide/video_player/view/default/swf.jhtml' quality='high' bgcolor='#cccccc' width='332' height='316' name='comedy_central_player' align='middle' allowScriptAccess='always' allownetworking='external' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>"), array('/(slideshare\\.net)/i', '{DOWNLOAD%/<input.*?id="embedded_code" value="(.*?)"/%html_entity_decode}'), array('/revver\\.com\\/video\\/(.*?)\\//i', '<script src="http://flash.revver.com/player/1.0/player.js?mediaId:{ID_VIDEO};width:480;height:392;" type="text/javascript"></script>'), array('/sevenload\\.com\\/videos\\/(.*?)-/i', '<script type="text/javascript" src="http://de.sevenload.com/pl/{ID_VIDEO}/500x408"></script>'), array('/clipfish\\.de.*?videoid=([^&]*)/i', "<object width='464' height='380'><param name='movie' value='http://www.clipfish.de/videoplayer.swf?videoid={ID_VIDEO}' /><param name='allowFullScreen' value='true' /><embed src='http://www.clipfish.de/videoplayer.swf?videoid=MTMyNzg4fDI0NTY3MzM' width='464' height='380' name='player' allowFullScreen='true' type='application/x-shockwave-flash'></embed></object>"));
    foreach ($values as $value) {
        if (preg_match($value[0], $link, $matches)) {
            $id_video = $matches[1];
            return preg_replace_callback('/{.*?}/', create_function('$matches', 'switch (true){
case preg_match("/\\{ID_VIDEO\\}/", $matches[0]):
return "' . $id_video . '";
break;
case preg_match("/\\{LINK\\}/", $matches[0]):
return "' . $link . '";
break;
case preg_match("/\\{DOWNLOAD(.*?)%(.*?)%(.*?)\\}/", $matches[0], $matches2):
if (empty($matches2[1])) $matches2[1]="' . $link . '";
if (!$page) {
    $page = 1;
}
$limit = ($page - 1) * $num;
if ($limit < 0) {
    $limit = 0;
}
$arr = MySql::dbselect('id,name,url,duration,thumb', 'media', "id != 0 order by id desc LIMIT {$limit},{$num}");
$total = MySql::dbselect('id', 'media', "id != 0");
$allpage_site = get_allpage(count($total), $num, $page, SITE_URL . "/video/page-");
?>
<div class="hdvideo">
	<div class="hdhwap">
		<ul style="height:400px">
			<?php 
echo get_video('slide = 1', 7);
?>
		</ul>
		<div style="clear:both">
		</div>
		<a href="#" id="hvideo_control_prev" class="btn_pre_ft"></a><a href="#" id="hvideo_control_next" class="btn_next_ft"></a>
	</div>
	<script type="text/javascript">$(".hdhwap ul").carouFredSel({circular: false,infinite: false,auto : false,width: "100%",prev: {button: "#hvideo_control_prev",key: "left"},next: { button: "#hvideo_control_next",key: "right"},});</script>
	<div class="videos">
		<h2 class="title">Video mới</h2>
		<div class="vwap clearfix">
			<div class="vlist">
				<ul class="ulvdieo">
					<?php 
for ($i = 0; $i < count($arr); $i++) {
    $id = $arr[$i][0];
Example #13
0
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. <br/>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
            <div class="clear"></div>
          </div>
          
          <div class="divTextBlock">
            <h2>Textblock 2</h2>
            <div class="divImgLeft">
              <img title="" alt="" src="/website/themes/default/images/tmp/blank220x.gif"/>
            </div>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. <br/>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
            <div class="clear"></div>
          </div> -->
          
          <?php 
get_video();
?>
          
          <?php 
if (has_image_gallery()) {
    ?>
            <div class="divImageGallery">
              <?php 
    get_image_gallery_title('h3');
    ?>
              <?php 
    get_image_gallery(10, '80x80', true, false, '660x');
    ?>
              <div class="clear"></div>
            </div>
          <?php 
function the_video($video)
{
    echo get_video($video);
}
Example #15
0
function get_servico($dbconn)
{
    $query = "SELECT * FROM requilib_website.servico";
    $query_response = mysql_query($query, $dbconn) or die(mysql_error());
    $counter = 0;
    $servico = [];
    while ($row = mysql_fetch_array($query_response)) {
        $servico[$counter]['id'] = $row['id'];
        $servico[$counter]['pagina'] = $row['pagina'];
        $servico[$counter]['titulo'] = $row['titulo'];
        $servico[$counter]['texto'] = $row['texto'];
        //get associated items
        $servico[$counter]['items'] = get_servico_items($dbconn, $servico[$counter]['id']);
        //get associated images
        $equipa[$counter]['img'] = get_img($dbconn, 'servico', $servico[$counter]['id']);
        //get associated videos
        $equipa[$counter]['video'] = get_video($dbconn, 'servico', $servico[$counter]['id']);
        $counter++;
        //proxima medicao da tabela SQL
    }
    echo json_encode(utf8ize($servico));
    return $servico;
}
} else {
    get_form('contactForm', $this->rootLevelId, get_elementId(true));
}
?>
            </div>

            <?php 
get_text_blocks('220x', true, true, '660x');
?>
            
            <?php 
get_internal_links();
?>
            
            <?php 
get_video('540', '304');
?>
            
            <?php 
get_image_gallery(8, '140x140', true, true, '660x');
?>
               
            <?php 
get_documents();
?>
          </div>
          <div class="sidebar">
            <?php 
get_contact();
?>
            <?php 
Example #17
0
function get_servico($dbconn)
{
    $query = "SELECT * FROM servico";
    $query_response = pg_query($dbconn, $query);
    $counter = 0;
    $servico = [];
    while ($row = pg_fetch_array($query_response, $counter, PGSQL_BOTH)) {
        $servico[$counter]['id'] = $row['id'];
        $servico[$counter]['pagina'] = $row['pagina'];
        $servico[$counter]['titulo'] = $row['titulo'];
        $servico[$counter]['texto'] = $row['texto'];
        //get associated items
        $servico[$counter]['items'] = get_servico_items($dbconn, $servico[$counter]['id']);
        //get associated images
        $equipa[$counter]['img'] = get_img($dbconn, 'servico', $servico[$counter]['id']);
        //get associated videos
        $equipa[$counter]['video'] = get_video($dbconn, 'servico', $servico[$counter]['id']);
        $counter++;
        //proxima medicao da tabela SQL
        if ($counter == pg_num_rows($query_response)) {
            break;
            //para a execução do ciclo para que não haja erro quando $counter>numero de linhas na tabela
        }
    }
    echo json_encode($servico);
    return $servico;
}
Example #18
0
function print_feature_media($item_xml)
{
    print_item_header(find_xml_value($item_xml, 'header'), '', '', find_xml_value($item_xml, 'icon-class'));
    global $featured_media_size;
    $item_size = $featured_media_size[find_xml_value($item_xml, 'size')];
    echo '<div class="feature-media-wrapper" >';
    if (find_xml_value($item_xml, 'type') == "Image") {
        $image_id = find_xml_value($item_xml, 'image');
        if (!empty($image_id)) {
            $image_url = wp_get_attachment_image_src($image_id, $item_size);
            $alt_text = get_post_meta($image_id, '_wp_attachment_image_alt', true);
            echo '<div class="feature-media-thumbnail">';
            echo '<img src="' . $image_url[0] . '" alt="' . $alt_text . '" />';
            echo '</div>';
        }
    } else {
        $video_url = find_xml_value($item_xml, 'video');
        if (!empty($video_url)) {
            echo '<div class="feature-media-thumbnail">';
            get_video($video_url, gdl_get_width($item_size), gdl_get_height($item_size));
            echo '</div>';
        }
    }
    $title = find_xml_value($item_xml, 'title');
    $content = find_xml_value($item_xml, 'content');
    echo '<div class="feature-media-content-wrapper">';
    echo '<h4 class="feature-media-title">' . $title . '</h4>';
    echo '<div class="feature-media-content">' . do_shortcode($content) . '</div>';
    echo '</div>';
    echo '<div class="clear"></div>';
    echo '</div>';
}
Example #19
0
     $page_title = SITE_TITLE;
     $meta_description = SITE_DESCRIPTION;
     // Variable setup for pagination.
     if (isset($_GET['page'])) {
         $page_number = $_GET['page'];
         define('PAGE_NUMBER', $page_number);
     }
     // Single video pages.
 } elseif (is_page('single')) {
     // Get & define the video ID.
     $the_current_location = $_SERVER["REQUEST_URI"];
     $the_video_id = end(explode('/', $the_current_location));
     define('THE_VIDEO_ID', $the_video_id);
     // Set the page title and description.
     $page_title = get_video('title', $the_video_id, '');
     $meta_description = get_video('description', $the_video_id, '');
     // Variable setup for pagination.
     if (isset($_GET['page'])) {
         $page_number = $_GET['page'];
         define('PAGE_NUMBER', $page_number);
     }
     // About page.
 } elseif (is_page('about')) {
     // Set the page title and description.
     $page_title = $about_title;
     $meta_description = $about_text;
     // 404 page.
 } else {
     // Set the page title and description.
     $page_title = $not_found_title;
     $meta_description = $not_found_text;
Example #20
0
function print_anything_slider($slider_xml, $size = '940x360')
{
    if (empty($slider_xml)) {
        return;
    }
    global $gdl_element_id;
    echo '<ul id="slider" class="anythingSlider gdl-slider" style="width:' . gdl_get_width($size) . 'px; height:' . gdl_get_height($size) . 'px;">';
    foreach ($slider_xml->childNodes as $slider) {
        $title = find_xml_value($slider, 'title');
        $caption = html_entity_decode(find_xml_value($slider, 'caption'));
        $link = find_xml_value($slider, 'link');
        $link_type = find_xml_value($slider, 'linktype');
        $image_url = wp_get_attachment_image_src(find_xml_value($slider, 'image'), $size);
        $alt_text = get_post_meta(find_xml_value($slider, 'image'), '_wp_attachment_image_alt', true);
        echo '<li>';
        if ($link_type == 'Link to Video') {
            echo get_video($link, gdl_get_width($size), gdl_get_height($size));
        } else {
            if ($link_type == 'Lightbox') {
                $image_full_url = wp_get_attachment_image_src(find_xml_value($slider, 'image'), 'full');
                echo '<a data-rel="fancybox" data-fancybox-group="gal' . $gdl_element_id . '" href="' . $image_full_url[0] . '"  title="' . $alt_text . '">';
            } else {
                if ($link_type != 'No Link') {
                    echo '<a href="' . $link . '" alt="" >';
                }
            }
            echo '<img src="' . $image_url[0] . '" alt="' . $alt_text . '" />';
            if (!empty($title) || !empty($caption)) {
                echo '<div class="anything-caption">';
                if (!empty($title)) {
                    echo '<h2 class="gdl-slider-title">' . $title . '</h2>';
                    echo "<div class='clear'></div>";
                }
                if (!empty($caption)) {
                    echo '<div class="gdl-slider-caption"><div class="gdl-slider-inner-caption">' . $caption . '</div></div>';
                    echo "<div class='clear'></div>";
                }
                echo '</div>';
            }
            if ($link_type != 'No Link') {
                echo '</a>';
            }
        }
        echo '</li>';
    }
    echo "</ul>";
    $gdl_element_id++;
}
Example #21
0
function print_portfolio($item_xml)
{
    wp_reset_query();
    // Translator words
    global $gdl_admin_translator;
    if ($gdl_admin_translator == 'enable') {
        $translator_visit_website = get_option(THEME_SHORT_NAME . '_translator_visit_website', 'Visit Website');
        $translator_view_project = get_option(THEME_SHORT_NAME . '_translator_view_all_project', 'View All Projects →');
        $translator_read_more = get_option(THEME_SHORT_NAME . '_translator_read_more', 'Read More');
    } else {
        $translator_visit_website = __('Visit Website', 'gdl_front_end');
        $translator_view_project = __('View All Projects →', 'gdl_front_end');
        $translator_read_more = __('Read More', 'gdl_front_end');
    }
    global $paged;
    global $sidebar;
    global $port_div_size_num_class;
    global $class_to_num;
    if (empty($paged)) {
        $paged = get_query_var('page') ? get_query_var('page') : 1;
    }
    // get the item class and size from array
    $port_size = find_xml_value($item_xml, 'item-size');
    $item_class = $port_div_size_num_class[$port_size]['class'];
    if ($sidebar == "no-sidebar") {
        $item_size = $port_div_size_num_class[$port_size]['size'];
    } else {
        if ($sidebar == "left-sidebar" || $sidebar == "right-sidebar") {
            $item_size = $port_div_size_num_class[$port_size]['size2'];
        } else {
            $item_size = $port_div_size_num_class[$port_size]['size3'];
        }
    }
    // get the portfolio meta value
    $header = find_xml_value($item_xml, 'header');
    $num_fetch = find_xml_value($item_xml, 'num-fetch');
    $num_excerpt = find_xml_value($item_xml, 'num-excerpt');
    $category = find_xml_value($item_xml, 'category');
    $category_val = $category == 'All' ? '' : $category;
    $filterable = find_xml_value($item_xml, 'filterable');
    $filter_class = '';
    // start fetching database
    global $post, $wp_query;
    if (!empty($category_val)) {
        $category_term = get_term_by('name', $category_val, 'portfolio-category');
        $category_val = $category_term->slug;
    }
    $post_temp = query_posts(array('post_type' => 'portfolio', 'paged' => $paged, 'portfolio-category' => $category_val, 'posts_per_page' => $num_fetch));
    // check available category
    $avail_cat = array();
    while (have_posts()) {
        the_post();
        $post_categories = get_the_terms(get_the_ID(), 'portfolio-category');
        if (!empty($post_categories)) {
            foreach ($post_categories as $category) {
                if (!in_array($category->slug, $avail_cat)) {
                    array_push($avail_cat, $category->slug);
                }
            }
        }
    }
    rewind_posts();
    // portfolio header
    if (!empty($header)) {
        echo '<h3 class="portfolio-header-title title-color gdl-title">' . $header . '</h3>';
        $view_all_project = find_xml_value($item_xml, 'view-all-project');
        if ($view_all_project != 'No') {
            $view_all_project_link = get_permalink(get_page_by_title($view_all_project));
            echo '<div class="portfolio-view-all-project">';
            echo '<a href="' . $view_all_project_link . '">' . $translator_view_project . '</a>';
            echo '</div>';
        }
    }
    // category list for filter
    if ($filterable == "Yes") {
        echo '<ul id="portfolio-item-filter">';
        if (empty($category_val)) {
            echo '<li><a href="#" class="gdl-button active" data-value="all">All</a></li>';
            $parent_id = 0;
        } else {
            $parent_id = get_term_by('slug', $category_val, 'portfolio-category');
            echo '<li><a href="#" class="gdl-button active" data-value="' . $parent_id->slug . '">' . $parent_id->name . '</a></li>';
            $parent_id = $parent_id->term_id;
        }
        $category_lists = get_categories(array('taxonomy' => 'portfolio-category', 'child_of' => $parent_id));
        foreach ($category_lists as $category_list) {
            if (in_array($category_list->slug, $avail_cat)) {
                echo '<li><a href="#" class="gdl-button" data-value="' . $category_list->slug . '">' . $category_list->name . '</a></li>';
            }
        }
        echo "</ul>";
    }
    echo '<div class="clear"></div>';
    // get the portfolio size
    $port_wrapper_size = $class_to_num[find_xml_value($item_xml, 'size')];
    $port_current_size = 0;
    $port_size = $class_to_num[$port_size];
    $port_num_have_bottom = sizeof($post_temp) % (int) ($port_wrapper_size / $port_size);
    $port_num_have_bottom = $port_num_have_bottom == 0 ? (int) ($port_wrapper_size / $port_size) : $port_num_have_bottom;
    $port_num_have_bottom = sizeof($post_temp) - $port_num_have_bottom;
    echo '<div id="portfolio-item-holder" class="portfolio-item-holder">';
    while (have_posts()) {
        the_post();
        // get the category for filter
        $item_categories = get_the_terms($post->ID, 'portfolio-category');
        $category_slug = " ";
        if (!empty($item_categories)) {
            foreach ($item_categories as $item_category) {
                $category_slug = $category_slug . $item_category->slug . ' ';
            }
        }
        // start printing data
        echo '<div class="' . $item_class . $category_slug . ' mt0 pt25 portfolio-item">';
        $thumbnail_types = get_post_meta($post->ID, 'post-option-thumbnail-types', true);
        if ($thumbnail_types == "Image") {
            $image_type = get_post_meta($post->ID, 'post-option-featured-image-type', true);
            $image_type = empty($image_type) ? "Link to Current Post" : $image_type;
            $thumbnail_id = get_post_thumbnail_id();
            $thumbnail = wp_get_attachment_image_src($thumbnail_id, $item_size);
            $alt_text = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
            if ($image_type == "Link to Current Post") {
                $hover_thumb = "hover-link";
                $pretty_photo = "";
                $permalink = get_permalink();
            } else {
                if ($image_type == "Link to URL") {
                    $hover_thumb = "hover-link";
                    $pretty_photo = "";
                    $permalink = __(get_post_meta($post->ID, 'post-option-featured-image-url', true), 'gdl_front_end');
                } else {
                    if ($image_type == "Lightbox to Current Thumbnail") {
                        $hover_thumb = "hover-zoom";
                        $pretty_photo = ' data-rel="prettyPhoto" ';
                        $permalink = wp_get_attachment_image_src($thumbnail_id, 'full');
                        $permalink = $permalink[0];
                    } else {
                        if ($image_type == "Lightbox to Picture") {
                            $hover_thumb = "hover-zoom";
                            $pretty_photo = ' data-rel="prettyPhoto" ';
                            $permalink = __(get_post_meta($post->ID, 'post-option-featured-image-url', true), 'gdl_front_end');
                            $permalink = $permalink;
                        } else {
                            $hover_thumb = "hover-video";
                            $pretty_photo = ' data-rel="prettyPhoto" ';
                            $permalink = __(get_post_meta($post->ID, 'post-option-featured-image-url', true), 'gdl_front_end');
                            $permalink = $permalink;
                        }
                    }
                }
            }
            if (!empty($thumbnail[0])) {
                echo '<div class="portfolio-thumbnail-image">';
                echo '<div class="overflow-hidden">';
                echo '<a href="' . $permalink . '" ' . $pretty_photo . ' title="' . get_the_title() . '">';
                echo '<span class="portfolio-thumbnail-image-hover">';
                echo '<span class="' . $hover_thumb . '"></span>';
                echo '</span>';
                echo '</a>';
                echo '<img src="' . $thumbnail[0] . '" alt="' . $alt_text . '"/>';
                echo '</div>';
                //overflow hidden
                echo '</div>';
                //portfolio thumbnail image
            }
        } else {
            if ($thumbnail_types == "Video") {
                $video_link = get_post_meta($post->ID, 'post-option-thumbnail-video', true);
                echo '<div class="portfolio-thumbnail-video">';
                echo get_video($video_link, gdl_get_width($item_size), gdl_get_height($item_size));
                echo '</div>';
            } else {
                if ($thumbnail_types == "Slider") {
                    $slider_xml = get_post_meta($post->ID, 'post-option-thumbnail-xml', true);
                    $slider_xml_dom = new DOMDocument();
                    $slider_xml_dom->loadXML($slider_xml);
                    echo '<div class="portfolio-thumbnail-slider">';
                    echo print_flex_slider($slider_xml_dom->documentElement, $item_size);
                    echo '</div>';
                }
            }
        }
        echo '<div class="portfolio-thumbnail-context">';
        // portfolio title
        if (find_xml_value($item_xml, "show-title") == "Yes") {
            echo '<h2 class="portfolio-thumbnail-title port-title-color gdl-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
        }
        // portfolio excerpt
        if (find_xml_value($item_xml, "show-excerpt") == "Yes") {
            echo '<div class="portfolio-thumbnail-content">' . mb_substr(get_the_excerpt(), 0, $num_excerpt) . '</div>';
        }
        // read more button
        if (find_xml_value($item_xml, "read-more") == "Yes") {
            echo '<a href="' . get_permalink() . '" class="portfolio-read-more gdl-button">' . $translator_read_more . '</a>';
        }
        // visit website
        if (find_xml_value($item_xml, "visit-website") == "Yes") {
            $website = get_post_meta($post->ID, 'post-option-website-url', true);
            if (!empty($website)) {
                echo '<a href="' . $website . '" class="portfolio-visit-website gdl-button">' . $translator_visit_website . '</a>';
            }
        }
        echo '</div>';
        // print space if not last line
        if ($port_current_size < $port_num_have_bottom) {
            if (find_xml_value($item_xml, "show-title") == 'Yes' || find_xml_value($item_xml, "show-excerpt") == "Yes" || find_xml_value($item_xml, "read-more") == "Yes" || find_xml_value($item_xml, "visit-website") == "Yes") {
                echo '<div class="portfolio-bottom"></div>';
            }
            $port_current_size++;
        }
        echo '</div>';
    }
    echo "</div>";
    echo '<div class="clear"></div>';
    if (find_xml_value($item_xml, "pagination") == "Yes") {
        pagination();
    }
}
<?php

get_video('all', 'content-video');
?>

<div id="gallery" class="row">
    <div id="content" class="row">
        <header class="content">
            <h3><?php 
get_text($gallery_title);
?>
</h3>
            <p><?php 
get_text($gallery_description);
?>
</p>
        </header>
        
        <div id="thumbs" class="content grid">
            <?php 
get_videos('gallery', 'content-gallery-item');
?>
        </div>
    </div>
    
    <footer id="footer" class="row">
        <div class="content">
            <div class="left">
                <span><?php 
get_text($footer_text);
?>