Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-28 18:02:53

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Can I painlessly convert WordPress post slug to Textpattern?

Short version:

I’m thinking of converting a WP blog to Textpattern. I want to keep my old url scheme:

longstoryshortpier.com/vaults/YEAR/MONTH/DAY/slug

The slug is a specific field in WordPress. I see Textpattern, when converting, <a href=“http://forum.textpattern.com/viewtopic.php?id=13872”>dirifies the post’s title</a>. I want to know if there’s an easy way to port over the WP slug instead.

Also, I want to make sure there’s an easy way to get “vaults” in there as part of the URL.

Long version:

I converted an MT blog to WP a while back. I’m thinking for a variety of reasons that was a mistake; what I’ve seen of Txp makes me think I should have come here off the bat. Anyway. I’m trying to keep a Frankenstein’s monster of a legacy URL scheme current so my permalinks don’t keep breaking.

The MT scheme I originally used dirified with underscores rather than dashes. Also, I’m fond of special effects (sometimes) in post titles, and (sometimes) hiding inside jokes in the URL itself, so the slug was frequently different, sometimes entirely different, from the post title. When I ported to WP, I couldn’t get any of the scripts that purported to carry old MT slugs into WP to work properly, so I just went through and fixed every single one by hand.

I don’t want to do that again.

The WP slug is stored in a specific field of the database. It looks like there’s an URL-only title option in Txp. Does this just parse the title? Or can you store a slug value in there, so it’s possible to (somehow) port the slug from WP and drop it into the field in Txp and there you go?

I get the sinking feeling I’m going to have to learn some sort of SQL or something, but I thought I’d check and see if anyone knew of any resources off the bat.

Offline

#2 2006-01-28 18:14:48

RenJonsin
Member
From: Tarpon Springs, FL USA
Registered: 2005-02-06
Posts: 103
Website

Re: Can I painlessly convert WordPress post slug to Textpattern?

On each article, under advanced options, there is a field called “URL-only title” that can be used to change the slug part of your URL on a per article basis.

Offline

#3 2006-01-28 18:20:07

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Can I painlessly convert WordPress post slug to Textpattern?

Cool. But I have 800+ articles. Is there an easy way of porting the WP slug to Txp’s URL-only title?

Offline

#4 2006-01-28 18:29:49

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: Can I painlessly convert WordPress post slug to Textpattern?

kiplit,

you would want to do a sql command for this. You can use phpmyAdmin or the rss_db_admin plugin for TXP. There are tons of ways to get the data (I used to copy the entire wp articles table into the txp database). Then just do <pre>UPDATE textpattern set url_title =wp.slug</pre>

You would replace wp.slug with: table.coulmn of the table that has the wp slugs.

Offline

#5 2006-01-28 18:40:06

RenJonsin
Member
From: Tarpon Springs, FL USA
Registered: 2005-02-06
Posts: 103
Website

Re: Can I painlessly convert WordPress post slug to Textpattern?

> kiplet wrote:

> Cool. But I have 800+ articles. Is there an easy way of porting the WP slug to Txp’s URL-only title?

You should be able to port the slug over with no problem, however I’ve been looking for a plugin that I thought I saw that would ensure that you would be able to use the “vault” section followed by the date and slug and I can’t find that so you may not be able to do this.

Someone else may know of a plugin that will allow you to do this though so it might work afterall.

Ren

Offline

#6 2006-01-28 18:44:43

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Can I painlessly convert WordPress post slug to Textpattern?

Thanks, variaas.

RenJonsin, it would be pretty much a deal-breaker if I can’t match my old URL pattern. &#8212;It’s weird; I’d thought upon cursory examination that setting up the URL pattern to match would be the easier of the two.

Offline

#7 2006-01-28 20:38:17

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Can I painlessly convert WordPress post slug to Textpattern?

Hmm. It appears, and yes, there’s quite a bit of reading I need to do yet, bear with me, I’m thinking out loud, but it appears I could designate all the old legacy posts as being part of section “vaults” and then use the <a href=“http://textpattern.org/plugins/482/”>nck_olm</a> plugin to tweak the permalink structure for section “vaults” to follow YEAR/MONTH/DAY/SLUG.

I don’t care what model I use for future posts; in fact, I’m kinda looking forward to what I can do with sections and breaking the usual “blog” paradigm, woo hoo. But I do want to ensure that anyone who clicks on an old link out there in cyberspace will end up at the same-same post in its brand new home.

Offline

#8 2006-01-29 22:22:32

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Can I painlessly convert WordPress post slug to Textpattern?

Just as an update: I used a redirect in .htaccess to get around the “vaults” problem. (Short version: you can either have the section in your permalink structure, out of the box, or you can have the date. Not both.)

Now I need to figure out how to move the slug value for each post in the old WordPress database tables to the url_title field in Textpattern. Variaas got me started, thanks…

Offline

Board footer

Powered by FluxBB