コード例 #1
0
 public function initContent()
 {
     parent::initContent();
     include_once dirname(__FILE__) . '/../../../modules/eicmslinks/eicmslinks.php';
     //Module EiCmsLinks : On récupère les liens dynamiques des catégories
     $this->category->description = EiCmsLinks::updateCmsLinksDisplay($this->category->description);
     $this->context->smarty->assign(array('description_short' => Tools::truncateString(EiCmsLinks::updateCmsLinksDisplay($this->category->description), 350), 'category' => $this->category));
 }
コード例 #2
0
 public function initContent()
 {
     parent::initContent();
     //Module EiCmsLinks : On récupère les liens dynamiques des produits
     include_once dirname(__FILE__) . '/../../../modules/eicmslinks/eicmslinks.php';
     $this->product->description_short = EiCmsLinks::updateCmsLinksDisplay($this->product->description_short);
     $this->product->description = EiCmsLinks::updateCmsLinksDisplay($this->product->description);
     $this->context->smarty->assign(array('product' => $this->product));
 }
コード例 #3
0
 /**
  * Get a value from $_POST / $_GET
  * if unavailable, take a default value
  *
  * @param string $key Value key
  * @param mixed $default_value (optional)
  * @return mixed Value
  */
 public static function getValue($key, $default_value = false)
 {
     if (!isset($key) || empty($key) || !is_string($key)) {
         return false;
     }
     $ret = isset($_POST[$key]) ? $_POST[$key] : (isset($_GET[$key]) ? $_GET[$key] : $default_value);
     // array of fields names if you don't want update link ( not need )
     $arrDisableEicLink = ['description_short', 'description'];
     if (is_string($ret)) {
         if (!in_array($key, $arrDisableEicLink)) {
             include_once dirname(__FILE__) . '/../../modules/eicmslinks/eicmslinks.php';
             $ret = EiCmsLinks::updateCmsLinksDisplay($ret);
         }
         return stripslashes(urldecode(preg_replace('/((\\%5C0+)|(\\%00+))/i', '', urlencode($ret))));
     }
     return $ret;
 }
コード例 #4
0
<?php 
/**
 * 2007-2014 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author    Hennes Hervé <*****@*****.**>
 *  @copyright 2013-2015 Hennes Hervé
 *  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  http://www.h-hennes.fr/blog/
 */
define('_PS_ADMIN_DIR_', 1);
require_once dirname(__FILE__) . '/../../../../config/config.inc.php';
require_once dirname(__FILE__) . '/../../../../modules/eicmslinks/eicmslinks.php';
//Affichage de la popup d'insertion des cms
$eicmslink = new EiCmsLinks();
$eicmslink->displayTinyMcePopup();