miles 10 лет назад
Сommit
fedce29479
100 измененных файлов с 5207 добавлено и 0 удалено
  1. 10 0
      #U4f7f#U7528#U8bf4#U660e.txt
  2. 4 0
      .gitignore
  3. 27 0
      404.php
  4. 466 0
      admin/Yusi.php
  5. 360 0
      admin/admin.css
  6. 1 0
      admin/index.php
  7. 103 0
      ajax/comment.php
  8. 53 0
      ajax/tougao.php
  9. 14 0
      archive.php
  10. 15 0
      author.php
  11. 1 0
      cache/.gitignore
  12. 11 0
      category.php
  13. 109 0
      comments.php
  14. 24 0
      editor-style.css
  15. 9 0
      error_log
  16. BIN
      favicon.ico
  17. BIN
      fonts/FontAwesome.otf
  18. BIN
      fonts/fontawesome-webfont.eot
  19. 504 0
      fonts/fontawesome-webfont.svg
  20. BIN
      fonts/fontawesome-webfont.ttf
  21. BIN
      fonts/fontawesome-webfont.woff
  22. 22 0
      footer.php
  23. 648 0
      functions.php
  24. 74 0
      header.php
  25. 106 0
      image.php
  26. BIN
      img/admin.png
  27. BIN
      img/ajax-loader.gif
  28. BIN
      img/arrows.png
  29. BIN
      img/default.png
  30. BIN
      img/grey.gif
  31. BIN
      img/new.gif
  32. BIN
      img/pause.png
  33. BIN
      img/pic/1.jpg
  34. BIN
      img/pic/10.jpg
  35. BIN
      img/pic/2.jpg
  36. BIN
      img/pic/3.jpg
  37. BIN
      img/pic/4.jpg
  38. BIN
      img/pic/5.jpg
  39. BIN
      img/pic/6.jpg
  40. BIN
      img/pic/7.jpg
  41. BIN
      img/pic/8.jpg
  42. BIN
      img/pic/9.jpg
  43. BIN
      img/play.png
  44. BIN
      img/smilies/icon_arrow.gif
  45. BIN
      img/smilies/icon_biggrin.gif
  46. BIN
      img/smilies/icon_confused.gif
  47. BIN
      img/smilies/icon_cool.gif
  48. BIN
      img/smilies/icon_cry.gif
  49. BIN
      img/smilies/icon_eek.gif
  50. BIN
      img/smilies/icon_evil.gif
  51. BIN
      img/smilies/icon_exclaim.gif
  52. BIN
      img/smilies/icon_idea.gif
  53. BIN
      img/smilies/icon_lol.gif
  54. BIN
      img/smilies/icon_mad.gif
  55. BIN
      img/smilies/icon_mrgreen.gif
  56. BIN
      img/smilies/icon_neutral.gif
  57. BIN
      img/smilies/icon_question.gif
  58. BIN
      img/smilies/icon_razz.gif
  59. BIN
      img/smilies/icon_redface.gif
  60. BIN
      img/smilies/icon_rolleyes.gif
  61. BIN
      img/smilies/icon_sad.gif
  62. BIN
      img/smilies/icon_smile.gif
  63. BIN
      img/smilies/icon_surprised.gif
  64. BIN
      img/smilies/icon_twisted.gif
  65. BIN
      img/smilies/icon_wink.gif
  66. BIN
      img/weixin.gif
  67. 24 0
      index.php
  68. 1 0
      js/html5.js
  69. 7 0
      js/jquery.js
  70. 5 0
      js/my_quicktags.js
  71. 3 0
      js/slider.js
  72. 129 0
      js/tougao.js
  73. 51 0
      modules/archive_title.php
  74. 50 0
      modules/excerpt.php
  75. 32 0
      modules/related.php
  76. 26 0
      modules/sticky.php
  77. 69 0
      pages/archives.php
  78. 45 0
      pages/example.php
  79. 60 0
      pages/links.php
  80. 28 0
      pages/none_page.php
  81. 33 0
      pages/page.php
  82. 45 0
      pages/readers.php
  83. 35 0
      pages/tags.php
  84. 49 0
      pages/tougao.php
  85. BIN
      screenshot.jpg
  86. 27 0
      search.php
  87. 6 0
      share.css
  88. 34 0
      sidebar.php
  89. 52 0
      single.php
  90. 53 0
      single.php.bak
  91. 31 0
      style.css
  92. 10 0
      tag.php
  93. 1266 0
      timthumb.php
  94. 18 0
      widgets/index.php
  95. 43 0
      widgets/wid-banner.php
  96. 90 0
      widgets/wid-comment.php
  97. 108 0
      widgets/wid-postlist.php
  98. 108 0
      widgets/wid-postlist.php.bak
  99. 108 0
      widgets/wid-readers.php
  100. 0 0
      widgets/wid-subscribe.php

+ 10 - 0
#U4f7f#U7528#U8bf4#U660e.txt

@@ -0,0 +1,10 @@
+
+============Yusi主题=====================
+
+所有的设置在后台都有详细说明。请仔细看清楚每个设置对应的说明信息!
+
+更多的主题详细说明可以访问:http://yusi123.com/3233.html
+
+使用Yusi主题的童鞋记得在timthumb.php中加入你的域名,不然列表图片会显示不正常。具体参考http://yusi123.com/1247.html
+
+微信图片直接替换主题同名图片后在后台开启即可。

+ 4 - 0
.gitignore

@@ -0,0 +1,4 @@
+.buildpath
+.project
+.settings
+cache/*

+ 27 - 0
404.php

@@ -0,0 +1,27 @@
+<?php get_header(); ?>
+<div class="content-wrap">
+	<div style="text-align:center;padding:10px 0;font-size:16px;background-color:#ffffff;">
+		<h2 style="font-size:36px;margin-bottom:10px;">哎哟~404了~休息一下,玩个游戏吧!</h2><script type="text/javascript">
+/*漂浮120*270,创建于2013-3-12*/
+var cpro_id = "u1232049";
+</script>
+<script src="http://cpro.baidustatic.com/cpro/ui/f.js" type="text/javascript"></script>
+<script type="text/javascript">
+/*580*90,创建于2013-3-17*/
+var cpro_id = "u1236691";
+</script>
+<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
+  <embed type="application/x-shockwave-flash" width="600" height="400" src="http://images.yusi123.com/zhuamao.swf" wmode="transparent" quality="high" scale="noborder" flashvars="width=600&amp;height=400" allowscriptaccess="sameDomain" align="L">
+<br>
+	<p align="center"><font face="微软雅黑" size="5" color="#0099CC">
+<a target="_blank" href="http://yusi123.com/">首页</a>&nbsp;
+<a target="_blank" href="http://yusi123.com/money" title="网赚">网赚</a>&nbsp;
+<a target="_blank" href="http://yusi123.com/share" title="">福利</a>&nbsp;
+<a target="_blank" href="http://yusi123.com/web">建站</a>&nbsp;
+<a target="_blank" href="http://yusi123.com/design">前端</a>&nbsp;
+<a target="_blank" href="http://yusi123.com/wordpress">WordPress</a>&nbsp;&nbsp;
+<a target="_blank" href="http://yusi123.com/diary">随笔</a>&nbsp;&nbsp;
+<a target="_blank" href="http://www.520tvs.com/a/tuku/">图库</a></font></p><p align="center">
+	
+</div>
+<?php get_footer(); ?>

Разница между файлами не показана из-за своего большого размера
+ 466 - 0
admin/Yusi.php


+ 360 - 0
admin/admin.css

@@ -0,0 +1,360 @@
+ * { font-family: "Microsoft YaHei" !important; }
+.d_wrap{position: relative;font-family:'microsoft yahei';}
+.d_wrap h2{font-family:'microsoft yahei';border-bottom: solid 1px #ddd;padding-bottom: 10px;margin-bottom: 20px;}
+.d_themedesc{
+	font-size: 16px;
+}
+.d_tip{
+	color: #D36B6B;line-height: 20px;
+}
+table{
+	width: 100%;
+  background-color: transparent;
+  border-collapse: collapse;
+  border-spacing: 0;
+  
+}
+table td{
+	vertical-align: middle;
+	padding-bottom: 15px;
+}
+
+table td.d_tit{
+	padding-top: 6px;
+	vertical-align: top;
+}
+dl {
+  margin-bottom: 15px;
+}
+dt,
+dd {
+  line-height: 20px;
+}
+
+dd {
+  margin-left: 10px;
+}
+.d_li {
+  *zoom: 1;
+}
+.d_li:before,
+.d_li:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.d_li:after {
+  clear: both;
+}
+.d_li dt {
+  float: left;
+  width: 160px;
+  clear: left;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.d_li dd {
+  margin-left: 180px;
+}
+
+
+
+input,
+select,
+textarea {
+  margin: 0;
+  font-size: 100%;
+  vertical-align: middle;
+}
+
+input {
+  *overflow: visible;
+  line-height: normal;
+}
+
+input::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+label,
+select,
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"],
+input[type="radio"],
+input[type="checkbox"] {
+  cursor: pointer;
+}
+input[type="search"] {
+  -webkit-box-sizing: content-box;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+  -webkit-appearance: none;
+}
+textarea {
+  overflow: auto;
+  vertical-align: top;
+}
+label,
+input,
+button,
+select,
+textarea {
+  font-size: 12px;
+  font-weight: normal;
+  line-height: 20px;
+}
+input,
+button,
+select,
+textarea {
+  font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+select,
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  display: inline-block;
+  height: 20px;
+  padding: 5px 6px 3px;
+  margin-bottom: 0;
+  font-size: 12px;
+  line-height: 20px;
+  color: #555555;
+  border-radius: 0;
+  vertical-align: middle;
+  -moz-box-sizing: content-box;
+-webkit-box-sizing: content-box;
+-ms-box-sizing: content-box;
+box-sizing: content-box;
+}
+input,
+textarea,
+.uneditable-input {
+  width: 406px;
+}
+input[type="number"]{
+	width: 40px;
+}
+textarea,
+input.ipt-b {
+  height: auto;
+  width: 100%;
+    -moz-box-sizing: border-box;
+-webkit-box-sizing: border-box;
+-ms-box-sizing: border-box;
+box-sizing: border-box;
+}
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  background-color: #fff;
+  border: 1px solid #D9D9D9;
+  border-top-color: #C0C0C0;
+  border-left-color: #d0d0d0;
+  -webkit-transition: border linear .2s;
+  -moz-transition: border linear .2s;
+  transition: border linear .2s;
+}
+textarea:hover,
+input[type="text"]:hover,
+input[type="password"]:hover,
+input[type="datetime"]:hover,
+input[type="datetime-local"]:hover,
+input[type="date"]:hover,
+input[type="month"]:hover,
+input[type="time"]:hover,
+input[type="week"]:hover,
+input[type="number"]:hover,
+input[type="email"]:hover,
+input[type="url"]:hover,
+input[type="search"]:hover,
+input[type="tel"]:hover,
+input[type="color"]:hover,
+.uneditable-input:hover,
+textarea:focus,
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="datetime"]:focus,
+input[type="datetime-local"]:focus,
+input[type="date"]:focus,
+input[type="month"]:focus,
+input[type="time"]:focus,
+input[type="week"]:focus,
+input[type="number"]:focus,
+input[type="email"]:focus,
+input[type="url"]:focus,
+input[type="search"]:focus,
+input[type="tel"]:focus,
+input[type="color"]:focus,
+.uneditable-input:focus {
+  border-color: #b9b9b9;
+  border-top-color: #A0A0A0;
+  border-left-color: #b0b0b0;
+  outline: 0;
+  outline: thin dotted \9;
+  /* IE6-9 */
+
+}
+textarea:focus,
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="datetime"]:focus,
+input[type="datetime-local"]:focus,
+input[type="date"]:focus,
+input[type="month"]:focus,
+input[type="time"]:focus,
+input[type="week"]:focus,
+input[type="number"]:focus,
+input[type="email"]:focus,
+input[type="url"]:focus,
+input[type="search"]:focus,
+input[type="tel"]:focus,
+input[type="color"]:focus,
+.uneditable-input:focus {
+  border-color: #999;
+}
+/* line 142 */
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 0 0 0;
+  *margin-top: 0;
+  /* IE7 */
+
+  margin-top: 1px \9;
+  /* IE8-9 */
+
+  line-height: normal;
+}
+/* line 151 */
+input[type="file"],
+input[type="image"],
+input[type="submit"],
+input[type="reset"],
+input[type="button"],
+input[type="radio"],
+input[type="checkbox"] {
+  width: auto;
+}
+select,
+input[type="file"] {
+  height: 30px;
+  /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+  *margin-top: 4px;
+  /* For IE7, add top margin to align select with labels */
+
+  line-height: 30px;
+}
+select {
+  width: 220px;
+  border: 1px solid #cccccc;
+  background-color: #fbfbfb;
+}
+select[multiple],
+select[size] {
+  height: auto;
+}
+select:focus,
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+input:-moz-placeholder,
+textarea:-moz-placeholder {
+  color: #999999;
+}
+input:-ms-input-placeholder,
+textarea:-ms-input-placeholder {
+  color: #999999;
+}
+input::-webkit-input-placeholder,
+textarea::-webkit-input-placeholder {
+  color: #999999;
+}
+.radio,
+.checkbox {
+  min-height: 20px;
+}
+.radio input[type="radio"],
+.checkbox input[type="checkbox"] {
+  margin-right: 5px;
+  vertical-align: -2px;
+}
+.controls > .radio:first-child,
+.controls > .checkbox:first-child {
+  padding-top: 5px;
+}
+.radio.inline,
+.checkbox.inline {
+  display: inline-block;
+  margin-bottom: 0;
+  vertical-align: middle;
+  margin-right: 20px;
+}
+.radio.inline + .radio.inline,
+.checkbox.inline + .checkbox.inline {
+  margin-left: 10px;
+}
+.ipt-m {
+  width: 60px;
+}
+.ipt-s {
+  width: 100px;
+}
+.ipt-medium {
+  width: 150px;
+}
+.ipt-large {
+  width: 210px;
+}
+.ipt-xlarge {
+  width: 270px;
+}
+.ipt-xxlarge {
+  width: 530px;
+}

