Lester Chan’s WordPress Plugins June 2007 Update

It is 1st June 2007 over my side (GMT+8) while the rest of the world may still be at 31st May 2007. I am proud to present to you my 12 updated plugins out of a total of 14 plugins. Most of them are just bugs fixes and some new minor features here and there. The plugins that changes the most are WP-Polls, WP-PageNavi, WP-Ban, WP-DBManager and of course WP-Sticky is now 1.00 instead of 1.00 beta 2.

WP-Polls now feature multiple options, future poll scheduling, poll data log mining and some parts of the admin backend are now AJAXed.

WP-PageNavi has been revamp in terms of looks and options as you can see at the bottom of this page, it features digg style design navigation with the use of style sheet and now almost all the options can be set in “WP-Admin -> Options -> PageNavi”.

I have added some new features in WP-Ban, like banned by referrers url, banned by specific IP range, exclude a specific IP from being banned and the ability to preview banned message.

I have added scheduler to WP-DBManager, the ability to optimize, backup, backup and email the database dump file after X number of days/weeks/months. I have also added a Repair Database feature.

Be sure to read the readme.html and checkout the changelog for more information and most importantly NOTE THE TABS AT THE TOP

Please ensure that your WordPress version is at least 2.1 before you can use the updated plugins.

12 Updated Plugins:
WP-Ban 1.11
» Readme/Changelog
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-DBManager 2.11
» Readme/Changelog
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-EMail 2.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-PageNavi 2.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-Polls 2.20
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-PostRatings 1.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-PostViews 1.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-Print 2.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-RelativeDate 1.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-Sticky 1.00
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-Stats 2.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

WP-Useronline 2.11
» Readme/Changelog
» Demo
» Download Mirror #1
» Download Mirror #2
» Support Forum

1 Star2 Stars3 Stars4 Stars5 Stars (62 votes, average: 4.29 out of 5)

WordPress 3.8.1

WordPress 3.8.1 has been released. This is a maintenance releases that fixes 31 bugs found in WordPress 3.8.

Various fixes and improvements for the new dashboard design and new themes admin screen. An issue with taxonomy queries in WP_Query was resolved. And if you’ve been frustrated by submit buttons that won’t do anything when you click on them (or thought you were going crazy, like some of us), we’ve found and fixed this “dead zone” on submit buttons.

It also contains a fix for embedding tweets (by placing the URL to the tweet on its own line), which was broken due to a recent Twitter API change.

Issues Fixed: WordPress 3.8.1
Download: WordPress 3.8.1

1 Star2 Stars3 Stars4 Stars5 Stars (32 votes, average: 4.22 out of 5)

How To Turn Off Post Revision In WordPress 2.6

One of the irritating feature for me in WordPress 2.6 is the post revision. I am the only author of my blog and hence this feature is useless to me.

Just in case you are wondering how post revision works, whenever a post is edited, a new row will be created in wp_posts table. Hence if your posts or pages got edited 10 times, you will have 10 new rows in wp_posts table.

In no time your wp_posts table will be filled up and the post ID will be huge.

To turn off this feature, add this following code to wp-config.php:

define('WP_POST_REVISIONS', false);

You can also delete all post revisions by running this query in phpMyAdmin:

DELETE a,b,c  
FROM wp_posts a  
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)  
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)  
WHERE a.post_type = 'revision'  

Be sure to backup your database first before performing any queries in phpMyAdmin.

*UPDATE* Auto Saves does not create a revision of the post.

*UPDATE 2* Updated SQL query from Andrei Neculau as the previous query does not delete from wp_postmeta and wp_term_relationships tables.

*UPDATE 3* There is a proper way of cleaning up Post Revisions as mentioned by kitchin in Deleting Post Revisions: do NOT use the a,b,c JOIN code you see everywhere. I like his method more than the SQL query above.

1 Star2 Stars3 Stars4 Stars5 Stars (178 votes, average: 4.18 out of 5)

My Plugins And WordPress 2.7

I tested both 1.31/2.31 version as well as 1.40/2.40 version of my plugins and they appear to work fine in WordPress 2.7 EXCEPT for WP-Email and WP-Print. It is because for some reasons the canonical redirect happens before my template redirect and hence /email/ will always be an invalid page in WordPress eyes. This issue is not present in WordPress 2.6.

My efforts had paid off when my plugins undergo major cosmetic changes back in WordPress 2.5 to accommodate the new WordPress 2.5 design. It is because for WordPress 2.7, I need not do anything and the design just fits right in. I just need to add in the icon for the admin menu for WP-DBManager, WP-DownloadManager, WP-Email, WP-Polls and WP-PostRatings.

Here are the fixes to get WP-Email 2.31 and WP-Print 2.31 to work with WordPress 2.7. I will not update WP-Email 2.31 and WP-Print 2.31 with this fix, instead I will just leave the fix to be downloadeded on this site. Do note that the fix will make WP-Email and WP-Print work for WordPress 2.7 ONLY.

Here is the fix for WP-Email 2.31:

In wp-email.php:

Find (Line 106, Line 120, Line 134 & Line 147):

$rewrite_rules = array_slice($rewrite_rules, 4, 1);

Replace:

$rewrite_rules = array_slice($rewrite_rules, 5, 1);

Find (Line 758):

add_action('template_redirect', 'wp_email');

Replace:

add_action('template_redirect', 'wp_email', 5);

Alternatively you can download the fixed wp-email.php:

Here is the fix for WP-Print 2.31:

In wp-print.php:

Find (Line 79 & Line 95):

$rewrite_rules = array_slice($rewrite_rules, 4, 1);

Replace:

$rewrite_rules = array_slice($rewrite_rules, 5, 1);

Find (Line 395):

add_action('template_redirect', 'wp_print');

Replace:

add_action('template_redirect', 'wp_print', 5);

Alternatively you can download the fixed wp-print.php:

After uploading the fix, you need to regenerate permalink. Go to (WP-Admin -> Settings -> Permalinks -> Save Changes)

I have already committed these changes to WP-Email 2.40 and WP-Print 2.40 to the SVN.

Tentatively WP-DBManager, WP-DownloadManager, WP-Email, WP-Polls and WP-PostRatings will work for WordPress 2.7 only because of the new icon in the admin menu.

1 Star2 Stars3 Stars4 Stars5 Stars (50 votes, average: 4.18 out of 5)