Chinaunix首页 | 论坛 | 博客
  • 博客访问: 592533
  • 博文数量: 207
  • 博客积分: 10128
  • 博客等级: 上将
  • 技术积分: 2440
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-10 21:40
文章分类

全部博文(207)

文章存档

2009年(200)

2008年(7)

我的朋友

分类: 系统运维

2009-05-04 12:04:24

This article presents 15 WordPress plugins to help enhance and simplify the blogging experience of advanced users, especially web developers and designers. Most of the plugins were tested on a default installation of WordPress version 2.3.1 for basic functionality; relevant screenshots of the plugins in action are included.

What’s a savvy user?

  1. A blogger with basic to expert knowledge of HTML/CSS, and for a lot of the plugins featured here, PHP and MySQL experience is highly recommended.
  2. A blogger who needs to display complex content in posts and pages like displaying and colorizing code snipplets, running custom scripts only on certain posts or pages, incorporating custom web forms, etc.
  3. A blogger who knows what they’re doing - The default configuration of WordPress is too "fool-proof". For example, with the visual editor turned on, it will add unexpected indents and line breaks even inside
     tags. Additionally, it blocks you from adding 
    tags, automatically "sanitizing" them into

    tags.

If you match any of the above criteria, read on and maybe you’ll find a plugin or two that will make your blogging experience more convenient.

1) Google Syntax Highlighter for WordPress

colorizes your code on-the-fly. It supports most programming/scripting languages such as C++, PHP, Perl, Ruby, and much more. The syntax is simple — just put your code inside

 tags and assign them the attributes name="code" and class="thelanguage". 

The following code was tested:

var myString = "nSync";
if (myString == "Justin Timberlake") {
   document.write("You're a winner");
   } else {
   document.write("There's always celebreality shows");
   }

 

This is how it colorizes my code:

Screenshot of Google Syntax Highlighter for Wordpress

You can learn more more ways to customize your highlighted code in the Google code wiki entry on . Also check out the on Google Code.

Other code highlighters available are:

A plain and simple code highlighter.

WP-Syntax Screenshot

- also check out the basic usage and demo page

This plugin gives you two awesome

 tag attributes: download - which automatically creates a download link for your code snipplet, and colla - which gives you the option to collapse and expand the code block.

WP-CodeBox Screenshot

- It’s almost identical to WP-Syntax.

CodeHighlighter plugin for Wordpress

2) Exec-PHP

gives you the capability of running PHP code inside certain posts and pages. You can insert PHP code directly into your posts without having to modify your theme files. You can find a more detailed documentation of Exec-PHP on Bluesome.

You have to turn off the visual editor whenever you use Exec-PHP in your posts or pages, It won’t work even in code view.

As a test, I used a WordPress conditional tag to see if it supports them, turns out it does — the conditional tag is

The PHP snipplet used to test PHP-Exec Wordpress plugin

And this is what it looks like:

PHP script used for PHP-Exec

3) Save My

If you use the visual editor, then you’ve probably experienced the frustration of trying to figure out why it messes up your

 tags. Code in between
the
 tag , but the default visual editor doesn’t uphold this rule.

This is what I wanted my code snipplet to look like (minus the
 tags):

Save my <pre> not installed

This is how WordPress renders it after I save my work from the visual editor.

What happens to <pre> tag content without plugin installed

Using Save my

 will prevent the WordPress editor from processing and "cleaning" up the stuff inside 
 tags.

4) Maintenance Mode

just notifies your readers that your blog is undergoing maintenance and is currently unavailable. The message won’t appear if you’re logged in as an administrator, so you can see what your updates look like during maintenance mode.

Here’s the options page for Maintenance Mode:

Maintenance mode options

This is how it looks for users that aren’t logged in or don’t have the proper credentials:

This is how the maintenance mode message looks 

5) WP-DBManager

gives you an administrative interface to manage, backup, and optimize your WordPress database. It has countless of options for making database management quite effortless. Installing this plugin gives you a new tab in the admin panel, called "Database".

WP-DBManager admin interface screenshot

6) Deactivate Visual Editor

If you need to write intricate posts that have code snipplets and/or custom scripts, it’s highly advisable that you turn off the visual editor. But if you find value in the visual editor of WordPress, then you just may want to exclude certain posts and pages from using it. Installing the WordPress plugin ensures that nothing gets accidentally screwed up when you edit a post that shouldn’t be edited using the visual editor. To deactivate the visual editor on a post or page, you’ll need to create a custom field called deactivate_visual_editor and set the value to true.

Wordpress custom field for Deactivate Visual Editor plugin

7) Search and Replace

Ever wanted to change a user’s name, email, website URL on old posts? How about correcting references to an old post that no longer exists or whose name has been editted? allows you to do all of this inside of WordPress, through an intuitive admin interface.

 

Here’s how the admin interface looks like:

Admin interface of Search And Replace

For this test, I created a few comments throughout the test installation using the name "myOldName". I then replaced it with "myNewName".

Search and Replace (before replacing the author name)

After pressing the "Go" button, search and replace simplifies this database update by not requiring you to run a custom MySQL query (alternatively, use WordPress’ $wpdb database class and PHP-Exec if you prefer to run your own update).

Screenshot after Search and Replace Wordpress plugin was used to replace comments author name

8) WP-DB-Backup

offers a straightforward interface for backing up your WordPress database. It’s an excellent alternative to WP-DBManager if you’re only looking to create a backup. You can save the backup on the server, on your computer, or have it sent to you via email.

WP-DB-Backup screenshot

9) Tidy Up

cleans your HTML source code and attempts to correct invalid XHTML code. It utilizes WC3’s . If you’re concerned about XHTML validation this plugin can help.

Running the Tidy Up report gives the following output:

Tidy Up Report

10) FormBuilder

is a simple plugin that allows you to create custom forms inside posts and pages.

Setting up a form is a walk in the park:

FormBuilder Set-up

Here’s how the form looks (unstyled):

FormBuilder - sample form

Other Notable Plug-ins

11) WP Super Edit

is an alternative to the default visual WYIWYG editor (TinyMCE). It improves on the default editor by providing advanced users with additional options such as a button for inserting

tags in your posts.

12) WP-Debug

lets you see what’s going on when your WordPress web page is rendered. This plugin is vital for efficiently troubleshooting your WordPress installation.

13) Theme Preview

permits you to see how your new WordPress theme looks without having to switch it out. Use it on a demo WordPress site to showcase your theme designs.

14) post2pdf

converts your blog posts into PDF format. This is terrific specifically for tutorial writers who want to provide a PDF download option.

15) X-Valid

is another popular plugin to help you achieve XHTML validation by cleaning up HTML code.

阅读(1124) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~