diff --git a/README.markdown b/README.markdown index 54680a6..8075270 100755 --- a/README.markdown +++ b/README.markdown @@ -1,10 +1,10 @@ Markdown Guide Extension ======================= -* Version: 1.5 -* Author: Carson Sasser (sassercw@cox.net) -* Build Date: 17 January 2012 -* Requirements: Tested on Symphony CMS versions 2.0.6, 2.0.7 and 2.1.1. Requires version 1.11 of the Markdown Text Formatter extension. +* Version: 1.6 +* Author: Stuart Palmer, Carson Sasser +* Build Date: 11 November 2014 +* Requirements: Tested on Symphony CMS version 2.5+. Requires version 1.11 of the Markdown Text Formatter extension. Installation ------------ @@ -23,6 +23,10 @@ TODO Change Log ---------- +Version 1.6 - 11 November 2014 + +- Add XML meta file + Version 1.5 - 17 January 2012 - Corrected a typographical error found by Martin Janiczek diff --git a/assets/markdown.php b/assets/markdown.php index 0af2c53..8ebcafa 100644 --- a/assets/markdown.php +++ b/assets/markdown.php @@ -2,7 +2,7 @@ $description = array( array(__('Headers'), __('Precede with a # for each level desired as in: ### This is an h3 header')), - array(__('Paragraphs'), __('Seperate with a blank line')), + array(__('Paragraphs'), __('Separate with a blank line')), array(__('Blockquotes'), __('Precede with a > (two >> will produce a quote within a quote)')), array(__('Unordered lists'), __('Precede list items with a *, + or -')), array(__('Ordered lists'), __('Precede list items with a number followed by a period')), diff --git a/extension.driver.php b/extension.driver.php index 2430ca3..9662883 100755 --- a/extension.driver.php +++ b/extension.driver.php @@ -6,13 +6,13 @@ public function about() { $info = array( 'author' => array( - 'email' => 'sassercw@cox.net', - 'name' => 'Carson Sasser', - 'website' => 'http://carsonsasser.com/' + 'email' => 'stuart@eyes-down.net', + 'name' => 'Stuart Palmer, Carson Sasser', + 'website' => 'http://www.eyes-down.net' ), 'name' => 'Markdown Guide', - 'release-date' => '2010-09-28', - 'version' => '1.3' + 'release-date' => '2014-11-12', + 'version' => '1.6' ); return $info; } @@ -45,19 +45,10 @@ public function addGuideBelowTextArea($context) { $context['textarea'] = Widget::Label(''); //retrieve the guide and append it - switch($formatter){ - case 'markdown': - $file = EXTENSIONS . '/markdown_guide/assets/markdown.php'; - break; - case 'markdown_extra': - $file = EXTENSIONS . '/markdown_guide/assets/markdown_extra.php'; - break; - case 'markdown_extra_with_smartypants': - $file = EXTENSIONS . '/markdown_guide/assets/markdown_extra_with_smartypants.php'; - break; - case 'markdown_with_purifier': - $file = EXTENSIONS . '/markdown_guide/assets/markdown_with_purifier.php'; - break; + if (file_exists(EXTENSIONS . '/markdown_guide/assets/' . $formatter . '.php')) { + $file = EXTENSIONS . '/markdown_guide/assets/' . $formatter . '.php'; + } else { + $file = EXTENSIONS . '/markdown_guide/assets/markdown.php'; } include($file); @@ -71,7 +62,7 @@ public function addGuideBelowTextArea($context) { } public function initaliseAdminPageHead($context) { - $page = $context['parent']->Page; + $page = Administration::instance()->Page; $page->addScriptToHead(URL . '/extensions/markdown_guide/assets/toggle_guide.js', 900200); } } diff --git a/extension.meta.xml b/extension.meta.xml new file mode 100644 index 0000000..efb07c3 --- /dev/null +++ b/extension.meta.xml @@ -0,0 +1,24 @@ + + + Markdown Guide + Provides markdown text formatter syntax explanation + https://github.com/stuartgpalmer/markdown_guide + + + Text Formatters + + + + Stuart Palmer, Carson Sasser + http://getsymphony.com + + + + + - Compatibility with Symphony 2.4+ + + + + + +