+ 1 - 0
admin/index.php

@@ -0,0 +1 @@
+<?php 

+ 103 - 0
ajax/comment.php

@@ -0,0 +1,103 @@
+<?php
+if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
+	header('Allow: POST');
+	header('HTTP/1.1 405 Method Not Allowed');
+	header('Content-Type: text/plain');
+	exit;
+}
+
+require( dirname(__FILE__) . '/../../../../wp-load.php' ); // 此 comments-ajax.php 位於主題資料夾,所以位置已不同
+nocache_headers();
+$comment_post_ID = isset($_POST['comment_post_ID']) ? (int) $_POST['comment_post_ID'] : 0;
+$post = get_post($comment_post_ID);
+if ( empty($post->comment_status) ) {
+	do_action('comment_id_not_found', $comment_post_ID);
+	err(__('Invalid comment status.')); // 將 exit 改為錯誤提示
+}
+
+$status = get_post_status($post);
+$status_obj = get_post_status_object($status);
+
+	do_action('pre_comment_on_post', $comment_post_ID);
+
+$comment_author       = ( isset($_POST['author']) )  ? trim(strip_tags($_POST['author'])) : null;
+$comment_author_email = ( isset($_POST['email']) )   ? trim($_POST['email']) : null;
+$comment_author_url   = ( isset($_POST['url']) )     ? trim($_POST['url']) : null;
+$comment_content      = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;
+$edit_id              = ( isset($_POST['edit_id']) ) ? $_POST['edit_id'] : null; // 提取 edit_id
+// If the user is logged in
+$user = wp_get_current_user();
+if ( $user->ID ) {
+	if ( empty( $user->display_name ) )
+		$user->display_name=$user->user_login;
+	$comment_author       = $wpdb->escape($user->display_name);
+	$comment_author_email = $wpdb->escape($user->user_email);
+	$comment_author_url   = $wpdb->escape($user->user_url);
+	if ( current_user_can('unfiltered_html') ) {
+		if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
+			kses_remove_filters(); // start with a clean slate
+			kses_init_filters(); // set up the filters
+		}
+	}
+} else {
+	if ( get_option('comment_registration') || 'private' == $status )
+		err('Hi,你必须登录才能发表评论!'); // 將 wp_die 改為錯誤提示
+}
+$comment_type = '';
+if ( get_option('require_name_email') && !$user->ID ) {
+	if ( 6 > strlen($comment_author_email) || '' == $comment_author )
+		err( '请填写昵称和邮箱!' ); // 將 wp_die 改為錯誤提示
+	elseif ( !is_email($comment_author_email))
+		err( '请填写有效的邮箱地址!' ); // 將 wp_die 改為錯誤提示
+}
+if ( '' == $comment_content )
+	err( '请填写点评论!' ); // 將 wp_die 改為錯誤提示
+// 增加: 錯誤提示功能
+function err($ErrMsg) {
+    header('HTTP/1.1 405 Method Not Allowed');
+    echo $ErrMsg;
+    exit;
+}
+
+$comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0;
+$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');
+// 增加: 檢查評論是否正被編輯, 更新或新建評論
+if ( $edit_id ){
+$comment_id = $commentdata['comment_ID'] = $edit_id;
+wp_update_comment( $commentdata );
+} else {
+$comment_id = wp_new_comment( $commentdata );
+}
+$comment = get_comment($comment_id);
+if ( !$user->ID ) {
+	$comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000);
+	setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
+	setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
+	setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
+}
+
+$comment_depth = 1;   //为评论的 class 属性准备的
+$tmp_c = $comment;
+while($tmp_c->comment_parent != 0){
+$comment_depth++;
+$tmp_c = get_comment($tmp_c->comment_parent);
+}
+//以下是評論式樣, 不含 "回覆". 要用你模板的式樣 copy 覆蓋.
+
+echo '<li '; comment_class(); echo ' id="comment-'.get_comment_ID().'">';
+
+//头像
+echo '<div class="c-avatar">';
+echo get_avatar( $comment->comment_author_email, $size = '54' , deel_avatar_default() ); 
+//内容
+echo '<div class="c-main" id="div-comment-'.get_comment_ID().'">';
+	echo comment_text();
+	if ($comment->comment_approved == '0'){
+		echo '<span class="c-approved">您的评论正在排队审核中,请稍后!</span><br />';
+	}
+	//信息
+	echo '<div class="c-meta">';
+		echo '<span class="c-author">'.get_comment_author_link().'</span>'; echo get_comment_time('m-d H:i '); echo time_ago(); 
+	echo '</div>';
+echo '</div></div>';
+?>

+ 53 - 0
ajax/tougao.php

@@ -0,0 +1,53 @@
+<?php
+require( dirname(__FILE__).'/../../../../wp-load.php' );
+
+if( !dopt('d_tougao_b') ) die('off');
+
+global $wpdb;
+$last_post = $wpdb->get_var("SELECT post_date FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC LIMIT 1");
+
+if ( current_time('timestamp') - strtotime($last_post) < (dopt('d_tougao_time')?dopt('d_tougao_time'):240) ){
+    die('sofast');
+}
+
+$title =  check_chart( $_POST['title'] );
+$url =  check_chart( $_POST['url'] );
+$content =  check_chart( $_POST['content'] );
+
+if ( empty($title) || mb_strlen($title) > 100 ) {
+    die('title');
+}
+
+if ( empty($url) || mb_strlen($url) > 100 ) {
+    die('url');
+}
+
+if ( empty($content) || mb_strlen($content) > 5000 || mb_strlen($content) < 200) {
+    die('content');
+}
+
+
+if( $url ) $url = '<p>来源:<a href="'.$url.'" target="_blank">'.$url.'</a></p>';
+
+$post_content = $content.$url;
+
+$submit = array(
+    'post_title' => $title,
+    'post_author' => 1,
+    'post_content' => $post_content
+);
+
+$status = wp_insert_post( $submit );
+
+if ($status != 0) { 
+    if( dopt('d_tougao_mailto') ) wp_mail(dopt('d_tougao_mailto'), "站长,有新投稿! ".$title, $post_content);
+    die('success');
+}else{
+    die('fail');
+}
+
+function check_chart($t){
+    return isset( $t ) ? trim(htmlspecialchars($t, ENT_QUOTES)) : '';
+}
+
+?>

+ 14 - 0
archive.php

@@ -0,0 +1,14 @@
+<?php get_header(); ?>
+<div class="content-wrap">
+	<div class="content">
+		<header class="archive-header"> 
+			<h1><?php 
+				if(is_day()) echo the_time('Y年m月j日');
+				elseif(is_month()) echo the_time('Y年m月');
+				elseif(is_year()) echo the_time('Y年'); 
+			?>的内容</h1>
+		</header>
+		<?php include( 'modules/excerpt.php' ); ?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

+ 15 - 0
author.php

@@ -0,0 +1,15 @@
+<?php get_header(); 
+	global $wp_query;
+	$curauth = $wp_query->get_queried_object();
+?>
+<div class="content-wrap">
+	<div class="content">
+		<header class="archive-header"> 
+			<h1><?php echo $curauth->display_name.'的文章' ?></h1>
+			<?php if ( $curauth->description ) echo '<div class="archive-header-info">'.$curauth->description.'</div>'; ?>
+		</header>
+		
+		<?php include( 'modules/excerpt.php' ); ?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

+ 1 - 0
cache/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 11 - 0
category.php

@@ -0,0 +1,11 @@
+<?php get_header(); ?>
+<div class="content-wrap">
+	<div class="content">
+		<header class="archive-header"> 
+			<h1><i class="fa fa-folder-open"></i>  &nbsp;分类:<?php single_cat_title() ?>  <a title="订阅<?php single_cat_title() ?>" target="_blank" href="<?php echo get_category_link( get_cat_ID( single_cat_title('',false) ) ); ?>/feed"><i class="rss fa fa-rss"></i></a></h1>
+			<?php if ( category_description() ) echo '<div class="archive-header-info">'.category_description().'</div>'; ?>
+		</header>
+		<?php include( 'modules/excerpt.php' ); ?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

+ 109 - 0
comments.php

@@ -0,0 +1,109 @@
+<?php
+defined('ABSPATH') or die('This file can not be loaded directly.');
+
+global $comment_ids; $comment_ids = array();
+foreach ( $comments as $comment ) {
+	if (get_comment_type() == "comment") {
+		$comment_ids[get_comment_id()] = ++$comment_i;
+	}
+} 
+
+if ( !comments_open() ) return;
+
+$my_email = get_bloginfo ( 'admin_email' );
+$str = "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = $post->ID AND comment_approved = '1' AND comment_type = '' AND comment_author_email";
+$count_t = $post->comment_count;
+
+date_default_timezone_set(PRC);
+$closeTimer = (strtotime(date('Y-m-d G:i:s'))-strtotime(get_the_time('Y-m-d G:i:s')))/86400;
+?>
+<div id="respond" class="no_webshot">
+	<?php if ( get_option('comment_registration') && !is_user_logged_in() ) { ?>
+	<h3 class="queryinfo">
+		<?php printf('您必须 <a href="%s">登录</a> 才能发表评论!', wp_login_url( get_permalink() ) );?>
+	</h3>
+	<?php }elseif( get_option('close_comments_for_old_posts') && $closeTimer > get_option('close_comments_days_old') ) { ?>
+	<h3 class="queryinfo">
+		文章评论已关闭!
+	</h3>
+	<?php }else{ ?>
+	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
+		
+		<div class="comt-title">
+			<div class="comt-avatar pull-left">
+				<?php 
+					global $current_user;
+					get_currentuserinfo();
+					if ( is_user_logged_in() ) 
+						echo get_avatar( $current_user->user_email, $size = '54' , deel_avatar_default() );
+					elseif( !is_user_logged_in() && get_option('require_name_email') && $comment_author_email=='' ) 
+						echo get_avatar( $current_user->user_email, $size = '54' , deel_avatar_default() );
+					elseif( !is_user_logged_in() && get_option('require_name_email') && $comment_author_email!=='' )  
+						echo get_avatar( $comment->comment_author_email, $size = '54' , deel_avatar_default() );
+					else
+						echo get_avatar( $comment->comment_author_email, $size = '54' , deel_avatar_default() );
+				?>
+			</div>
+			<div class="comt-author pull-left">
+			<?php 
+				if ( is_user_logged_in() ) {
+					printf($user_identity.'<span>发表我的评论</span>');
+				}else{
+					if( get_option('require_name_email') && !empty($comment_author_email) ){
+						printf($comment_author.' <span>发表我的评论</span> &nbsp; <a class="switch-author" href="javascript:;" data-type="switch-author" style="font-size:12px;">换个身份</a>');
+					}else{
+						printf('发表我的评论');
+					}
+				}
+			?>
+			</div>
+			<a id="cancel-comment-reply-link" class="pull-right" href="javascript:;">取消评论</a>
+		</div>
+		
+		<div class="comt">
+			<div class="comt-box">
+				<textarea placeholder="写点什么..." class="input-block-level comt-area" name="comment" id="comment" cols="100%" rows="3" tabindex="1" onkeydown="if(event.ctrlKey&amp;&amp;event.keyCode==13){document.getElementById('submit').click();return false};"></textarea>
+				<div class="comt-ctrl">
+					<button class="btn btn-primary pull-right" type="submit" name="submit" id="submit" tabindex="5"><i class="fa fa-check-square-o"></i> 提交评论</button>
+					<div class="comt-tips pull-right"><?php comment_id_fields(); do_action('comment_form', $post->ID); ?></div>
+					<span data-type="comment-insert-smilie" class="muted comt-smilie"><i class="fa fa-smile-o"></i> 表情</span>
+					<span class="muted comt-mailme"><?php deel_add_checkbox() ?></span>
+				</div>
+			</div>
+
+			<?php if ( !is_user_logged_in() ) { ?>
+				<?php if( get_option('require_name_email') ){ ?>
+					<div class="comt-comterinfo" id="comment-author-info" <?php if ( !empty($comment_author) ) echo 'style="display:none"'; ?>>
+						<h4>Hi,您需要填写昵称和邮箱!</h4>
+						<ul>
+							<li class="form-inline"><label class="hide" for="author">昵称</label><input class="ipt" type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" tabindex="2" placeholder="昵称"><span class="help-inline">昵称 (必填)</span></li>
+							<li class="form-inline"><label class="hide" for="email">邮箱</label><input class="ipt" type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" tabindex="3" placeholder="邮箱"><span class="help-inline">邮箱 (必填)</span></li>
+							<li class="form-inline"><label class="hide" for="url">网址</label><input class="ipt" type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" tabindex="4" placeholder="网址"><span class="help-inline">网址</span></li>
+						</ul>
+					</div>
+				<?php } ?>
+			<?php } ?>
+		</div>
+
+		
+	</form>
+	<?php } ?>
+</div>
+<?php  
+
+if ( have_comments() ) { 
+?>
+<div id="postcomments">
+	<div id="comments">
+		<i class="fa fa-comments-o"></i> <b><?php echo ' ('.$count_t.')'; ?></b>个小伙伴在吐槽
+	</div>
+	<ol class="commentlist">
+		<?php wp_list_comments('type=comment&callback=deel_comment_list') ?>
+	</ol>
+	<div class="commentnav"	>
+		<?php paginate_comments_links('prev_text=«&next_text=»');?>
+	</div>
+</div>
+<?php 
+} 
+?>

