Welcome Guest, Not a member yet? Register   Sign In
[Patch] Textile Helper class patch for CodeIgniter
#1

[eluser]pacifika[/eluser]
Because up to now it was easier to use markdown as a helper rather than textile (which had to be implemented as a library), I created a patch to make using textile much simpler.

Instructions
Copy /textpattern/lib/classTextile.php to /application/helpers/textile_helper.php from a TextPattern installation
Apply the patch in the helpers directory: @patch < textile_ci-helper.patch

Patch: http://dl.dropbox.com/u/70903/textile/te...lper.patch
Patched Textile Helper: http://dl.dropbox.com/u/70903/textile/te...helper.zip

After patching, simply use textile as follows:

Code:
$this->load->helper('textile');
$text = Textile("Dude this is *my* code!");

Thanks to Michel Fortin of Markdown PHP for his PHP Markdown Extra which is implemented similarly to my patch. BTW, I’m not that experienced in making patches available, so any feedback on the process is appreciated. I’ve crossposted on the textile forums.

I've not updated the wiki but perhaps if this patch is accepted then someone more authorative could do so? Forum software will not allowed to post links on here so for downloads of the patch and resources visit http://forum.textpattern.com/viewtopic.php?id=36030

Markdown for CI: http://codeigniter.com/wiki/PHP_Markdown_for_CI_1.5.x/
Textile for CI: http://codeigniter.com/wiki/Textile_Markup/
Michel Fortin's PHP Markdown Extra: http://michelf.com/projects/php-markdown/




Theme © iAndrew 2016 - Forum software by © MyBB