| Server IP : 54.36.91.62 / Your IP : 216.73.217.111 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/dansnotreville-fr/plugins/hikashop/content_markdown/ |
Upload File : |
<?php
/**
* @package HikaShop for Joomla!
* @version 5.0.2
* @author hikashop.com
* @copyright (C) 2010-2023 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
class plgHikashopContent_markdown extends JPlugin
{
protected $plugin_name = 'content_markdown';
public function __construct(&$subject, $config) {
parent::__construct($subject, $config);
if(isset($this->params))
return;
$plugin = JPluginHelper::getPlugin('hikashop', $this->plugin_name);
$this->params = new JRegistry(@$plugin->params);
}
public function onHkContentParserLoad(&$parsers) {
if(isset($parsers['markdown']))
return;
$parsers['markdown'] = array(
'name' => 'CONTENTPARSER_MARKDOWN',
'editor' => false,
'plugin' => $this->plugin_name
);
}
public function onHkContentParse(&$content, $type) {
if($type != 'markdown')
return null;
$content = $this->parse($content);
}
public function parse($content) {
include_once dirname(__FILE__).DS.'lib'.DS.'parsedown'.DS.'parsedown.php';
$content = htmlentities($content, ENT_COMPAT, 'UTF-8');
$parsedown = new Parsedown();
return $parsedown->text($content);
}
}