Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-13 05:54:21

rawtext
Member
From: Massachusetts, USA
Registered: 2006-09-13
Posts: 21

While migrating from MT to TXP

I lost all my categories as they turned in to numbers, when I listed the categories in the admin interface I couldn’t even click them to rename, the title/link labels were blank for every cat.

So I entered in the cat id in to a textpattern url to view the cat edit page, fixed the cats names, still another problem. My articles lost their assigned cats while importing. Great!

So basically, I need a way to batch assign a category to multiple articles at once. I wouldn’t want to go through every article assigning cats as there are over 100.

Also In MT I built a link log by putting a url in the excerpt of articles. Now in TXP a p tag is around my exceprts so I can’t output the url unformated like I normally would with MT. With MT there were global attr’s to turn off formating for pretty much any template tag.

Should this be brought up in the plugin section?, I think these would be good plugins.

Thank you for your time.

Offline

#2 2006-09-13 06:10:14

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: While migrating from MT to TXP

I’ve never converted from something to TXP, but you could try a few things:

  • Install Textpattern locally with XAMPP or another instant server.
    • Change all the categories locally. It’s like browsing local files on your computer, speed wise, so you could have all 100+ articles re-categorized in an hour or less.
  • Edit the sql file in a text editor—do a find and replace for categories.

For the linklog, click Advanced Options when posting/editing, and check “Leave Text Unformatted” for the excerpt. Or you could wrap <txp:excerpt /> with etz_striptags. That would be the easiest method. Also, there is a great bookmarklet for the links section, if you use that instead of articles.

Offline

#3 2006-09-13 06:57:32

rawtext
Member
From: Massachusetts, USA
Registered: 2006-09-13
Posts: 21

Re: While migrating from MT to TXP

deldindesign, great tips, I checked out etz_striptags, works fine but not for a url output as spaces are put around the url when the tags are stripped.

I may just find and replace my category articles like you said.

Offline

#4 2006-09-13 07:22:20

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: While migrating from MT to TXP

I linked the excerpt to the URL, but if you’d rather have the raw URL, remove the a href part.

<pre>
//article-list
&lt;a href=&quot;&lt;txp:etz_striptags&gt;&lt;txp:excerpt /&gt;&lt;/txp:etz_striptags&gt;&quot;&gt;&lt;txp:etz_striptags&gt;&lt;txp:excerpt /&gt;&lt;/txp:etz_striptags&gt;&lt;/a&gt;
</pre>

Produces OK markup:

<pre>
&lt;a href=&quot; http://foobar.com

&quot;&gt; http://foobar.com &lt;/a&gt; </pre>

EDIT: Go to Admin>Plugins>Edit etz_striptags. Replace the existing function with this:

<pre>
function etz_striptags ($atts, $thing) { $initial = strip_tags(parse($thing)); return trim($initial);
}
</pre>

Which will produce:

<pre>
&lt;a href=&quot;http://foobar.com&quot;&gt;http://foobar.com&lt;/a&gt;
</pre>.

You might be better off using a custom field for the URL though, in case you decide to post more with the excerpt.

Last edited by deldindesign (2006-09-13 07:31:59)

Offline

#5 2006-09-13 17:21:44

rawtext
Member
From: Massachusetts, USA
Registered: 2006-09-13
Posts: 21

Re: While migrating from MT to TXP

deldin, thank you so much, now Tidy doesn’t whine about malformed url’s ;o)

I have about 40 articles with a url in the excerpt, so I think i’ll just stick with that. Besides I call the articles QuickLinks so they wouldn’t ever need an excerpt just a few sentences in the body.

Thanks again.

Offline

#6 2006-09-13 19:10:21

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: While migrating from MT to TXP

etz_striptags version 0.2 includes the desired fix.

Last edited by Etz Haim (2006-09-13 19:11:15)

Offline

#7 2006-09-13 23:31:32

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: While migrating from MT to TXP

No problem!

Offline

Board footer

Powered by FluxBB