Nathan Pitmanhello, my name is
nathan pitman.

Category: Textpattern

Migrating from TXP to EE - Step 1 Sep 22. 080

Ok so a lot of this will be obvious but hey, here we go… I’ve decided to tackle the migration by setting up an ExpressionEngine Core Install on a sub domain (http://ee.nathanpitman.com) where I will be able to get everything up and running before I switch from the old Textpattern install for good.

First step quite obviously is to install ExpressionEngine Core (The free version of the CMS). I won’t explain how to do this, it’s dead easy and there are a ton of useful resources out there for you to look at if you’ve never used EE before.

First thing to do after you’ve completed the install is to modify the default custom field group for the default weblog to match the fields which you have in Textpattern. Textpattern has a ‘Body’ and ‘Excerpt’ field so you could simply rename the default ‘extended’ field if you want to feel at home.

As we’re migrating from Textpattern all our posts that we will be importing will be formatted with Textile or XHTML so we’re going to need to mimic that environment in ExpressionEngine. To do so we’ll need to install a handy little 3rd party plug-in called ‘Textile’! You can download the Textile Plug-in from the ExpressionEngine website. Once installed you will need to log-in to your ExpressionEngine control panel again and change the default formatting for the custom fields (body and excerpt) to use ‘Textile’ rather than XHTML. Don’t worry if some of your Textpattern blog posts have XHTML in them, Textile will still render these just right.

Finally, before we move on to exporting our blog entries from Textpattern we need to install a module that will allow us to more easily upload and manage files as we are used to doing so with the Textpattern ‘Files’ tab. The nearest equivalent that I have found over the years is the Low File Manager Module. It doesn’t provide download counts but it does pretty much everything else you could want and ties in beautifully with the ExpressionEngine File Upload preference settings.

Next we’ll be looking at how to export all our blog entries from Textpattern and pull them into ExpressionEngine. :)

Next Step…

Blogging the migration from Textpattern to ExpressionEngine Sep 22. 080

I have made a cast iron decision. I am migrating (this) my personal blog from Textpattern to ExpressionEngine. I thought others might find it useful if I blogged my progress along the way.

So, this is the first of a number of posts which will explain the how, why when and what in as much detail as I can muster. If you’re looking to do the same then perhaps you’d like to follow me…

:)

Update: Step 1, Step 2, Step 3, Step 4, Step 5, Conclusion.

Bah, it’s ghastly. Mar 02. 065

Well, I started faffing about with what was intended to be a small ‘re-align’ or whatever, now it’s turning into a ghastly mess with content flailing wildly all over the place and background images wandering off without any intention of returning to a sensible or desired location.

It’s all gone Pete Tong. I hate the set up of page templates which are stored in a CMS database field, and the same goes for the CSS, that sucks too. It just teases me into toying and tweaking live, on the trot, until disaster strikes, then I realise it’s a year or so since I did a backup of my CSS, and the page templates well forget it, those changes are lost for good. No handy little tab to roll back to the previous version, no sir!

It’s like 1 step forward, 2 steps back.., great I can manage my content from anywhere in the world, my pages are made up of neat little re-usable snippets of code and my CSS is served by a clever little call to a PHP page, but the interface for editing it all, it stinks… I can’t have code colouring like I can in a text editor, and heaven forbid if I should want to ‘tab’ a line of code in a few spaces.

Bah, I’ve had it, it’s ghastly, it’s horrible, is there not a CMS out there which is designed around storing my templates, snippets and CSS in the normal manner, in a simple physical folder.

Rant off.

New tricks with Textile Oct 19. 050

I’m using textile on a project I’m currently working on and having come up against a bit of an issue I discovered a nifty little feature of textile which I’d never used before.

The problem I was having is as follows.

I’m pulling a field out of a database which is marked up using textile, I then call the ‘TextileThis’ function to render it back as XHTML. This is all good except for one thing. The text I’m pulling back is wrapped in an ‘href’ in order to link the entire body of text to another part of the site. When the textile ‘XHTML’s my text it’s auto wrapped in an opening and closing paragragh tag, that’s fine in most cases but in this situation it messes up the visual rendering of the link element:

<a href="http://ninefour.co.uk"><p>This is my sample text</p></a>

Obviously this isn’t ideal.

So, I took a poke about in the textile class file and discovered that ‘TextileThis’ accepts a number of arguments. Wow, never realised that before.

function TextileThis($text$lite=''$encode=''$noimage=''$strict='')

Well I have no idea what ‘encode’ (URL encode maybe) and ‘strict’ do but ‘image’ will remove images and ‘lite’ prevents textile from wrapping it’s output in paragraph tags.

Success!

Tag parsing in Textpattern articles Aug 03. 050

Did you know that you can nest Texpattern tags in your article body? This is super neat (and probably pretty obvious) but I never realised until now. I’ve been fiddling with a new section called ‘etc’ (maniacal rage inspired name) and wanted to add articles in the usual manner but needed to list a bunch of file downloads. At first I thought I’d have to hard code the relevant tags into my page template… Hoorah for tag parsing in articles! :)

With an RC5 release over at Textpattern.com it looks like things are gathering pace and Dean is ‘finally’ on the brink of a ’1.0’ release. I know I’ve said it before, but I think this time they really are getting close!

Tagged: Textpattern