957, height=>394, "border-radius" => 0 ); // load the correct custom post template import file // use the following function to make the slider ///////////////////////// function make_ywg_promoslider() { global $globalarray; $output = '
'; query_posts("post_type=post&post_status=publish&meta_key=promo-image&posts_per_page=-1"); while(have_posts()) : the_post(); $promo_post_custom = get_post_custom($post->ID); $thislink = $promo_post_custom["promo-link"][0]; if($thislink == "self") $thislink = get_permalink($post->ID); $processed_image = str_replace(get_bloginfo('url'),"",wp_get_attachment_url($promo_post_custom["promo-image"][0])); $thisimage = get_bloginfo('template_url').'/timthumb.php?src='.$processed_image.'&w='.$globalarray[width].'&h='.$globalarray[height].'&zc=1&q=100'; $float = "left"; if($promo_post_custom["promo-float"][0]) $float = $promo_post_custom["promo-float"][0]; $output .= '

'.$promo_post_custom["promo-text"][0].'

'; if($thislink) $output .= ''; $output .= '
'; endwhile; $output.= '
'; echo $output; } // load the javascript ////////////////////// function ywg_promoslider_scripts() { wp_enqueue_script('slides', plugins_url('/js/slides.min.jquery.js', __FILE__), // where the this file is in /someplugin/ array('jquery'), '1.1.9' ); } function ywg_promoslider_header() { global $globalarray; $loadingpicurl = plugins_url('/images/loading.gif', __FILE__); $middle = ceil(($globalarray[height]-43)/2); $nextloc = $globalarray[width]+15; $pagination = $globalarray[height]-35; echo " "; } add_action('wp_enqueue_scripts', 'ywg_promoslider_scripts'); add_action('wp_head', 'ywg_promoslider_header'); // load the css /////////////////////////////// function ywg_promoslider_stylesheet() { $myStyleUrl = plugins_url('/css/style.css', __FILE__); // Respects SSL, Style.css is relative to the current file $myStyleFile = WP_PLUGIN_DIR . '/ywg-promoslider/css/style.css'; if ( file_exists($myStyleFile) ) { wp_register_style('ywg_promoslider_style', $myStyleUrl); wp_enqueue_style( 'ywg_promoslider_style'); } } add_action('wp_enqueue_scripts', 'ywg_promoslider_stylesheet'); /* Display custom column */ function display_posts_slider( $column, $post_id ) { if($column == "promo") { $post_custom=get_post_custom($post_id); if($post_custom["promo-image"][0]) echo ''; } } add_action( 'manage_posts_custom_column' , 'display_posts_slider', 10, 2 ); /* Add custom column to post list */ function add_slider_column($columns) { return array('promo' => __('Promo Slider')) + $columns; } add_filter('manage_posts_columns' , 'add_slider_column'); ARIN is our first confirmed sponsor. :: Rocky Mountain IPv6 Taskforce

 

ARIN Is Our First Confirmed Sponsor

arin

ARIN is joining the 7th Annual North American IPv6 Summit as a Silver Sponsor. This year’s theme is Putting IPv6 To Work. With available IPv4 address space becoming scarce, ARIN strongly encourages you to deploy IPv6 on your networks and equipment, so that they can remain visible to the entirety of the Internet. Register today to visit them on September 24-25 at the Grand Hyatt, Denver, Colorado.

Comments are closed.