Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Plugin for PHP Markdown
Would it be at all possible to write a plugin that would let PHP Markdown co-exist alongside with Textile? Today I’ve replaced Textile with PHP Markdown and hope that I never have to go back and edit an old Textile marked up text. I would much prefer to have PHP Markdown as the fourth choice in the “Use Textile/Convert line breaks/Leave text untouched” drop down menu and be able to choose the shorthand syntax on a per-article bases.
Is this possible? Does such a plugin exist? Is there someone willing to give it a shot? I do lack the necessary PHP skills myself.
Thank you,
Joakim
Offline
Re: Plugin for PHP Markdown
I’d be willing to bet that Textile is fairly ingrained in the core code so a plugin might be tricky.
It would be nice to be able to upload new ones and add them to a TXP installation, then switch between systems allowing one to be ‘default’ from the prefs. But I think you’re out of luck without some hacking… (it was fairly straightforward to do in PunBB either but still a hack)
Today I’ve replaced Textile with PHP Markdown
Was it easy? What else did you do besides replace classTextile.php?
Last edited by Bloke (2008-04-21 08:45:43)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Plugin for PHP Markdown
Was it easy? What else did you do besides replace classTextile.php?
I did this myself a while ago on an old version of Txp (though I’ve gone back to Textile – I much prefer it) and – IIRC – it was little more than a matter of renaming the Markdown script “classTextile.php” and replacing the original with it.
Keith
Blyth, Northumberland, England
Capture The Moment
Offline
Re: Plugin for PHP Markdown
keith wrote:
it was little more than a matter of renaming the Markdown script “classTextile.php” and replacing the original with it.
Cool, good to know. I guessed it might have been a bit more involved because the core makes calls to textileThis() in a few places so I’d expect it to cry at those points (e.g. when using the ‘Preview’ and ‘HTML’ links on the Article tab… not that I know anyone who uses those!)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Plugin for PHP Markdown
I feared as much. I suppose I’ll have to wait for Txp 4.1, then.
Replacing Textile was easy, as was previously stated. Besides replacing classTextile.php with a renamed copy of PHP Markdown (Extra) and uploading a copy of PHP Smartypants Typographer I found I had to set “Comments use fat Textile” to yes in preferences. The latter is to allow for any syntax formatting in comments.
/Joakim
Offline
Pages: 1