+ 24 - 0
editor-style.css

@@ -0,0 +1,24 @@
+body{font-size:14px;line-height:24px;word-break: break-all; word-wrap: break-word;font-family: microsoft yahei}
+img{max-width:100%;padding: 5px;border: solid 1px #e6e6e6;border:none;}
+img:hover{background-color: #fbfbfb;border-color: #ddd;}
+a{text-decoration: none;}
+h2,h3,h4{color:#222;border-bottom:#eee 1px solid;padding-bottom:5px;margin-bottom: 14px;}
+h2{font-size:18px;margin-top: 30px}
+h3,h4{font-size:14px}
+ul{margin:0 0 6px 26px}
+ol{margin:16px}
+ul li{margin-bottom: 10px;*list-style:disc;*padding-left:0;}
+ol li{list-style:decimal;margin-left: 28px;}
+p{margin-bottom:14px}
+code{padding:1px 4px;border-radius:2px;background-color:#eee;font-family:'courier new';color:#777;margin:0 4px}
+table{border-top:solid 1px #ddd;border-left:solid 1px #ddd;width: 100%;margin-bottom: 16px;}
+table th{background-color:#f9f9f9;text-align:center}
+table td,table th{border-bottom:solid 1px #ddd;border-right:solid 1px #ddd;padding:5px 10px}
+.alignleft{float:left;text-align:left;margin-right:10px}
+.aligncenter{text-align:center}
+.alignright{float:right;text-align:right;margin-left:10px}
+
+
+pre{margin:15px auto;font:12px/20px 'courier new';border:1px solid #d6d6d6;border-left-width:4px;background:#fbfbfb;padding:10px 15px}
+blockquote{margin:15px auto;border:1px solid #d6d6d6;border-top-width:3px;padding:15px 20px 10px;background-color:#fdfdfd;}
+blockquote p{margin:0;padding:0;text-indent:24px;margin-bottom:10px;}

+ 9 - 0
error_log

@@ -0,0 +1,9 @@
+[31-Mar-2015 20:12:18 America/Los_Angeles] PHP Fatal error:  Call to undefined function get_header() in /home/solompco/public_html/wp-content/themes/yusi1.0/index.php on line 1
+[01-Apr-2015 01:58:41 America/Los_Angeles] PHP Fatal error:  Call to undefined function get_header() in /home/solompco/public_html/wp-content/themes/yusi1.0/index.php on line 1
+[02-Apr-2015 17:11:28 America/Los_Angeles] PHP Fatal error:  Call to undefined function get_header() in /home/solompco/public_html/wp-content/themes/yusi1.0/index.php on line 1
+[02-Apr-2015 20:09:46 America/Los_Angeles] PHP Fatal error:  Call to undefined function get_header() in /home/solompco/public_html/wp-content/themes/yusi1.0/index.php on line 1
+[09-Apr-2015 16:00:27 America/Los_Angeles] PHP Fatal error:  Call to undefined function get_header() in /home/solompco/public_html/wp-content/themes/yusi1.0/index.php on line 1
+[09-Apr-2015 23:10:36 America/Los_Angeles] PHP Fatal error:  Call to undefined function get_header() in /home/solompco/public_html/wp-content/themes/yusi1.0/index.php on line 1
+[11-Apr-2015 20:56:47 America/Los_Angeles] PHP Fatal error:  Call to undefined function get_header() in /home/solompco/public_html/wp-content/themes/yusi1.0/index.php on line 1
+[02-May-2015 06:19:33 UTC] PHP Warning:  imagecreatefromgif(): '/home/solompco/public_html/wp-content/themes/yusi1.0/cache/timthumbNmNvU1' is not a valid GIF file in /home/solompco/public_html/wp-content/themes/yusi1.0/timthumb.php on line 1110
+[02-May-2015 06:19:33 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/solompco/public_html/wp-content/themes/yusi1.0/timthumb.php:1110) in /home/solompco/public_html/wp-content/themes/yusi1.0/timthumb.php on line 426


BIN
fonts/FontAwesome.otf


BIN
fonts/fontawesome-webfont.eot


Разница между файлами не показана из-за своего большого размера
+ 504 - 0
fonts/fontawesome-webfont.svg


BIN
fonts/fontawesome-webfont.ttf


BIN
fonts/fontawesome-webfont.woff


+ 22 - 0
footer.php

@@ -0,0 +1,22 @@
+</section>
+<footer class="footer">
+    <div class="footer-inner">
+        <div class="copyright pull-left">
+        Copyright © 2012-<?php echo date("Y")?> 独奏流年. Powered by <a href="http://www.wordpress.org/" rel="external">WordPress</a>. Theme by <a href="http://yusi123.com/" rel="external">欲思博客</a>. <a href="http://www.solomp.com/sitemap.xml" rel="external">网站地图</a>
+        </div>
+        <div class="trackcode pull-right">
+            <?php if( dopt('d_track_b') ) echo dopt('d_track'); ?>
+        </div>
+    </div>
+</footer>
+
+<?php 
+wp_footer(); 
+global $dHasShare; 
+if($dHasShare == true){ 
+	echo'<script>with(document)0[(getElementsByTagName("head")[0]||body).appendChild(createElement("script")).src="http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion="+~(-new Date()/36e5)];</script>';
+}  
+if( dopt('d_footcode_b') ) echo dopt('d_footcode'); 
+?>
+</body>
+</html>

Разница между файлами не показана из-за своего большого размера
+ 648 - 0
functions.php


+ 74 - 0
header.php

@@ -0,0 +1,74 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="UTF-8">
+<meta http-equiv="X-UA-Compatible" content="IE=10,IE=9,IE=8">
+<meta name="theme-color" content="#1e90ff">
+<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
+<title><?php wp_title('|', true, 'right'); echo get_option('blogname'); if (is_home ()) echo " | ".get_option('blogdescription'); if ($paged > 1) echo '-Page ', $paged; ?></title>
+<?php
+$sr_1 = 0; $sr_2 = 0; $commenton = 0; 
+if( dopt('d_sideroll_b') ){ 
+    $sr_1 = dopt('d_sideroll_1');
+    $sr_2 = dopt('d_sideroll_2');
+}
+if( is_singular() ){ 
+    if( comments_open() ) $commenton = 1;
+}
+?>
+<script>
+window._deel = {name: '<?php bloginfo('name') ?>',url: '<?php echo get_bloginfo("template_url") ?>', ajaxpager: '<?php echo dopt('d_ajaxpager_b') ?>', commenton: <?php echo $commenton ?>, roll: [<?php echo $sr_1 ?>,<?php echo $sr_2 ?>]}
+</script>
+<?php
+	//49分类不被搜索引擎收录
+    if (!is_home() && in_category('49') ){
+        echo '<meta name="robots" content="noindex,nofollow" />';
+    }
+?>
+<?php 
+wp_head(); 
+if( dopt('d_headcode_b') ) echo dopt('d_headcode'); ?>
+<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
+<!--[if lt IE 9]><script src="<?php bloginfo('template_url'); ?>/js/html5.js"></script><![endif]-->
+</head>
+<body <?php body_class(); ?>>
+
+<header id="header" class="header">
+<div class="container-inner">
+ <div class="yusi-logo">
+                    <a href="/">
+                        <h1>
+                                                        <span class="yusi-mono"><?php bloginfo('name'); ?></span>
+                                                        <span class="yusi-bloger"><?php bloginfo('description'); ?></span>
+                                                    </h1>
+                    </a>
+    </div>
+</div>
+
+	<div id="nav-header" class="navbar">
+		
+		<ul class="nav">
+			<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'nav', 'echo' => false)) )); ?>
+<li style="float:right;">
+                    <div class="toggle-search"><i class="fa fa-search"></i></div>
+<div class="search-expand" style="display: none;"><div class="search-expand-inner"><form method="get" class="searchform themeform" onsubmit="location.href='<?php echo home_url('/search/'); ?>' + encodeURIComponent(this.s.value).replace(/%20/g, '+'); return false;" action="/"><div> <input type="ext" class="search" name="s" onblur="if(this.value=='')this.value='search...';" onfocus="if(this.value=='search...')this.value='';" value="search..."></div></form></div></div>
+</li>
+		</ul>
+	</div>
+	</div>
+</header>
+<section class="container"><div class="speedbar">
+		<?php 
+		if( dopt('d_sign_b') ){ 
+			global $current_user; 
+			get_currentuserinfo();
+			$uid = $current_user->ID;
+			$u_name = get_user_meta($uid,'nickname',true);
+		?>
+			<div class="pull-right">
+				<?php if(is_user_logged_in()){echo '<i class="fa fa-user"></i> '.$u_name.' &nbsp; '; echo ' &nbsp; &nbsp; <i class="fa fa-power-off"></i> ';}else{echo '<i class="fa fa-user"></i> ';}; wp_loginout(); ?>
+			</div>
+		<?php } ?>
+		<div class="toptip"><strong class="text-success"><i class="fa fa-volume-up"></i> </strong> <?php echo dopt('d_tui'); ?></div>
+	</div>
+	<?php if( dopt('d_adsite_01_b') ) echo '<div class="banner banner-site">'.dopt('d_adsite_01').'</div>'; ?>

+ 106 - 0
image.php

@@ -0,0 +1,106 @@
+<?php
+/**
+ * The template for displaying image attachments.
+ *
+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Twelve
+ * @since Twenty Twelve 1.0
+ */
+
+get_header(); ?>
+
+	<div id="primary" class="site-content">
+		<div id="content" role="main">
+
+		<?php while ( have_posts() ) : the_post(); ?>
+
+				<article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>>
+					<header class="entry-header">
+						<h1 class="entry-title"><?php the_title(); ?></h1>
+
+						<footer class="entry-meta">
+							<?php
+								$metadata = wp_get_attachment_metadata();
+								printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve' ),
+									esc_attr( get_the_date( 'c' ) ),
+									esc_html( get_the_date() ),
+									esc_url( wp_get_attachment_url() ),
+									$metadata['width'],
+									$metadata['height'],
+									esc_url( get_permalink( $post->post_parent ) ),
+									esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
+									get_the_title( $post->post_parent )
+								);
+							?>
+							<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
+						</footer><!-- .entry-meta -->
+
+						<nav id="image-navigation" class="navigation" role="navigation">
+							<span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous', 'twentytwelve' ) ); ?></span>
+							<span class="next-image"><?php next_image_link( false, __( 'Next &rarr;', 'twentytwelve' ) ); ?></span>
+						</nav><!-- #image-navigation -->
+					</header><!-- .entry-header -->
+
+					<div class="entry-content">
+
+						<div class="entry-attachment">
+							<div class="attachment">
+<?php
+/**
+ * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
+ * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
+ */
+$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
+foreach ( $attachments as $k => $attachment ) :
+	if ( $attachment->ID == $post->ID )
+		break;
+endforeach;
+
+$k++;
+// If there is more than 1 attachment in a gallery
+if ( count( $attachments ) > 1 ) :
+	if ( isset( $attachments[ $k ] ) ) :
+		// get the URL of the next image attachment
+		$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
+	else :
+		// or get the URL of the first image attachment
+		$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
+	endif;
+else :
+	// or, if there's only 1 image, get the URL of the image
+	$next_attachment_url = wp_get_attachment_url();
+endif;
+?>
+								<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
+								$attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) );
+								echo wp_get_attachment_image( $post->ID, $attachment_size );
+								?></a>
+
+								<?php if ( ! empty( $post->post_excerpt ) ) : ?>
+								<div class="entry-caption">
+									<?php the_excerpt(); ?>
+								</div>
+								<?php endif; ?>
+							</div><!-- .attachment -->
+
+						</div><!-- .entry-attachment -->
+
+						<div class="entry-description">
+							<?php the_content(); ?>
+							<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
+						</div><!-- .entry-description -->
+
+					</div><!-- .entry-content -->
+
+				</article><!-- #post -->
+
+				<?php comments_template(); ?>
+
+			<?php endwhile; // end of the loop. ?>
+
+		</div><!-- #content -->
+	</div><!-- #primary -->
+
+<?php get_footer(); ?>


BIN
img/ajax-loader.gif


BIN
img/arrows.png


BIN
img/default.png






BIN
img/pic/10.jpg











BIN
img/smilies/icon_arrow.gif


BIN
img/smilies/icon_biggrin.gif


BIN
img/smilies/icon_confused.gif


BIN
img/smilies/icon_cool.gif


BIN
img/smilies/icon_cry.gif


BIN
img/smilies/icon_eek.gif


BIN
img/smilies/icon_evil.gif


BIN
img/smilies/icon_exclaim.gif


BIN
img/smilies/icon_idea.gif


BIN
img/smilies/icon_lol.gif


BIN
img/smilies/icon_mad.gif


BIN
img/smilies/icon_mrgreen.gif


BIN
img/smilies/icon_neutral.gif


BIN
img/smilies/icon_question.gif


BIN
img/smilies/icon_razz.gif


BIN
img/smilies/icon_redface.gif


BIN
img/smilies/icon_rolleyes.gif


BIN
img/smilies/icon_sad.gif


BIN
img/smilies/icon_smile.gif


BIN
img/smilies/icon_surprised.gif


BIN
img/smilies/icon_twisted.gif


BIN
img/smilies/icon_wink.gif


BIN
img/weixin.gif


+ 24 - 0
index.php

@@ -0,0 +1,24 @@
+<?php get_header(); ?>
+<?php if( dopt('d_adindex_01_b') ) printf('<div class="banner banner-navbar">'.dopt('d_adindex_01').'</div>'); ?>
+<div class="content-wrap">
+	<div class="content">
+	<?php 
+		if( dopt('d_adindex_03_b') ) printf('<div class="banner banner-contenttop">'.dopt('d_adindex_03').'</div>');
+
+		if( $paged && $paged > 1 ){
+			printf('<header class="archive-header"><h1>最新发布 第'.$paged.'页</h1><div class="archive-header-info"><p>'.get_option('blogname').get_option('blogdescription').'</p></div></header>');
+		}else{
+			if( dopt('d_sticky_b') ) include 'modules/sticky.php';
+		}
+
+		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
+		$args = array(
+		    'caller_get_posts' => 1,
+		    'paged' => $paged
+		);
+		query_posts($args);
+		include 'modules/excerpt.php'; 
+	?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
js/html5.js


Разница между файлами не показана из-за своего большого размера
+ 7 - 0
js/jquery.js


+ 5 - 0
js/my_quicktags.js

@@ -0,0 +1,5 @@
+QTags.addButton( 'hr', 'hr', "\n<hr />\n", '' );//添加横线
+QTags.addButton( 'h2', 'h2', "\n<h2>", "</h2>\n" ); //添加标题2
+QTags.addButton( 'h3', 'h3', "\n<h3>", "</h3>\n" ); //添加标题3
+QTags.addButton( 'pre', 'pre', '\n<pre class="prettyprint linenums" >\n\n</pre>', "" );//添加高亮代码
+//这儿共有四对引号,分别是按钮的ID、显示名、点一下输入内容、再点一下关闭内容(此为空则一次输入全部内容),\n表示换行。

Разница между файлами не показана из-за своего большого размера
+ 3 - 0
js/slider.js


+ 129 - 0
js/tougao.js

@@ -0,0 +1,129 @@
++(function($){
+	/* tougao
+	 * ====================================================
+	*/
+	var tougao = {
+		init: function(){
+			var that = this
+
+			that._title = $('#tougao-title')
+			that._url = $('#tougao-url')
+			that._content = $('#tougao-content')
+			that._submit = $('#tougao-submit')
+
+			that._check = [, 0, 0]
+
+			$('#tougao').on('shown', function(){
+				that._title.focus()
+			})
+
+			that._title.blur(function(){
+				that.check_title( $(this) )
+			})
+			
+			that._url.blur(function(){
+				that.check_url( $(this) )
+			})
+			
+			that._content.blur(function(){
+				that.check_content( $(this) )
+			})
+
+			that._submit.bind('click', function(){
+				
+				if( !that.is_check() ){
+					that.check_title( that._title )
+					that.check_url( that._url )
+					that.check_content( that._content )
+					return
+				}
+
+				var _tip = that._submit.prev()
+
+				$.ajax({
+				    type: 'POST',
+				    url: _deel.url+'/ajax/tougao.php',
+				    data: 'title='+$.trim(that._title.val())+'&url='+$.trim(that._url.val())+'&content='+$.trim(that._content.val()),
+				    success: function(data){
+				   		if(data === 'sofast'){
+				   			_tip.show().html('服务器忙,请稍候重试!')
+				   			setTimeout(function(){
+				   				_tip.fadeOut(1000)
+				   			}, 5000)
+				        }
+				        if(data === 'success'){
+				            _tip.show().addClass('text-success').html('投稿成功,审核通过后将正式发布!')
+				            setTimeout(function(){
+				   				$('#tougao').modal('hide')
+				   				that._title.val('')
+			        			that._url.val('')
+			        			that._content.val('')
+			        			_tip.hide()
+			        			that._title.focus()
+				   			}, 4000)
+				        }
+				        if(data === 'fail'){
+				        	_tip.show().html('投稿失败,请稍候重试!')
+				        	setTimeout(function(){
+				        		_tip.fadeOut(1000)
+				        	}, 5000)
+				        }
+				        if(data === 'title'){
+				        	_tip.show().html('标题不能为空,且不能大于40个字符!')
+				        }
+				        if(data === 'url'){
+				        	_tip.show().html('网址不能为空,且不能大于100个字符!')
+				        }
+				        if(data === 'content'){
+				        	_tip.show().html('内容不能为空,且介于200-5000个字符之间!')
+				        }
+				    }
+				});
+			})
+		},
+		is_check: function(){
+			return this._check.join('') === '111' ? true : false
+		},
+		check_title: function(target){
+			if(!target.val() || target.val().length < 8){
+				this.tip(target,'标题太短,不得少于8字!', 0);
+			}
+			else if(target.val().length > 30){
+				this.tip(target,'标题太长,不得超过30字!', 0);
+			}
+			else{
+				this.tip_hide(target, 0)
+			}
+		},
+		check_url: function(target){
+			if(!target.val() || !target.val().match(/^(http|https):\/\/([a-z0-9-]{1,}.)?[a-z0-9-]{2,}.([a-z0-9-]{1,}.)?[a-z0-9]{2,}/)){
+				this.tip(target,'格式错误!', 1)
+			}
+			else{
+				this.tip_hide(target, 1)
+			}
+		},
+		check_content: function(target){
+			if(!target.val() || target.val().length < 200){
+				this.tip(target,'内容太短,不得少于200字', 2)
+			}
+			else if(target.val().length > 5000){
+				this.tip(target,'内容太长,不得超过5000字', 2)
+			}
+			else{
+				this.tip_hide(target, 2)
+			}
+		},
+		tip: function(id, txt, c){
+			id.next('.text-error').html(txt).slideDown(300)
+			this._check[c] = 0
+		},
+		tip_hide: function(id, c){
+			id.next('.text-error').slideUp(300)
+			this._check[c] = 1
+		}
+	}
+
+	tougao.init()
+
+})(window.jQuery);

+ 51 - 0
modules/archive_title.php

@@ -0,0 +1,51 @@
+<?php if( dopt('d_adindex_02_b') ) printf('<div class="banner banner-sticky">'.dopt('d_adindex_02').'</div>'); ?>
+<?php  
+$_author = dopt('d_post_author_b');
+$_time = dopt('d_post_time_b');
+$_views = dopt('d_post_views_b');
+$_comment = dopt('d_post_comment_b');
+?>
+<?php while ( have_posts() ) : the_post(); ?>
+<?php  
+$_thumbnail = false;
+if( has_post_thumbnail() || !dopt('d_thumbnail_b') ){
+	$_thumbnail = true;
+}
+?><?php
+$s = trim(get_search_query()) ? trim(get_search_query()) : 0;
+$title = get_the_title();
+$content = mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 260,"......",'utf-8');//300是摘要字符数,......是结束符号。
+if($s){$keys = explode(" ",$s);
+$title = preg_replace('/('.implode('|', $keys) .')/iu','<span style="color:#b94a48;">\0</span>',$title);
+$content = preg_replace('/('.implode('|', $keys) .')/iu','<span style="color:#b94a48;">\0</span>',$content);
+}?>
+<article class="excerpt<?php echo !$_thumbnail ? ' excerpt-nothumbnail' : '' ?>">
+	<header>
+		<?php  
+			if( !is_category() ) {
+				$category = get_the_category();
+		        if($category[0]){
+		            echo '<a class="label label-important" href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'<i class="label-arrow"></i></a>';
+		        }
+	        };
+		?>
+		<h2><a target="_blank" href="<?php the_permalink() ?>" title="<?php the_title(); ?> - <?php bloginfo('name'); ?>"><?php echo $title; ?></a></h2>
+	</header>
+<?php if( $_thumbnail ){ ?>
+	<div class="focus"><a target="_blank" href="<?php the_permalink(); ?>"><img class="thumb" src="<?php echo get_bloginfo("template_url") ?>/timthumb.php?src=<?php echo post_thumbnail_src(); ?>&h=123&w=200&q=90&zc=1&ct=1" alt="<?php the_title(); ?>" /></a></div>
+	<?php } ?>
+		<span class="note"> <?php echo $content;?></span>
+<p class="auth-span">
+<?php if( !is_author() && !$_author ){ ?>
+		<span class="muted"><i class="fa fa-user"></i> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>"><?php echo get_the_author() ?></a></span>
+	<?php } ?>
+	<?php if( !$_time ){ ?><span class="muted"><i class="fa fa-clock-o"></i> <?php echo timeago( get_gmt_from_date(get_the_time('Y-m-d G:i:s')) ) ?></span><?php } ?>
+	<?php if( !$_views ){ ?><span class="muted"><i class="fa fa-eye"></i> <?php deel_views('℃'); ?></span><?php } ?>
+	<?php if( !$_comment ){ ?><span class="muted"><i class="fa fa-comments-o"></i> <?php 
+			if ( comments_open() ) echo '<a target="_blank" href="'.get_comments_link().'">'.get_comments_number('0', '1', '%').'评论</a>'
+		?></span><?php } ?>
+<?php if( !$_like ){ ?><span class="muted">
+<a href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" id="Addlike" class="action<?php if(isset($_COOKIE['bigfa_ding_'.$post->ID])) echo ' actived';?>"><i class="fa fa-heart-o"></i><span class="count"><?php if( get_post_meta($post->ID,'bigfa_ding',true) ){ echo get_post_meta($post->ID,'bigfa_ding',true); } else {echo '0';}?></span>喜欢</a></span><?php } ?></p>
+</article>
+<?php endwhile; wp_reset_query(); ?>
+<?php deel_paging(); ?>

+ 50 - 0
modules/excerpt.php

@@ -0,0 +1,50 @@
+		<?php if( dopt('d_adindex_02_b') ) printf('<div class="banner banner-sticky">'.dopt('d_adindex_02').'</div>'); ?>
+<?php if(is_home()&& dopt('hot_list_check') ){ ?>
+		<div><div class="left-ad" style="clear: both;background-color: #fff; width: 30%;float: left;margin-right:2%;"></div><div class="hot-posts">
+			<h2 class="title"><?php echo dopt('hot_list_title') ?></h2>
+			<ul><?php hot_posts_list($days=dopt('hot_list_date'), $nums=dopt('hot_list_number')); ?></ul>
+		</div></div>
+		<?php } ?>
+<?php if (wp_is_mobile() ): ?><?php if( dopt('Mobiled_adindex_02_b') ) printf('<div class="banner-sticky">'.dopt('Mobiled_adindex_02').'</div>'); ?><?php endif ;?>
+<?php  
+$_author = dopt('d_post_author_b');
+$_time = dopt('d_post_time_b');
+$_views = dopt('d_post_views_b');
+$_comment = dopt('d_post_comment_b');
+$_like = dopt('d_post_like_b');
+?>
+<?php while ( have_posts() ) : the_post(); ?>
+<?php if (is_home() && in_category('49') ) continue; ?>
+<?php  
+$_thumbnail = false;
+if( has_post_thumbnail() || !dopt('d_thumbnail_b') ){
+	$_thumbnail = true;
+}
+?>
+<article class="excerpt<?php echo !$_thumbnail ? ' excerpt-nothumbnail' : '' ?>">
+	<header><?php  if( !is_category() ) {$category = get_the_category();
+		        if($category[0]){echo '<a class="label label-important" href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'<i class="label-arrow"></i></a>';}
+	        };?><h2><a target="_blank" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?>
+ <?php $t1=$post->post_date;
+$t2=date("Y-m-d H:i:s");
+$diff=(strtotime($t2)-strtotime($t1))/3600;
+if($diff<12){echo '<img src="'.get_bloginfo("template_url").'/img/new.gif" alt="24小时内最新">';}?> </a></h2>
+	</header>
+<?php if( $_thumbnail ){ ?>
+	<div class="focus"><a target="_blank" href="<?php the_permalink(); ?>"><img class="thumb" src="<?php echo get_bloginfo("template_url") ?>/timthumb.php?src=<?php echo post_thumbnail_src(); ?>&h=123&w=200&q=90&zc=1&ct=1" alt="<?php the_title(); ?>" /></a></div>
+	<?php } ?>
+		<span class="note"> <?php echo deel_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 140, '...'); ?></span>
+<p class="auth-span">
+<?php if( !is_author() && !$_author ){ ?>
+		<span class="muted"><i class="fa fa-user"></i> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>"><?php echo get_the_author() ?></a></span>
+	<?php } ?>
+	<?php if( !$_time ){ ?><span class="muted"><i class="fa fa-clock-o"></i> <?php echo timeago( get_gmt_from_date(get_the_time('Y-m-d G:i:s')) ) ?></span><?php } ?>
+	<?php if( !$_views ){ ?><span class="muted"><i class="fa fa-eye"></i> <?php deel_views('℃'); ?></span><?php } ?>
+	<?php if( !$_comment ){ ?><span class="muted"><i class="fa fa-comments-o"></i> <?php 
+			if ( comments_open() ) echo '<a target="_blank" href="'.get_comments_link().'">'.get_comments_number('0', '1', '%').'评论</a>'
+		?></span><?php } ?>
+<?php if( !$_like ){ ?><span class="muted">
+<a href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" id="Addlike" class="action<?php if(isset($_COOKIE['bigfa_ding_'.$post->ID])) echo ' actived';?>"><i class="fa fa-heart-o"></i><span class="count"><?php if( get_post_meta($post->ID,'bigfa_ding',true) ){ echo get_post_meta($post->ID,'bigfa_ding',true); } else {echo '0';}?></span>喜欢</a></span><?php } ?></p>
+</article>
+<?php endwhile; wp_reset_query(); ?>
+<?php deel_paging(); ?>

+ 32 - 0
modules/related.php

@@ -0,0 +1,32 @@
+<div class="related_posts"><ul class="related_img">
+<?php
+$post_num = 4;$exclude_id = $post->ID;$posttags = get_the_tags();$i = 0;if ( $posttags ){$tags = '';foreach ( $posttags as $tag ) $tags .= $tag->term_id . ',';$args = array(
+		'post_status' => 'publish','tag__in' => explode(',',$tags),'post__not_in' => explode(',',$exclude_id),'caller_get_posts' => 1,'orderby' => 'comment_date','posts_per_page' => $post_num
+	);query_posts($args);while( have_posts() ){the_post();?>
+
+		<li class="related_box"  >
+		<a href="<?php the_permalink();?>" title="<?php the_title();?>" target="_blank">
+<img src="<?php echo get_bloginfo("template_url") ?>/timthumb.php?src=<?php echo post_thumbnail_src();?>&h=110&w=185&q=90&zc=1&ct=1" alt="<?php the_title();?>" />	<br><span class="r_title"><?php the_title();?></span></a>
+		</li>
+	<?php $exclude_id .= ',' . $post->ID;$i ++;}wp_reset_query();}if ( $i < $post_num ){$cats = '';foreach ( get_the_category() as $cat ) $cats .= $cat->cat_ID . ',';$args = array(
+
+		'category__in' => explode(',',$cats),'post__not_in' => explode(',',$exclude_id),'caller_get_posts' => 1,'orderby' => 'comment_date','posts_per_page' => $post_num - $i
+
+	);query_posts($args);while( have_posts() ){the_post();?>
+
+	<li class="related_box"  >
+		<a href="<?php the_permalink();?>" title="<?php the_title();?>" target="_blank">
+		<img src="<?php echo get_bloginfo("template_url") ?>/timthumb.php?src=<?php echo post_thumbnail_src();?>&h=110&w=185&q=90&zc=1&ct=1" alt="<?php the_title();?>" /><br><span class="r_title"><?php the_title();?></span></a>
+		</li>
+	<?php $i++;}wp_reset_query();}if ( $i  == 0 )  echo '<div class=\"r_title\">没有相关文章!</div>';?>
+</ul>
+
+<div class="relates">
+<ul>
+<?php  
+$exclude_id = $post->ID;$posttags = get_the_tags();$i = 0;$limit = 8;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),'caller_get_posts' => 1,'orderby' => 'comment_date','posts_per_page' => $limit
+	);query_posts($args);while( have_posts() ){the_post();echo '<li><i class="fa fa-minus"></i><a href="'.get_permalink().'">',get_the_title(),'</a></li>';$exclude_id .= ',' . $post->ID;$i ++;};wp_reset_query();}if ( $i < $limit ){$cats = '';foreach ( get_the_category() as $cat ) $cats .= $cat->cat_ID . ',';$args = array(
+		'category__in' => explode(',',$cats),'post__not_in' => explode(',',$exclude_id),'caller_get_posts' => 1,'orderby' => 'comment_date','posts_per_page' => $limit - $i
+	);query_posts($args);while( have_posts() ){the_post();echo '<li><i class="fa fa-minus"></i><a target="_blank" href="'.get_permalink().'">',get_the_title(),'</a></li>';$i ++;};wp_reset_query();}if ( $i  == 0 ){echo '<li>暂无相关文章!</li>';}?>
+
+</ul></div></div>

