Archive for the ‘Wordpress’ Category

Upgrading TwitterPress to support Microformats

Tuesday, December 25th, 2007

I am making a small improvement on TwitterPress to make it support Microformats hCard.

I tested with the Operator toolbar and Microformats bookmarklet, it looks good:

image

image

I will release an upgraded version of TwitterPress later.  Sorry, I was too busy to upgrade TwitterPress, so it was still remain on preview version 0.1 :(

Popularity: 12% [?]

Upgrade WPMU to version 1.3

Tuesday, December 25th, 2007

I just upgraded my WPMU from previous 1.2.x to the current 1.3, so far so good, seemed everything is smooth.

Here is the steps I followed:

1. Backup MySQL Database.  I finally didn’t use the backup data after all since no problem on the upgrade.

2. Decompress the WPMU in a new directory.  I didn’t touch the old version, so just in case anything went wrong, I can quickly switch it back.

3. Copy  wp-config.php and .htaccess from old installation to new one.  Copy wp-content directory from old installation. (Notice that old files appeared in wp-content/mu-plugins directory will not required in new version since they have been moved to other place, only copy the plugins you installed in that directory. )

4. Switch apache’s virtual host setting and point to new directory.

5. The new installation should already work now, login to the management interface, run “site admin/upgrade”, then check if any plugin compatible problem.

I have no problem to upgrade after all.

Popularity: 9% [?]

TwitterPress 0.1 preview version ready to download!

Friday, July 27th, 2007

TwitterPress is a wordpress plugin which mashup Twitter and your Wordpress blog. TwitterPress was inspired by AlexKing’s Twitter Tools.

 This is a 0.1 preview version, I was suposed to implement more features and enable more options inside it, however some plan changed and I suddenly become very busy these days.(Life is random, isn’t it?) So I have to release this preview version out just in case I was sucked in some works so TwitterPress may be delaied too long.

Features:

TwitterPress 0.1 have following features:

  • Display your twitter friends on your blog, like any other Social Network did
  • Display your friends (on twitters)’s latest update, so you and your reader can easily discover some topics inside your friends network
  • Automatically send twitter when you post new blogs, so your friends will get notified and come to read

I plan to add more in the near future:

  • More widgets, so you have more flexibilities to add twitter friends, latest updates on your blog
  • Lightbox style display of twitter friends on the blog
  • Friend of friends browser in Ajax
  • Add twitter friends directly from blog
  • Integrate twitter account with blog comment users
  • and more…

How it look like:

image

This is a screen shot from my Chinese blog, I put TwitterPress in my right side bar. (see the red arrow pointed part)

How to install:

  • Download TwitterPress (current version 0.1 preview)
  • Decompress into your wordpress’s “wp-content/plugins” directory, make sure the “cache’ directory inside ‘TwitterPress’ directory is writable by your web server (simplest way is set to 777 or ‘a+w’)
    • unzip TwitterPress-x.x.zip
    • chmod 777 TwitterPress/cache
  • In your wordpress admin page’s “plugins” tab, activate TwitterPress plugin
  • Then you will have a new Option tab named “TwitterPress”, setup your Twitter account there
  • Navigate to wordpress admin’s “presentation/widgets” tab, and you will find a “Twitter Press” widget ready to use, drag it to your sidebar.

Download

Thanks

Popularity: 70% [?]

TwitterPress is under construction…

Wednesday, July 25th, 2007

image 

I have installed an unfinished TwitterPress in my Chinese blog (in Chinese) for test, because most of my twitter friends speak Chinese…

Hopefully I will finish it in 1 or 2 days and release the first version. :)

Here is a progress from an idea to the real thing…

idea: Twitter+wordpress = SNS enabled wordpress

prototye: A twitter based social network inside wordpress

0.1 (alpha) : this post…

0.1 (beta) : maybe tomorrow…

Popularity: 11% [?]

The best analytics plugin I ever seen: Geotrack Plugin (2.0.2)

Monday, July 23rd, 2007

 

Today I found a great wordpress plugin today:

Features:

  • logs every visit on your wordpress blog in your MySQL database
  • automatic cleanup of logs in your MySQL database
  • contains the same information as Apache combined server logs with ip, referrer, method, status, uri, user agent and access time
  • additionally stores geo-ip information with country, ISO country code, city name, latitude and longitude
  • displays a list of current visitors
  • displays a top-10-list of referrers, visited pages, visitors‘ countries and visitors‘ cities
  • has functionality to prevent referrer spamming
  • ip blocking of known referrer spammers
  • contains a set of free (GNU-GPL / Creative Commons) country flags from Wikipedia
  • Google maps integration: shows your visitors‘ locations on world map
  • fast geoip retrieval through local database
  • contains installer and update scripts
  • uses MaxMind GeoLite City
  • see it in action here
  • and of course it’s free to use!

Very cool, very useful and with google maps displaying who si from where…

See it live in my site:

http://dev.robertmao.com/visitors-map/

Download it here!

Popularity: 23% [?]

A twitter based social network inside wordpress

Sunday, July 22nd, 2007

image

I am now working on an experiment: a wordpress plugin to turn wordpress into a social network, you can have friends lists, the latest updates of friends, the lastest posts of friends in your wordpress page.

This social network is based on Twitter, and it was inspired by AlexKing’s TwitterTools.

I will tweak it these days, when it’s ready I will release it so every one can play with it.

