Tag Archives | wordpress

Notes from SeaCoast WordPress Developers meeting, 11-Jan-2011

The premiere meeting of the Seacoast WordPress Developers group occurred on Tuesday, January 11, 2011 at the Portsmouth Public Library from 6:30 – 8:30 pm. Four people attended, a modest but promising showing. All four – Amanda, Jesse, Kevin and I – had experience with WordPress and relatively advanced computer experience, as befits a “Developers” group rather than a “Users” group. We did a round on introductions and discussed what we’d like from the group. There was a lot of meta-discussion: how to organize the group, when to meet, what features to offer attendees, etc. We talked about what we had done with WordPress and what we were looking to do. We shared some advice on resources and plugins we’d had success with.

Kevin shared some insights into the Drupal community and the Seacoast NH Drupal Group. Kevin talked about working with Drupal’s Aegir enterprise management system and the Content Creation Kit

I mentioned the Joomla’s recent 1.6 release and Barry North’s CompassDesigns.net pointing out we have a lot of good options in CMSes out there, and we talked about some of the hybrid solutions: some of this and some of that.

Jesse’s been working with Expression Engine and is interested in the CMS capabilities of WordPress as an alternative. I pointed out that Expression Engine is built on the CodeIgniter framework which I’m currently working with.

We spoke about a lot of related groups and hope to share contacts and exchange publicity with the New Hampshire Ruby Rails Group, the Greater New Hampshire Linux User Group, SLUG, the Seacoast Linux User Group (meeting in Morse 301 on the second Monday at 7 Pm for the past 11 years). Amanda and Kevin recalled the GNHLUG meeting featuring Linus Torvalds, attended by over 200 people, on 31 Jan 1996 (accoding to GNHLUG’s list of past events), We mentioned other meetings, such as NHUPA: New Hampshire Usability Professionals Association (now NHUXPA) the eBrew last week at the Press Room, the New Hampshire High Tech Council and the NH PodCamp and Boston WordCamp

Amanda was the organizer of the meeting, and had the most experience with WordPress sites. She has developed and released a number of sites, modified plugins and worked with other developers to get the features she needed. Amanda was interested in learning more about WordPress’ CMS abilities. She’s interested in the Flutter add-on, the Magic Fields CMS Add-On, and extending WordPress with the WP 3.0’s Custom Fields. Amanda brought two books for show-n-tell: Smashing WordPress: Beyond the Blog by Thord Daniel Hedengren (Smashing) and Professional WordPress by Hal Stern, David Damstra and Brad Williams (Apress/Wrox)

This was a great start to a good group, and I’m looking forward to future meetings. Thanks to Amanda for organizing the meeting and the Portsmouth Public Library for the fine facilities. Stay tuned to the meetup group for announcements on future meetings.

Upgraded to WordPress 3.0

As seems to be the case with WordPress, I did another uneventful upgrade. Gotta love how smooth the devs have made upgrades! Let me know if you see anything out of the ordinary. Keep an eye out for some new WP 3.0 features

Updating WordPress again: permalinks

This morning, I updated the blog to use permalinks (the long URLs that should permanently link to a post) to change the format from http://www.tedroche.com/blog/?p=1234 to a newer format that includes the date and a bit of the post title, like: http://www.tedroche.com/blog/2007/11/22/recommendations-for-foss-podcatcher/. This lets you see both the date of the post and title in the link, and it also is more digestable by the search engines. Rather than seeing one page named blog/ with a parameter of P that changes all the time, the search engines now see that there are twenty-eight hundred pages in that directory, each with its own name. We’ll see if it makes any difference…

Retro-tagging a WordPress blog

I’ve got a WordPress blog with a couple thousand posts, upgraded several times, from a TWiki blog to a Radio Userland blog to WordPress and a couple of upgrades. And I’d like to add the new taggin features available in WordPress 2.3. Here’s what I’ve figured out from poking around: what used to be wp_category is now wp_terms and terms contains both categories and tags. The categories are hierarchical from a self-join using the group column to link back into the term’s term_id primary key. wp_terms in turn links into wp_term_taxonomy: that’s got a column named taxonomy that contains groups like ‘category’ and ‘link_tag’ and a parent column that self links into term_id, which I think is a duplication of what wp_terms is doing. There’s also a count field, meaning that we’re denormalizing the count of categories and tags, meaning if we hack at them, we’ll need to manually update this (see below). Finally, the posts are related to categories and tags using the table wp_term_relationships that’s a many-to-many link from the post’s primary key, object_id, to the term_taxonomy_id primary key of the wp_term_taxonomy table.

So, here’s the recipe to retrofit tags into some posts. I used phpMyAdmin as the web interface into the MySQL table that holds WordPress’ data. You can do the same via the mysql terminal interface or using other remote connectivity like ODBC or your choice of tools.

1. Create or update a tag in the wp_terms table. Note the term_id PK.
2. Insert the term_id and category of ‘post_tag’ into the wp_term_taxonomy table.
3. Create the linking records in wp_term_relationships with the following SQL. In this case, I’m tagging with “Ruby” any post that has “Ruby” in the title or post.

INSERT INTO wp_term_relationships
SELECT wpp.id object_id, `term_taxonomy_id`
FROM wp_posts wpp, `wp_term_taxonomy` wptt
JOIN wp_terms wpt ON wptt.term_id=wpt.term_id
WHERE wpt.name='Ruby'
AND wptt.taxonomy='post_tag'
AND (wpp.post_content LIKE '%Ruby%'
OR wpp.post_title LIKE '%Ruby%' )
ON DUPLICATE KEY UPDATE
wp_term_relationships.term_taxonomy_id=
wp_term_relationships.term_taxonomy_id

(The ON DUPLICATE code is just a quick hack to tell MySQL to ignore it if you’ve already tagged some posts Ruby by hand.)

4. Hack away. When you’re all done, you’ll want to fix the count in the table with the code below:

UPDATE wp_term_taxonomy wptt
SET wptt.count=
(SELECT count(*)
FROM wp_term_relationships wptr
WHERE wptr.term_taxonomy_id = wptt.term_taxonomy_id
GROUP BY term_taxonomy_id)

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.