+ 26 - 0
modules/sticky.php

@@ -0,0 +1,26 @@
+<?php if (!Yusi_is_mobile() ): ?>
+<div id="wowslider-container1">
+	<div class="ws_images"><ul>
+<?php $sticky = get_option('sticky_posts'); rsort( $sticky );
+		query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1, 'showposts' => dopt('d_sticky_count')?dopt('d_sticky_count'):4 ) );
+		while (have_posts()) : the_post(); 
+echo '<li><a target="_blank" href="'.get_permalink().'" title="'.get_the_title().'">';
+		echo '<img src="';echo post_thumbnail_src();echo '" title="'.get_the_title().'" alt="'.get_the_title().'" /></a></li>';
+		endwhile; 
+		wp_reset_query(); 
+	?>
+	</ul>
+</div>
+
+<div class="ws_thumbs">
+<div>
+<?php $sticky = get_option('sticky_posts'); rsort( $sticky );
+		query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1, 'showposts' => dopt('d_sticky_count')?dopt('d_sticky_count'):4 ) );
+		while (have_posts()) : the_post(); 
+echo '<a target="_blank" href="#" title="'.get_the_title().'">';
+		echo '<img src="'.get_bloginfo("template_url").'/timthumb.php?src=';echo post_thumbnail_src();echo '&h=62&w=120&q=90&zc=1&ct=1" /></a>';
+		endwhile; 
+		wp_reset_query(); 
+	?>
+</div></div><div class="ws_shadow"></div>
+	</div><script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/slider.js"></script><?php endif ;?>

