当前位置: 首页>>代码示例>>PHP>>正文


PHP bfi_thumb函数代码示例

本文整理汇总了PHP中bfi_thumb函数的典型用法代码示例。如果您正苦于以下问题:PHP bfi_thumb函数的具体用法?PHP bfi_thumb怎么用?PHP bfi_thumb使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bfi_thumb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_bfithumb

function get_bfithumb($w, $h, $url)
{
    include_once 'includes/bfithumb.php';
    $params = array('width' => $w, 'height' => $h, 'crop' => true);
    $image = bfi_thumb($url, $params);
    return $image;
}
开发者ID:phuocdungit,项目名称:fundy,代码行数:7,代码来源:functions.php

示例2: userpro_get_avatar

function userpro_get_avatar($avatar, $id_or_email, $size, $default, $alt = '')
{
    global $userpro;
    require_once userpro_path . 'lib/BFI_Thumb.php';
    if (isset($id_or_email->user_id)) {
        $id_or_email = $id_or_email->user_id;
    } elseif (is_email($id_or_email)) {
        $user = get_user_by('email', $id_or_email);
        $id_or_email = $user->ID;
    }
    if ($id_or_email && userpro_profile_data('profilepicture', $id_or_email)) {
        $url = $userpro->file_uri(userpro_profile_data('profilepicture', $id_or_email), $id_or_email);
        $params = array('width' => $size, 'height' => $size, 'quality' => 100);
        $crop = bfi_thumb(get_site_url() . (strpos($url, "http") !== false ? urlencode($url) : $url), $params);
        $return = '<img src="' . $crop . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="modified avatar" />';
    } else {
        if ($id_or_email && userpro_profile_data('gender', $id_or_email)) {
            $gender = strtolower(userpro_profile_data('gender', $id_or_email));
        } else {
            $gender = 'male';
            // default gender
        }
        $userpro_default = userpro_url . 'img/default_avatar_' . $gender . '.jpg';
        $return = '<img src="' . $userpro_default . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="default avatar" />';
    }
    if (userpro_profile_data('profilepicture', $id_or_email) != '') {
        return $return;
    } else {
        if (userpro_get_option('use_default_avatars') == 1) {
            return $avatar;
        } else {
            return $return;
        }
    }
}
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:35,代码来源:hooks-filters.php

示例3: st_vc_team

 function st_vc_team($attr, $content = false)
 {
     $data = shortcode_atts(array('st_avatar' => 0, 'st_name' => 0, 'st_position' => '', 'st_position_social' => '-top-left', 'st_effect' => '', 'st_facebook' => '', 'st_twitter' => '', 'st_google' => '', 'st_other_social' => ''), $attr, 'st_team');
     extract($data);
     $img = wp_get_attachment_image_src($st_avatar, 'full');
     $list_social = '';
     if (!empty($st_facebook)) {
         $list_social .= '<li><a href="' . $st_facebook . '" class="fa fa-facebook box-icon-normal round"></a></li>';
     }
     if (!empty($st_twitter)) {
         $list_social .= '<li><a href="' . $st_twitter . '" class="fa fa-twitter box-icon-normal round"></a></li>';
     }
     if (!empty($st_google)) {
         $list_social .= '<li><a href="' . $st_google . '" class="fa fa-google-plus box-icon-normal round"></a></li>';
     }
     if (!empty($st_other_social)) {
         $list_social .= $st_other_social;
     }
     $txt = '<div class="thumb text-center st_team">
                     <header class="thumb-header hover-img">
                         <img class="round" src="' . bfi_thumb($img[0], array('width' => 300, 'height' => 300)) . '" alt="' . $st_name . '" title="' . $st_name . '" />
                         <ul class="hover-icon-group' . $st_position_social . ' ' . $st_effect . ' ">
                                 ' . $list_social . '
                         </ul>
                     </header>
                     <div class="thumb-caption">
                         <h5 class="thumb-title">' . $st_name . '</h5>
                         <p class="thumb-meta text-small">' . $st_position . '</p>
                     </div>
               </div>';
     return $txt;
 }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:32,代码来源:st-team.php

