Topic: [ granted (both!) ] Textile or Markdown Integration  (Read 15904 times)

Pages: 1 [2]   Go Down

#21: 27-Feb-2006, 04:07 AM

Coding Team

garryn
Posts: 1,391

WWW
Hi,

Looking at the phpMarkdown instructions, I think the following plugin should work - set it to run on the 'OnWebPagePrerender' event:

Code:
// phpMarkdown integration

$e = &$modx->Event;

switch ($e->name) {
case "OnWebPagePrerender":
include_once("markdown.php"); //change path to where the markdown script is located
$pg=&$modx->documentOutput;
$modx->documentOutput = Markdown($pg);
break;
default:
return;
break;
}

I've not tried this yet but, in theory, should work.  Wink

Cheers, Garry

#22: 27-Feb-2006, 08:35 AM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
If it's as simple as that, then it's truly a testimony of MODx power Smiley

Berlueur, could you try that and report ?
Thanks !
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#23: 27-Feb-2006, 11:24 AM

Berlueur
Posts: 12

I love MODx!

Yeah, I have made my "own" Markdown plugin after posting my message and before reading the responses here... (by totally ripping off Raymond Irving's plugin).

I'm actually a bit excited to have "made" my first MODx plugin... so much so that I made a little package.

(BTW, MODx thoroughly rocks...)

The plugin lives here.
« Last Edit: 27-Feb-2006, 07:17 PM by Berlueur »

#24: 27-Feb-2006, 11:37 AM

Emeritus
Djamoer
Posts: 1,495

No one can limit a man other than the man himself.

WWW
Yeah, I have made my "own" Markdown plugin after posting my message and before reading the responses here... (by totally ripping off Raymond Irving's plugin).

I'm actually a bit excited to have "made" my first MODx plugin... so much so that I made a little package.

Here goes.

(BTW, MODx thoroughly rocks...)

Did you post it somewhere on the forum? Please make a new topic with [Plugin] as the prefix of the title, and name the plugin, so we can add it to the repository Wink Good job with your first try...

Have fun with MODx! Grin

#25: 27-Feb-2006, 12:11 PM

Berlueur
Posts: 12

I love MODx!

Yes, it is attached to my post, just above...

I will make a new topic, although it feels a bit strange since I did almost nothing...

#26: 27-Feb-2006, 04:47 PM

Guest
I download the package and follow the readme but when I edit to document the FCKeditor kick in and I don't see any markdown stuff even I set FCKEditor to no in the system config.

What am I missing?

Thanks

#27: 27-Feb-2006, 06:23 PM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
Maybe the little instructions I wrote for the Textile plugin will help, since the principle is similar.

Just modify <textile> and </textile> by <markdown> and </markdown> (that is, if berlueur followed the same logic , didn't test this one yet).

Hope this helps !
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#28: 27-Feb-2006, 06:24 PM

Berlueur
Posts: 12

I love MODx!

Yes, Markdown directives need to be enclosed in <markdown> </markdown tags.

#29: 27-Feb-2006, 07:05 PM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
Yeah well let's also mention there is a ReadMe in the distributed plugin Smiley

Berlueur, so that everyone downloads the right version, I suggest you take your download off this thread and keep only one on your the official plugin post Smiley

This will avoid confusion and mistakes Tongue

Anyway, great work this is very nice having Mardown working Grin

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#30: 27-Feb-2006, 09:22 PM

Guest
I put <markdown>[*content*]</markdown> in the template and it works but I did the same thing for <textile></textile> but for some reason it does not work the tag that tried.

#31: 28-Feb-2006, 12:30 PM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
Chanh, didn't test Markdown but Textile works for me when I put <textile>[*content*]</textile>, I just checked again.

Are you sure you ticked OnWebPagePrerender in Resources > Manage Resources > Plugin >> Textile >>> System Events ?

If that's not it, then I don't get it...
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#32: 28-Feb-2006, 01:02 PM

Guest
I copy the entire TexTile test text into my content to test out the snippet and yes I did set the system event and I did change the template but it does not seems to do anything.  May be the Textile.php is not compatible with the test text that I copy from the site.

I work fine with Markdown test markup those.

One little caveat is the first line have to be blank for this to work otherwise the first line does nothing.

#33: 1-Mar-2006, 05:24 AM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
Well, I tested a few elements of Textile syntax, not the sample file...

I'll try that, you're probably right something is bugging the plugin probably. Which sample file did you try ? There are Textile (like the one use in txp) and Brad Choat's Textile2.0 which has been ported from MT to many CMSes , the later having more capability.
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#34: 1-Mar-2006, 08:59 AM

Guest
Here is the sample that I use for my test.

http://www.textism.com/tools/textile/?sample=2

#35: 1-Mar-2006, 12:32 PM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
Ok I just tried the textism sample.

For me :
  • lists (unordered and ordered) work
  • title work
  • links work
  • emphasis works
  • blockquote works
  • all "second level" things like p.{color:red} or bq.[fr] or #{color:blue}doesn't work
  • muli-level list do not work (or rather the second level of depth)
  • mixed list do not work (idem)

Not in the sample file I also tried :
  • quote works
  • deleted text works
  • superscript works
  • subscript works
  • accronyms work
  • span doesn't work
  • align doesn't work.

I'd have to check that with Jeff... or have a look myself to the plugin.


« Last Edit: 1-Mar-2006, 12:33 PM by davidm »
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
Pages: 1 [2]   Go Up
0 Members and 1 Guest are viewing this topic.