For the last few weeks, I have been wrestling with Markdown, Textile and Textpattern in an attempt to fix our comments. We use Markdown for text formatting on Particletree (and we love it), but it’s been making our comments useless. Basically, it was just stripping out the HTML and leaving people with no way to add links to their comments (Textile didn’t work OR Markdown).
Well, I finally figured out how to make everything work in peace and thankfully, you only have to change one line of code. The following refers to Textpattern 4.01.
For those that know, installing PHP Markdown is easy. All you have to do is renamed the markdown file to
classTextile.php and replace the Textile formatting file of the same name in the ‘textpattern/lib/’. Before you do that though, rename your old
classTextile.php so you don’t lose it. For example I rechristened ours
Then find the
txplib_misc.php file in your
textpattern/lib/ directory. Locate the
markup_comment function (around line 1134) and rename the following line:
so it refers to your original Textile file. Like this:
And boom. You can use Markdown for your articles and have textile formatting in your comments.