+ 69 - 0
pages/archives.php

@@ -0,0 +1,69 @@
+<?php
+/*
+    template name: 文章存档
+    description: template for yusi123.com Yusi theme 
+*/
+get_header(); 
+?>
+<div class="pagewrapper clearfix">
+    <aside class="pagesidebar">
+        <ul class="pagesider-menu">
+            <?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'pagemenu', 'echo' => false)) )); ?>
+        </ul>
+    </aside>
+    <div class="pagecontent">
+        <header class="pageheader clearfix">
+            <h1 class="pull-left">
+                <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
+            </h1>
+            <div class="pull-right">
+                <?php deel_share() ?>
+            </div>
+        </header>
+        <?php while (have_posts()) : the_post(); ?>
+            <article class="article-content">
+                <?php the_content(); ?>
+            </article>
+
+            <article class="archives">
+                <?php
+                $previous_year = $year = 0;
+                $previous_month = $month = 0;
+                $ul_open = false;
+                 
+                $myposts = get_posts('numberposts=-1&orderby=post_date&order=DESC');
+                
+                foreach($myposts as $post) :
+                    setup_postdata($post);
+                 
+                    $year = mysql2date('Y', $post->post_date);
+                    $month = mysql2date('n', $post->post_date);
+                    $day = mysql2date('j', $post->post_date);
+                    
+                    if($year != $previous_year || $month != $previous_month) :
+                        if($ul_open == true) : 
+                            echo '</ul></div>';
+                        endif;
+                 
+                        echo '<div class="item"><h3>'; echo the_time('F Y'); echo '</h3>';
+                        echo '<ul class="archives-list">';
+                        $ul_open = true;
+                 
+                    endif;
+                 
+                    $previous_year = $year; $previous_month = $month;
+                ?>
+                    <li>
+                        <time><?php the_time('j'); ?>日</time>
+                        <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
+                        <span class="muted"><?php comments_number('', '1评论', '%评论'); ?></span>
+                    </li>
+                <?php endforeach; ?>
+                </ul>
+            </div>
+            </article>
+
+        <?php endwhile;  ?>
+    </div>
+</div>
+<?php get_footer(); ?>

+ 45 - 0
pages/example.php

