dannyman.toldme.com

About Me : Free Style : Good Reads : News and Reaction : Photographs : Technical : Travels : Unsorted

WordPress »

Hacking on the blog platform!

Search:
April 25, 2008
Linux, Technical, Technology, WordPress

WordPress 2.5.1

Link: http://dannyman.toldme.com/2008/04/25/wordpress-251/

There’s a notice on the WordPress dev blog that WordPress 2.5.1 is out. Alas, they neglected to link to the upgrade documentation. My favorite? Upgrading via Subversion:

0-11:17 djh@ratchet ~> cd public_html/toldme
0-11:17 djh@ratchet ~/public_html/toldme> svn sw http://svn.automattic.com/wordpress/tags/2.5.1/
[ . . . ]
Updated to revision 7839.

When I logged in to post this little note, it blocked me and ran the upgrade procedure, then I had to log in again, and here I am!

There’s a further note about the secret key setting:

Since 2.5 your wp-config.php file allows a new constant called SECRET_KEY which basically is meant to introduce a little permanent randomness into the cryptographic functions used for cookies in WordPress. You can visit this link we set up to get a unique secret key for your config file. (It’s unique and random on every page load.) Having this line in your config file helps secure your blog.

It leaves me to wonder: if the secret key can be randomly generated by a machine, why not go ahead and do that and then stash it in the database? There may be a good reason for that . . .

In unrelated news, I upgraded to the newer Ubuntu release at home yesterday. The only trick I have noticed so far is that it runs with Firefox 3.0, which is beta, and I lost use of my foxmarks plugin, for now. So, I’m waiting until that is supported before I upgrade my workstation.

Feedback Welcome

July 24, 2007
Featured, News and Reaction, Sundry, Technical, Technology, WordPress

Notes from WordCamp 2007: Day 1

Link: http://dannyman.toldme.com/2007/07/24/wordcamp-notes-day1/

On the weekend of July 22 and 23, I and about 400 other folks attended WordCamp 2007 in San Francisco. This is a conference about WordPress blogging software, and blogging itself. I am usually a bit wary of killing my weekend by spending the bulk of it with a bunch of nerds. Especially bloggers. But then, I am a nerd, and this is, I admit, a blog . . . that and registration was merely $25 and covered my food for the weekend. That’s a pretty compelling deal for the unemployed! Added value was found at the open bar on Saturday night at one of my favorite bars: Lucky 13.

Here are notes I compiled during the Saturday presentations. (more…)

2 Comments

June 27, 2007
Featured, Technical, WordPress

Photos Flickr 0.7

Link: http://dannyman.toldme.com/2007/06/27/photos-flickr-07/

Photos Flickr now supports pretty URLs, and sports an inline Function Reference, that should become pretty fully fleshed out in short order.

Pretty URLs? Yes! If you are using permalinks and mod_rewrite, compare these two URLs:
/?page_id=3&photoset=72157600167167486&photo=481023042
versus:
/photos/photoset/72157600167167486/photo/481023042

BUG: Uhm, actually, if you have pretty permalinks this plugin will break unless your post slug is photos . . . I just tried to fix this but failed. Sorry about that.

See Photos Flickr in Action

What is New? What has Changed?

What is Fixed?

There is plenty more work to make this an awesome plugin. You can track plans and progress on my “projects” page.

Feedback Welcome

June 21, 2007
Mac OS X, Technical, WordPress

Mac OS X and per-user Support for .htaccess

Link: http://dannyman.toldme.com/2007/06/21/mac-os-x-sites-htaccess-allowoverride/

Problem

I just spent a fair amount of time wrestling with Apache on my Macintosh. The problem is that it simply refused to read the .htaccess file in my user directory.

My First Approach

I took the “Unix Guy” approach and edited /etc/httpd/httpd.conf to ensure that Apache was configured to consult my user’s .htaccess file. I changed this bit:

<Directory /Users/*/Sites>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes FollowSymLinks IncludesNoExec
    [ . . . ]

To read:

<Directory /Users/*/Sites>
    # AllowOverride FileInfo AuthConfig Limit
    AllowOverride All
    Options MultiViews Indexes FollowSymLinks IncludesNoExec
    [ . . . ]

