Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#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
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
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
<a href="<txp:etz_striptags><txp:excerpt /></txp:etz_striptags>"><txp:etz_striptags><txp:excerpt /></txp:etz_striptags></a>
</pre>
Produces OK markup:
<pre>
<a href=" http://foobar.com
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>
<a href="http://foobar.com">http://foobar.com</a>
</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
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)
VC3 :: weblog :: my wishlist
Offline
Offline
Pages: 1