@@ -0,0 +1,45 @@
+<?php 
+/*
+	template name: 案例展示
+	description: template for yusi123.com Yusi theme 
+*/
+$pid = isset( $_GET['pid'] ) ? trim(htmlspecialchars($_GET['pid'], ENT_QUOTES)) : '';
+if( !$pid ) die('No param pid');
+$title = get_the_title($pid);
+$values = get_post_custom_values('d_example',$pid);
+empty($values) ? Header('Location:/') : $theCode = $values[0];
+?>
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="UTF-8" />
+<title>实例: <?php echo $title ?> -- <?php echo bloginfo('name'); ?></title>
+<style>
+@charset "utf-8";
+body,h1,h2,h3,h4,p,ul,li,ol,dl,dt,dd,input,textarea,figure,form{margin:0;padding:0}
+body,input,textarea{font-size:12px;font-family:microsoft yahei}
+body{text-align:center;color:#33383D;background:#eee}
+ul,ol{list-style:none}
+img{border:0}
+button,input {line-height:normal;*overflow:visible}
+input,textarea{outline:none}
+a{color:#428BD1;text-decoration:none}
+a:hover{color:#3071A9}
+.demo-header{position:relative;height:32px;background-color:#4A4A4A;line-height:32px;text-align: left;}
+.demo-name{background-color: #428BCA;color: #fff;display: inline-block;padding: 0 20px;}
+.demo-name:hover{color: #fff;}
+.demo-title{height:0;overflow:hidden}
+.demo-container{clear: both;padding:30px 20px;text-align:left;margin:0 auto;line-height: 18px;}
+.demo h2{font-size: 15px;padding-bottom: 6px;margin-bottom: 20px;border-bottom: solid 1px #ddd;}
+</style>
+</head>
+<body>
+<h1 class="demo-title">实例: <?php echo $title ?> -- <?php echo bloginfo('name'); ?></h1>
+<div class="demo-header">
+	<a class="demo-name" href="<?php echo get_permalink($pid); ?>">&laquo; <?php echo $title ?></a>
+	<span style="display:none"><?php if( dopt('d_track_b') != '' ) echo dopt('d_track'); ?></span>
+</div>
+<div class="demo-container demo"><?php echo $theCode; ?></div>
+<div style="display:none"><?php if( dopt('d_track_b') ) echo dopt('d_track'); ?></div>
+</body>
+</html>

+ 60 - 0
pages/links.php

@@ -0,0 +1,60 @@
+<?php 
+/*
+	Template name: 友情链接
+	description: template for yusi123.com Yusi theme 
+*/
+get_header();
+?>
+<div class="pagewrapper clearfix">
+	<aside class="pagesidebar">
+		<ul class="pagesider-menu">
+			<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'pagemenu', 'echo' => false)) )); ?>
+		</ul>
+	</aside>
+	<div class="pagecontent">
+		<header class="pageheader clearfix">
+			<h1 class="pull-left">
+				<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
+			</h1>
+			<div class="pull-right">
+				<?php deel_share() ?>
+			</div>
+		</header>
+		<?php while (have_posts()) : the_post(); ?>
+			<article class="article-content">
+				<?php the_content(); ?>
+			</article>
+<h2>友情链接</h2>
+<?php
+$bookmarks = get_bookmarks(array('category' => dopt('d_linkpage_cat')?dopt('d_linkpage_cat'):''));
+
+if ( !empty($bookmarks) ){
+    echo '<ul class="link-content clearfix">';
+    foreach ($bookmarks as $bookmark) {
+        echo '<li><a href="' . $bookmark->link_url . '" title="' . $bookmark->link_description . '" target="_blank" >'. get_avatar($bookmark->link_notes,64) . '<span class="sitename">'. $bookmark->link_name .'</span></a></li>';
+    }
+    echo '</ul>';
+}
+
+?>
+
+<h2>我的链接</h2>
+<?php
+$bookmarks = get_bookmarks(array('category' => dopt('d_linkpage_cat_mine')?dopt('d_linkpage_cat_mine'):''));
+
+if ( !empty($bookmarks) ){
+    echo '<ul class="link-content clearfix">';
+    foreach ($bookmarks as $bookmark) {
+        echo '<li><a href="' . $bookmark->link_url . '" title="' . $bookmark->link_description . '" target="_blank" >'. get_avatar($bookmark->link_notes,64) . '<span class="sitename">'. $bookmark->link_name .'</span></a></li>';
+    }
+    echo '</ul>';
+}
+
+?>
+
+			<?php comments_template('', true); ?>
+
+		<?php endwhile;  ?>
+	</div>
+</div>
+<?php get_footer(); ?>

+ 28 - 0
pages/none_page.php

@@ -0,0 +1,28 @@
+<?php 
+/*
+	template name: 空页面
+	description: template for yusi123.com Yusi theme 
+*/
+get_header();
+?>
+
+<div class="pagewrapper clearfix">
+	
+	
+		<header class="pageheader clearfix">
+			<h1 class="pull-left">
+				<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
+			</h1>
+			<div class="pull-right"><!-- 百度分享 -->
+	<?php deel_share() ?>
+			</div>
+		</header>
+		<?php while (have_posts()) : the_post(); ?>
+			<div class="article-content">
+				<?php the_content(); ?>
+			</div>
+		<?php comments_template('', true); endwhile;  ?>
+	
+</div>
+
+<?php get_footer(); ?>

+ 33 - 0
pages/page.php

@@ -0,0 +1,33 @@
+<?php 
+/*
+	template name: 页面(新版)
+	description: template for yusi123.com Yusi theme 
+*/
+get_header();
+?>
+
+<div class="pagewrapper clearfix">
+	<aside class="pagesidebar">
+		<ul class="pagesider-menu">
+			<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'pagemenu', 'echo' => false)) )); ?>
+		</ul>
+	</aside>
+	<div class="pagecontent">
+		<header class="pageheader clearfix">
+			<h1 class="pull-left">
+				<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
+			</h1>
+			<div class="pull-right"><!-- 百度分享 -->
+	<?php deel_share() ?>
+			</div>
+		</header>
+		<?php while (have_posts()) : the_post(); ?>
+			<div class="article-content">
+				<?php //the_content(); ?>
+<?php replace_pic(get_the_content())?>
+			</div>
+		<?php comments_template('', true); endwhile;  ?>
+	</div>
+</div>
+
+<?php get_footer(); ?>

+ 45 - 0
pages/readers.php

@@ -0,0 +1,45 @@
+<?php 
+/*
+	template name: 读者墙
+	description: template for yusi123.com Yusi theme 
+*/
+get_header();
+function readers_wall( $outer='1',$timer='100',$limit='60' ){
+	global $wpdb;
+	$counts = $wpdb->get_results("select count(comment_author) as cnt, comment_author, comment_author_url, comment_author_email from (select * from $wpdb->comments left outer join $wpdb->posts on ($wpdb->posts.id=$wpdb->comments.comment_post_id) where comment_date > date_sub( now(), interval $timer month ) and user_id='0' and comment_author != '".$outer."' and post_password='' and comment_approved='1' and comment_type='') as tempcmt group by comment_author order by cnt desc limit $limit");
+	foreach ($counts as $count) {
+		$c_url = $count->comment_author_url;
+		if (!$c_url) $c_url = 'javascript:;';
+		$type .= '<a id="duzhe" target="_blank" href="'. $c_url . '" title="['.$count->comment_author.']近期评论'. $count->cnt . '次">'.get_avatar( $count->comment_author_email, $size = '64' , deel_avatar_default() ).'<span>'.$count->comment_author.'</span></a>';
+	}
+	echo $type;
+};
+?>
+
+<div class="pagewrapper clearfix">
+	<aside class="pagesidebar">
+		<ul class="pagesider-menu">
+			<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'pagemenu', 'echo' => false)) )); ?>
+		</ul>
+	</aside>
+	<div class="pagecontent">
+		<header class="pageheader clearfix">
+			<h1 class="pull-left">
+				<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
+			</h1>
+			<div class="pull-right">
+				<?php deel_share() ?>
+			</div>
+		</header>
+		<?php while (have_posts()) : the_post(); ?>
+			<div class="article-content">
+				<?php the_content(); ?>
+			</div>
+			<div class="readers">
+				<?php readers_wall(); ?>
+			</div>
+		<?php comments_template('', true); endwhile;  ?>
+	</div>
+</div>
+
+<?php get_footer(); ?>

+ 35 - 0
pages/tags.php

@@ -0,0 +1,35 @@
+<?php 
+/*
+ 	template name: 标签云
+ 	description: template for yusi123.com Yusi theme 
+*/
+get_header();
+?>
+<div class="pagewrapper clearfix">
+	<aside class="pagesidebar">
+		<ul class="pagesider-menu">
+			<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'pagemenu', 'echo' => false)) )); ?>
+		</ul>
+	</aside>
+	<div class="pagecontent">
+		<header class="pageheader clearfix">
+			<h1 class="pull-left">
+				<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
+			</h1>
+			<div class="pull-right">
+				<?php deel_share() ?>
+			</div>
+		</header>
+		<ul class="tag-clouds">
+			<?php $tags_list = get_tags('orderby=count&order=DESC');
+			if ($tags_list) { 
+				foreach($tags_list as $tag) {
+					echo '<li><a class="btn btn-mini" href="'.get_tag_link($tag).'">'. $tag->name .'</a><strong>x '. $tag->count .'</strong><br>'; 					
+					echo '</li>';
+				} 
+			} 
+			?>
+		</ul>
+	</div>
+</div>
+<?php get_footer(); ?>

+ 49 - 0
pages/tougao.php

@@ -0,0 +1,49 @@
+<?php 
+/*
+	template name: 投稿
+	description: template for yusi123.com Yusi theme 
+*/
+get_header();
+?>
+<div class="pagewrapper clearfix">
+	<aside class="pagesidebar">
+		<ul class="pagesider-menu">
+			<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'pagemenu', 'echo' => false)) )); ?>
+		</ul>
+	</aside>
+	<div class="pagecontent">
+		<header class="pageheader clearfix">
+			<h1 class="pull-left">
+				<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
+			</h1>
+			<div class="pull-right">
+				<?php deel_share() ?>
+			</div>
+		</header>
+		<?php while (have_posts()) : the_post(); ?>
+		<article class="article-content">
+			<?php the_content(); ?>
+		</article>
+		<?php endwhile;  ?>
+		<ul class="submit-form">
+			<li> <strong>标题</strong>
+				<input id="tougao-title" class="input-block-level" type="text" size="40" placeholder="写点什么...">	
+				<p class="text-error hide"></p>
+			</li>
+			<li> <strong>网址</strong>
+				<input id="tougao-url" class="input-block-level" type="text" placeholder="http://" size="100">	
+				<p class="text-error hide"></p>
+			</li>
+			<li>
+				<strong>内容</strong>
+				<textarea id="tougao-content" rows="12" class="input-block-level" placeholder="写点什么..."></textarea>
+				<p class="text-error hide"></p>
+			</li>
+		</ul>
+		<div class="text-error"></div>
+		<button id="tougao-submit" class="btn btn-primary"><i class="fa fa-check-square-o"></i> 立即提交</button>
+	</div>
+</div>
+
+<?php wp_enqueue_script( '', get_template_directory_uri() . '/js/tougao.js', array(), '3.0', true ); ?>
+<?php get_footer(); ?>

BIN
screenshot.jpg


+ 27 - 0
search.php

@@ -0,0 +1,27 @@
+<?php get_header(); ?>
+<div class="content-wrap">
+	<div class="content">
+		<?php if ( !have_posts() ) : ?>
+			<header class="archive-header"> 
+				<h1>没有找到有关【<?php echo $s; ?>】的内容</h1>
+				<p class="muted">给您推荐以下内容:</p>
+			</header>
+			<?php 
+				$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
+				$args = array(
+				    'showposts' => 4,
+				    'caller_get_posts' => 1,
+				    'paged' => $paged
+				);
+				query_posts($args);
+			?>
+			<?php include( 'modules/excerpt.php' ); ?>
+		<?php else: ?>
+			<header class="archive-header"> 
+				<h1>有关【<?php echo $s; ?>】的内容</h1>
+			</header>
+			<?php include( 'modules/archive_title.php' ); ?>
+		<?php endif; ?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

+ 6 - 0
share.css