示例4: blog_thumbnail_style

function blog_thumbnail_style($atts, $current)
{
    global $post, $mk_options;
    extract($atts);
    $image_height = $grid_image_height;
    if ($thumbnail_align == 'left') {
        $align_class = ' content-align-right';
    } else {
        $align_class = ' content-align-left';
    }
    if ($layout == 'full') {
        $image_width = $grid_width - 40;
    } else {
        $image_width = $content_width / 100 * $grid_width - 40;
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    /*
     * Image Width : 600px
     * Image Height : 460px
     */
    $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    $image_output_src = bfi_thumb($image_src_array[0], array('width' => '600', 'height' => '460'));
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-blog-thumbnail-item thumbnail-' . $item_id . ' mk-isotop-item ' . $post_type . '-post-type' . $align_class . '">' . "\n";
    if (has_post_thumbnail()) {
        $output .= '<div class="featured-image" ><a href="' . get_permalink() . '" title="' . get_the_title() . '">';
        $output .= '    <img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . $image_output_src . '" itemprop="image" />';
        $output .= '    <div class="image-hover-overlay"></div>';
        $output .= '    <div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
        $output .= '</a></div>';
    }
    $output .= '<div class="mk-thumbnail-content-container">';
    $output .= '    <div class="mk-blog-meta">';
    $output .= '        <div class="mk-blog-author">';
    ob_start();
    the_author_posts_link();
    $output .= ob_get_contents() . '</div>';
    ob_get_clean();
    $output .= '        <span class="mk-categories"> / ' . __('', 'mk_framework') . ' ' . get_the_category_list(', ') . ' </span> /
                        <time datetime="' . get_the_date() . '">
                            <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>
                        </time>';
    $output .= '        <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    if ($excerpt_length != 0) {
        ob_start();
        the_excerpt_max_charlength($excerpt_length);
        $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
    }
    $output .= '        <div class="mk-teader-button">' . do_shortcode('[mk_button dimension="outline" corner_style="pointed" outline_skin="custom" outline_active_color="#000000" outline_hover_color="#fff" margin_bottom="0" size="medium" align="left" url="' . get_permalink() . '"]' . __('READ MORE', 'mk_framework') . '[/mk_button]') . '
                            </div>';
    $output .= '        </div>';
    $output .= '    </div>';
    $output .= '<div class="clearboth"></div>';
    $output .= '</article>' . "\n\n\n";
    return $output;
}
开发者ID:kevalbaxi,项目名称:dosomething-blog,代码行数:59,代码来源:thumbnail.php

示例5: resize_thumbnail_wpden

function resize_thumbnail_wpden($width = '', $height = '', $path = '')
{
    // Include the library
    include_once 'BFI_Thumb.php';
    // Our parameters, do a resize
    $params = array('width' => $width, 'height' => $height);
    // Get the URL of our processed image
    $image = bfi_thumb($path, $params);
    // Print out our img tag
    return $image;
}
开发者ID:supersonique-studio,项目名称:BlueStrap,代码行数:11,代码来源:functions.php

