blogging
Help Blog Editors Reliably Discover Your API
It seems that tons of people have the same complaint: the Wordpress application for iPhone does not discover their blog and, therefore, is of no use to them.
The same goes for many desktop-based applications.
I, too, spent quite a lot of time trying to figure that one out but now that I have succeeded, here is how I would recommend working on this issue if your blog is affected:
- Go to your blog home page and select “View source”
- Look for <link ref=”EditURI”… you will see that this line contains a URL ending with xmlrpc.php?rsd. Point your browser to that URL. A rather empty page should be displayed. Check its source; if it is XML, it’s all good.
- If the previous step fails, go to the same URL but without ?rsd. If this fails too, you need to check that you have a file called xmlrpc.php and that: a. No rewrite rule messes up your URL; b. No plugin renders it invisible — e.g. “private”
- If both steps work well, it is VERY likely that the blog editor you are using — or trying to use, more accurately — is choking on malformed XHTML code. It is what seems to mystify most of us.
To convince your blog editor to “discover” your blog, we are going to give it a nicely formed XHTML page:
First, make a copy of index.php: cp index.php index.o.php
Now, create a new index.php page with this code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="generator" content="WordPress abc" /> <!-- leave this for stats --> <link rel="pingback" href="http://nexus.zteo.com/xmlrpc.php" /> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://nexus.zteo.com/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://nexus.zteo.com/wp-includes/wlwmanifest.xml" /> <link rel='index' href='http://nexus.zteo.com' /> <head> <body> </body> </html> |
Of course, you need to replace all instances of nexus.zteo.com with your own blog’s information; for instance myblog.mydomain.com
Discover your blog using your favourite blog editor.
Restore your index.php: cp index.o.php index.php
Done!
If you enjoyed this post, make sure you subscribe to my RSS feed!
Wordpress Toolbar Plugin and Wordpress Prefixes: A Fix
First of all, that’s an awesome plugin that will allow your visitors to have a look at external links while retaining the ability to comment locally on your blog. Get it!
Unfortunately, if you have modified your Wordpress database prefix, for instance because you are using Wordpress MU or the Virtual Module, the toolbar will fail to display.
Here is my very modest fix that will make it work.
1. Open wordpress-toolbar/toolbar.php
2. Find, near the top of the file:
$resultset = $wpdb->get_results("SELECT * FROM wp_options where option_name in ('wordpress_toolbar_social','wordpress_toolbar_excludedomains','wordpress_toolbar_skin','wordpress_toolbar_custom')"); |
Replace with:
$resultset = $wpdb->get_results("SELECT * FROM {$wpdb->options} where option_name in ('wordpress_toolbar_social','wordpress_toolbar_excludedomains','wordpress_toolbar_skin','wordpress_toolbar_custom')"); |
3. That’s it!
If you enjoyed this post, make sure you subscribe to my RSS feed!
A very geeky Holidays break
Was your break as geeky as mine? Come on, admit it: you’ve done at least one incredibly unsexy thing in the last couple weeks. I know I have. Well, in fact, I had to take a four weeks-long break and it shows in the number of silly things I’ve played with.
In no particular order:
- I improved this blog’s look — well, I like to think that I have:

- I finally created a personalized Twitter page:

- I also created a Twitter page for Twitterified:

- I created an icon set call “More Blaqua“:

- I added a drawer to the Twitterified client – you will see why sometime in January, hopefully!

(Oh, and I finally mastered transparency in Flex, too! Yay)
- I started separating nextBBS v2’s components so that the framework can be used on its own and the message board part is now a module.
It is the first MVC PHP framework that seamlessly support plug-ins.
- I added to nextBBS v2 a limited amount of compatibility with Wordpress plug-ins.
I re-read Getting Things Done by David Allen and made a new year resolution to stick with the program, this time.
So far my Inbox is empty and my tasks list still is a manageable size…
I have installed Medialink on my iMac and use it to stream Divx movies to my PS3. Works flawlessly.
I have also installed PlayOn! in Parallels to stream Netflix. I wish there was an equivalent program for OS X. Well, I “kind of” wish because Netflix’s streaming choice is not that exciting. Not to mention that Netflix innovates by being, to my knowledge, the first company to proudly blog about letting go 50 employees.
- I setup an old P4 with Nexentra. The project bills itself as “The land of free and open source distribution combining OpenSolaris kernel with Ubuntu userland.”
In fact I installed it because I wanted to create a ZFS array. Unfortunately the clunky old PC is way too noisy. Fortunately I realized that a read-write implementation of ZFS for Leopard is available at Mac OS Forge.
- I cancelled XM Radio. They had been annoying me for quite a while, inserting their stupid advertisements in talk radio channels, and now that they merged with Sirius they got rid of some channels I happened to like so, good riddance XM, welcome free radios on my iPhone! — and ironically but quite logically I have better reception in tunnels.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Four Top Wordpress Code Highlighters Reviewed
I recently ran a whole lot of Wordpress code highlighting plug-ins through the grinder and ended up selecting four that, in my opinion, are the worthiest of the lot.
Writing a code highlighter plug-in proves to be a fairly difficult exercise. Your plug-in needs to be smart about its content, or the result will invariably be a disappointment. For instance, if the plug-in is activated using the <pre> tag, then it needs to maintain a stack/counter of <pre> and </pre> tags so that finding a <pre> tag in the code being highlighted doesn’t abruptly terminate the code parsing, disfiguring your blog in the process. I noticed the issue with SyntaxHighlighter, but the other plug-ins may also suffer from it.
SyntaxHighlighter
Tag: [sourcecode language='css']code here[/sourcecode]
My main issue with this plug-in is that it works in visual mode; hence, your source code formatting (tabs etc.) is lost. Other than that, it works well and support a wide range of languages and it offers several very nice features such as ‘copy to clipboard’ or ‘print’. My hope, right now, is that I did not use it correctly.
[rating:3.0]
Highlight source Pro
Tag: <pre lang="enc__php" class="17">code here</pre>
I do not like the use of the class arguments, as it means “start numbering with line 17″ which totally breaks XHTML compliance.
Note the smart use of the enc__ prefix, which, when presents, means that the code being highlighted is encoded using HTML Entities. Add the prefix, you can use the higlighter in visual mode; omit it and work in HTML mode.
[rating:3.5]
FV Code Highlighter
Tag: {code type=php}code here{/code}
Cute display, which will feel immediately familiar to Dreamweaver aficionados. Support PHP, HTML, CSS and XML.
[rating:4.0]
WP_CODEBOX
Tag: <pre lang="php" line="1" file="example.php" colla="-">code here</pre>
In my opinion, this is the winner. It works well, looks good and support more languages than any of the others — I counted about 70 different formats!
You can display the code box collapsed or expanded, offer a link to download the code, etc.
[rating:4.5]
If you enjoyed this post, make sure you subscribe to my RSS feed!












