GetSimple Support Forum

Full Version: Markdown for GetSimple
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It’s weird that nobody beat me to it. Here is Markdown for GetSimple.

I’m not even going to give a speech on this one, it took me a total of 2 lines to code this plugin. Nope, I don’t even want credit for that.

Download and extract the files to your plugins folder. From then on you can write using the Markdown syntax (turn of CKEditor first!) to create your pages. It is running on PHP Markdown, if you have any knowledge of it and prefer using PHP Markdown Extra this will only take you a minute. Download the Extra package and unpack the archive into the markdown folder that came with the plugin. It will want to overwrite files and you’re going to allow this. Once it has overwritten all the files (markdown.php in particular) you will find yourself playing with this special version of Markdown.

Have fun with it, let me know whether you will actually use it. If not, I still think this had to be made.
well...still nice one Smile
something similar for TexTile, not a plugin though...

http://get-simple.info/forum/viewtopic.php?id=124
n00dles101 Wrote:Something similar for TexTile, not a plugin though…
Didn’t know about that! Are you thinking about making it a plugin?

Wait, you wrote this:
n00dles101 Wrote:This will automatically be included version 1.6 onwards.
So, is it? Because I didn’t know about that.
This was back in the day before the templates "functions.php" existed,
it was automatically included from v1.6 onwards...

no plans for a plugin as it doesn't do anything on the backend...
I'm just turning off the editor.

M
n00dles101 Wrote:It was automatically included from v1.6 onwards… […] I'm just turning off the editor.
That doesn’t give you TexTile now, does it? I can’t find any reference to it in the core.
think we've got out wires crossed on this one...

the functions.php file was not automatically included in your template if it existed before v1.6,
you had to manually add it.

my original texTile post included a function to convert the "content" of the page into textile which needed to be included
in your templates function.php file.

by turning off the internal editor you can have whatever on the frontend be it TexTile/Markdown/BBCode etc... just include the relevant classes/functions in your template file and convert / echo the "content" of the page.

my site uses textile, and using markdown on jack.ie

M
Aah, now I get it, sorry for the mix-up Smile I was under the impression that you meant it was included in the core.

Maybe I should make this plugin bigger and let it support the different parsers that are out there. Anyone know a good one? It will of course support TexTile, Markdown and Smartypants.
To make this plugin work under PHP 5.3.* I've had to edit plugin_functions.php

Line 135:
Code:
function exec_filter($script,$data=array()) {
Line 139:
Code:
$data = call_user_func_array($filter['function'], array($data));

(via this thread)