Example #1
0
function mytheme_video($file, $image, $width, $height, $color)
{
    //Template URL
    $template_url = get_template_directory_uri();
    //Unique ID
    $id = "video-" . theme1762_random(15);
    $object_height = $height + 39;
    //JS
    $output = '<script type="text/javascript">' . "\n";
    $output .= 'var flashvars = {};' . "\n";
    $output .= 'flashvars.player_width="' . $width . '";' . "\n";
    $output .= 'flashvars.player_height="' . $height . '"' . "\n";
    $output .= 'flashvars.player_id="' . $id . '";' . "\n";
    $output .= 'flashvars.thumb="' . $image . '";' . "\n";
    $output .= 'flashvars.colorTheme="' . $color . '";' . "\n";
    $output .= 'var params = { "wmode": "transparent" };' . "\n";
    $output .= 'params.wmode = "transparent";' . "\n";
    $output .= 'params.quality = "high";';
    $output .= 'params.allowFullScreen = "true";' . "\n";
    $output .= 'params.allowScriptAccess = "always";' . "\n";
    $output .= 'params.quality="high";' . "\n";
    $output .= 'var attributes = {};' . "\n";
    $output .= 'attributes.id = "' . $id . '";' . "\n";
    $output .= 'swfobject.embedSWF("' . $template_url . '/flash/video.swf?fileVideo=' . $file . '", "' . $id . '", "' . $width . '", "' . $object_height . '", "9.0.0", false, flashvars, params, attributes);' . "\n";
    $output .= '</script>' . "\n\n";
    $output .= '<div class="video-bg" style="width:' . $width . 'px; height:' . $height . 'px; background-image:url(' . $image . ')">' . "\n";
    $output .= '</div>' . "\n";
    //HTML
    $output .= '<div id="' . $id . '">' . "\n";
    $output .= '<a href="http://www.adobe.com/go/getflashplayer">' . "\n";
    $output .= '<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />' . "\n";
    $output .= '</a>' . "\n";
    $output .= '</div>';
    return $output;
}
Example #2
0
    ?>
</h1>
				
				<?php 
}
?>
				
				<?php 
get_template_part('includes/post-formats/post-meta');
?>
				
				</header>
				
				
				<?php 
$random = theme1762_random(10);
?>
			
				<script type="text/javascript">
					jQuery(function(){
						jQuery('#gallery_post_<?php 
echo $random;
?>
').cycle({
							pause: 1,
							fx: 'fade',
							timeout: 5000,
							pager:   '#g_pagination_<?php 
echo $random;
?>
',