function _xt_widget_blog_daogou($layout) { echo '<ul class="media-list">'; if (have_posts()) { global $post; while (have_posts()) { the_post(); ?> <li class="media"> <?php if (has_post_thumbnail()) { echo '<a class="pull-left" href="' . get_permalink() . '" target="_blank">' . get_the_post_thumbnail(null, 'xt-daogou-post-thumbnail') . '</a>'; } else { echo '<a class="pull-left" href="' . get_permalink() . '" target="_blank"><img class="media-object" data-src="holder.js/180x180/text:无图无真相"></a>'; } ?> <div class="media-body"> <h4 class="media-heading"><a href="<?php the_permalink(); ?> " target="_blank"><?php the_title(); ?> </a></h4> <div class="media"> <?php echo wp_trim_words(strip_tags(get_the_content()), $layout == 'span12' ? 280 : 150); ?> <a href="<?php the_permalink(); ?> " target="_blank" rel="nofollow">阅读全文</a> </div> </div> <div class="pull-right"> <ul class="thumbnails"> <?php $items = get_post_meta($post->ID, 'xt_items', true); if (!empty($items)) { foreach ($items as $item) { if (!empty($item['pic'])) { ?> <li><a class="thumbnail" href="<?php echo xt_jump_url(array('id' => get_the_share_key($item['key']), 'type' => $item['type'], 'share' => $item['guid'])); ?> " target="_blank"> <img src="<?php echo xt_pic_url($item['pic'], 160, $item['type']); ?> "></a></li> <?php } } } ?> </ul> </div> </li> <?php } } echo '</ul>'; }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); echo $before_widget; global $post; if (have_posts()) { while (have_posts()) { the_post(); echo '<div class="hd"><h4 class="xt-bd-l"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a> <small>' . get_the_date() . '</small></span></h4></div><div class="bd">'; echo '<div class="row-fluid">'; the_content(); $items = get_post_meta($post->ID, 'xt_items', true); if (!empty($items)) { $itemsHtml = ''; foreach ($items as $item) { if (!empty($item['pic'])) { $_url = xt_jump_url(array('id' => get_the_share_key($item['key']), 'type' => $item['type'], 'share' => $item['guid'])); $itemsHtml .= '<li> <a class="thumbnail" rel="nofollow" target="_blank" href="' . $_url . '" title="' . $item['title'] . '">' . xt_write_pic(base64_encode(xt_pic_url($item['pic'], 160, $item['type'])), $item['title'], 0, 0, '', '', false) . '</a> <div class="caption"> <div class="desc"><a rel="nofollow" target="_blank" href="' . $_url . '" class="permalink">' . $item['title'] . '</a></div> </div> </li>'; } } if (!empty($itemsHtml)) { echo '<div class="span12"><h4>推荐的宝贝</h4><ul class="thumbnails">' . $itemsHtml . '</ul></div>'; } } comments_template('xt-daogou_comments.php', true); echo '</div></div>'; } } echo $after_widget; }
?> " target="_blank" class="btn btn-primary btn-large">立刻购买</a> <button id="X_Item-Get-Publish-Btn" data-url="http://auction1.paipai.com/<?php echo get_the_share_key($item['share_key']); ?> " type="button" class="btn btn-success btn-large X_Publish">我要分享</button></td></tr> </tbody> </table> </div> <div id="X_Item-Get-Recommend" class="xt-widget-recommend-side clearfix hide" data-platform="<?php echo $item['from_type']; ?> " data-cid="<?php echo $item['cat']; ?> " data-id="<?php echo get_the_share_key($item['share_key']); ?> " style="height:288px;padding-top:7px;"> <div class="hd"><h4><span>猜你喜欢</span></h4></div> <div class="bd"> <ul class="media-list"> </ul> </div> </div> </div> </div> <?php } } else { xt_not_found('“请用淘宝、天猫、聚划算、拍拍的宝贝网址查返利”'); }
function get_the_share_detail_template() { global $xt_user_avatar; $cacheObj = get_the_share_cachedata(); $_item = $cacheObj['item']; $_title = get_the_share_title(); $_fxText = '元'; $isJifenbao = xt_fanxian_is_jifenbao(get_the_share_fromtype()); if ($isJifenbao) { $_fxText = xt_jifenbao_text(); } ?> <script type="text/javascript"> if(typeof(XT)!='undefined'){XT.share_id=<?php the_share_id(); ?> ;} </script> <div class="row-fluid" style="background-color:white;"> <div class="span12 media well well-small" style="margin-left:0px;margin-bottom:0px;"> <a style="display:block;width:40px;" class="pull-left X_Nick" data-value="<?php echo get_the_share_userid(); ?> " href="<?php xt_the_user_url(get_the_share_userid()); ?> " target="_blank" rel="nofollow"><img src="<?php xt_the_user_pic($xt_user_avatar); ?> " style="width:40px;height:40px;"></a> <div class="media-body"> <h5 class="media-heading"><a class="xt-red X_Nick" data-value="<?php echo get_the_share_userid(); ?> " href="<?php xt_the_user_url(get_the_share_userid()); ?> " target="_blank"><?php the_share_username(); ?> </a> 分享了该宝贝<span class="pull-right"><?php the_share_time_human(); ?> </span></h5> <div class="media" style="margin-top:0px;"><?php the_share_content(); ?> </div> </div> </div> <div class="span12 media" style="margin-left:0px;padding:5px;"> <div class="pull-left"> <a rel="nofollow" href="<?php the_share_go(); ?> " target="_blank"> <img src="<?php the_share_picurl(450); ?> " alt="<?php echo $_title; ?> "/> <?php echo get_the_admin_tool_share(get_the_share_id()); ?> </a> </div> <div class="pull-left" style="width:250px"> <h1 style="font-size:16px;line-height:22px;margin-top: 0px;"><?php echo '<img src="' . get_the_share_ico() . '"/>'; ?> <a rel="nofollow" title="<?php echo $_title; ?> " target="_blank" href="<?php the_share_go(); ?> "><?php echo $_title; ?> </a></h1> <a id="X_Share-Detail-Buy" data-from="<?php echo get_the_share_fromtype(); ?> " data-type="<?php echo $isJifenbao ? 'jifenbao' : 'cash'; ?> " data-id="<?php echo get_the_share_key(); ?> " href="<?php the_share_go(); ?> " target="_blank" rel="nofollow" class="btn btn-primary" style="padding:4px 20px;font-size:16px;font-weight:bold;">¥<?php the_share_price(); ?> 去购买</a> <?php if (xt_fanxian_is_sharebuy()) { ?> <div class="clearfix"><?php echo xt_fanxian_html('{fx}', $_fxText, 'margin-top:10px;'); ?> </div> <?php } ?> <div class="clearfix" style="margin-top:10px;padding-bottom: 10px;border-bottom: 1px solid #EAEAEA;"> <a class="badge badge-fav" title="喜欢" data-id="<?php the_share_id(); ?> " data-type="1" data-uid="<?php the_share_userid(); ?> "><?php the_share_favcount(); ?> <i class="icon-heart icon-white"></i></a> <!--<a href="javascript:;" class="xt-album-add" data-id="<?php //the_share_id() ?> " data-pic="<?php //the_share_picurl(160) ?> ">加入专辑</a>--> </div> <div class="well well-small clearfix" style="margin-top:15px;"> <?php $_tags = explode(" ", get_the_share_tags()); foreach ($_tags as $_tag) { echo "<a href=\"" . xt_get_shares_search_url(array('s' => $_tag)) . "\" target=\"_blank\" style=\"float: left;margin-left: 8px;\">{$_tag}</a>"; } ?> </div> <?php $bdshare = xt_bdshare(); if ($bdshare > 0) { ?> <!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_b" style="line-height: 12px;"><img src="http://share.baidu.com/static/images/type-button-1.jpg" /> <a class="shareCount"></a> </div> <script type="text/javascript"> document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours(); </script> <!-- Baidu Button END --> <?php } ?> </div> </div> </div> <?php }