Welcome to Geeklog, Anonymous Wednesday, December 07 2022 @ 09:55 pm EST

Geeklog Forums

WiML Post Mode


Rick Measham

Anonymous
thoughtful
(It probably has a better name, but I call it WiML for Wiki Markup Language)

Is there an existing plugin to allow users to select WiML for their Post Mode?

The default installation lets users select 'Plain Old Text' or 'HTML Formatted'. I'd like a third option for WiML (that I could set as default). WiML allows links like [http://mysite/|This is my site] and many other conventions seen in Wikis.

(If this is done, or it's possible, I'd eventually also like to include POD for entering text in POD format ... but that's down the track)

Cheers!
Rick
 Quote

Status: offline

magomarcelo

Forum User
Junior
Registered: 05/21/04
Posts: 16
Location:Milano, Italy
I am currently using PHP Markdown 1.0.

To integrate it, I modified the COM_article function within lib-common.php:

Text Formatted Code

    if( $A['postmode'] == 'plaintext' )
    {
        $A['introtext'] = Markdown( $A['introtext'] );
        $A['bodytext'] = Markdown( $A['bodytext'] );
/*
        $A['introtext'] = nl2br( $A['introtext'] );
        $A['bodytext'] = nl2br( $A['bodytext'] );
*/
    }

 


You also need the markdown.php file somewhere and a call to include_once for it within lib-common.php.
--m
http://magomarcelo.blogspot.com
 Quote

All times are EST. The time is now 09:55 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content