Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

TextilePHP

This is a fairly involved hack for TXP that allows one to use TextilePHP, or any other suitable replacement for Textile such as SmartyPants, quite easily. There are a few steps that you have to go through.

Installation

  1. Download TextilePHP
  2. Extract the zip file, then place classTextilePHP.php and smartypants.php into /textpattern/lib/
  3. Using a good text editor, like Textpad do a search on all the files in your textpattern directory that have classTextile.php in them.
  4. Replace everything after the include or include_once on the lines that have classTextile.php in them, with this: $txpcfg['txpath'].'/lib/'.$txpcfg['textile_filename'];
  5. Open up config.php and add $txpcfg['textile_filename'] = 'classTextilePHP.php';

If you wish to remove TextilePHP for TXP, just change the $txpcfg['textile_filename'] to classTextile.php and Dean’s original Textile class will be used instead. If someone developed a port of Markdown then you would change $txpcfg['textile_filename'] to the filename of the Markdown class.

One important thing to note is that TextilePHP for TXP and Dean’s Textile handle Excerpts differently. TextilePHP will allow for much more formatting of Excerpts (you can add block level, like table’s, elements), but it will strip out paragraph tags. This is done to more closely match the way Dean’s Textile handle’s Excerpts, which are supposed to be simple one or two line descriptions.

Article Request Count:
Initially released:
2004-06-09
Posted here:
23 Mar 2005

You know you want to visit the Archives.
Published with Textpattern