wordpress-theme-BubbleDream-screenshot

wordpress-theme-BubbleDream-screenshot

/*
Theme Name: BubbleDream
Author: ZHAO Xudong
Theme URI: http://html5beta.com/wordpress/wordpress-theme-bubbleDream/
Author URI:http://html5beta.com
Description:a pure css theme without images at all and with a canvas bubbles animated background;
in a perfect world,there is no ie5,ie6,ie7, or ie8!!!do not work in ie5.6.7.8.!!!
Version: 1.0
Tags: black,blue,white,two-columns,fixed-width
License: GNU General Public License, v2 (or newer)
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

Will be avalaivable in a few days

找到如下代码

1
2
3
4
5
6
7
8
9
}).bind("blur.autocomplete", function (c) {
                if (!a.options.disabled) {
                    clearTimeout(a.searching);
                    a.closing = setTimeout(function () {
                        a.close(c);
                        a._change(c)
                    }, 150)
                }
            })

改为

1
2
3
4
5
6
7
8
9
10
11
}).bind("blur.autocomplete", function (c) {
                if (!a.options.disabled) {
                    clearTimeout(a.searching);
                    a.closing = setTimeout(function () {
                        a.close(c);
                        a._change(c)
                    }, 150)
                }
            }).bind('input',function (c) {
				a.search(a.item);
			})

这样,输入中文就会立刻搜索了。

TAGS

/*
Theme Name: MetroWP
Author: ZHAO Xudong
Theme URI: http://html5beta.com/wordpress/wordpress-theme-MetroWP/
Author URI:http://html5beta.com
Description:a pure css theme without images at all.Warning:ie6,7 user will see a different layout.
Version: 1.0
Tags: yellow,blue,green,two-columns,fixed-width
License: GNU General Public License, v2 (or newer)
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

screenshot

screenshot

DOWNLOAD

http://wordpress.org/extend/themes/metrowp/

TAGS

if you are a new wordpressER,you may not know how to Change logo of wordpress theme easyOne ,let me give you a little guild.

easyOne theme has a default logo :

leasyOne-logo

leasyOne-logo

it will show in tag page,achieve page and home page as default post image.
only if you did not set your own featured image.
you can click the “set featured image” button to set your own post image:

set-featured-image

set-featured-image

when after uploading a image ,at the bottom,there is a “set featured image” button too.

set-featured-image-2

set-featured-image-2

after you set your own featured image,it will replace default.like this:

use-my-own-logo

use-my-own-logo

and if you want repalce the default logo,upload you own logo.gif to theme/easyOne/images/,replace the default logo.gif.
it will work,and you better use same width and height image as default logo.gif which is 65PX × 65PX

wordpress-theme-cssfever

wordpress-theme-cssfever

/*
Theme Name: cssfever
Author: ZHAO Xudong
Theme URI: http://html5beta.com/wordpress/wordpress-theme-cssfever/
Author URI:http://html5beta.com
Description:a pure css theme without images at all.do not work in ie5.6.7.8.
Tags: black,blue,white,two-columns,fixed-width
License: GNU General Public License, v2 (or newer)
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
FAQ
1.how to turn off the hover show/hide post content funtion
—find these code in style.css and delete them

1
2
3
#content .hide {
	display: none;
}

—find these code in js/cssfever.js and delete them

1
2
3
4
5
6
7
    $('.show').hover(
        function(){
        $(this).find(".hide").show("normal");
        },
        function(){
        $(this).find(".hide").hide("normal");
        });

—done

DOWNLOAD

http://wordpress.org/extend/themes/cssfever

TAGS

Someone may not like the Paper3 theme’s hide/show feature, I will show you how to remove the hide/show feature of Paper3 theme.

1.Goto edit “theme/Paper3/js/Paper3.js”,find and delete the code below

1
2
3
4
5
6
7
    $('.show').hover(
        function(){
        $(this).find(".hide").show("normal");
        },
        function(){
        $(this).find(".hide").hide("normal");
        });

2.then goto edit “theme/Paper3/index.php”,find this

1
<div class="post-content hide fix">

delete “hide”.

3.All done.

TAGS

WP Simple Captcha

ABOUT WP Simple Captcha

lots of robot spam commenters,i really get rid of them,hope it will not cost much.so I write this little plugin to do the work,you can just add these lines of code into your theme’s function.php file ,put them before the last:

1
?>

it will just work.

these are the code you should put into your function.php:>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class zxdRoboCheck{
	function zxd_robokiller_fields($fields) {
		$rnum1 =rand(1,10);
		$rnum2 = rand(2,8);
		$rnum = $rnum1 + $rnum2;
		$fields['robo'] = '<p class="comment-form-robo"><label for="robo">'.$rnum1.'+'.$rnum2.'=?'.__('(robot check)').'</label> <span class="required">*</span><input id="robo" name="robo" type="text" value="" size="30" aria-required="true" /><input id="rnum" name="rnum" type="hidden" value="'.$rnum.'" size="0" aria-required="true" class="hide" /></p> ';
		return $fields;
	}
	function roboCheck($comment){
                $userId = get_current_user_id();
                if($userId!=0) return($comment);
		if (empty($_POST['robo']) || trim($_POST['robo']) == '' ) {
			wp_die( __('Error: you are not robot,are you?do the math,fill the blank '));
		}
		$robo_num1 = (int)$_POST['robo'];
		$robo_num2 = (int)$_POST['rnum'];
		if ( $robo_num2 == $robo_num1) {
			return($comment);
		} 
		else {
			wp_die( __('Error: you are not robot,are you?'));
		}
	}
}
if (class_exists("zxdRoboCheck")) {
  $aRoboCheck = new zxdRoboCheck();
  add_action('comment_form_default_fields', array(&$aRoboCheck, 'zxd_robokiller_fields'),1);
  add_filter('preprocess_comment', array(&$aRoboCheck, 'roboCheck'), 1);
}

FAQ

it is simple,so it is easy to crack,if spammers want.lets just hope they do not really have to deal with your site.

DOWNLOAD

http://wordpress.org/extend/plugins/wp-simple-captcha/

CHANGE LOG

1.1 fix login user can not comment bug.

ABOUT

Simply download WP ajax Collapsing Categories plugin from wordpress plugin panel and enable it is the easy way to add WP ajax Collapsing Categories widget.but not the best way.we can just add some code to theme’s function.php to make it work.i will explain the details here.

WALKTHROUGH

1.download WP ajax Collapsing Categories,unzip it,put “wp-ajax-collapsing-categories.js” into your theme folder
2.add these lines of code into your theme’s function.php (before the last “?>”)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/*a function to check if post_is_in_descendant_category ,which will work with */
/**
* a function to check if post_is_in_descendant_category
* @param $cats the category object to check
* @return true if post_is_in_descendant_category or false if not in
*/
    function zxd_post_is_in_descendant_category( $cats, $_post = null ){
		foreach ( (array) $cats as $cat ) {
			$descendants = get_term_children( (int) $cat, 'category');
			if ( $descendants && in_category( $descendants, $_post ) ) return true;
		}
		return false;
	}
	/**
	* get all top level categories
	* @return top level categories objects array
	*/
	function getTopLevelCats() {
		$allCats = get_all_category_ids();
		$cats = array();
		foreach ($allCats as $id){
			$obj = get_category($id);
			$name = get_cat_name($id);
			if (!$obj -> parent) array_push($cats,$obj);
		}
		return $cats;
	}
	/**
	* wp ajax collapsing categories class
	*/
	class ajax_cc_Widget extends WP_Widget{
		function ajax_cc_Widget() {
			$widget_ops = array('classname' => 'widget_ajax_cc', 'description' => 'WP ajax Collapsing Categories' );
			$this->WP_Widget('ajax_cc_widget','ajax_cc_widget',$widget_ops);
		}
		/**
		* implent widget fucntion
		*/
		function widget($args, $instance) {
			extract($args, EXTR_SKIP);
			echo $before_widget;
			$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
			if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
			echo '<ul class="zxd_ajax_cc"' ;
			echo ' zid="';
			the_ID();
			echo '">';
			if(!$instance['zxdIncludeCats']) {
				$zxdCatArrayPool = getTopLevelCats();
			}
			else {
				$zxdCatArrayPool = array();
				$zxdCatTempPool = preg_split('/[,]+/',$instance['zxdIncludeCats']);
				sort($zxdCatTempPool);
				foreach($zxdCatTempPool as $a) {
					if(!get_category_by_slug($a)) {
						$zxdCatArrayPool = getTopLevelCats();
						break;
					}
					$obj = get_category_by_slug($a);
					array_push($zxdCatArrayPool,$obj);
				}
			}
			$zxdPostId = is_single()?get_the_ID():0;
			foreach ($zxdCatArrayPool as $zxdCatObj){
				$zxdCatid = $zxdCatObj -> term_id;
				$zxdCatdesc = $zxdCatObj->description;
				$zxdCatCount = $zxdCatObj->count; 
				echo '<li class="zxd_ajax_cc_li"><span class="zxd_expand">[+]</span>'.'<a '; 
				if(in_category( $zxdCatid,$zxdPostId)||zxd_post_is_in_descendant_category($zxdCatid,$zxdPostId)) {
					echo 'class="zxd_current_cat" '; 
				}
				echo 'href="'.get_category_link($zxdCatid).'" '.'title="'.$zxdCatdesc.'">'.get_cat_name( $zxdCatid ).'</a>'.'('.$zxdCatCount.')'.'</li>';
			}
			echo '</ul>' ;
			echo $after_widget;
		}
		/**
		* implent widget fucntion
		*/
		function update($new_instance, $old_instance) {
			$instance = $old_instance;
			$title = strip_tags($new_instance['title']);
			$zxdIncludeCats=$new_instance['zxdIncludeCats'];
			$instance = compact('title','zxdIncludeCats');
			return $instance;
		}
		/**
		* implent widget fucntion
		*/
		function form($instance) {
			$defaults=array(
			'title' => __('ajax Categories', 'WP ajax collapsing categories'),
			'zxdIncludeCats' => '',
			);
			$options = wp_parse_args( $instance,$defaults );
			extract($options);  
			?>
            <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this-/>get_field_id('title'); ?>" name="< ?php echo $this->get_field_name('title'); ?>" type="text" value="< ?php echo esc_attr($title); ?>" /></label></p>
            <p>include these categories (category slugs,separated by commas): </p>
            <p><input type="text" name="<?php echo $this-/>get_field_name('zxdIncludeCats'); ?>" value="< ?php echo $zxdIncludeCats ?>" id="< ?php echo $this->get_field_id('zxdIncludeCats') ?>" </p>
			< ?php
        }
    }
	/**
	* register_widget
	*/
	function zxd_widgets_init() {
		register_widget('ajax_cc_Widget');
	}
	add_action( 'widgets_init', 'zxd_widgets_init' );
	if ( !is_admin() ) {
		function zxd_init_method() {
			wp_register_script( 'wp-ajax-collapsing-categories', get_template_directory_uri().'/wp-ajax-collapsing-categories.js',array('jquery'),'1.0',true);
			wp_enqueue_script( 'wp-ajax-collapsing-categories');
			wp_localize_script( 'wp-ajax-collapsing-categories', 'ajaxCC', array( 'ajaxurl' => admin_url( 'admin-ajax.php' )) );
		}
		add_action('init', 'zxd_init_method');
	}
	add_action( 'wp_ajax_nopriv_zxd_cc_submit', 'zxd_cc_submit' );
	add_action( 'wp_ajax_zxd_cc_submit', 'zxd_cc_submit');
	function zxd_cc_submit(){
	    $zxdCatUrl = $_POST['catZxd'];
		$zxdCurrentPostID =  (int)$_POST['currentID'];
		$items1 = explode('/',$zxdCatUrl);
		$zxdCatSlug =  $items1[count($items1)-1]?$items1[count($items1)-1]:$items1[count($items1)-2];
		$items2 = explode('=',$zxdCatSlug);
		if($items2[0] == '?cat') $zxdCatId = (int)$items2[1];
		else{
			$zxdCatObj = get_category_by_slug($zxdCatSlug);
			$zxdCatId = $zxdCatObj->term_id;
		}
		$zxdArgs = array(
		'parent'                   => $zxdCatId,
		'orderby'                  => 'slug',
		'order'                    => 'ASC',
		'hide_empty'               => 1,
		);
		$zxdChildCats = get_categories( $zxdArgs );
		echo '<ul class="child_cat hide">' ;
		if(!empty($zxdChildCats)){
			$zxdChildCatsIdArray =array();
			foreach($zxdChildCats as $zxdtemp1){
				array_push($zxdChildCatsIdArray, $zxdtemp1->term_id);
			}
		$zxdArgs2 = array(
		'post_type' => 'post',
		'category__in'  => array($zxdCatId),
		'category__not_in' => $zxdChildCatsIdArray,
		);
		foreach ($zxdChildCats as $zxdEachCatChild){
			$zxdCatChildId =  $zxdEachCatChild ->term_id;
			$zxdCatChildDesc = $zxdEachCatChild->description;
			$zxdCatChildCount = $zxdEachCatChild->count;
			if ( in_category( $zxdCatChildId,$zxdCurrentPostID )||zxd_post_is_in_descendant_category( $zxdCatChildId,$zxdCurrentPostID )) {
				echo '<li class="zxd_ajax_cc_li"><span class="zxd_expand">[+]</span>'.'<a class="zxd_current_cat" href="'.get_category_link($zxdCatChildId).'" '.'title="'.$zxdCatChildDesc.'">'.get_cat_name( $zxdCatChildId ).'</a>'.'('.$zxdCatChildCount.')'.'</li>';
			}
			else{
				echo '<li class="zxd_ajax_cc_li"><span class="zxd_expand">[+]</span>'.'<a href="'.get_category_link($zxdCatChildId).'" '.'title="'.$zxdCatChildDesc.'">'.get_cat_name( $zxdCatChildId ).'</a>'.'('.$zxdCatChildCount.')'.'</li>';
			}
		};
	}
	else{
		$zxdArgs2 = array(
		'post_type' => 'post',
		'category__in'  => array($zxdCatId),
		);
	};
	$zxdQuery = new WP_Query($zxdArgs2);
	if($zxdQuery->have_posts()){
		while ($zxdQuery->have_posts()) {
		    $zxdQuery->the_post();
			echo '<li class="zxd_ajax_cc_li"><a';
			if  ($zxdQuery->post->ID==$zxdCurrentPostID) echo ' class="zxd_current_cat"';
			echo ' href="';
			echo the_permalink();
			echo '" rel="bookmark" title="';
			echo  the_title_attribute();
			echo '">';
			echo  the_title();
			echo '</a></li>';
		}
	}
	echo '</ul>' ;
	exit;
}