But . . . nada. (more…)

Feedback Welcome

June 20, 2007
Technical, WordPress

Photos Flickr 0.6

Link: http://dannyman.toldme.com/2007/06/20/photos-flickr-06/

Photos Flickr 0.6 Preview

My WordPress plugin, Photos Flickr, now supports sets. I spent a little time crafting up a nice default template. I also set up a “demo blog” to give an online demonstration of the new default template.

I had planned to “ship” this version last Friday, but it was a little more adventure than I had anticipated.

Photos Flickr is an early version of a plugin that I am developing for WordPress blog software to display a user’s Flickr album within their blog. The result? Someone with a WordPress blog can now have a basic interface to let readers view their Flickr images, using their own web site and design.

Photos Flickr makes use of Dan Coulter’s PHPFlickr library, which in turn accesses the Flickr API.

What is New? What Has Changed?

There is plenty more work to make this an awesome plugin. You can track plans and progress on my “projects” page.

Feedback Welcome

June 6, 2007
Technical, WordPress

Photos Flickr 0.5

Link: http://dannyman.toldme.com/2007/06/06/photos-flickr-05/

I have had my sleeves rolled up . . . and I am having a blast! It is with some joy that I announce the release of the latest development version of my WordPress Flickr plugin, Photos Flickr 0.5:

Photos Flickr is an early version of a plugin that I am developing for WordPress blog software to display a user’s Flickr album within their blog. The result? Someone with a WordPress blog can now have a basic interface to let readers view their Flickr images, using their own web site and design.

Photos Flickr makes use of Dan Coulter’s PHPFlickr library, which in turn accesses the Flickr API.

What’s new?

I also managed, despite myself, to release this (arguably) on-time! Yay me!

I would rate this release as cool-but-underwhelming or, “shows promise” . . .

Interested parties can check ongoing development plans / milestone on my projects page.

1 Comment

June 1, 2007
Technical, WordPress

HOWTO: Add Print Stylesheet to WordPress

Link: http://dannyman.toldme.com/2007/06/01/wordpress-media-print/

I wanted to print an article from my web site, but the printing was ugly. I had previously tried to fix up my printing by adding some @media print stuff to my stylesheet, but I found it wasn’t working. Since I have free time, I spent a bunch of it thrashing my head against the wall trying to figure out what’s up researching the correct approach. Finally, I found a wordpress.org article: “Styling for Print”.

To specify a “print” stylesheet for WordPress: (more…)

1 Comment

May 30, 2007
Excerpts, Technical, WordPress

WordPress Upgraded

Link: http://dannyman.toldme.com/2007/05/30/wordpress-22/

I successfully upgraded WordPress to 2.2. I don’t bother with WordPress upgrades that often, because even the simple “Five Step” procedure can get a bit hairy. I’m still grinning at “Step 3: Overwrite Files” . . .

Step 3: Overwrite Files

Get the latest and greatest WordPress and upload it to the WordPress directory, overwriting all the files that exist there only after you have delete the old files, which is explained as follows (do not overwrite your wp-content directory or wp-config.php). Important: when upgrading from 2.0.x to 2.2, or from 2.1.x to 2.2, you will need to delete old files on the server, because several file names have changed. What if something goes wrong, you ask? Well, did you not create a backup of all files in Step 1? You can fall back upon them in the worst case scenario. Deleting your old files on the server and uploading the newer files from the new version you downloaded is an alternative which will ensure that the files on the server have been replaced for sure.

According to my “worklog” file, the process took 25 minutes: (more…)

1 Comment

December 11, 2005
Technical, WordPress

WordPress: Last Month / Next Month

Link: http://dannyman.toldme.com/2005/12/11/wordpress-last-month-next-month/

I was tweaking the site navigation–and I welcome any feedback a reader may have–and I had to grab a plugin to allow me to link to next month / previous month / next year / previous year:

Next Archive Date / Previous Archive Date Plugin from scriptygoddess

