Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-09 11:44:32

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

[wiki] Pivot to TXP Converter

Pivot to TXP Converter
could be intergrated to Textbook

Offline

#2 2005-11-09 11:49:31

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: [wiki] Pivot to TXP Converter

I would much rather like to see a Pivot user adopt the script and change it, so we can add it to the other converters in Textpattern. And after that, add the relevant info in Textbook.

Offline

#3 2005-11-09 12:16:17

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

Re: [wiki] Pivot to TXP Converter

@Sencer
this is one way to handle the issue
i just think this way: start to add it to textbook so someone can pick it up and work on it furtheron
(maybe my approach is silly ?)

Offline

#4 2005-11-09 13:23:24

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [wiki] Pivot to TXP Converter

The problem as I see it is there is no documentation to begin with, except this …it’s just a PHP script that we have so far, and apparently a shakey one at that. Being that is the case, we’re probably not ready for TextBook yet. However, I think Alexandra was right in starting a thread here about it. This is one way I see this forum being useful…bringing attention to documentation that is needed, and getting some eyes and brains on the matter.

Last edited by Destry (2005-11-09 13:25:05)

Offline

#5 2005-11-23 13:22:12

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [wiki] Pivot to TXP Converter

I have a Pivot to TxP project looming and would like to iron-out the approach with anybody who can shed some light. After it’s all said and done I’ll add a writeup to TextBook.

Background:

Thanks to Stefan, we have a start on an converter file (CF) to work with (article). However, I having not done an import yet like this so I don’t want to walk into the process with a blindfold on.

To be clear, I don’t have any need for expanding the script to something more robust, like what Sencer points out really needs done. That needs to be taken up by a PHP-Pivot wiz to account for any categories, sections, or other established IA aspects an existing Pivot site might have.

The site I’m working on is pretty badly organized and owner is no designer/developer; I don’t think there is any structural aspects to worry about. There isn’t even any text formatting to worry about, for the most part; the goal will simply be to get the articles loaded into a TxP dev location where the site owner can start editing his articles in the TxP environment (getting used to it), while I start from scratch on his IA and design.

There is not much to work with right now: PUlling from “Stefan’s thread, and from LeeStewart’s general overview of system migration in TextBook, here is what I gather so far.

Docs Planning:

1) Install Textpattern at the desired location (probably best at first as a dev directory on the hosts server), and make sure the config file contains the correct database information.

2) Put the CF somewhere for editing purposes, and begin editing as follows:

  • At line 16, define the path to the TxP site: <code>$path_to_textpattern = ‘/var/www/new/textpattern/’;</code> (Edit path accordingly.)
  • At line 19, define the language used by the current Pivot site: <code>define(LANG, ‘en-gb’);</code> (Edit <code>‘en-gb’</code> accordingly.)
  • Beginning at line 21, add all the TxP files expecting to be needed [What would be a complete list of these files, or are the three below all there is?], such as…
    • <code>include_once($path_to_textpattern.‘config.php’);</code>
    • <code>include_once($path_to_textpattern.‘lib/classTextile.php’);</code>
    • <code>include_once($path_to_textpattern.‘lib/txplib_misc.php’);</code>
  • Beginning at line 29, add the correct TxP config.php file details…
    • <code>mysql_connect($txpcfg[‘host’], $txpcfg[‘user’], $txpcfg[‘pass’]) or die(‘could not connect to mysql’);</code> (Edit <code>‘host’</code>, <code>‘user’</code>, and <code>‘pass’</code> accordingly.)
    • <code>mysql_select_db($txpcfg[‘db’]) or die(‘could not select database’);</code> (Edit <code>‘db’</code> accordingly.)

3) Place the CF above your Pivot root folder (the same folder where you see the pivot/ folder). [This is a little unclear to me, and I do not yet have access to the client’s server to see what an actual Pivot tree looks like so if anyone can clarify this with paths and locations and such, that would be very helpful here. Maybe show what a typical Pivot tree structure looks like at the installed root, and indicate where the CF is to be added into the tree.]

4) Open a Web browser, add path to the CF, and hit enter. This runs the CF script.

<strong>Attention:</strong> And if it’s even possible (I can’t rightly say), could the lines of code in the CF file be reworked so that less page spanning was happening, like with a few key line breaks and such? Then make this copy a default source somewhere, in the wiki for example. Why would this be helpful? Two reasons:

  1. It makes it easier for writers to document the code by using line numbers correctly in the documentation to reference code snippets (like I’m trying to do above). My tendency is to use word wrap in Crimson Editor when I read and notate code, but if the code is not hard wrapped to begin with, this can cause confusion later when documenting line numbers.
  2. In relation to the first, it’s easier for people to follow and edit the CF when the CF code looks like the documentation that describes it (i.e., proper line number positioning). If it can’t be done for code reasons, which I realize could be the case, then no worries.

So now what, what should happen? What should a person doing this see exactly as signs of success?

Offline

Board footer

Powered by FluxBB