示例6: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? 'Mini Slideshow' : $instance['title'], $instance, $this->id_base);
        $count = (int) $instance["count"];
        $width = (int) $instance["width"];
        $height = (int) $instance["height"];
        $random = rand(0, 999999);
        $output = '<div class="mk-widget-mini-slideshow mk-flexslider" id="testimonial_slider_' . $random . '"><ul class="mk-flex-slides">';
        if ($count > 0) {
            for ($i = 1; $i <= $count; $i++) {
                $src = isset($instance["src_" . $i]) ? $instance["src_" . $i] : '';
                require_once THEME_FUNCTIONS . "/bfi_cropping.php";
                $image_src = bfi_thumb($src, array('width' => $width, 'height' => $height));
                $output .= '<li>';
                $output .= '<img alt="" src="' . $image_src . '" />';
                $output .= '</li>';
            }
        }
        $output .= "</ul></div>";
        if (!empty($output)) {
            echo $before_widget;
            ?>

<script type="text/javascript">

		jQuery(document).ready(function() {
			
		jQuery('#testimonial_slider_<?php 
            echo $random;
            ?>
').flexslider({
			selector: ".mk-flex-slides > li",
			animation: "fade",              //String: Select your animation type, "fade" or "slide"
			smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
			slideshowSpeed: 7000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
			animationSpeed: 400,            //Integer: Set the speed of animations, in milliseconds
			pauseOnHover: true,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
			controlNav: false,               //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
			prevText: "",           //String: Set the text for the "previous" directionNav item
			nextText: ""              //String: Set the text for the "next" directionNav item
	});

		});
</script>
            <?php 
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            echo $output;
            echo $after_widget;
        }
    }
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:53,代码来源:widgets-slideshow.php

示例7: mk_thumbnail_image_gen

function mk_thumbnail_image_gen($image, $width, $height)
{
    $default = includes_url() . 'images/media/default.png';
    if ($image == $default || empty($image)) {
        $default_url = THEME_IMAGES . '/dummy-images/dummy-' . mt_rand(1, 7) . '.png';
        if (!empty($width) && !empty($height)) {
            $image = bfi_thumb($default_url, array('width' => $width, 'height' => $height, 'crop' => true));
            return $image;
        }
        return $default_url;
    } else {
        return $image;
    }
}
开发者ID:boozzywoozzy,项目名称:tvoya-peremoga,代码行数:14,代码来源:general-functions.php

示例8: widget

 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('CWS_Widget_Latest_Posts', $instance['title']);
     $head = '';
     if ($title && $title != '') {
         $head = '<h3 class="widget-title">' . $title . '</h3>';
     }
     global $post;
     $category = !empty($instance['category']) ? absint($instance['category']) : 0;
     $post_query = array('numberposts' => 3, 'cat' => $category);
     if ($instance['num_to_show']) {
         $post_query['numberposts'] = $instance['num_to_show'];
     }
     if ($instance['show_date']) {
         $post_query['show_date'] = $instance['show_date'];
     }
     $show_date = $instance['show_date'] ? $instance['show_date'] : false;
     $myposts = get_posts($post_query);
     echo $before_widget;
     echo '<div class="latest-posts-widget">' . $head . '<div class="widget-content"><ul>';
     //$myposts = get_posts( $post_query );
     foreach ($myposts as $post) {
         $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_id()), 'full', true);
         setup_postdata($post);
         echo '<li>';
         if (has_post_thumbnail()) {
             echo '<div class="kids_image_wrapper ">';
             echo '<a href="' . $thumbnail[0] . '" class="prettyPhoto kids_mini_picture"  data-rel="prettyPhoto[rpwt]">';
             echo '<img src="' . bfi_thumb($thumbnail[0], array('width' => 70, 'height' => 70, 'crop' => true)) . '" width="70" height="70" alt=""></a></div>';
         }
         echo '<div class="kids_post_content"><h4><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
         if ($show_date) {
             echo '<p>' . the_excerpt_max_charlength(25) . '</p>';
             echo '<p class="time-post">' . get_the_date() . '</p>';
         } else {
             echo '<p>' . the_excerpt_max_charlength(40) . '</p>';
         }
         echo '</div></li>';
     }
     wp_reset_postdata();
     echo '</ul></div></div>' . $args['after_widget'];
 }
开发者ID:Makenrro,项目名称:repos,代码行数:43,代码来源:latest_posts_w_thumbnails.php

