<?php if (have_posts()) { while (have_posts()) { the_post(); ?> <div class="post-single"> <div class="post-content"> <h2><?php the_title(); ?> </h2> <?php the_content('Read more...'); ?> <?php if (bymt_c('guestwall') && !wp_is_mobile()) { ?> <?php if (function_exists('bymt_mostactive')) { bymt_mostactive('36', '1 MONTH'); } ?> <?php } ?> </div> <?php comments_template(); ?> </div> <?php
?> </div> </div> <?php } ?> <?php if (bymt_c('sd_config_lis_ck')) { bymt_slides('lis', '760', '210'); } ?> <?php get_template_part('loop'); ?> <?php if (bymt_c('categoryad2')) { ?> <div id="adsense4"> <div id="adsense-loader4" style="display:none;"> <?php bymt('categoryadcode2'); ?> </div> </div> <?php } ?> <?php bymt_pagenav(); ?> </div>
?> </a> </div> <?php } ?> <div class="post-excerpt"> <?php echo $content; ?> </div> </div> <div class="post-footer"> <div class="tags" > <?php if (bymt_c('txttag')) { ?> <i class="icon-tags"></i> <?php bymt_tags(); } ?> </div> <div class="readmore"> <a href="<?php the_permalink(); ?> " rel="bookmark">阅读全文 »</a> </div> </div> </div> </div>
?> </div> <?php } ?> <?php if (bymt_c('txtrelated') && !wp_is_mobile()) { ?> <?php get_template_part('functions/bymt-related'); ?> <?php } ?> <?php if (bymt_c('txtnext')) { ?> <div class="post-navigation"> <div class="post-previous"> <?php previous_post_link('%link', '<span>' . __('上一篇') . '</span> %title'); ?> </div> <div class="post-next"> <?php next_post_link('%link', '<span>' . __('下一篇') . '</span> %title'); ?> </div> </div> <?php }
?> <?php if (bymt_c('emailrss')) { ?> <li><a href="<?php bymt('emailrsslink', 'u'); ?> " rel="external" target="_blank" class="icons-em" title="邮件订阅"></a></li> <?php } ?> <?php if (bymt_c('weixin')) { ?> <li class="weixin"><a href="javascript:;" title="关注我的微信" class="icons-wx"><b><span></span><i><img src="<?php bymt('weixinimg', 'u'); ?> " alt="微信" /></i></b></a></li> <?php } ?> </ul> </div> <?php } ?> </div> <?php if (bymt_c('sd_config_bul_ck')) { bymt_slides('bul', '1060', '120'); }
bymt('txtadcode1'); ?> </div> </div> <?php } ?> <?php the_content('Read more...'); ?> <div style="text-align:center;"> <iframe width="746" height="524" align="middle" src="http://www.duole.com/application/qihu360" scrolling="no"></iframe> </div> <hr /> <?php if (bymt_c('txtad2')) { ?> <div id="adsense6"> <div id="adsense-loader6" style="display:none;"> <?php bymt('txtadcode2'); ?> </div> </div> <?php } ?> <div class="post-musicshare"> <div class="post-musiclink"> <strong>听歌链接:</strong><a href="<?php the_permalink();
function widget($args, $instance) { extract($args); if (bymt_c('sd_config_sid_ck')) { ?> <div class="widget" id="widget_slides" > <?php bymt_slides('sid', '260', '110'); ?> </div> <?php } }
function bymt_head() { if (!isset($paged)) { $paged = 1; } echo "<title>"; if (is_home()) { if (bymt_c('title_content')) { bymt('title_content', 'e'); if ($paged > 1) { bymt_r('title_split', ' | ', 'e'); printf('第%s页', $paged); } } else { esc_attr_e(bloginfo('name')); if ($paged > 1) { bymt_r('title_split', ' | ', 'e'); printf('第%s页', $paged); } bymt_r('title_split', ' | ', 'e'); esc_attr_e(bloginfo('description')); } } else { if (is_search()) { echo '"'; the_search_query(); echo '"的搜索结果'; } elseif (is_single() || is_page()) { echo trim(wp_title('', 0)); } elseif (is_category()) { single_cat_title(); } elseif (is_year()) { the_time('Y年的文章'); } elseif (is_month()) { the_time('Y年m月的文章'); } elseif (is_day()) { the_time('Y年m月d日的文章'); } elseif (is_404()) { echo '404错误:' . trim(wp_title('', 0)); } elseif (is_author()) { global $author; $userdata = get_userdata($author); echo $userdata->display_name . '发表的文章'; } elseif (function_exists('is_tag')) { if (is_tag()) { echo 'Tag:'; single_tag_title("", true); } } if (get_query_var('page')) { bymt_r('title_split', ' | ', 'e'); echo '第' . get_query_var('page') . '页'; } if ($paged > 1) { bymt_r('title_split', ' | ', 'e'); printf('第%s页', $paged); } bymt_r('title_split', ' | ', 'e'); esc_attr_e(bloginfo('name')); } echo "</title>\n"; global $post; if (is_singular()) { if ($post->post_excerpt) { $post_excerpt = $post->post_excerpt; } else { $post_excerpt = trim(preg_replace('/((\\s)*(\\n)+(\\s)*)/i', '', strip_tags($post->post_content))); } if (!empty($post_excerpt)) { $description = mb_substr($post_excerpt, 0, 200, 'UTF-8'); $description .= mb_strlen($post_excerpt, 'UTF-8') > 200 ? '...' : ''; } else { $description = trim(wp_title('', 0)); } $tags = wp_get_post_tags($post->ID); if (empty($tags)) { $keywords = trim(wp_title('', 0)); } else { $keywords = ''; } foreach ($tags as $tag) { $keywords = $keywords . $tag->name . ","; } } elseif (is_home()) { $keywords = bymt_c('keyword_content'); $description = bymt_c('description_content'); } elseif (is_category()) { $keywords = single_cat_title('', false); $description = category_description(); } elseif (is_tag()) { $keywords = single_tag_title('', false); $description = tag_description(); } if (!isset($keywords)) { $keywords = ''; } if (!isset($description)) { $description = ''; } $keywords = esc_attr(trim(strip_tags($keywords))); $description = esc_attr(trim(strip_tags($description))); ?> <meta name="description" content="<?php echo $description; ?> " /> <meta name="keywords" content="<?php echo rtrim($keywords, ','); ?> " /> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?> " /> <link rel="shortcut icon" href="<?php if (bymt_c('favicon_ck')) { bymt('custom_favicon', 'u'); } else { echo TPLDIR . "/images/favicon.png"; } ?> " type="image/x-icon" /> <link rel="icon" href="<?php if (bymt_c('favicon_ck')) { bymt('custom_favicon', 'u'); } else { echo TPLDIR . "/images/favicon.png"; } ?> " type="image/x-icon" /> <?php if (wp_is_mobile()) { ?> <link rel="stylesheet" type="text/css" href="<?php echo TPLDIR . '/css/mobile.css'; ?> " media="all" /> <?php } else { ?> <link rel="stylesheet" type="text/css" href="<?php echo TPLDIR . '/style.css'; ?> " media="all" /> <!--[if IE 7]><link rel="stylesheet" href="<?php echo TPLDIR . '/css/ie7.css'; ?> " type="text/css" /><![endif]--> <!--[if IE 8]><link rel="stylesheet" href="<?php echo TPLDIR . '/css/ie8.css'; ?> " type="text/css" /><![endif]--> <?php } }
function bymt_comment_post($comment) { $content = $comment['comment_content']; $pattern_en = '/[一-龥]/u'; $pattern_ja = '/[ぁ-ん]+|[ァ-ヴ]+/u'; $pattern_ru = '/[А-я]+/u'; $pattern_kr = '/[갂-줎]+|[줐-쥯]+|[쥱-짛]+|[짞-쪧]+|[쪨-쬊]+|[쬋-쭬]+|[쵡-힝]+/u'; $pattern_th = '/[ก-๛]+/u'; $pattern_ar = '/[؟-ض]+|[ط-ل]+|[م-م]+/u'; if (bymt_c('lang_en')) { if (!preg_match($pattern_en, $content)) { err(__('请写点汉字吧! Please write some Chinese!')); } } if (bymt_c('lang_ja')) { if (preg_match($pattern_ja, $content)) { err(__('日文滚粗!Japanese Get out!日本語出て行け!')); } } if (bymt_c('lang_ru')) { if (preg_match($pattern_ru, $content)) { err(__('战斗民族伤不起!Russians, get away!Savage выйти из Русского Севера!')); } } if (bymt_c('lang_kr')) { if (preg_match($pattern_kr, $content)) { err(__('不要用韩语思密达!Please do not use Korean!하시기 바랍니다 한국 / 한국어 사용하지 마십시오!')); } } if (bymt_c('lang_th')) { if (preg_match($pattern_th, $content)) { err(__('人妖你好,人妖再见!Please do not use Thai!กรุณาอย่าใช้ภาษาไทย!')); } } if (bymt_c('lang_ar')) { if (preg_match($pattern_ar, $content)) { err(__('不要用阿拉伯语!Please do not use Arabic!!من فضلك لا تستخدم اللغة العربية')); } } return $comment; }
?> " rel="bookmark" title="<?php the_title(); ?> " > <?php echo bymt_thumbnails('257', '', false); ?> </a> <p class="imgbox-info"> <span class="ptime"><i class="icon-calendar"></i> <?php bymt_time_diff($time_type = 'post'); ?> </span> <?php if (bymt_c('postinfoviews')) { ?> <span class="pview"><i class="icon-pass"></i><?php if (function_exists('the_views')) { the_views(); } ?> </span><?php } ?> <span class="pcomm"><i class="icon-comment"></i> <?php comments_popup_link('抢沙发', '1评论', '%评论'); ?> </span> </p> </div>
?> </h2> <?php the_content('Read more...'); ?> </div> <?php comments_template(); ?> </div> <?php } } ?> <?php if (bymt_c('pagead2')) { ?> <div id="adsense8"> <div id="adsense-loader8" style="display:none;"> <?php bymt('pageadcode2'); ?> </div> </div> <?php } ?> </div> <?php if (!wp_is_mobile()) { get_sidebar();
function bymt_txt_share() { if (bymt_c('txtshare_code') != "") { bymt('txtshare_code'); } else { echo '<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"> <a class="bds_tsina"></a> <a class="bds_qzone"></a> <a class="bds_tqq"></a> <a class="bds_sqq"></a> <a class="bds_tieba"></a> <a class="bds_hi"></a> <a class="bds_renren"></a> <a class="bds_taobao"></a> <a class="bds_more"></a> <a class="shareCount"></a> </div> <script type="text/javascript" id="bdshare_js" data="type=tools&uid=590440" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000); </script>'; } }
<?php /***** Version: BYMT 2.1.1 Author: 麦葱 http://maicong.me *****/ ?> <div class="post-related"> <ul> <?php $post_num = bymt_c('txtrelatednum') == "" ? 6 : bymt_c('txtrelatednum'); $exclude_id = $post->ID; $posttags = get_tags(); $i = 0; if ($posttags) { $tags = ''; foreach ($posttags as $tag) { $tags .= $tag->name . ','; } $args = array('post_status' => 'publish', 'tag_slug__in' => explode(',', $tags), 'post__not_in' => explode(',', $exclude_id), 'ignore_sticky_posts' => 1, 'orderby' => 'rand', 'posts_per_page' => $post_num); query_posts($args); while (have_posts()) { the_post(); ?> <li> <span class="time"><?php the_time('m-d'); ?> </span> <span class="title"><i class="icon-doc-text"></i> <a href="<?php the_permalink();
</div> </div> <?php } ?> <?php if (bymt_c('sd_config_lis_ck')) { bymt_slides('lis', '760', '210'); } ?> <?php get_template_part('loop'); ?> <?php if (bymt_c('indexad2')) { ?> <div id="adsense2"> <div id="adsense-loader2" style="display:none;"> <?php bymt('indexadcode2'); ?> </div> </div> <?php } ?> <?php bymt_pagenav(); ?> </div>
bymt('statisticscode'); } ?> <?php } ?> </div> </div> <?php if (!wp_is_mobile()) { if (bymt_c('custom_circle')) { ?> <div id="circle"></div> <div id="circletext">加载中</div> <div id="circle1"></div> <?php } if (bymt_c('custom_gotop')) { ?> <div id="backtop"></div> <?php } } ?> </div> </div> <?php wp_footer(); ?> </body> </html>