Skip to content

Commit 7fe45a3

Browse files
committed
documentation and cleanup
Added licence, renamed files to be more general & refined readme
1 parent 5ebcef0 commit 7fe45a3

6 files changed

+47
-64
lines changed

README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
### Oxid CE Markdown module
2-
#### A Oxid eShop CE module providing a Smarty modifier plugin to convert markdown formated text to HTML
2+
#### A Oxid eShop CE module providing a Smarty modifier plugin to convert markdown formatted text to HTML
33

4-
This Oxid module adds a modifier to the oxid shop Smarty functions. Upload to modules, activate and use like this (example):
4+
To convert markdown text to HTML this module is using the Parsedown lib by http://parsedown.org
5+
6+
7+
##### Usage:
8+
9+
Upload to modules, activate and use like this (example):
510

611

712
[{ oxeval var=$oLongdesc|md2html }]
813

9-
14+
in any *.tpl you like.
15+
1016
In this example the articles long description will be transformed to HTML.
1117

12-
License: The MIT License
18+
##### License
19+
The MIT License

metadata.php

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<?php
2+
/**
23
/**
34
* Markdown Converter as Smarty plugin for Oxid CE
45
* Copyright (C) 2014 Sven Wegerhoff
5-
*
6-
* This program is free software;
7-
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
8-
* either version 3 of the License, or (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12-
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
6+
* Project URL: https://github.com/buckyball/
137
*/
148

9+
1510
$aModule = array(
1611
'id' => 'zoq_markdown',
1712
'title' => '<strong style="color:#2e5fc7;border: 1px solid #6a8fc7;padding: 0 2px;background:white;">zoq</strong> Markdown Extension',
@@ -22,13 +17,13 @@
2217
'email' => '[email protected]',
2318
'url' => 'https://github.com/buckyball/',
2419
'extend' => array(
25-
'oxutilsview' => 'zoq_markdown/oxutilsview_zqse'
20+
'oxutilsview' => 'zoq_markdown/oxutilsview_zqmd'
2621
),
2722
'files' => array(
28-
'zqse_events' => 'zoq_markdown/zqse_events.php',
23+
'zqse_events' => 'zoq_markdown/zqmd_events.php',
2924
),
3025
'events' => array(
31-
'onActivate' => 'zqse_events::onActivate',
32-
'onDeactivate' => 'zqse_events::onDeactivate'
26+
'onActivate' => 'zqmd_events::onActivate',
27+
'onDeactivate' => 'zqmd_events::onDeactivate'
3328
)
3429
);

oxutilsview_zqmd.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Markdown Converter as Smarty plugin for Oxid CE
4+
* Copyright (C) 2014 Sven Wegerhoff
5+
* Project URL: https://github.com/buckyball/
6+
*/
7+
8+
9+
10+
/***
11+
* Class oxutilsview_zqmd
12+
* attach custom smarty plugins to the oxid smarty object
13+
*/
14+
class oxutilsview_zqse extends oxutilsview_zqse_parent
15+
{
16+
public function _fillCommonSmartyProperties($oSmarty)
17+
{
18+
parent::_fillCommonSmartyProperties($oSmarty);
19+
20+
$cfg = oxRegistry::getConfig();
21+
22+
$aPluginsDir = $oSmarty->plugins_dir;
23+
$aPluginsDir[] = $cfg->getModulesDir()."/zoq_markdown/smarty/";
24+
$oSmarty->plugins_dir = $aPluginsDir;
25+
}
26+
}

oxutilsview_zqse.php

-32
This file was deleted.

smarty/modifier.md2html.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22
/**
33
* Markdown Converter as Smarty plugin for Oxid CE
44
* Copyright (C) 2014 Sven Wegerhoff
5-
*
6-
* This program is free software;
7-
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
8-
* either version 3 of the License, or (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12-
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
5+
* Project URL: https://github.com/buckyball/
136
*/
147

158
require_once('Parsedown.php');

zqse_evets.php zqmd_events.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
/**
33
* Markdown Converter as Smarty plugin for Oxid CE
44
* Copyright (C) 2014 Sven Wegerhoff
5-
*
6-
* This program is free software;
7-
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
8-
* either version 3 of the License, or (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12-
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
5+
* Project URL: https://github.com/buckyball/
136
*/
7+
148
class zqse_evets extends oxI18n {
159

1610
public static function onActivate() {

0 commit comments

Comments
 (0)