예제 #1
0
    ?>
</a></h1>
	<?php 
}
//postinfo
echo getPostInfo(get_custom_option('set_post_info', null, $post_data['post_id']), $post_data);
//main block in full Width style
echo $fullwidth && $streampage_columns || $layout_isotope ? '</div><div class="sc_columns_item">' : '';
//thumb
if (!$post_data['post_protected'] && get_custom_option('show_featured_image', null, $post_data['post_id']) == 'yes') {
    if ($post_data['post_gallery']) {
        echo balanceTags($post_data['post_gallery']);
    } else {
        if ($post_data['post_video']) {
            $post_thumb = $post_data['post_thumb'] != '' ? $post_data['post_thumb'] : getVideoImgCode($post_data['post_video_url']);
            echo getVideoFrame($post_data['post_video'], $post_thumb);
        } else {
            if ($post_data['post_audio']) {
                echo balanceTags($post_data['post_audio']);
            } else {
                if ($post_data['post_thumb'] && $post_data['post_format'] == 'image') {
                    ?>
			<div class="postThumb thumbZooom"><?php 
                    echo balanceTags('<a href="' . $post_data['post_attachment'] . '" data-image="' . $post_data['post_attachment'] . '"><span class="icon-search thumb-ico"></span>' . $post_data['post_thumb'] . '</a>');
                    ?>
			</div>
			<?php 
                } else {
                    if ($post_data['post_thumb'] && $post_data['post_format'] != 'quote' && $post_data['post_format'] != 'aside') {
                        ?>
			<div class="postThumb"><?php 
예제 #2
0
$show_title = true;
//get_custom_option('show_post_title', null, $post_data['post_id'])=='yes';
require themerex_get_file_dir('/templates/page-part-reviews-summary.php');
?>
<article class="columns1_<?php 
echo $opt['posts_visible'];
?>
 column_item_<?php 
echo $opt['number'];
?>
">

	<?php 
if ($post_data['post_video']) {
    echo getVideoFrame($post_data['post_video'], $post_data['post_thumb'], false);
} else {
    if ($post_data['post_thumb'] && ($post_data['post_format'] != 'gallery' || !$post_data['post_gallery'] || get_custom_option('gallery_instead_image') == 'no')) {
        ?>
	<div class="thumb hoverIncrease" data-image="<?php 
        echo $post_data['post_attachment'];
        ?>
" data-title="<?php 
        echo esc_attr($post_data['post_title']);
        ?>
"><?php 
        echo $post_data['post_thumb'];
        ?>
</div>
	<?php 
    } else {
예제 #3
0
function sc_video($atts, $content = null)
{
    if (in_shortcode_blogger()) {
        return '';
    }
    extract(shortcode_atts(array("id" => "", "url" => '', "src" => '', "image" => '', "title" => 'off', "autoplay" => 'off', "width" => '100%', "height" => '295', "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts));
    if ($src == '' && $url == '' && isset($atts[0])) {
        $src = $atts[0];
    }
    if ($image > 0) {
        $attach = wp_get_attachment_image_src($image, 'full');
        if (isset($attach[0]) && $attach[0] != '') {
            $image = $attach[0];
        }
    }
    $s = ($top !== '' ? 'margin-top:' . $top . 'px;' : '') . ($bottom !== '' ? 'margin-bottom:' . $bottom . 'px;' : '') . ($left !== '' ? 'margin-left:' . $left . 'px;' : '') . ($right !== '' ? 'margin-right:' . $right . 'px;' : '') . ($width !== '' ? 'width:' . $width . 'px;' : '') . ($height !== '' ? 'height:' . $height . 'px;' : '');
    $url = getVideoPlayerURL($src != '' ? $src : $url);
    $output = '';
    $video = '<video' . ($id ? ' id="' . $id . '"' : '') . ' class="sc_video" src="' . $url . '" width="' . $width . '" height="' . $height . '"' . ($image || sc_param_is_on($autoplay) && is_single() ? ' autoplay="autoplay"' : '') . ($s != '' ? ' style="' . $s . '"' : '') . ' controls="controls"><source type="video/mp4" src="' . $url . '"></source></video>';
    if ($image) {
        $video = substituteVideo($video, $width, $height);
        $output = getVideoFrame($video, $image, sc_param_is_on($title), $s);
    } else {
        $output = $video;
    }
    return $output;
    /*
    	return '<iframe' . ($id ? ' id="' . $id . '"' : '') . ' class="sc_video" src="' . $url . '" width="' . $width . '" height="' . $height . '"'.($s!='' ? ' style="'.$s.'"' : '').' frameborder="0" webkitAllowFullScreen="webkitAllowFullScreen" mozallowfullscreen="mozallowfullscreen" allowFullScreen="allowFullScreen"></iframe>';
    */
}
예제 #4
0
function sc_video($atts, $content = null)
{
    if (in_shortcode_blogger()) {
        return '';
    }
    extract(shortcode_atts(array("id" => "", "class" => "", "url" => '', "src" => '', "image" => '', "title" => 'off', "ratio" => '16:9', "autoplay" => 'off', "width" => '100%', "height" => '295', "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts));
    if ($src == '' && $url == '' && isset($atts[0])) {
        $src = $atts[0];
    }
    $ed = themerex_substr($width, -1);
    $s = getStyleString($top, $right, $bottom, $left, $width, $height != '' ? $height + (sc_param_is_on($title) ? 21 : 0) : '');
    $url = $src != '' ? $src : $url;
    if ($image != '' && sc_param_is_off($image)) {
        $image = '';
    } else {
        if (sc_param_is_on($autoplay) && is_single()) {
            $image = '';
        } else {
            if ($image > 0) {
                $attach = wp_get_attachment_image_src($image, 'full');
                if (isset($attach[0]) && $attach[0] != '') {
                    $image = $attach[0];
                }
            }
            $image = getResizedImageURL(empty($image) ? get_the_ID() : $image, $ed != '%' ? $width : null, $height);
            if (empty($image)) {
                $image = getVideoCoverImage($url);
            }
        }
    }
    $url = getVideoPlayerURL($src != '' ? $src : $url);
    $ratio = empty($ratio) ? "16:9" : str_replace(array('/', '\\', '-'), ':', $ratio);
    $video = '<video' . ($id ? ' id="' . $id . '"' : '') . ' class="sc_video' . (!empty($class) ? ' ' . $class : '') . '"' . ' src="' . $url . '"' . ' width="' . $width . '" height="' . $height . '"' . ' data-width="' . $width . '" data-height="' . $height . '"' . ' data-ratio="' . esc_attr($ratio) . '"' . ($image ? ' data-image="' . esc_attr($image) . '"' : '') . ' data-title="' . $title . '"' . ($s != '' ? ' style="' . $s . '"' : '') . ($image && get_theme_option('substitute_video') == 'yes' || sc_param_is_on($autoplay) && is_single() ? ' autoplay="autoplay"' : '') . ' controls="controls"' . '>' . '</video>';
    if (get_custom_option('substitute_video') == 'no') {
        $video = getVideoFrame($video, $image, sc_param_is_on($title), $s);
    }
    if (get_theme_option('use_mediaelement') == 'yes') {
        themerex_enqueue_script('wp-mediaelement');
    }
    return $video;
}
예제 #5
0
파일: preview.php 프로젝트: Prescia/Prescia
    list($tdata, $furl) = $core->dbo->fetch_row($r);
    $core->template->assign("ttitle", $tdata);
    $core->template->assign("urla", $furl);
}
// get FORUM data
$core->dbo->query("SELECT f.title,f.operationmode, f2.title FROM (bb_forum as f) LEFT JOIN bb_forum as f2 ON (f2.id = f.id_parent) WHERE f.id=" . $_POST['id_forum'], $r, $n);
list($ftitle, $op, $ptitle) = $core->dbo->fetch_row($r);
$core->template->fill($_POST);
$core->template->assign("forum_title", $ftitle);
$core->template->assign("parent_title", $ptitle . ($ptitle != '' ? " - " : ""));
$core->template->assign("date", date("Y-m-d H:i:s"));
// so this will result in "now"
$core->template->assign("bbaction", $_POST['bbaction'] == 'tpreview' ? 'tpost' : 'post');
$core->template->assign("bbactionpreview", $_POST['bbaction']);
if (isset($_POST['video']) && $_POST['video'] != '') {
    $embed = getVideoFrame(trim($_POST['video']), 420, 315);
    if ($embed != '') {
        $core->template->assign('videoembed', $embed);
    } else {
        $core->template->assign("_hasvideo");
    }
} else {
    $core->template->assign("_hasvideo");
}
// user image?
$image = CONS_PATH_PAGES . $_SESSION['CODE'] . '/files/users/t/image_' . $_SESSION[CONS_SESSION_ACCESS_USER]['id'] . "_2";
if ($_SESSION[CONS_SESSION_ACCESS_USER]['image'] == 'n' || !locateFile($image, $ext)) {
    $core->template->assign("_imageyes");
} else {
    $core->template->assign("_imageno");
    $core->template->assign("image", $image);
예제 #6
0
function sc_video($atts, $content = null)
{
    if (in_shortcode_blogger()) {
        return '';
    }
    extract(shortcode_atts(array("id" => "", "url" => "", "src" => "", "image" => "", "title" => "", "autoplay" => "off", "width" => "", "height" => "", "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts));
    if ($src == '' && $url == '' && isset($atts[0])) {
        $src = $atts[0];
    }
    $s = ($top !== '' ? 'margin-top:' . $top . 'px;' : '') . ($bottom !== '' ? 'margin-bottom:' . $bottom . 'px;' : '') . ($left !== '' ? 'margin-left:' . $left . 'px;' : '') . ($right !== '' ? 'margin-right:' . $right . 'px;' : '');
    $block_size = getThumbSizes(array('thumb_size' => 'image_large', 'thumb_crop' => true, 'sidebar' => false));
    $image = getAttachmentID($image);
    if ($image != 'no') {
        $image_thumb = getResizedImageURL($image, $block_size['w'], $block_size['h']);
        $image_youtube = getVideoImgCode($url);
    }
    $start_frame = $image != 'no' ? true : false;
    $url = getVideoPlayerURL($src != '' ? $src : $url);
    $output = '';
    $video = '<div class="videoThumb"><video' . ($id ? ' id="sc_video_' . $id . '"' : '') . ' class="sc_video" src="' . $url . '" width="' . $width . '" height="' . $height . '"' . (is_single() ? $image != 'no' || sc_param_is_on($autoplay) ? ' autoplay="autoplay"' : '' : ($image != 'no' ? ' autoplay="autoplay"' : '')) . ($s != '' ? ' style="' . $s . '"' : '') . ' controls="controls"></video></div>';
    if ($width == '') {
        $width = $block_size['w'];
        $height = $block_size['h'];
    } else {
        if ($width == '' || ($width = '100%')) {
            $width = $block_size['w'];
            $height = $block_size['h'];
        }
    }
    if ($image && $image != 'no') {
        $video = substituteVideo($video, $width, $height, $start_frame);
        $output = getVideoFrame($video, $image_thumb, $title, $autoplay, $s);
    } else {
        if ($image != 'no') {
            $video = substituteVideo($video, $width, $height, $start_frame);
            $output = getVideoFrame($video, $image_youtube, $title, $autoplay, $s);
        } else {
            $output = $video;
        }
    }
    return $output;
}
예제 #7
0
파일: thread.php 프로젝트: Prescia/Prescia
// -- this will apply image tags and use _toggles
$core->templateParams['core'] =& $this->parent;
$core->templateParams['module'] = $core->loaded($core->storage['friendlyurlmodule']);
$core->storage['friendlyurldata'] = prepareDataToOutput($core->template, $core->templateParams, $core->storage['friendlyurldata']);
$core->template->fill($core->storage['friendlyurldata']);
// --
// image meta
if ($core->storage['friendlyurldata']['image'] == 'y') {
    $core->addScript("shadowbox");
    $core->template->constants['METAFIGURE'] = $core->storage['friendlyurldata']['image_2'];
}
// add data from this FORUM data
$core->template->assign("forumurla", $core->storage['friendlyurldata']['forum_urla'] != '' ? $core->storage['friendlyurldata']['forum_urla'] . "/" : "");
// add video from FORUMTHREAD (image handled on prepareDataToOutput)
if ($core->storage['friendlyurldata']['video'] != '') {
    $core->template->assign("videoembed", getVideoFrame($core->storage['friendlyurldata']['video'], 0, 0, 'embed-responsive-item'));
} else {
    $core->template->assign("_hasvideo");
}
// prepare to get posts
$idf = $core->storage['friendlyurldata']['id_forum'];
$idt = $core->storage['friendlyurldata']['id'];
// count posts
$totalPost = $mode != "articles" ? $core->dbo->fetch("SELECT count(id) FROM bb_post WHERE id_forum={$idf} AND id_forumthread={$idt} GROUP BY id_forumthread") : 1;
// NOTE: if we are not on bb mode, the FIRST post must be IGNORED, that's why we reduce one from totalPost in that case, EVERYWHERE
if (isset($_REQUEST['lastpage'])) {
    // if requested last page, calculate first post of last page
    $_REQUEST['p_init'] = floor(($mode == 'bb' ? $totalPost : $totalPost - 1) / $ipp) * $ipp;
}
$core->template->assign("pg", ceil(($mode == 'bb' ? $totalPost : $totalPost - 1) / $ipp));
$v = $core->loadedPlugins['bi_stats']->getCounter($pageToBelogged);
예제 #8
0
 function substituteVideo($post_text, $w, $h, $in_frame = true)
 {
     $tag = '<video>';
     $tag_end = '</video>';
     $pos_start = -1;
     while (($pos_start = themerex_strpos($post_text, themerex_substr($tag, 0, -1) . ' ', $pos_start + 1)) !== false) {
         $pos_end = themerex_strpos($post_text, themerex_substr($tag, -1), $pos_start);
         $pos_end2 = themerex_strpos($post_text, $tag_end, $pos_end);
         $tag_text = themerex_substr($post_text, $pos_start, ($pos_end2 !== false ? $pos_end2 + themerex_strlen($tag_end) - 1 : $pos_end) - $pos_start + 1);
         if (getTagAttrib($tag_text, $tag, 'data-frame') == 'no') {
             continue;
         }
         if (($src = getTagAttrib($tag_text, $tag, 'src')) == '') {
             $src = getTagAttrib($tag_text, $tag, 'url');
         }
         if ($src != '') {
             $auto = getTagAttrib($tag_text, $tag, 'autoplay');
             $src = getVideoPlayerURL($src, $auto != '');
             // && is_single());
             $id = getTagAttrib($tag_text, $tag, 'id');
             $tag_w = getTagAttrib($tag_text, $tag, 'width');
             $tag_h = getTagAttrib($tag_text, $tag, 'height');
             $tag_a = getTagAttrib($tag_text, $tag, 'align');
             $tag_s = getTagAttrib($tag_text, $tag, 'style');
             $video = '<iframe' . ($id ? ' id="' . $id . '"' : '') . ' class="video_frame' . ($tag_a ? ' align' . $tag_a : '') . '"' . ' src="' . $src . '"' . ' width="' . ($tag_w ? $tag_w : $w) . '"' . ' height="' . ($tag_h ? $tag_h : $h) . '"' . ' frameborder="0" webkitAllowFullScreen="webkitAllowFullScreen" mozallowfullscreen="mozallowfullscreen" allowFullScreen="allowFullScreen"></iframe>';
             if ($in_frame) {
                 $tag_image = getTagAttrib($tag_text, $tag, 'data-image');
                 $tag_title = getTagAttrib($tag_text, $tag, 'data-title');
                 $video = getVideoFrame($video, $tag_image, sc_param_is_on($tag_title), $tag_s);
             }
             $pos_end = $pos_end2 !== false ? $pos_end2 + 8 : $pos_end + 1;
             $post_text = themerex_substr($post_text, 0, themerex_substr($post_text, $pos_start - 3, 3) == '<p>' ? $pos_start - 3 : $pos_start) . $video . themerex_substr($post_text, themerex_substr($post_text, $pos_end, 4) == '</p>' ? $pos_end + 4 : $pos_end);
         }
     }
     return $post_text;
 }
?>
">

	<?php 
if (in_array($post_data['post_format'], array('chat', 'status', 'aside', 'link'))) {
    echo '<i class="icon ' . $post_data['post_icon'] . '"></i>';
}
?>
	
	<?php 
if (!$post_data['post_protected']) {
    if (!empty($opt['dedicated'])) {
        echo $opt['dedicated'];
    } else {
        if ($post_data['post_video']) {
            echo getVideoFrame($post_data['post_video'], $post_data['post_thumb'], false, '', 'small');
        } else {
            if ($post_data['post_thumb']) {
                ?>
			<div class="sc_section columns post_thumb thumb">
				<?php 
                if ($post_data['post_format'] == 'link' && $post_data['post_url'] != '') {
                    echo '<a href="' . $post_data['post_url'] . '"' . ($post_data['post_url_target'] ? ' target="' . $post_data['post_url_target'] . '"' : '') . '>' . $post_data['post_thumb'] . '</a>';
                } else {
                    if ($post_data['post_link'] != '') {
                        echo '<a href="' . $post_data['post_link'] . '">' . $post_data['post_thumb'] . '</a>';
                    } else {
                        echo $post_data['post_thumb'];
                    }
                }
                ?>