Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //page with partial html where i call the ajax
- <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php wpzoom_rss(); ?>" />
- <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
- <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
- <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/dropdown.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom.css" type="text/css" media="screen" />
- <?php if (strlen($wpzoom_misc_favicon) > 1 ) { ?><link rel="shortcut icon" href="<?php echo "$wpzoom_misc_favicon";?>" type="image/x-icon" /><?php } ?>
- <?php if ($wpzoom_sidebar == 'Left') { ?><style type="text/css">#sidebar { float:left; margin:15px 5px 0 15px;} </style> <?php } ?>
- <?php remove_action('wp_print_styles', 'pagenavi_stylesheets'); ?>
- <?php wp_enqueue_script('jquery'); ?>
- <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
- <?php wpzoom_js( "slider");?>
- <?php wp_head(); ?>
- <script type="text/javascript">
- /*emerald script to handle reset*/
- function ResetForm() {
- var myForm = document.forms['taxonomy-picker'];
- /*document.write(myForm);*/
- selectTags = myForm.getElementsByTagName("select");
- for(var i = 0; i < selectTags.length; i++) {
- selectTags[i].selectedIndex =0;
- }
- }
- </script>
- <script type="text/javascript">
- $(function() {
- $('#next_five').live('click', function(){
- var data = {
- action: 'next_five',
- next: 5
- };
- jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data,
- function(response){
- $('#navi').slideDown("slow");
- $("#slidercontainer").html(response);
- },"html");
- $.getScript('wp-content/themes/yamidoo_pro/js/slider.js');
- });
- });
- </script>
- </head>
- <body>
- <div style="position:absolute;left:450px;top:0px;">
- <input type="button" class="nextfive top-buttons" id="next_five" value="Click five" />
- <span id="output"></span>
- <div id="slidercontainer">
- <?php
- if ($wpzoom_slideshow_show == 'Yes')
- {
- include(TEMPLATEPATH . '/wpzoom-featured.php'); // calling Featured Slideshow
- }
- ?>
- </div>
- </body>
- </html>
- //wpzoom-featured.php
- <div id="feature">
- <?php
- $catid5 = $wpzoom_featured_category_5;
- $cat5 = get_category($catid5,false);
- $catlink5 = get_category_link($catid5);
- $breaking_cat5 = "cat=$catid5";
- ?>
- <div id="panes">
- <?php
- $offset_param="";
- //$offset_param=$_GET['next'];
- //global $paged;
- //$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- //$my_query = new WP_Query('category_name=Resources&showposts=50&paged=' . $paged');
- $headline = new WP_Query('showposts=5&' . $breaking_cat5.'&offset='.$offset_param );
- while($headline->have_posts()) : $headline->the_post(); unset($videocode);
- $videocode = get_post_meta($post->ID, 'wpzoom_post_embed_code', true);?>
- <?php if($wpzoom_autoembed == "Yes") { $AE = new AutoEmbed(); } // loading the AutoEmbed PHP Class ?>
- <div>
- <?php if (strlen($videocode) > 1 && $wpzoom_autoembed == "Yes") {
- if ($videocode && $AE->parseUrl($videocode)) {
- $AE->setParam('wmode','transparent');
- $AE->setParam('autoplay','false');
- $AE->setHeight(280);
- $AE->setWidth(520);
- ?><span class="cover"><?php echo $AE->getEmbedCode(); ?></span><?php
- }
- }
- elseif (strlen($videocode) > 1 && $wpzoom_autoembed == "No") {
- $videocode = preg_replace("/(width\s*=\s*[\"\'])[0-9]+([\"\'])/i", "$1 520 $2", $videocode);
- $videocode = preg_replace("/(height\s*=\s*[\"\'])[0-9]+([\"\'])/i", "$1 280 $2", $videocode);
- $videocode = str_replace("<embed","<param name='wmode' value='transparent'></param><embed",$videocode);
- $videocode = str_replace("<embed","<embed wmode='transparent' ",$videocode);
- ?><span class="cover"><?php echo "$videocode"; ?></span><?php
- }
- if (!$videocode) {
- ?>
- <?php unset($img);
- if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
- $thumbURL = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '' );
- $img = $thumbURL[0]; }
- else {
- unset($img);
- if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); }
- else {
- if (!$img) { $img = catch_that_image($post->ID); } }
- }
- if ($img) { $img = wpzoom_wpmu($img); ?>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&w=520&h=280&zc=1" alt="<?php the_title(); ?>" /></a><?php } else { echo"<img src=\""; bloginfo('template_directory'); echo"/images/blank.jpg\" />"; }
- } // if a video does not exist ?>
- <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
- <ul class="post-meta"><li class="date"><?php the_time("$dateformat $timeformat"); ?></li> <li class="category"><?php the_category(', ') ?></li> <li class="comments"> <?php comments_popup_link('0', '1', '%'); ?></li> <?php edit_post_link( __('Edit', 'wpzoom'), ' ', ''); ?></ul>
- <?php the_excerpt(); ?>
- </div>
- <?php endwhile; ?>
- </div>
- <br clear="all" />
- <!-- navigator -->
- <div id="navi">
- <ul>
- <?php $teaser_small = new WP_Query('showposts=5&' . $breaking_cat5.'&offset='.$offset_param ); while($teaser_small->have_posts()) : $teaser_small->the_post(); ?>
- <li>
- <?php unset($img);
- if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
- $thumbURL = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '' );
- $img = $thumbURL[0]; }
- else {
- unset($img);
- if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); }
- else {
- if (!$img) { $img = catch_that_image($post->ID); } }
- }
- if ($img) { $img = wpzoom_wpmu($img); ?>
- <a href="#"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&w=60&h=50&zc=1" alt="<?php the_title(); ?>" /></a><?php } else { echo"<img src=\""; bloginfo('template_directory'); echo"/images/blank2.jpg\" />"; } ?>
- </li>
- <?php endwhile; wp_reset_query(); ?>
- </ul>
- </div>
- </div>
- // ajax call back from admin-ajax.php
- $breaking_cat5=5;
- ?>
- <div id="feature">
- <?php
- $catid5 = $wpzoom_featured_category_5;
- $cat5 = get_category($catid5,false);
- $catlink5 = get_category_link($catid5);
- $breaking_cat5 = "cat=$catid5";
- ?>
- <div id="panes">
- <?php
- $offset_param="";
- $offset_param=$_POST['next'];
- //global $paged;
- //$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- //$my_query = new WP_Query('category_name=Resources&showposts=50&paged=' . $paged');
- $headline = new WP_Query('showposts=5&' . $breaking_cat5.'&offset='.$offset_param );
- while($headline->have_posts()) : $headline->the_post(); unset($videocode);
- $videocode = get_post_meta($post->ID, 'wpzoom_post_embed_code', true);?>
- <?php if($wpzoom_autoembed == "Yes") { $AE = new AutoEmbed(); } // loading the AutoEmbed PHP Class ?>
- <div>
- <?php if (strlen($videocode) > 1 && $wpzoom_autoembed == "Yes") {
- if ($videocode && $AE->parseUrl($videocode)) {
- $AE->setParam('wmode','transparent');
- $AE->setParam('autoplay','false');
- $AE->setHeight(280);
- $AE->setWidth(520);
- ?><span class="cover"><?php echo $AE->getEmbedCode(); ?></span><?php
- }
- }
- elseif (strlen($videocode) > 1 && $wpzoom_autoembed == "No") {
- $videocode = preg_replace("/(width\s*=\s*[\"\'])[0-9]+([\"\'])/i", "$1 520 $2", $videocode);
- $videocode = preg_replace("/(height\s*=\s*[\"\'])[0-9]+([\"\'])/i", "$1 280 $2", $videocode);
- $videocode = str_replace("<embed","<param name='wmode' value='transparent'></param><embed",$videocode);
- $videocode = str_replace("<embed","<embed wmode='transparent' ",$videocode);
- ?><span class="cover"><?php echo "$videocode"; ?></span><?php
- }
- if (!$videocode) {
- ?>
- <?php unset($img);
- if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
- $thumbURL = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '' );
- $img = $thumbURL[0]; }
- else {
- unset($img);
- if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); }
- else {
- if (!$img) { $img = catch_that_image($post->ID); } }
- }
- if ($img) { $img = wpzoom_wpmu($img); ?>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&w=520&h=280&zc=1" alt="<?php the_title(); ?>" /></a><?php } else { echo"<img src=\""; bloginfo('template_directory'); echo"/images/blank.jpg\" />"; }
- } // if a video does not exist ?>
- <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
- <ul class="post-meta"><li class="date"><?php the_time("$dateformat $timeformat"); ?></li> <li class="category"><?php the_category(', ') ?></li> <li class="comments"> <?php comments_popup_link('0', '1', '%'); ?></li> <?php edit_post_link( __('Edit', 'wpzoom'), ' ', ''); ?></ul>
- <?php the_excerpt(); ?>
- </div>
- <?php endwhile; ?>
- </div>
- <br clear="all" />
- <!-- navigator -->
- <div id="navi">
- <ul>
- <?php $teaser_small = new WP_Query('showposts=5&' . $breaking_cat5.'&offset='.$offset_param ); while($teaser_small->have_posts()) : $teaser_small->the_post(); ?>
- <li>
- <?php unset($img);
- if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
- $thumbURL = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '' );
- $img = $thumbURL[0]; }
- else {
- unset($img);
- if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); }
- else {
- if (!$img) { $img = catch_that_image($post->ID); } }
- }
- if ($img) { $img = wpzoom_wpmu($img); ?>
- <a href="#"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&w=60&h=50&zc=1" alt="<?php the_title(); ?>" /></a><?php } else { echo"<img src=\""; bloginfo('template_directory'); echo"/images/blank2.jpg\" />"; } ?>
- </li>
- <?php endwhile; wp_reset_query(); ?>
- </ul>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement