Archive for the tag 'wordpress'

Finally got the prince.org staff blog up and running

I’ve been trying in spare cycles here and there to deeply integrate a WordPress-based blog into prince.org, for the staff (myself and all the moderators) to be able to muse on new policies, changes, whatever. We have a forum for that currently in the message boards area but that’s not the most effective way to disseminate stuff, as a lot of folks don’t actually read that forum, and there’s nothing that calls out new posts there (or differentiates the moderator-authored ones from the general question/complaint posts).

It was an interesting coding experiment to dive into WP’s guts a bit and figure out how to do this properly. I like the final solution; essentially the latest WP code gets dropped into /blog/ on the site, and a custom theme and plugin are symlinked in when I deploy the site, from my codebase. I don’t need to change a single line of WP code, and I get integration with my own session management/user database/authentication, a completely custom look and feel, and a nice administrative panel. I think added a new homepage module (in the upper right) to help guide some traffic to it (since I think postings there are really relevant to all visitors), which was trivial since I have a standard methodology for that. Overall I really think it’s a big win, and for probably less than a total of 10 hours work, with about 25% of that being CSS (which I suck at).

If you want to see how it turned out, head on over and check it out: the prince.org staff blog.

Ouch, that’s gotta hurt

I was surfing for some movabletype vs wordpress comparisons based on a discussion at work (I’m firmly in the WP camp due to the extensive plugin and theme work I’ve done for the prince.org blog, but still curious to know what’s up in the MT world), and came across this entry from Dustin Diaz discussing it. The most telling part was actually one of the comments, from Molly Holzchlag, who wrote the Teach yourself Movable Type in 24 hours book:

Dustin, did you hear me shouting in enthusiastic agreement when I read this post? I’m sure you did.

While I still fight spam, WordPress has made it a lot easier to do so. And yeah, I might have written a book on MT, but I was so fed up with the product that the very week the book came out I switched to WordPress.

I agree that MT has some nice features. But I’m very happy I switched all told.

Now, granted this is from 2 years ago, and things can change a lot in 2 years, but damn, that sucks when the person who just published a book about your product changes their mind and enthusiastically jumps to the competitor. Must have been an akward book tour :)

Best source-control commit log entry of the week

Ryan, working on the WordPress codebase, changed the category code to be more flexible. Here’s his commit entry:

“In your cats, making them back compat.”

OK, that’s pretty good. Lolcat phrasing, about code, with an actual cat(egory) reference. That’s a triple score!

Trying out TextMate

[tags]TextMate, apple, software, coding, blogging, emacs, Ruby, rubyonrails, wordpress[/tags]

I’ve been trying out [TextMate][] for a couple of weeks on the Mac. So far, I’m really impressed, and very likely to fork over the license fee (around $75). Which is really quite a lot for an editor when you consider the wealth of good editors already out there, and free, not the least of which is Emacs, which I’ve been happily using on and off for hmm, probably 15 years at this point. Sure, I’ve forayed into the Visual Studio IDE when I was developing on Windows, and used the Borland (text-mode) environment when I wrote a lot of Turbo C++ before that; I’ve toyed with Eclipse as well more recently. But Emacs ports on the Mac aren’t too great (including stability issues), and TextMate pretty much seems to be written with an Emacs state of mind with regards to extensibility, etc. It even has some Emacs keybindings lurking in the default configuration.

But what got me on this kick was playing with [Rails, or RoR, or Ruby on Rails][rails], the almost sublime web-application framework built on [the Ruby language][Ruby]. It seems a lot of the influential RoR community, are Mac-heads and use TextMate for developing code. The Ruby support in TextMate is quite good, and there is special ‘modes’ to use Emacs terminology (’Bundles’ to use TextMate terminology) just for Rails as well. And they’re very nice.

My essentially frothing at the mouth praise for Rails and Ruby can wait for another post, although let me say they are both quite excellent, especially if you keep in mind the problem domain, and don’t think of them as C++ or J2EE replacements. (But PHP and typical Java web app replacements, well that’s another story… and I recommend reading [O'Reilly's Beyond Java book][Beyond Java] to get it.) The interesting bit is how much having an excuse to feel out the editor and understand some of the hooks and extensions available for it, have made me really understand how it can empower me. I guess it was always that way with Emacs as well, although the alternative was something edlin-ish (I don’t think the Prime I first started using it on had a vi port, even.)

But here’s my first words on this: TextMate is excellent, so far. Ruby (and Rails) are as well. I feel excited to be exploring this stuff.