The original idea was here: Twitter+wordpress = SNS enabled wordpress

Popularity: 13% [?]

Get rid of boring WPMU’s post html/javascript filtering…

Wednesday, July 18th, 2007

Today I spend about 10 minutes to wrote a small javascript code and wish to release it in my blog, then I spend almost 2 hours to find out how to get rid of boring WPMU(Wordpress Multi Users)’s post html tags filtering.

I searched across the Internet, lots of people are asking how, very few information are helpful. The official “how to use Javascript” is actually missleading. It suggest to install “text-control plugin”, turn off rich editor are totally useless in WPMU.

Finally I got a simple solution by hack some code:

edit wp-include/kses.php, found “Post filtering”, and simply comment out a line:

// Post filtering
//add_filter(’content_save_pre’, ‘wp_filter_post_kses’);

UPDATED (Jan 10, 2008)

Joe in his comment point out the better solution, thanks Joe!

At around line 742 of kses.php, do the following commenting out:

function kses_init_filters() {
// Normal filtering.
add_filter(’pre_comment_content’, ‘wp_filter_kses’);
add_filter(’title_save_pre’, ‘wp_filter_kses’);

// Post filtering
// add_filter(’content_save_pre’, ‘wp_filter_post_kses’);
// add_filter(’excerpt_save_pre’, ‘wp_filter_post_kses’);
// add_filter(’content_filtered_save_pre’, ‘wp_filter_post_kses’);
}

This allows you to only stop filtering of the POST, but the comments still get filtered.

Popularity: 21% [?]

Improve TwitterTool to support international charset better.

Monday, July 16th, 2007

 AlexKing’s Twitter tools is a great wordpress-twitter mashup plugin:

Twitter Tools

This plugin creates an integration between your WordPress blog and your Twitter account. Pull your tweets into your blog and create new tweets on blog posts and from within WordPress.

Download | README | SVN Repository

Latest Release: Version 1.0, 2007-05-07.

However this version TwitterTools have some problem in my Chinese blog, all Chinese characters are displayed as “???”, that should be an encoding problem.

After I investigate this problem, I found it because my MySQL database’s character set is not UTF-8 unicode, so TwitterTools created a table as default charset,  that cause the problem.  Why wordpress’s posts show correct encoding? I looked through wordpress’s code, and found that they will force create tables in correct encoding and won’t just use default one.

After I pull some code from wordpress’s wp-admin/upgrade-schema.php and plugin TwitterTools.php, problem gone! (All previous data in the table remained problem, I just delete that table and re-activate Twitter tool again. NOTE: Deactivate TwitterTools seemed not delete that table, so you need to delete yourself. )

I will email Alexking the update and he may put this changes to his next version, but before he change it, I release an non-official version here:

Download Twitter Tools with better internationalization support.

Popularity: 16% [?]

A wordpress plugin to fix the invalid UTF-8 data inside the feed

Monday, July 16th, 2007

Yesterday, I decided to host my feeds with FeedBurner like many bloggers do. There is no problem to create a feed of this blog, however when i tried to create a feed for my Chinese blog, FeedBurner refuse to continue because it said that my feed can’t be validated:

http://feedvalidator.org/check.cgi?url=http%3a%2f%2frobertmao.com%2ffeed

Sorry

This feed does not validate.

line 167, column 77: ‘utf8′ codec can’t decode bytes in position 10676-10678: invalid data (maybe a high-bit character?) [help]

In addition, this feed has issues that may cause problems for some users.
We recommend fixing these issues.

line 115, column 21: description contains bad characters [help]


After I check the error message, it seemed that the problem is from my blog post content, I did copy/paste some text from some other website in some of my posts, but how could I know those text may contain invalid UTF-8 char? It seemed to be a serious problem. :(

I can’t believe that why FeedBurner can’t handle this, since my feed can be read correctly in Firefox, Google Reader, Bloglines, and a bunch of other RSS readers, aggregators. But since it can’t handle, and my feed did have problem to pass validation, it’s my job to fix it.

I wrote a very simple wordpress plugin to fix this problem, it will correct all possible invalid UTF-8 data inside the feed content. After I activate my plugin, my feed can pass the validation correctly, so I have no problem to use FeedBurner any more.

I release this simple wordpress plugin here, just in case someone else have similar problem as I had.

Download: wordpress plugin to fix the invalid UTF-8 data inside the feed

Version: 1.0

Install: Download and unzip the file in your wp-content/plugins directory, and then “activate” the plugin in your admin panel’s “plugins” menu.

Popularity: 16% [?]

Add Google Search box to blog post plugin

Monday, July 16th, 2007

I wrote a new simple wordpress plugin for my own use, but I guess maybe someone else may need it, so I release it here.

This plugin is very simple, it put a google search box right behind your blog post, and it fill this post’s title in the search box for you.  With this search box, you and your reader can search the related information easier, they no longer need to open a window, browse to google and type in some words… now all they need is click the button.

The search box will only show up in single post display, it will not show in front page,  category,  search results, …

This version I  only add standard google search form, in the future, if required, it can be configured to support site search, or google co-op search, and use user’s Adsense account to make some money from the search result.   If anyone think such feature is important, let me know I may add it.

Download Here: Wordpress Plugin - Add Google Search box to blog posts

Version : 0.1

Install:  uncompress it in your wordpress plugin directory, and activate this plugin.

Popularity: 100% [?]

Close
E-mail It
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.