@@ -0,0 +1,6 @@
+.bdsharebuttonbox a{border-bottom:0;margin-right:5px;width:28px;height:28px;line-height:28px;color: #fff;}
+.bds_renren{background:#94b3eb;}
+.bds_qzone{background:#fac33f;}
+.bds_more{background:#40a57d;}
+.bds_weixin{background:#7ad071;}
+.bdsharebuttonbox a:hover{background-color:#7fb4ab;color: #fff;border-bottom:0;}

+ 34 - 0
sidebar.php

@@ -0,0 +1,34 @@
+<aside class="sidebar">	
+<div class="widget widget_text"><div class="textwidget"><div class="social">
+<?php if( dopt('d_tqq_b') || dopt('d_weibo_b') || dopt('d_facebook_b') || dopt('d_twitter_b') ){ ?>
+
+<?php if( dopt('d_weibo_b') ) echo '<a href="'.dopt('d_weibo').'" rel="external nofollow" title="新浪微博" target="_blank"><i class="sinaweibo fa fa-weibo"></i></a>'; ?>
+<?php if( dopt('d_tqq_b') ) echo '<a  href="'.dopt('d_tqq').'" rel="external nofollow" title="腾讯微博" target="_blank"><i class="tencentweibo fa fa-tencent-weibo"></i></a>'; ?>
+<?php if( dopt('d_twitter_b') ) echo '<a href="'.dopt('d_twitter').'" rel="external nofollow" title="Twitter" target="_blank"><i class="twitter fa fa-twitter"></i></a>'; ?>
+<?php if( dopt('d_facebook_b') ) echo '<a href="'.dopt('d_facebook').'" rel="external nofollow" title="Facebook" target="_blank"><i class="facebook fa fa-facebook"></i></a>'; ?>
+<?php if( dopt('d_google_b') ) echo '<a href="'.dopt('d_google').'" rel="external nofollow" title="Google+" target="_blank"><i class="google fa fa-google-plus"></i></a>'; ?>
+<?php if( dopt('d_weixin_b') ) echo '<a class="weixin"><i class="weixins fa fa-weixin"></i><div class="weixin-popover"><div class="popover bottom in"><div class="arrow"></div><div class="popover-title">订阅号“'.dopt('d_weixin').'”</div><div class="popover-content"><img src="'.get_bloginfo('template_url').'/img/weixin.gif" ></div></div></div></a>';?>
+<?php if( dopt('d_emailContact_b') ) echo '<a href="'.dopt('d_emailContact').'" rel="external nofollow" title="Email" target="_blank"><i class="email fa fa-envelope-o"></i></a>'; ?>
+<?php if( dopt('d_qqContact_b') ) echo '<a href="'.dopt('d_qqContact').'" rel="external nofollow" title="联系QQ" target="_blank"><i class="qq fa fa-qq"></i></a>'; ?>
+<?php echo'<a href="'.dopt('d_rss').'" rel="external nofollow" target="_blank"  title="订阅本站"><i class="rss fa fa-rss"></i></a>'; ?>
+
+<?php } ?>
+</div></div></div>
+
+<?php 
+if (function_exists('dynamic_sidebar') && dynamic_sidebar('widget_sitesidebar')) : endif; 
+
+if (is_single()){
+	if (function_exists('dynamic_sidebar') && dynamic_sidebar('widget_postsidebar')) : endif; 
+}
+else if (is_page()){
+	if (function_exists('dynamic_sidebar') && dynamic_sidebar('widget_pagesidebar')) : endif; 
+}
+else if (is_home()){
+	if (function_exists('dynamic_sidebar') && dynamic_sidebar('widget_sidebar')) : endif; 
+}
+else {
+	if (function_exists('dynamic_sidebar') && dynamic_sidebar('widget_othersidebar')) : endif; 
+}
+?>
+</aside>

+ 52 - 0
single.php

@@ -0,0 +1,52 @@
+<?php get_header(); ?>
+<div class="content-wrap">
+	<div class="content">
+<?php if( dopt('d_singleMenu_b') ) echo '<div class="breadcrumbs">'.deel_breadcrumbs().'</div>'; ?>
+
+		<?php while (have_posts()) : the_post(); ?>
+		<header class="article-header">
+			<h1 class="article-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
+			<div class="meta">
+				<?php  
+					$category = get_the_category();
+			        if($category[0]){
+			            echo '<span id="mute-category" class="muted"><i class="fa fa-list-alt"></i><a href="'.get_category_link($category[0]->term_id ).'"> '.$category[0]->cat_name.'</a></span>';
+			        }
+				?>
+				<span class="muted"><i class="fa fa-user"></i> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>"><?php echo get_the_author() ?></a></span>
+				<time class="muted"><i class="fa fa-clock-o"></i> <?php echo timeago( get_gmt_from_date(get_the_time('Y-m-d G:i:s')) )?></time>
+				<span class="muted"><i class="fa fa-eye"></i> <?php deel_views('℃'); ?></span>
+				<?php if ( comments_open() ) echo '<span class="muted"><i class="fa fa-comments-o"></i> <a href="'.get_comments_link().'">'.get_comments_number('0', '1', '%').'评论</a></span>'; ?>
+				<?php edit_post_link('[编辑]'); ?>
+			</div>
+		</header>
+<?php if( dopt('d_adpost_01_b') ) echo '<div class="banner banner-post">'.dopt('d_adpost_01').'</div>'; ?>
+<?php if (wp_is_mobile() ): ?><?php if( dopt('Mobiled_adpost_01_b') ) echo '<div class="banner-post">'.dopt('Mobiled_adpost_01').'</div>'; ?><?php endif ;?>
+		<article class="article-content">
+			<?php //the_content(); ?>
+<?php replace_pic(get_the_content());?>
+<?php wp_link_pages(array('before' => '<div class="fenye">', 'after' => '', 'next_or_number' => 'next', 'previouspagelink' => '<span>上一页</span>', 'nextpagelink' => "")); ?>   <?php wp_link_pages(array('before' => '', 'after' => '', 'next_or_number' => 'number', 'link_before' =>'<span>', 'link_after'=>'</span>')); ?>   <?php wp_link_pages(array('before' => '', 'after' => '</div>', 'next_or_number' => 'next', 'previouspagelink' => '', 'nextpagelink' => "<span>下一页</span>")); ?>
+
+<div class="article-social">
+			<a href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" id="Addlike" class="action<?php if(isset($_COOKIE['bigfa_ding_'.$post->ID])) echo ' actived';?>"><i class="fa fa-heart-o"></i>喜欢 (<span class="count"><?php if( get_post_meta($post->ID,'bigfa_ding',true) ){ echo get_post_meta($post->ID,'bigfa_ding',true); } else {echo '0';}?></span>)</a><?php if( dopt('d_bdshare_b') ) echo'<span class="or">or</span>';  deel_share(); ?>	
+</div>
+	</article>	
+		<?php endwhile;  ?>
+		<footer class="article-footer">
+			<?php the_tags('<div class="article-tags"><i class="fa fa-tags"></i>','','</div>'); ?>
+</footer>
+	<nav class="article-nav">
+			<span class="article-nav-prev"><?php previous_post_link('<i class="fa fa-angle-double-left"></i> %link'); ?></span>
+			<span class="article-nav-next"><?php next_post_link('%link  <i class="fa fa-angle-double-right"></i>'); ?></span>
+		</nav>
+
+		<div class="related_top">
+			<?php include( 'modules/related.php' ); ?>
+		</div>
+		<?php if (wp_is_mobile() ): ?><?php if( dopt('Mobiled_adpost_02_b') )echo '<div id="comment-ad" class="banner-related">'.dopt('Mobiled_adpost_02').'</div>'; ?><?php endif ;?>
+		<?php if( dopt('d_adpost_02_b') ) echo '<div id="comment-ad" class="banner banner-related">'.dopt('d_adpost_02').'</div>'; ?>
+		<?php comments_template('', true); ?>
+		<?php if( dopt('d_adpost_03_b') ) echo '<div class="banner banner-comment">'.dopt('d_adpost_03').'</div>'; ?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

+ 53 - 0
single.php.bak

@@ -0,0 +1,53 @@
+<?php get_header(); ?>
+<div class="content-wrap">
+	<div class="content">
+<?php if( dopt('d_singleMenu_b') ) echo '<div class="breadcrumbs">'.deel_breadcrumbs().'</div>'; ?>
+
+		<?php while (have_posts()) : the_post(); ?>
+		<header class="article-header">
+			<h1 class="article-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
+			<div class="meta">
+				<?php  
+					$category = get_the_category();
+			        if($category[0]){
+			            echo '<span id="mute-category" class="muted"><i class="fa fa-list-alt"></i><a href="'.get_category_link($category[0]->term_id ).'"> '.$category[0]->cat_name.'</a></span>';
+			        }
+				?>
+				<span class="muted"><i class="fa fa-user"></i> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>"><?php echo get_the_author() ?></a></span>
+				<time class="muted"><i class="fa fa-clock-o"></i> <?php echo timeago( get_gmt_from_date(get_the_time('Y-m-d G:i:s')) )?></time>
+				<span class="muted"><i class="fa fa-eye"></i> <?php deel_views('℃'); ?></span>
+				<?php if ( comments_open() ) echo '<span class="muted"><i class="fa fa-comments-o"></i> <a href="'.get_comments_link().'">'.get_comments_number('0', '1', '%').'评论</a></span>'; ?>
+				<?php edit_post_link('[编辑]'); ?>
+			</div>
+		</header>
+<?php if( dopt('d_adpost_01_b') ) echo '<div class="banner banner-post">'.dopt('d_adpost_01').'</div>'; ?>
+<?php if (wp_is_mobile() ): ?><?php if( dopt('Mobiled_adpost_01_b') ) echo '<div class="banner-post">'.dopt('Mobiled_adpost_01').'</div>'; ?><?php endif ;?>
+		<article class="article-content">
+			<?php the_content(); ?>
+
+
+<?php wp_link_pages(array('before' => '<div class="fenye">', 'after' => '', 'next_or_number' => 'next', 'previouspagelink' => '<span>上一页</span>', 'nextpagelink' => "")); ?>   <?php wp_link_pages(array('before' => '', 'after' => '', 'next_or_number' => 'number', 'link_before' =>'<span>', 'link_after'=>'</span>')); ?>   <?php wp_link_pages(array('before' => '', 'after' => '</div>', 'next_or_number' => 'next', 'previouspagelink' => '', 'nextpagelink' => "<span>下一页</span>")); ?>
+
+<div class="article-social">
+			<a href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" id="Addlike" class="action<?php if(isset($_COOKIE['bigfa_ding_'.$post->ID])) echo ' actived';?>"><i class="fa fa-heart-o"></i>喜欢 (<span class="count"><?php if( get_post_meta($post->ID,'bigfa_ding',true) ){ echo get_post_meta($post->ID,'bigfa_ding',true); } else {echo '0';}?></span>)</a><?php if( dopt('d_bdshare_b') ) echo'<span class="or">or</span>';  deel_share(); ?>	
+</div>
+	</article>	
+		<?php endwhile;  ?>
+		<footer class="article-footer">
+			<?php the_tags('<div class="article-tags"><i class="fa fa-tags"></i>','','</div>'); ?>
+</footer>
+	<nav class="article-nav">
+			<span class="article-nav-prev"><?php previous_post_link('<i class="fa fa-angle-double-left"></i> %link'); ?></span>
+			<span class="article-nav-next"><?php next_post_link('%link  <i class="fa fa-angle-double-right"></i>'); ?></span>
+		</nav>
+
+		<div class="related_top">
+			<?php include( 'modules/related.php' ); ?>
+		</div>
+		<?php if (wp_is_mobile() ): ?><?php if( dopt('Mobiled_adpost_02_b') )echo '<div id="comment-ad" class="banner-related">'.dopt('Mobiled_adpost_02').'</div>'; ?><?php endif ;?>
+		<?php if( dopt('d_adpost_02_b') ) echo '<div id="comment-ad" class="banner banner-related">'.dopt('d_adpost_02').'</div>'; ?>
+		<?php comments_template('', true); ?>
+		<?php if( dopt('d_adpost_03_b') ) echo '<div class="banner banner-comment">'.dopt('d_adpost_03').'</div>'; ?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

Разница между файлами не показана из-за своего большого размера
+ 31 - 0
style.css


+ 10 - 0
tag.php

@@ -0,0 +1,10 @@
+<?php get_header(); ?>
+<div class="content-wrap">
+	<div class="content">
+		<header class="archive-header"> 
+			<h1>标签:<?php echo single_tag_title(); ?></h1>
+		</header>
+		<?php include( 'modules/excerpt.php' ); ?>
+	</div>
+</div>
+<?php get_sidebar(); get_footer(); ?>

Разница между файлами не показана из-за своего большого размера
+ 1266 - 0
timthumb.php


+ 18 - 0
widgets/index.php

@@ -0,0 +1,18 @@
+<?php  
+
+include('wid-banner.php');
+include('wid-readers.php');
+include('wid-postlist.php');
+include('wid-comment.php');
+include('wid-tags.php');
+include('wid-textbanner.php');
+include('wid-subscribe.php');
+add_action('widgets_init','unregister_d_widget');
+function unregister_d_widget(){
+    unregister_widget('WP_Widget_Search');
+    unregister_widget('WP_Widget_Recent_Comments');
+    unregister_widget('WP_Widget_Tag_Cloud');
+    unregister_widget('WP_Nav_Menu_Widget');
+}
+
+?>

+ 43 - 0
widgets/wid-banner.php

@@ -0,0 +1,43 @@
+<?php  
+add_action( 'widgets_init', 'd_banners' );
+
+function d_banners() {
+	register_widget( 'd_banner' );
+}
+
+class d_banner extends WP_Widget {
+	function d_banner() {
+		$widget_ops = array( 'classname' => 'd_banner', 'description' => '显示一个广告(包括富媒体)' );
+		$this->WP_Widget( 'd_banner', 'Yusi-广告', $widget_ops, $control_ops );
+	}
+
+	function widget( $args, $instance ) {
+		extract( $args );
+
+		$title = apply_filters('widget_name', $instance['title']);
+		$code = $instance['code'];
+
+		echo $before_widget;
+		echo '<div class="d_banner_inner">'.$code.'</div>';
+		echo $after_widget;
+	}
+
+	function form($instance) {
+?>
+		<p>
+			<label>
+				广告名称:
+				<input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $instance['title']; ?>" class="widefat" />
+			</label>
+		</p>
+		<p>
+			<label>
+				广告代码:
+				<textarea id="<?php echo $this->get_field_id('code'); ?>" name="<?php echo $this->get_field_name('code'); ?>" class="widefat" rows="12" style="font-family:Courier New;"><?php echo $instance['code']; ?></textarea>
+			</label>
+		</p>
+<?php
+	}
+}
+
+?>

Разница между файлами не показана из-за своего большого размера
+ 90 - 0
widgets/wid-comment.php


+ 108 - 0
widgets/wid-postlist.php

@@ -0,0 +1,108 @@
+<?php
+add_action( 'widgets_init', 'd_postlists' );
+
+function d_postlists() {
+	register_widget( 'd_postlist' );
+}
+
+class d_postlist extends WP_Widget {
+	function d_postlist() {
+		$widget_ops = array( 'classname' => 'd_postlist', 'description' => '图文展示(最新文章+热门文章+随机文章)' );
+		$this->WP_Widget( 'd_postlist', 'Yusi-聚合文章', $widget_ops, $control_ops );
+	}
+
+	function widget( $args, $instance ) {
+		extract( $args );
+
+		$title        = apply_filters('widget_name', $instance['title']);
+		$limit        = $instance['limit'];
+		$cat          = $instance['cat'];
+		$orderby      = $instance['orderby'];
+		$more = $instance['more'];
+		$link = $instance['link'];
+		$img = $instance['img'];
+
+		$mo='';
+		$style='';
+		if( $more!='' && $link!='' ) $mo='<a class="btn" href="'.$link.'">'.$more.'</a>';
+		if( !$img ) $style = ' class="nopic"';
+		echo $before_widget;
+		echo $before_title.$mo.$title.$after_title; 
+		echo '<ul'.$style.'>';
+		echo dtheme_posts_list( $orderby,$limit,$cat,$img );
+		echo '</ul>';
+		echo $after_widget;
+	}
+
+	function form( $instance ) {
+?>
+		<p>
+			<label>
+				标题:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $instance['title']; ?>" />
+			</label>
+		</p>
+		<p>
+			<label>
+				排序:
+				<select style="width:100%;" id="<?php echo $this->get_field_id('orderby'); ?>" name="<?php echo $this->get_field_name('orderby'); ?>" style="width:100%;">
+					<option value="comment_count" <?php selected('comment_count', $instance['orderby']); ?>>评论数</option>
+					<option value="date" <?php selected('date', $instance['orderby']); ?>>发布时间</option>
+					<option value="rand" <?php selected('rand', $instance['orderby']); ?>>随机</option>
+				</select>
+			</label>
+		</p>
+		<p>
+			<label>
+				分类限制:
+				<a style="font-weight:bold;color:#f60;text-decoration:none;" href="javascript:;" title="格式:1,2 &nbsp;表限制ID为1,2分类的文章&#13;格式:-1,-2 &nbsp;表排除分类ID为1,2的文章&#13;也可直接写1或者-1;注意逗号须是英文的">?</a>
+				<input style="width:100%;" id="<?php echo $this->get_field_id('cat'); ?>" name="<?php echo $this->get_field_name('cat'); ?>" type="text" value="<?php echo $instance['cat']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				显示数目:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="number" value="<?php echo $instance['limit']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				More 显示文字:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('more'); ?>" name="<?php echo $this->get_field_name('more'); ?>" type="text" value="<?php echo $instance['more']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				More 链接:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('link'); ?>" name="<?php echo $this->get_field_name('link'); ?>" type="url" value="<?php echo $instance['link']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				<input style="vertical-align:-3px;margin-right:4px;" class="checkbox" type="checkbox" <?php checked( $instance['img'], 'on' ); ?> id="<?php echo $this->get_field_id('img'); ?>" name="<?php echo $this->get_field_name('img'); ?>">显示图片
+			</label>
+		</p>
+		
+	<?php
+	}
+}
+
+
+function dtheme_posts_list($orderby,$limit,$cat,$img) {
+	$args = array(
+		'order'            => DESC,
+		'cat'              => $cat,
+		'orderby'          => $orderby,
+		'showposts'        => $limit,
+		'caller_get_posts' => 1
+	);
+	query_posts($args);
+	while (have_posts()) : the_post(); 
+?>
+<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php if( $img ){echo '<span class="thumbnail">';echo '<img src="'.get_bloginfo("template_url").'/timthumb.php?src=';echo post_thumbnail_src();echo '&h=64&w=100&q=90&zc=1&ct=1" alt="'.get_the_title().'" /></span>'; }else{$img = '';} ?><span class="text"><?php the_title(); ?></span><span class="muted"><?php the_time('Y-m-d');?></span><span class="muted"><?php comments_number('', '1评论', '%评论'); ?></span></a></li>
+<?php
+	
+    endwhile; wp_reset_query();
+}
+
+?>

+ 108 - 0
widgets/wid-postlist.php.bak

@@ -0,0 +1,108 @@
+<?php
+add_action( 'widgets_init', 'd_postlists' );
+
+function d_postlists() {
+	register_widget( 'd_postlist' );
+}
+
+class d_postlist extends WP_Widget {
+	function d_postlist() {
+		$widget_ops = array( 'classname' => 'd_postlist', 'description' => '图文展示(最新文章+热门文章+随机文章)' );
+		$this->WP_Widget( 'd_postlist', 'Yusi-聚合文章', $widget_ops, $control_ops );
+	}
+
+	function widget( $args, $instance ) {
+		extract( $args );
+
+		$title        = apply_filters('widget_name', $instance['title']);
+		$limit        = $instance['limit'];
+		$cat          = $instance['cat'];
+		$orderby      = $instance['orderby'];
+		$more = $instance['more'];
+		$link = $instance['link'];
+		$img = $instance['img'];
+
+		$mo='';
+		$style='';
+		if( $more!='' && $link!='' ) $mo='<a class="btn" href="'.$link.'">'.$more.'</a>';
+		if( !$img ) $style = ' class="nopic"';
+		echo $before_widget;
+		echo $before_title.$mo.$title.$after_title; 
+		echo '<ul'.$style.'>';
+		echo dtheme_posts_list( $orderby,$limit,$cat,$img );
+		echo '</ul>';
+		echo $after_widget;
+	}
+
+	function form( $instance ) {
+?>
+		<p>
+			<label>
+				标题:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $instance['title']; ?>" />
+			</label>
+		</p>
+		<p>
+			<label>
+				排序:
+				<select style="width:100%;" id="<?php echo $this->get_field_id('orderby'); ?>" name="<?php echo $this->get_field_name('orderby'); ?>" style="width:100%;">
+					<option value="comment_count" <?php selected('comment_count', $instance['orderby']); ?>>评论数</option>
+					<option value="date" <?php selected('date', $instance['orderby']); ?>>发布时间</option>
+					<option value="rand" <?php selected('rand', $instance['orderby']); ?>>随机</option>
+				</select>
+			</label>
+		</p>
+		<p>
+			<label>
+				分类限制:
+				<a style="font-weight:bold;color:#f60;text-decoration:none;" href="javascript:;" title="格式:1,2 &nbsp;表限制ID为1,2分类的文章&#13;格式:-1,-2 &nbsp;表排除分类ID为1,2的文章&#13;也可直接写1或者-1;注意逗号须是英文的">?</a>
+				<input style="width:100%;" id="<?php echo $this->get_field_id('cat'); ?>" name="<?php echo $this->get_field_name('cat'); ?>" type="text" value="<?php echo $instance['cat']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				显示数目:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="number" value="<?php echo $instance['limit']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				More 显示文字:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('more'); ?>" name="<?php echo $this->get_field_name('more'); ?>" type="text" value="<?php echo $instance['more']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				More 链接:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('link'); ?>" name="<?php echo $this->get_field_name('link'); ?>" type="url" value="<?php echo $instance['link']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				<input style="vertical-align:-3px;margin-right:4px;" class="checkbox" type="checkbox" <?php checked( $instance['img'], 'on' ); ?> id="<?php echo $this->get_field_id('img'); ?>" name="<?php echo $this->get_field_name('img'); ?>">显示图片
+			</label>
+		</p>
+		
+	<?php
+	}
+}
+
+
+function dtheme_posts_list($orderby,$limit,$cat,$img) {
+	$args = array(
+		'order'            => DESC,
+		'cat'              => $cat,
+		'orderby'          => $orderby,
+		'showposts'        => $limit,
+		'caller_get_posts' => 1
+	);
+	query_posts($args);
+	while (have_posts()) : the_post(); 
+?>
+<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php if( $img ){echo '<span class="thumbnail">';echo '<img src="';echo post_thumbnail_src();echo '" alt="'.get_the_title().'" /></span>'; }else{$img = '';} ?><span class="text"><?php the_title(); ?></span><span class="muted"><?php the_time('Y-m-d');?></span><span class="muted"><?php comments_number('', '1评论', '%评论'); ?></span></a></li>
+<?php
+	
+    endwhile; wp_reset_query();
+}
+
+?>

+ 108 - 0
widgets/wid-readers.php

@@ -0,0 +1,108 @@
+<?php  
+add_action( 'widgets_init', 'd_readers' );
+
+function d_readers() {
+	register_widget( 'd_reader' );
+}
+
+class d_reader extends WP_Widget {
+	function d_reader() {
+		$widget_ops = array( 'classname' => 'd_reader', 'description' => '显示近期评论频繁的网友头像等' );
+		$this->WP_Widget( 'd_reader', 'Yusi-活跃读者', $widget_ops, $control_ops );
+	}
+
+	function widget( $args, $instance ) {
+		extract( $args );
+
+		$title = apply_filters('widget_name', $instance['title']);
+		$limit = $instance['limit'];
+		$outer = $instance['outer'];
+		$timer = $instance['timer'];
+		$addlink = $instance['addlink'];
+		$more = $instance['more'];
+		$link = $instance['link'];
+
+		$mo='';
+		if( $more!='' && $link!='' ) $mo='<a class="btn" href="'.$link.'">'.$more.'</a>';
+
+		echo $before_widget;
+		echo $before_title.$mo.$title.$after_title; 
+		echo '<ul>';
+		echo dtheme_readers( $out=$outer, $tim=$timer, $lim=$limit, $addlink );;
+		echo '</ul>';
+		echo $after_widget;
+	}
+	function form($instance) {
+
+?>
+		<p>
+			<label>
+				标题:
+				<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $instance['title']; ?>" />
+			</label>
+		</p>
+		<p>
+			<label>
+				显示数目:
+				<input class="widefat" id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="number" value="<?php echo $instance['limit']; ?>" />
+			</label>
+		</p>
+		<p>
+			<label>
+				排除某人:
+				<input class="widefat" id="<?php echo $this->get_field_id('outer'); ?>" name="<?php echo $this->get_field_name('outer'); ?>" type="text" value="<?php echo $instance['outer']; ?>" />
+			</label>
+		</p>
+		<p>
+			<label>
+				几天内:
+				<input class="widefat" id="<?php echo $this->get_field_id('timer'); ?>" name="<?php echo $this->get_field_name('timer'); ?>" type="number" value="<?php echo $instance['timer']; ?>" />
+			</label>
+		</p>
+		<p>
+			<label>
+				<input style="vertical-align:-3px;margin-right:4px;" class="checkbox" type="checkbox" <?php checked( $instance['addlink'], 'on' ); ?> id="<?php echo $this->get_field_id('addlink'); ?>" name="<?php echo $this->get_field_name('addlink'); ?>">加链接
+			</label>
+		</p>
+		<p>
+			<label>
+				More 显示文字:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('more'); ?>" name="<?php echo $this->get_field_name('more'); ?>" type="text" value="<?php echo $instance['more']; ?>" size="24" />
+			</label>
+		</p>
+		<p>
+			<label>
+				More 链接:
+				<input style="width:100%;" id="<?php echo $this->get_field_id('link'); ?>" name="<?php echo $this->get_field_name('link'); ?>" type="url" value="<?php echo $instance['link']; ?>" size="24" />
+			</label>
+		</p>
+
+<?php
+	}
+}
+
+/* 
+ * 读者墙
+ * dtheme_readers( $outer='name', $timer='3', $limit='14' );
+ * $outer 不显示某人
+ * $timer 几个月时间内
+ * $limit 显示条数
+*/
+function dtheme_readers($out,$tim,$lim,$addlink){
+	global $wpdb;
+	$counts = $wpdb->get_results("select count(comment_author) as cnt, comment_author, comment_author_url, comment_author_email from (select * from $wpdb->comments left outer join $wpdb->posts on ($wpdb->posts.id=$wpdb->comments.comment_post_id) where comment_date > date_sub( now(), interval $tim day ) and user_id='0' and comment_author != '".$out."' and post_password='' and comment_approved='1' and comment_type='') as tempcmt group by comment_author order by cnt desc limit $lim");
+	foreach ($counts as $count) {
+		$c_url = $count->comment_author_url;
+		if ($c_url == '') $c_url = 'javascript:;';
+
+		if($addlink == 'on'){
+			$c_urllink = ' href="'. $c_url . '"';
+		}else{
+			$c_urllink = '';
+		}
+		$type .= '<li><a title="['.$count->comment_author.'] 近期点评'. $count->cnt .'次" target="_blank"'.$c_urllink.'>'.get_avatar( $count->comment_author_email, $size = '48' , deel_avatar_default() ) .'</a></li>';
+	}
+	echo $type;
+}
+
+?>

+ 0 - 0
widgets/wid-subscribe.php


Некоторые файлы не были показаны из-за большого количества измененных файлов