and p.s., this blog post was written and edited from within TextMate using the ‘blogging’ bundle and [Markdown][], via the [PHP Markdown Extra][] plugin for WordPress! About all it needs now is to support the [Ultimate Tag Warrior][] plugin, and I’m never using WordPress’ writing interface again… from my Mac anyhow. (**Update** it seems you can still get the main tagging stuff to work if you turn on ‘embedded tag support’ in UTW and then use the SimpleTag format. Cool! Thanks to [this blog post][vimposting] about posting from vim of all things, for the hint!)

[vimposting]: http://coopblue.com/blog/2006/06/posting-to-wordpress-from-vim-with-tags-and-markdown/
[Ultimate Tag Warrior]: http://www.neato.co.nz/ultimate-tag-warrior/
[Beyond Java]: http://www.oreilly.com/catalog/beyondjava/
[Ruby]: http://www.ruby-lang.org/
[rails]: http://rubyonrails.com/
[TextMate]: http://macromates.com
[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/
[Markdown]: http://daringfireball.net/projects/markdown/syntax
[Wordpress]: http://wordpress.org/

Upgrade fun

I really wanted to try out this WordPress plugin called ImageHeadlines that created images of your title headlines from any TrueType font. It’s a neat idea, and you can make your headlines really look cool with dropshadows, etc. One not-so-minor problem: my PHP install doesn’t have a working FreeType installation. “Well, time to fix that,” I figured. Read more »

WP2.0 admin dashboard slow as molasses

I was consistently getting 30-second load times for the WordPress admin ‘dashboard’, which is totally unacceptable. I decided to actually try and fix this, first by searching around a bit, and found for example this thread which is other users complaining as well, but mostly about WP1.5. After some experimentation (about 5 minutes at most), I discovered it was the “Planet WordPress” RSS feed pulling that was causing the big delay. Commenting that out gets me consistently sub-100ms for rendering (I’m assuming the other feeds it pulls are cached at that point.) Nice. Anyhow, if you want to do the same thing, there’s two ways to do it that are fairly simple with quick changes to wp-admin/index.php:

  1. Comment out the line (#146 in mine) that reads $rss = @fetch_rss(’http://planet.wordpress.org/feed/’);or
  2. (This works better, IMO, even thought the code looks like it should work fine with #1 above) Comment out the entire section for Planet WordPress updates. I.e., stick a “/*” at line 146, and a “*/” around line 165 (just after the closing curly brace).

Absolutely, positively, in 2.x of WP, I’d love to see the dashboard content be controllable by options in the admin section.

WordPress 2 upgrade: smooth as silk

new WordPress logo The new WordPress 2 codebase is supposedly a completely new backend, but my upgrade last night went without a hitch. Impressive. I guess this is largely in part due to my installation being pretty much stock, but even so, nice. I do slightly wonder if I’m missing an index on some of the tables in the DB though, not necessarily from WP2 but even before, my “admin dashboard” has been painfully slow to load. A problem for another day, however.

I’m sort of digging the new TinyMCE wysiwyg editor integration, although I must admit I was also getting pretty used to the Xinha Here! functionality. Not sure I’m totally ready to switch yet, but I’m giving it a try. I love the dhtml sections in the ‘write’ screen, so I can close the ones I don’t usually use, and reorder them to reflect my priorities. Nice work! Also, the new preview mode, while not critical for me and my simplistic theme, is nice to have. I’m definitely liking the better media upload/browse widget, although it’s vaguely unintuitive at first, and I wish it browsed all of the images in my assets folder, not just the newly-uploaded one(s). Also, I’d really like to see you able to put in a URL to an image and have it suck that down… sure there’s potential for copyright infringement, but for stuff like the logo above, I’d rather not deep link to their image, and I doubt they mind me copying it! Maybe an enhancement coming in the future, though.

Overall… so far, so good! Nice work, guys!

Double-fisted blogging

I’m trying to figure out where to post entries when I do happen to do so, which is a pretty rare event anyhow. Here, or at 360°? WordPress pretty much kicks 360’s ass at the moment when it comes to editing tools, so I suppose I’ll keep posting the majority here. But, 360 is all Yahoorific, and more at my fingertips while working. I guess I shouldn’t blog from work much anyhow :-)

Well, in the meantime, just a few interesting links… Mac serial number decoder–find out when your Mac was made.
As a guy at work would say, this is totally ringing the bell on the nerdometer. Some guy made Mac OS X Engineer Trading Cards. Yeah… but I have to admit his Ajax-style commenting system rocks. Pretty sweet effect, if a tad useless. Well, I like the submit-without-refresh bit, but the live preview bit is not too useful IMO.
One more: dissecting WordPress themes, seems handy.