示例9: get_image_src

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 public static function get_image_src($image, $size = NULL, $width = NULL, $height = NULL, $crop = true)
 {
     $src = NULL;
     if ($size) {
         $size = self::detect_image_size($size);
     }
     if (!empty($image)) {
         if (empty($width) && empty($height) && !empty($size)) {
             $sizes = KopaInit::get_image_sizes();
             if (isset($sizes[$size])) {
                 $width = $sizes[$size]['width'];
                 $height = $sizes[$size]['height'];
                 $crop = $sizes[$size]['crop'];
             }
         }
         $src = bfi_thumb($image, array('width' => $width, 'height' => $height, 'crop' => $crop));
     }
     return apply_filters('kopa_image_get_image_src', $src);
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:28,代码来源:image.class.php

示例10: widget

    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    public function widget($args, $instance)
    {
        extract($args);
        extract($instance);
        $hasWrapper = false;
        $i = 1;
        $n_items = $this->n_items;
        if ($id == 'home-sidebar-3') {
            $hasWrapper = true;
        }
        ?>

	<div class='<?php 
        echo $hasWrapper ? 'col-sm-6' : 'col-xs-12';
        ?>
'>

			<div class="widget box-accordion">	
				<h2 class="box-title"><img src="<?php 
        bloginfo('template_url');
        ?>
/assets/img/icon-list-small.png">PROIECTE FINALIZATE</h2>
		
			<?php 
        $bfi_args = array('width' => 166, 'height' => 69);
        while ($i <= $n_items) {
            $img = $instance["url_img_{$i}"];
            $img = bfi_thumb($img, $bfi_args);
            $text = $instance["text_{$i}"] . " <a href='{$instance["url_{$i}"]}'>{$instance["url_text_{$i}"]}</a> <span class='arrow-small'>&#8250;</span>";
            $first = $i == 1;
            $this->get_item($i, $img, $text, $first);
            $i++;
        }
        ?>

			</div>
			<!-- .box-accordion -->

	</div>

	<?php 
    }
开发者ID:bogdanpetru,项目名称:wpAtom,代码行数:50,代码来源:widget-input-loop.php

示例11: ktz_gallery_slide

 function ktz_gallery_slide()
 {
     global $post;
     $meta_values = get_post_custom($post->ID);
     if (isset($meta_values['ktz_gallery_post_postformat'][0]) && has_post_format('gallery')) {
         $title = get_the_title();
         $gallery = explode(',', get_post_meta(get_the_ID(), 'ktz_gallery_post_postformat', true));
         echo '<div class="box_gallery box_gallery_single"><div id="inner_box_gallery">';
         $count = 0;
         foreach ($gallery as $slide) {
             $attachment_url = get_attachment_link($slide);
             $img_url = wp_get_attachment_url($slide);
             $desc_img = get_the_title($slide);
             $params = array('width' => 539);
             $image_ori = bfi_thumb($img_url, $params);
             //resize & crop the image
             if ($count == 0) {
                 echo '<a class="data-original-link" href="' . $attachment_url . '" data-title="Image for ' . $desc_img . '"><img class="data-original" src="' . $image_ori . '" height="auto" width="539" alt="' . $desc_img . '" title="' . $desc_img . '" /></a>';
             }
             $count++;
         }
         echo '</div>';
         echo '<div class="widget_carousel ktz-slidesingle"><div class="list_carousel"><div class="ktzcarousel-little owl-carousel owl-theme owl-little">';
         foreach ($gallery as $slide) {
             $attachment_url = get_attachment_link($slide);
             $img_url = wp_get_attachment_url($slide);
             $desc_img = get_the_title($slide);
             $params_1 = array('width' => 177, 'height' => 130, 'crop' => true);
             $image = bfi_thumb($img_url, $params_1);
             //resize & crop the image
             $params_2 = array('width' => 539);
             $image_ori = bfi_thumb($img_url, $params_2);
             //resize & crop the image
             echo '<div class="item ktz-widgetcolor"><img src="' . $image . '" data-ori="' . $attachment_url . '" data-crop="' . $image_ori . '" height="130" width="177" alt="' . $desc_img . '" data-title="' . $desc_img . '" /></div>';
         }
         echo '</div></div></div></div>';
     } else {
         echo '<div class="ktz-featuredimg">';
         echo ktz_featured_img_width(540);
         echo '</div>';
     }
 }
开发者ID:jjpango,项目名称:JJTeam,代码行数:42,代码来源:_slider_ktz.php

示例12: ktz_get_gallery_post

 function ktz_get_gallery_post()
 {
     global $post;
     $meta_values = get_post_custom($post->ID);
     if (isset($meta_values['ktz_gallery_post_postformat'][0]) && has_post_format('gallery')) {
         $title = get_the_title();
         $gallery = explode(',', get_post_meta(get_the_ID(), 'ktz_gallery_post_postformat', true));
         echo '<div class="ktz-gallery"><ul>';
         foreach ($gallery as $slide) {
             $attachment_url = get_attachment_link($slide);
             $img_url = wp_get_attachment_url($slide);
             $desc_img = get_the_title($slide);
             $params = array('width' => 140, 'height' => 120, 'crop' => true);
             $image_ori = bfi_thumb($img_url, $params);
             //resize & crop the image
             echo '<li>';
             echo '<a href="' . $attachment_url . '" title="Image for ' . $desc_img . '"><img src="' . $image_ori . '" height="250" width="300" alt="' . $desc_img . '" title="' . $desc_img . '" /></a>';
             echo '</li>';
         }
         echo '<ul></div>';
     }
 }
开发者ID:gigikir,项目名称:adebe,代码行数:22,代码来源:_slider_ktz.php

示例13: my_post_gallery

function my_post_gallery($output, $attr)
{
    global $post;
    if (isset($attr['orderby'])) {
        $attr['orderby'] = sanitize_sql_orderby($attr['orderby']);
        if (!$attr['orderby']) {
            unset($attr['orderby']);
        }
    }
    extract(shortcode_atts(array('order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'full', 'include' => '', 'exclude' => ''), $attr));
    $id = intval($id);
    if ('RAND' == $order) {
        $orderby = 'none';
    }
    if (!empty($include)) {
        $include = preg_replace('/[^0-9,]+/', '', $include);
        $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
        $attachments = array();
        foreach ($_attachments as $key => $val) {
            $attachments[$val->ID] = $_attachments[$key];
        }
    }
    if (empty($attachments)) {
        return '';
    }
    // Here's your actual output, you may customize it to your need
    $output = "<div class=\"gallery-wrapper row\">\n";
    // Now you loop through each attachment
    foreach ($attachments as $id => $attachment) {
        $img = wp_get_attachment_image_src($id, 'full');
        $bfi_args = array('width' => 180, 'height' => 180);
        $bfi_img = bfi_thumb($img[0], $bfi_args);
        $output .= "<div class='gallery-item col-lg-3 col-sm-4 col-xs-2'>";
        $output .= "<a href='{$img['0']}'><img src=\"{$bfi_img}\" /></a>";
        $output .= "</div>";
    }
    $output .= "</div>\n";
    return $output;
}
开发者ID:bogdanpetru,项目名称:wpAtom,代码行数:39,代码来源:gallery.php

示例14: tva_ajaxdata


//.........这里部分代码省略.........
                $sorted_slidesets[$slide_name] = $slide_id;
            } else {
                $name = get_page_by_title($slide_set, 'OBJECT', "slide-sets");
                $slide_id = $name->ID;
                $slide_name = $slide_set;
                $sorted_slidesets[$slide_name] = $slide_id;
            }
        }
        ksort($sorted_slidesets);
        $slide_sets = $sorted_slidesets;
        $slide_set_array = array();
        $postcount = 0;
        $slidecount = 0;
        $data_id = $data_offset;
        foreach ($slide_sets as $slide_set) {
            $slide_xml = get_post_meta($slide_set, 'slide_manager_xml', true);
            $slide_data = new DOMDocument();
            $slide_data->loadXML($slide_xml);
            $slide_set = $slide_data->documentElement;
            foreach ($slide_set->childNodes as $slide) {
                // Get Attached / Post Image Data
                $get_image_src = wp_get_attachment_image_src(find_xml_value($slide, 'image'), 'full');
                // Get Image Meta Data Attachment ID
                $attachment_meta = themeva_attachment_data(find_xml_value($slide, 'image'));
                $slide_set_array[$slidecount]['img'] = $get_image_src;
                $slide_set_array[$slidecount]['img_url'] = $get_image_src[0];
                $slide_set_array[$slidecount]['media_url'] = find_xml_value($slide, 'media_url');
                $slide_set_array[$slidecount]['embed_type'] = find_xml_value($slide, 'embed_type');
                $slide_set_array[$slidecount]['autoplay'] = find_xml_value($slide, 'autoplay');
                $slide_set_array[$slidecount]['title'] = find_xml_value($slide, 'title') != '' ? find_xml_value($slide, 'title') : $attachment_meta['title'];
                $slide_set_array[$slidecount]['description'] = find_xml_value($slide, 'description') != '' ? find_xml_value($slide, 'description') : $attachment_meta['description'];
                $slide_set_array[$slidecount]['link_url'] = find_xml_value($slide, 'link_url');
                $slide_set_array[$slidecount]['css_classes'] = find_xml_value($slide, 'css_classes');
                $slide_set_array[$slidecount]['readmore_link'] = find_xml_value($slide, 'readmore_link');
                $slide_set_array[$slidecount]['timeout'] = find_xml_value($slide, 'timeout');
                $slide_set_array[$slidecount]['filter_tags'] = find_xml_value($slide, 'filter_tags');
                $slidecount++;
            }
        }
        $slide_set_array = array_slice($slide_set_array, $data_offset, $load_value);
        foreach ($slide_set_array as $slide_set) {
            $NV_disablegallink = $NV_movieurl = $NV_previewimgurl = $NV_cssclasses = $NV_galexturl = $NV_videotype = $NV_videoautoplay = $NV_posttitle = $NV_description = $NV_slidetimeout = $img = '';
            $img = $slide_set['img'];
            $NV_previewimgurl = $slide_set['img_url'];
            $NV_movieurl = $slide_set['media_url'];
            $NV_videotype = $slide_set['embed_type'];
            $NV_videoautoplay = $slide_set['autoplay'];
            $NV_posttitle = $slide_set['title'];
            $NV_description = $slide_set['description'];
            $NV_galexturl = $slide_set['link_url'];
            $NV_cssclasses = $slide_set['css_classes'];
            $NV_disablereadmore = $slide_set['readmore_link'];
            $NV_slidetimeout = $slide_set['timeout'];
            $tags_array = $slide_set['filter_tags'];
            $NV_disablegallink = empty($NV_galexturl) ? 'yes' : '';
            $NV_disablereadmore = $NV_disablereadmore == 'off' ? 'yes' : '';
            $NV_videoautoplay = $NV_videoautoplay == 'on' ? '1' : '0';
            $categories = '';
            // Enter Categories into an Array
            if (!empty($tags_array)) {
                $tags_array = str_replace(" ", "", $tags_array);
                $tags_array = explode(',', $tags_array);
                foreach ($tags_array as $tag) {
                    $categories .= $tag . $NV_shortcode_id . ',';
                }
                $replace_arr = array(' ', ',');
                $replace_with = array('_', ' ');
                $categories = str_replace($replace_arr, $replace_with, $categories);
            }
            // Assign unique video ID
            $video_id = $postcount + $data_id;
            $postcount++;
            $data_id++;
            $output = '';
            $NV_show_slider = $type;
            // Check is Timthumb is Enabled or Disabled
            if (of_get_option('timthumb_disable') != 'disable' && empty($NV_customlayer)) {
                require_once NV_FILES . '/adm/functions/BFI_Thumb.php';
                if (!empty($NV_imgwidth)) {
                    $params['width'] = $NV_imgwidth;
                }
                if (!empty($NV_imgheight)) {
                    $params['height'] = $NV_imgheight;
                }
                if ($NV_imgzoomcrop == '0') {
                    $params['crop'] = true;
                }
                if ($NV_imageeffect == 'circular') {
                    $params['height'] = $params['width'];
                }
                $NV_imagepath = bfi_thumb(dyn_getimagepath($NV_previewimgurl), $params);
            } else {
                $NV_imagepath = dyn_getimagepath($NV_previewimgurl);
            }
            require get_slider_frame($type);
            $data_contents .= $output;
        }
    }
    die($data_contents);
}
开发者ID:ConceptHaus,项目名称:backup,代码行数:101,代码来源:core.php

