Archive

Archive for the ‘wordpress’ Category

install firewatir on ubuntu 10.04

July 12th, 2010 Comments off

I am a newbie with ubuntu, I tried and failed several times to install firewatir on ubuntu 10.04, and finally got following codes by google:

sudo su
apt-get install build-essential
apt-get install ruby rdoc libopenssl-ruby
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar zxvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
ruby setup.rb
ln -s /usr/bin/gem1.8 /usr/local/bin/gem
gem install firewatir

Frankly I did not understand the function of the first 2 apt-get, I just copy it for free.

Categories: wordpress Tags:

$ Try to use backtrack $

October 22nd, 2008 No comments

This article is try to use backtrack, I copy a trackback url in the options of this post, and then go to the trackback url to see whether my trackback displayed there.

These days a lot of blogs stop this function, spam may be the reason.

Categories: wordpress Tags: ,

$ add adsense under each wordpress post by hand code $

October 12th, 2008 No comments

Sometimes I dont like to use plugin to add adsense in the blog, so I tried to add it by hand code, following is an example for add adsense under each post:

Go to the file of single.php in the theme fold, read and find the code for displaying the content, the <div class=”storycontent”> should be the code to display the content, and the <div class=”meta”> should be the code to show the post meta, so just add the script under the the post meta, I use the <hr> to isolate adsense for clearance.

<div class=”storycontent”>
<?php the_content(__(‘(more…)’)); ?>
</div><!– end storycontent –>

<div class=”meta”>

Written by <?php the_author() ?><?php _e(” in:”); ?> <?php the_category(‘,’) ?> | <?php the_tags(__(‘Tags: ‘), ‘, ‘, ‘ ‘); ?><?php edit_post_link(__(‘Edit This’)); ?>
<?php wp_link_pages(); ?><br />

</div><!– end meta –>

<hr>
******paste google adsense script here*************
<hr>

Related Blogs

$ Disable WordPress Auto-Saving and Revisions $

October 10th, 2008 No comments

Disable WordPress Auto-Saving
Open the WordPress Config File:

/wp-config.php

And add following code after the first set of functions :

define( ‘AUTOSAVE_INTERVAL’, 600 );

By Default this value is set to 60 (seconds), 600 equals 1 Hour,you can go higher, but i figure 1 hour is good for me.

Disable WordPress Revisions
Open the WordPress Config File:

/wp-config.php

And and following code after the first set of functions:

define( ‘WP_POST_REVISIONS’, 0 );

By Default this value is On (1), turn it off by setting it to Off (0) ( Zero ).

Related Blogs

Categories: wordpress Tags:

Change the amount of posts displayed at wordpress manage page

September 13th, 2008 No comments

only 15 posts will be displayed by default when try to manage posts at wordpress, sometimes there is a need to see more posts for bulk modification, following is a way:

go to the post.php in the folder of wp-admin/includes, and find the code:

wp(“post_type=post&what_to_show=posts$post_status_q&posts_per_page=15

&order=$order&orderby=$orderby”);

change the 15 to the desired number in posts_per_page=15.

Categories: wordpress Tags:

The code for the image link of wordpress

August 23rd, 2008 No comments

the code for the image link of wordpress:
<img src=”http://www.zzz.cn/111.png” />

Categories: wordpress Tags: ,