3.done,it should work now.without enable a plugin.
4.if your theme already has a javascript loaded,you can just skip the step1,do step2,then find these lines:

1
2
3
			wp_register_script( 'wp-ajax-collapsing-categories', get_template_directory_uri().'/wp-ajax-collapsing-categories.js',array('jquery'),'1.0',true);
			wp_enqueue_script( 'wp-ajax-collapsing-categories');
			wp_localize_script( 'wp-ajax-collapsing-categories', 'ajaxCC', array( 'ajaxurl' =&gt; admin_url( 'admin-ajax.php' )) );

,replace these lines with this one line(replace 'yourloadedjsfilename' with your js file's realname)

1
wp_localize_script( 'yourloadedjsfilename', 'ajaxCC', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' )) );

then,put these lines in your loaded js file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
+----------------------------------------------------------------+
|																							|
|	WordPress  Plugin: WP ajax collapsing categories										|
|	Copyright (c) 2011 ZHAO Xudong									|
|																							|
|	File Written By:																	|
|	- ZHAO Xudong														|
|	- http://html5beta.com														|
|																							|
|	File Information:																	|
|	- WP ajax collapsing categories Javascript File													|
|	- wp-content/plugins/wp-ajax-collapsing-categories/wp-ajax-collapsing-categories.js	 	|
|																							|
+----------------------------------------------------------------+
*/
jQuery( function($) {
	var zxdExpander = function() {
		var zxdExpand =$(this);
		var exp ='[—]';
		var exp2 = '[+]';
		if(zxdExpand.html() ==exp){
			zxdExpand.parent('.zxd_ajax_cc_li').children('ul').hide("normal");
			zxdExpand.html(exp2);
		}
		else{
			zxdExpand.html(exp);
			var zxdExpandChild =  zxdExpand.parent('.zxd_ajax_cc_li').children('.child_cat');
			if(zxdExpandChild.length>0) zxdExpandChild.show("normal");
			else{
				var zxdIdDiv = $('.zxd_ajax_cc').eq(0).attr("zid");
				var zxdID =zxdIdDiv?zxdIdDiv:0;
				var zxdCatLink = zxdExpand.parent('.zxd_ajax_cc_li').children('a').attr("href");
				$.ajax({
					type: 'POST',
					url:ajaxCC.ajaxurl,
					data: {
						action : 'zxd_cc_submit',
						catZxd: zxdCatLink,
						currentID:zxdID
					},
					success:function(data) {
						zxdExpand.parent('.zxd_ajax_cc_li').append(data).children('.child_cat').show("normal");
					} ,
					dataType:"html"
				});
			}
		}
	};
	$(".zxd_expand").live ('click',zxdExpander);
})

Ubuntu安装dropbox

应用proxychains和sshcenter免费ssh。我在Ubuntu 10.10自己试的,安装dropbox成功
1.到sshcenter.info注册免费24小时的ssh,到邮箱激活
2.下载dropbox 安装文件安装
3.安装proxychains,

1
sudo apt-get install proxychains

4,设置proxychains

1
2
sudo chmod a+w /etc/proxychains.conf
gedit  /etc/proxychains.conf

添加如下设置

1
2
dynamic_chain
socks5 	127.0.0.1 7070

5.开启ssh隧道,用到申请的sshcenter的用户名和密码

1
ssh -D 7070 yourusername@ssh.sshcenter.info

连接后会提示输入密码
6,另开一终端

1
proxychains dropbox start -i

然后就会成功下载了

TAGS

=== WP ajax Collapsing Categories ===

set the title and categories you want to show

screenshot-1

screenshot-1

click “[+]” to expand the category,to show child categories links and posts links in this category

screenshot-2

screenshot-2

Contributors: ZHAO Xudong
Donate link: http://html5beta.com
Plugin URI: http://html5beta.com/wordpress/wp-ajax-collapsing-categories/
Tags: categories, sidebar, widget
Requires at least: 2.8
Tested up to: 3.10
Stable tag: 1.0

== Description ==

This plugin uses jQuery to expand or collapsable the set of posts for each category,
uses ajax to get the expandable content from server.

== Note ==


0.WHY i do this.

in my work,i need a widget like this,so l learned to write it.
and i fully tested it in my site,it works fine.
since i am newbie,so there might be some bug or problem i do not know,
i appreciate it if you let me know.

1.About the Current Post

if the current post is in the category,the category link will has a “zxd_current_cat” class,
i certainly can add the css file in this little plugin,but i will not,because it is ugly.
you can customize it in your theme css file,like

1
2
3
4
#sidebar .zxd_current_cat{
font-weight:bold;
color:#08c
}

2.Suggestion

more clean way to use this widget is set it in your theme’s function.php.

3.download

http://wordpress.org/extend/plugins/wp-ajax-collapsing-categories/
4.set up WP ajax Collapsing Categories widget in function.php
http://html5beta.com/wordpress/set-up-wp-ajax-collapsing-categories-widget-in-function-php/

TAGS
第 1 页,共 2 页12