Archive for the 'Wordpress' Category

Page 2 of 3

Create your own WordPress plugin

wp-plugins
Wordpress has a really nifty system for adding functionality: the WP plugins. There are a ton of them around, but if you have some knowledge of SQL and PHP you can make your own plugins! You of course have to know how to display stuff, how to add a configuration panel to the Options or Manage tab, … When I read the code of some well-developed plugins, I thought: it should be easy to come up with a WordPress plugin template generator. So that’s what I did: here’s the first (far from complete) version of the WordPress Plugin Generator!

Currently it supports the following features:

  1. return the result as
    • REPLACE TAG: replace all occurences of <!--myplugin_tag--> by a certain text/html
    • AFTER/BEFORE POST: add after/before each post (e.g. for tags, DiggMe buttons, Adsense, …)
    • CALL FUNCTION: call the myplugin_showhtml() function (e.g. in sidebar.php)
    • BY PLUGIN PAGE: the result is displayed when the wp-content/plugins/myplugin/myplugin.php page is called (e.g. for results in XML or TXT format)
  2. add the result only to posts, pages, search and/or archive pages
  3. add a config page to the “Options” or the “Manage” panel
    (here I need to do some work to create a good way to generate the display code and the form processing – showing and changing parameters of your plugin)
  4. add optional GPL license text

I of course try to use the guidelines published by WordPress and Installer. I’ll write something about that later.

Continue reading ‘Create your own WordPress plugin’

My 10 essential WordPress plugins

Xampled: samples from Donna Summer
Since I’ve been doing quite a lot of WordPress blog upgrading recently, I’ve been diving into its plugins a lot. There are lots of them around and I have grown a liking to some of them.
Here’s a list of plugins that I’ve found to be essential to any of my WP installations:

  1. WP Installer
    what: install plugins/themes without using FTP
    why: makes installing and maintaining plugins really easy, even behind a firewall. This is the first plugin I always install.
    where: mattread.com
    install: installer-04.zip
  2. Akismet
    what: delete comment and trackback spam – not perfect but indispensable – pre-installed on Dreamhost accounts
    why: save you time and annoyance by filtering out the real comments
    site: akismet.com/
    install: akismet.zip (v1.2.1)
  3. WP Cache
    what: keep cached copies of your pages – pre-installed on Dreamhost accounts
    why: speeds up your site
    site: mnm.uib.es
    install: wp-cache-2-0-21.zip
  4. Brian’s Latest Comments
    what: displays your recent comments in a nicer format
    why: gives a better view of the popular articles
    site: meidell.dk
    install: brianslatestcomments.zip
  5. K2 Theme
    what: more than just a theme, includes a WYSIWYG sidebar and customisable header image
    why: if you can live with its looks, the most powerful theme available
    site: getk2.com
    install: k2-091.zip
  6. MightyAdsense
    what: manage your Google Adsense code insertion
    why: easily decide what ad goes where without modifying your theme
    site: mightyhitter.com
    install: mightyadsense41.zip
  7. RunPHP
    what: run PHP code inside your blog posts
    why: create pages that actually do stuff
    site: www.nosq.com
    install: runPHP2.1b.zip
  8. Popularity contest
    what: keep track of # views, comments … of all your posts
    why: makes it easy to show your popular posts
    site: alexking.org
    install: popularity-contest.zip v1.2.1
  9. Ultimate Tag Warrior
    what: add tags/keywords to your posts (Technorati compatible), show related posts based on those
    why: last tagging plugin you’ll ever need
    site: neato.co.nz
    install: UTW3-141592WP2.zip
  10. Google Sitemap generator
    what: creates a Google Sitemap XML file automatically
    why: because you need it, and you won’t do it manually anyway
    site: arnebrachhold.de
    install: sitemap.zip v2.7

Samples from Funky Drummer (James Brown)
And some nice to have’s:

  • FlickrRSS: show Flickr photos in your sidebar
  • Gravatar: show avatars for commenters (currently under reconstruction)
  • Sparkstats: show blog and comment activity
  • Backlinks: show incoming links trend
  • Dagon Sitemap: list all posts per category (index or sitemap)

WP-Cache speeds up your WordPress!

Ever wondered if you needed a caching plugin for your WordPress blog? You have the impression your blog’s homepage takes forever to load? You hate it when your friends call your blog ‘interesting, but so slow’?

Well, I did, so I wanted to find out just how slow it was. I set up an MRTG monitoring system on my Dreamhost account. First thing I did was to add 2 tests:

  • the download time of my blog’s home page (which involves quite some PHP/MySQL)
  • the download time of a small CSS file on the same site, which involves no PHP

Let’s take a look at the CSS file first:
Getting a CSS file from my site: always fast
The green line is my 500ms treshold: everything above it is too slow.You see that most of the time my CSS file can be downloaded faster than that (actually the average is around 250ms). There is the occasional peak, which might be caused by temporary network congestion or a server busy doing other stuff – it IS a shared hosting after all.

Now compare this to the time it takes to get my homepage: Continue reading ‘WP-Cache speeds up your WordPress!’

Fancy WordPress themes on Dreamhost

new WordPress themes on Dreamhost

It used to be that when you installed WordPress on Dreamhost, you only got 3 standard themes installed. Now you get a whopping 50: 2exquisite, 534, Abstrakt3c, Almost-spring, Artsemerging, Barthelme, Blue Kino, Classic, Connections-reloaded, Craving4green, Dapit_hapon, Darknight2.0, Daydream, Default, Disconnected, Durable, Fasttrack, Fluidityrs, Fspring_widgets, Greening, Hemmednoajax, Leone, Lush, Milc3, Modern, Newzen_2.0_build_105, Nineshadesgreen, Nolimits, Ocadia, Orchids, Phoenixblue, Plaintxtblog, Pressrow, Qwilm!, Rounded-v2, Roundflow, Rusty, Shadedgrey, Simply-vic, Sirius, Stripedplus, Tbs-blue, Thirteen, Tiga, Typoxp, Unsleepable, Veryplaintxt, Vslider2, Wpandreas03, Wpglass, Wpjeriko01.
Continue reading ‘Fancy WordPress themes on Dreamhost’