示例15: wpsm_thumb

    function wpsm_thumb($size = 'small')
    {
        global $post;
        if ($size == 'medium_news') {
            $width = 370;
            $height = 220;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_370_220.png';
        } elseif ($size == 'med_thumbs') {
            $width = 123;
            $height = 90;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_123_90.png';
        } elseif ($size == 'feature_slider') {
            $width = 765;
            $height = 460;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_765_460.jpg';
        } elseif ($size == 'video_big') {
            $width = 474;
            $height = 342;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_474_342.png';
        } elseif ($size == 'video_narrow') {
            $width = 270;
            $height = 110;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_270_110.png';
        } elseif ($size == 'news_big') {
            $width = 378;
            $height = 310;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_378_310.png';
        } elseif ($size == 'grid_news') {
            $width = 336;
            $height = 220;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_336_220.png';
        } else {
            $width = 123;
            $height = 90;
            $nothumb = get_template_directory_uri() . '/images/default/noimage_123_90.png';
        }
        if (rehub_option('aq_resize') == 1) {
            if (rehub_option('aq_resize_crop') == '1') {
                $params = array('width' => $width, 'quality' => '90');
            } else {
                $params = array('width' => $width, 'height' => $height, 'crop' => true, 'quality' => '90');
            }
            $img = get_post_thumb();
            if (!empty($img)) {
                ?>
			<img src="<?php 
                echo bfi_thumb($img, $params);
                ?>
" alt="<?php 
                the_title_attribute();
                ?>
" />
	    <?php 
            } elseif (vp_metabox('rehub_post.rehub_framework_post_type') == 'video' && vp_metabox('rehub_post.video_post.0.video_post_embed_url') != '') {
                ?>
	
	     	<?php 
                $img_video_url = vp_metabox('rehub_post.video_post.0.video_post_embed_url');
                $img_video = parse_video_url($img_video_url, 'hqthumb');
                ?>
	
        	<img src="<?php 
                echo $img_video;
                ?>
" alt="<?php 
                the_title_attribute();
                ?>
" />
        <?php 
            } else {
                ?>
			<img src="<?php 
                echo $nothumb;
                ?>
" alt="<?php 
                the_title_attribute();
                ?>
" />
		<?php 
            }
        } else {
            $image_id = get_post_thumbnail_id($post->ID);
            $image_url = wp_get_attachment_image($image_id, $size, false, array('alt' => get_the_title(), 'title' => get_the_title()));
            if (!empty($image_url)) {
                ?>
			<?php 
                echo $image_url;
                ?>
	    <?php 
            } elseif (vp_metabox('rehub_post.rehub_framework_post_type') == 'video' && vp_metabox('rehub_post.video_post.0.video_post_embed_url') != '') {
                ?>
	
	     	<?php 
                $img_video_url = vp_metabox('rehub_post.video_post.0.video_post_embed_url');
                $img_video = parse_video_url($img_video_url, 'hqthumb');
                ?>
	
        	<img src="<?php 
                echo $img_video;
                ?>
//.........这里部分代码省略.........
开发者ID:rhondamoananui,项目名称:rehub,代码行数:101,代码来源:functions.php


注:本文中的bfi_thumb函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。