spacer

WordPress theme:BubbleDream

in html5, wordpress , by ZHAO Xudong
spacer

wordpress-theme-BubbleDream-screenshot

/*
Theme Name: BubbleDream
Author: ZHAO Xudong
Theme URI: html5beta.com/wordpress/wordpress-theme-bubbleDream/
Author URI: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: www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

Will be avalaivable in a few days

BubbleDream • theme • wordpress
TAGS
1 Comments
Leave a respond
22
2012,Jan
No Thumb

jQuery UI Autocomplete 1.8.16中文输入修正

in jquery , by ZHAO Xudong

找到如下代码

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);
			})

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

Autocomplete • jQuery • 中文
TAGS
0 Comments
Leave a respond
12
2011,Oct
spacer

wordpress theme: MetroWP

in wordpress , by ZHAO Xudong

/*
Theme Name: MetroWP
Author: ZHAO Xudong
Theme URI: html5beta.com/wordpress/wordpress-theme-MetroWP/
Author URI: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: www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

spacer

screenshot

DOWNLOAD

wordpress.org/extend/themes/metrowp/

MetroWP • theme • wordpress
TAGS
27 Comments
Leave a respond
5
2011,Jul
spacer

Change logo of wordpress theme easyOne

in wordpress , by ZHAO Xudong

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 :

spacer

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:

spacer

set-featured-image

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

spacer

set-featured-image-2

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

spacer

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

easyOne • featrued image • theme • wordpress
TAGS
0 Comments
Leave a respond
28
2011,Apr
spacer

WordPress theme:cssfever

in wordpress , by ZHAO Xudong
spacer

wordpress-theme-cssfever

/*
Theme Name: cssfever
Author: ZHAO Xudong
Theme URI: html5beta.com/wordpress/wordpress-theme-cssfever/
Author URI: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: 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

wordpress.org/extend/themes/cssfever

cssfever • theme • wordpress
TAGS
1 Comments
Leave a respond
16
2011,Apr
No Thumb

Remove the hide/show feature of Paper3 theme

in wordpress , by ZHAO Xudong

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.

hide/show • Paper3
TAGS
1 Comments
Leave a respond
12
2011,Apr
No Thumb

WP Simple Captcha

in wordpress , by ZHAO Xudong

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

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

CHANGE LOG

1.1 fix login user can not comment bug.

captcha • wordpress • WP Simple Captcha
TAGS
1 Comments
Leave a respond
17
2011,Mar
No Thumb

set up WP ajax Collapsing Categories widget in function.php

in wordpress , by ZHAO Xudong

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 'class="'.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( 'aj


gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.