New WordPress User Guide

Please Note - This version of the guide is now obsolete and been superceded by our WordPress 2.6 User Guide which can be downloaded from Spectacu.la

One of the things lacking, in the free downloads world, so far as we could see, was a simple, easy to follow WordPress guide designed for non-techie WordPress users.

[digg=http://digg.com/software/New_WordPress_User_Guide_in_pdf_Format]

There are two versions available - the latest which is for WordPress 2.6, and the previous version for WordPress 2.3 - the latest is only available from our Spectacu.la WordPress Themes Club.

Silk Icon from famfamfamTo download the NEW WordPress User Guide follow this link to Spectacu.la

Silk Icon from famfamfamDownload the OLD! WordPress User Guide Version 2 beta for WP 2.3

I think the document still needs work, but I would greatly appreciate any feedback, comments, or even offers of assistance. It would be quite nice to GPL this but we haven’t done so yet and I personally am 50/50 about it. What do you think?

If you want to help popularise this guide, please digg it, or add it to your favourite social bookmarking system - it would be much appreciated!

WordPress and the iPhone

Two hot topics, in one post. WordPress is the hot blogging tool right now, and the iPhone is one of the hot mobile phones too.

So it’s a shame that they don’t work that well together. In this article I go through the following:

  • Posting to WordPress.com from the iPhone
  • Posting to a self hosted version of WordPress using the Mobile Admin plugin
  • Posting to WordPress from the iPhone and including images with the post

The latter is a particularly vexing problem, and one to which I can’t solve for WordPress.com. However, it’s relatively easy for self-hosting, or profesionally managed WordPress site owners to get images into their website, from their iPhone. Or for that matter, many other platforms. But this post in particular is all about getting on with WordPress when using an iPhone. Mainly because my shockingly generous girlfriend got me one for Xmas, I’m poorly, and I don’t feel like doing any ‘proper’ work today.

So let’s begin…

WordPress.com and the iPhone

WordPress and WordPress.com both use, by default, the TinyMCE editor. And it’s not a bad little editor either. A little buggy at times, but it’s feature rich and simple to use. What it won’t do, at least as supplied by WordPress, is work with the iPhone. You’ll have to tap on the Code tab above the editor and just enter plain text. You can then publish just fine.

If you’re only blogging from your phone you can turn off the visual rich editor in the WordPress Users | Your Profile tab in order to make this a simple one touch job. It may also save you the occassional Safari crashes that I experienced with the MCE editor running, even though I didn’t use it.

But… you probably aren’t limiting yourself to phone only blogging, and you probably like the editor. It lets you do nice things. But there’s also another problem… go down to the Upload part and you’ll notice that you can tap as much as you like on a “Choose File” button, but nothing will happen. So you can’t add images from your iPhone to your WordPress blog.

WordPress, the iPhone, and the Mobile Admin Plugin

If you’re a regular mobile blogger and you have your own, self-hosted or managed WordPress installation, then you have the option of plugins. And one of the handiest for WordPress is the Mobile Admin Plugin. You’ll need to follow the usual plugin steps - checking for compatibility, installation, and activation. But once you’ve followed the instructions it really does make using the iPhone (and for that matter, many other phones) on WordPress sites a cinch.

What’s great is that if you access the site admin using a normal PC, you still get the normal control panel.

Below are a couple of screenshots showing it in action:

WordPress Mobile Admin Screenshot 1

WordPress Mobile Admin Screenshot 2

Lovely isn’t it? And if you’re wondering why I’m not posting any of my own screenshots, it’s because I’ve not hacked my own iPhone in order to get the SSH access I’d need to take screenshots.

There’s only one downside, and I feel it’s a big one, to the whole Mobile Admin experience. It’s important to me as I’m a visual type and I like illustrations wherever possible - especially if I’m travelling and feel like showing some shots of where I’ve been. I’m also particularly keen to make it work as I had photoblogging to my WordPress site (Dave’s Geeky Play Area Blog) working just fine from a Nokia N95. Ok, that took some hacking too, but I’ve had photos… I want to continue with photos!

Posting Images to a WordPress Blog With Your iPhone

If you host your WordPress site yourself, you can do a lot… and get images from your iPhone directly to your site!

Now, the iPhone won’t tolerate MCE yet, and it won’t use the upload wizard in standard WordPress. So what’s to do? ftp tools don’t exist yet, so you can simply ftp your shots onto your site… which suggests that you’re stuck.

Well fear not. I’ve been casting around all afternoon and found the following works best. Basically, with WordPress you can set it up so that you can post to it by e-mail. This does require setting up either a cron job (something many hosting providers won’t do or allow) or it means hacking around so that the job fires off every now and then. Thing is, the standard WordPress wp-mail.php program doesn’t actually work all that well with images. In fact, it doesn’t work at all with anything other than text. So you’ll need something a little more…heavyweight.

But with WordPress there’s always a way. The plugin you need is called Postie, and this is what you have to do:

  1. Install the Postie plugin
  2. Read the instructions! Maybe do that before installing it?
  3. Go to the Postie config page as instructed (it’ll show the readme first - just refresh), and set your image resize to something appropriate to your theme
  4. Set up an e-mail account on your host that’s especially set up for receiving posts to your blog. Keep it a secret and make the password tricky too. Configure this information in Postie, bearing in mind the default port for e-mail is 110 (not defaulted into the form by the Postie plugin).
  5. And then the easiest way to get an image to your site is from the iPhone image gallery press the little swoosh icon in the bottom left of the image viewer.
  6. Tap Email Photo.
  7. In the New Message box you should enter the To: e-mail address that you set up in step 4. You can also enter some text in the box. Press Send.
  8. Now, the content won’t appear yet in your blog, but it’ll be waiting… all you need is to send a browser to http://www.yourdomain.com/wp-content/plugins/postie/get_mail.php or, if your WordPress is installed in its own directory: http://www.yourdomain.com/WordPressDirectory/wp-content/plugins/postie/get_mail.php
  9. You can set up a cron job if you’re allowed, but it’s not my favourite way anyhow. I like to just have a favourite in my browser for mail posting which I click on whenever I need to update the site.

[digg=http://digg.com/apple/WordPress_blogging_with_the_iPhone]And that’s it! Ok, it took a bit to get there, and it’s not integral to WordPress so you can’t guarantee support on version changes, but… it’s one way forward, I’ve tested it, and it works well on WP 2.3.1. If you spot any mistakes, please comment!

If this post is popular I may well try and add some screenshots, photos and sample posts. I also plan to do a similar post soon on the Nokia N95 and WordPress.

Attention WordPress Hackers! At Last, a GPL Theme Worth Playing With…

We finally built GPL theme for hosted versions of WordPress! And very pretty it is too…

Anvil Theme for WordPress

We’ve been writing custom themes for clients for quite some time now, and felt it was time to give a little something back to the WordPress community.

So we did a fully GPL theme, complete with a Fireworks png, all sliced up and ready to be re-exported in such a way that you can completely change the site’s design without ever touching a line of code. You have to work within the limitations of the graphical elements, but there’s no doubt there’s a lot you can do.

You’ll see variants of the theme in use around the place - on the satirical motoring site Sniff Petrol on Dave Coveney’s site, and in a few other places soon we hope. We have high hopes for the underlying platform of this theme - it brings with it a navigation widget to give you fine control of an elegantly styled sidebar, an easy to customise contact form page template, and much much more. It’s a theme for people who like to expand what they can do with WordPress. It’s also, of course, xhtml 1.0 transition, works on every browser we tested on, and the work of a dedicated team of professionals.

Anvil Theme Official Demo and Download Page

Well done WordPress! Two million and counting…

So we’re hoping to be one of the first to congratulate WordPress on hitting the two million blogs mark.

What can we say? Well done!

WordPress hits two million!

To us it’s big news - we’ve made a strategic decision to be increasingly involved in WordPress.  With the up and coming premium themes marketplace we’re hoping to be involved with, coupled with the increasing use of WordPress as a CMS, we believe the flexibility and power of this system makes it the one to be involved with - whether for blogging or for building general sites.

So here’s to the next two million.  Seems like WordPress is doubling every six months or so.  Which would mark out eight million blogs by Xmas 2008.  Who’s laying bets?

Change wordpress dashboard RSS feed

If you ever feel like you want to change the source of the news items on the wordpress dashboard (Not wordpress.com, sorry if I got your hopes up there) here is how to do it.

You can either add the code that follows to your themes functions.php or you can add the it to a plug-in. Just change the returns from the function to match your feed URIs and titles. There are two feeds the primary, which by default is the “Development Blog”, is limited to about 3 entries and the Secondary feed is much more open.

If you’d like to delete the feeds the just set the return to “”, doing this helps dashboard load time a lot.

/*
Plugin Name: Dashboard RSS replacement.
Plugin URI: http://www.completelypointless.co.uk/
Description: Changes the dashboard RSS to something more interesting.
Author: James R Whitehead
Version: 1.0
*/
function change_dashboard_primary_title () {
return "Completely Pointless";
}
function change_dashboard_primary_feed() {
return "http://completelypointless.co.uk/feed/";
}
function change_dashboard_secondary_title () {
return "BBC News";
}
function change_dashboard_secondary_feed() {
return "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml";
}
add_filter("dashboard_primary_feed","change_dashboard_primary_feed");
add_filter("dashboard_primary_title","change_dashboard_primary_title");
add_filter("dashboard_secondary_feed","change_dashboard_secondary_feed");
add_filter("dashboard_secondary_title","change_dashboard_secondary_title");

That’s it, nothing too onerous or perplexing. I will say however that if you’re distributing themes or plug-ins that it would be nice to let wordpress keep their feed in there.

Restricting WPMU sign-up.

Restricting the ability to sign up to new wpmu blogs is unfortunate but necessary to get away from all the spam bloggers out there. They make life hell for everyone.

This simplest means of hindering their progress is a plug-in that checks to see the login status of the person trying to create a new blog.
<?php
add_action(”signup_header”,”ICITAreYouAllowed”);
function ICITAreYouAllowed() {
if (!is_site_admin()) {
header(”location: http://{$_SERVER["HTTP_HOST"]}”);
} else {
return;
}
}
?>

Something like the above dropped into the mu-plugins folder would make it hard, if not impossible, to create blogs unless you where a site administrator. Nice for locked down sites but not very useful for sites that want to be open. You could change the “is_site_admin” to a check for logged on user with “user_level_0″ access. This would add an extra step to the sign-up process and would require that the user provide a few more details before they can move on to the process of creating a blog. This would eliminate the scripted bot blog creation but would not stop the manually created spam blogs.
That leaves us with a problem. Either lock it all down and the admin has to do it manually upon request or leave it open and be forever fighting fires.

As a result of the above I’m going to create a plug-in that gives you the following

  1. Drop down menu to choose the minimum account level to allow blog creation. i.e. level_0 to level_10 or “site admin”
  2. Option to choose to give users blog create access once they have X number of moderated comments on the site. This may also help get people posting comments to other blogs. Of course it could also lead to people posting youtube-esque comments just to get to the magic number.
  3. As part of the last one I may also introduce a comment voting system (different plug-in) and only trigger when a certain quality has been reached.
  4. Add an option that states you should have been a member of the site for at least X amount of time before you can create accounts. Couple that with the post count and it should make it a lot easier to spot and block the spammers.
  5. Will have to include the option to have the settings available for each site on the one mu install. So blog creation on each site can be controlled on a site by site basis.
  6. An option to pick up the wp-login form from a kind of page template in the plug-in folder or the theme folder. Would allow you to style it uniquely for each of your themes.

WARNING: These are my personal notes and there is no time frame for this. I can see this turning from the simple code above to something quite large. :D

Steps for installing WP Mu as domain manager

The following is the basic procedure for installing Wordpress mu with more than one domain name so that you only need one install to control several domains. I’m creating this document to help me see all the steps I’ve take so that I never have to figure it out from cold again and to help me with the writing of a plug-in that will allow me to do this via a very simple interface.

  1. Install mu on your domain {e.g. yourdomain.com} and ensure that wildcard domains are processed by mu. Entering [ramdom].yourdomain.com should take you to a prompt to create a blog of [ramdom].yourdomain.com unless it already exists that is.
  2. Park the new domain {e.g. newdomain.com} using your servers management back end. This will be different on each hosting provider and may not even be available so if it is not obvious you’ll need to contact your provider.
  3. Create a new blog {e.g. newdomain.yourdomain.com} and test it.
  4. Get into a position where you can edit the db.
  5. Run SELECT * FROM wp_blogs WHERE 1and look for the blog you just created and make a note of its blog_id.
  6. Edit the domain cell. Will currently be set to newdomain.yourdomin.com and we want to change it to newdomain.com. If we assume the blog_id is 9 the following command would do. UPDATE wp_blogs SET domain="newdomain.com" WHERE blog_id =9 LIMIT 1
  7. We now need to edit the other references to the sub-domain and point them to the real domain name. If you run the following you will find 3 references back to http://newdomain.yourdomain.com change them to http://newdomain.com/ and be sure to keep anything that comes after the domain name. i.e. /files/. Again we assume the blog_is is 9 SELECT * FROM wp_9_options WHERE option_value LIKE "http://%"
  8. Your site should almost work at this point. Give it a test, you should find it all looks as you expected until you try to login to the backend. That is what we’ll fix next.
  9. We need to add a new site to the wp_site table so that we can use the backend admin. INSERT INTO wp_site (id,domain,path) VALUES ("9","newdomain.com","/");We can use the blog_id as the value for id if it has not been used before, if it has been used then just pick a number that’s not been used and make a note of it. The value of domain should be that of the new domain {e.g. newdomain.com} and the value of path should normally be “/”.
  10. We now need to go back to the wp_blogs table SELECT * FROM wp_blogs blog_id = 9 and edit the site_id to be that of the id we set up in step 9. So that would be UPDATE wp_blogs SET site_id=9 WHERE blog_id =9 LIMIT 1. Change the site_id to that which you previously chose if it is not the same as the blog_id. I like to keep them the same to aid my admin but there is no technical need to do so.
  11. Site meta needs to be configured to allow administrators to change the site settings. This command will set the user called admin as site_admin if site_id == 9 INSERT INTO wp_sitemeta (site_id,meta_key,meta_value) VALUES ('9','site_admins','a:1:{i:0;s:5:"admin";}');If you need to change the admin name to something else, say “administrator”, you will have to change the s:5 to match the size of the new word. In the case of “administrator” it would be set to 13.
  12. To enable site plugins the following is needed. INSERT INTO wp_sitemeta (site_id,meta_key,meta_value) VALUES ('9','menu_items','a:1:{s:7:"plugins";s:1:"1";}');