I appreciate scriptygoddess’ work, as I’m using her paginate plugin as well. Unfortunately, the example on her site is kind of nasty. So, if someone is casting about on Google, here’s the code in my sidebar template:

    <?php if (is_year()): ?>
        <p><b>By Year</b><br />
        <?php previous_archive_date() ?>
            ...
        <?php next_archive_date() ?></p>
    <?php elseif (is_month()): ?>
        <p><b>Last Month</b><br />
        <?php previous_archive_date() ?>
        <p><b>Next Month</b><br />
        <?php next_archive_date() ?></p>
    <?php endif; ?>

Thanks for the code, Jennifer!

3 Comments

July 22, 2005
Technical, WordPress

Wordpress: How to type a Backslash

Link: http://dannyman.toldme.com/2005/07/22/wordpress-backslash-literal-entities/

WordPress rocks. It is blog software that drives much of this web site. WordPress rocks, it does, except for a few things it sucks at, like printing backslashes.

They’re taken care of the BR-in-PRE stuff, but I still have trouble with backslashes. They don’t get displayed unless you type two backslashes, but there seems to be another preprocessor that sucks out backslashes when you edit the post, and typing \\ into the web just seems so wrong.

But you can use HTML entity references. These are HTML escape codes for character literals. Here are a few potentially handy ones: (more…)

6 Comments

July 22, 2004
Technical, WordPress

My First WordPress Hack

Link: http://dannyman.toldme.com/2004/07/22/my-first-wordpress-hack/

As posted to WordPress Hacks:

Hey. I wanted to be able to see posts that had been “recently modified” as opposed to the date posted. This way I can add entries out-of-order, but still advertise them on my sidebar.

I hacked the get_archives() function to add a recentlymod option. You can see the following function call in use under “Recent Posts.”

get_archives('recentlymod', 7);

The hack is available at http://dannyman.toldme.com/scratch/wp-template-functions-general.diff.

Personally, I would like WP to have an admin feature to distinguish between post_date and post_modified … a toggle I could set somewhere to ensure that my RSS feed was behaving as “Recent Posts” does.

Now I can post stories from my World Tour (still not finished yet!?) and my readers will have a clue that new material has appeared.

Feedback Welcome

July 7, 2004
Technical, Technology, WordPress

WordPress - First Impressions

Link: http://dannyman.toldme.com/2004/07/07/wordpress-first-impressions/

I recently installed WordPress, mostly out of curiosity. My web site has evolved over many years from static files, to using stylesheets, and some lightly-templated formatting to facilitate the creation of an RSS feed. While I have maintained a “log” for a few years now, I’ve always been wary of the whole self-important, vapid, “blogging” stuff.

Well, I saw Keith Garner using it, and I liked the idea that it was a rewrite of some previous software, and had a plug-in architecture, so I thought I would try it out. The install was easy enough, and then I got hooked in to the possibility of importing my data from into via an RSS file. There was some wrestling involved to hack the migration script to eat my raw HTML, and a bit more to get my scraping script adapted to output the appropriate HTML via RSS, but lo and behold, everything made it in.

And I got to tweak the look and feel a great deal with the stylesheet, and by editing the index.php directly. It has all the bells and whistles. Like, comments, which I’ve never had before, but a few people have asked for. And then all this gay backtrack stuff and pingback and backflip and blogflop and whatever. Okay, it promised to be easy to install and support all the silly jargon that I don’t care about, personally. Yay.

And for the most part, it has been comfortable. I get to put things in categories. The categories can be organized hierarchically, but any given item can have more than one category. I can maintain a list of links that can be displayed in the side menu bar. No really serious god-awful, show-stopping bugs …

(more…)

1 Comment


Site Archive

Danny Howard is 100% responsible for the content on this site, except some of it is stolen.

All rights are reserved, unless otherwise noted. Generally, I'm a BSD guy, so you can assume implicit permission to adapt, modify, and redistribute my intellectual property with appropriate attribution. Except some of this content is itself re-appropriated, so you'd best ask first, especially for commercial use. Thanks!

You can contact me via e-mail: dannyman@toldme.com

Most of http://dannyman.toldme.com/ is powered by WordPress.

If you're hip to RSS and whatnot, you can subscribe to this site.

These links are for dannyman: login AND backlinks