This commit is contained in:
@@ -1,115 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 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 PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class EditorialClass extends ObjectModel
|
||||
{
|
||||
/** @var integer editorial id*/
|
||||
public $id = 1;
|
||||
|
||||
/** @var string body_title*/
|
||||
public $body_home_logo_link;
|
||||
|
||||
/** @var string body_title*/
|
||||
public $body_title;
|
||||
|
||||
/** @var string body_title*/
|
||||
public $body_subheading;
|
||||
|
||||
/** @var string body_title*/
|
||||
public $body_paragraph;
|
||||
|
||||
/** @var string body_title*/
|
||||
public $body_logo_subheading;
|
||||
|
||||
protected $table = 'editorial';
|
||||
protected $identifier = 'id_editorial';
|
||||
|
||||
protected $fieldsValidate = array('body_home_logo_link' => 'isUrl');
|
||||
protected $fieldsValidateLang = array(
|
||||
'body_title' => 'isGenericName',
|
||||
'body_subheading' => 'isGenericName',
|
||||
'body_paragraph' => 'isCleanHtml',
|
||||
'body_logo_subheading' => 'isGenericName');
|
||||
|
||||
/**
|
||||
* Check then return multilingual fields for database interaction
|
||||
*
|
||||
* @return array Multilingual fields
|
||||
*/
|
||||
public function getTranslationsFieldsChild()
|
||||
{
|
||||
parent::validateFieldsLang();
|
||||
|
||||
$fieldsArray = array('body_title', 'body_subheading', 'body_paragraph', 'body_logo_subheading');
|
||||
$fields = array();
|
||||
$languages = Language::getLanguages(false);
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
$fields[$language['id_lang']]['id_lang'] = (int)($language['id_lang']);
|
||||
$fields[$language['id_lang']][$this->identifier] = (int)($this->id);
|
||||
foreach ($fieldsArray as $field)
|
||||
{
|
||||
if (!Validate::isTableOrIdentifier($field))
|
||||
die(Tools::displayError());
|
||||
if (isset($this->{$field}[$language['id_lang']]) AND !empty($this->{$field}[$language['id_lang']]))
|
||||
$fields[$language['id_lang']][$field] = pSQL($this->{$field}[$language['id_lang']], true);
|
||||
elseif (in_array($field, $this->fieldsRequiredLang))
|
||||
$fields[$language['id_lang']][$field] = pSQL($this->{$field}[$defaultLanguage], true);
|
||||
else
|
||||
$fields[$language['id_lang']][$field] = '';
|
||||
}
|
||||
}
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function copyFromPost()
|
||||
{
|
||||
/* Classical fields */
|
||||
foreach ($_POST AS $key => $value)
|
||||
if (key_exists($key, $this) AND $key != 'id_'.$this->table)
|
||||
$this->{$key} = $value;
|
||||
|
||||
/* Multilingual fields */
|
||||
if (sizeof($this->fieldsValidateLang))
|
||||
{
|
||||
$languages = Language::getLanguages(false);
|
||||
foreach ($languages AS $language)
|
||||
foreach ($this->fieldsValidateLang AS $field => $validation)
|
||||
if (isset($_POST[$field.'_'.(int)($language['id_lang'])]))
|
||||
$this->{$field}[(int)($language['id_lang'])] = $_POST[$field.'_'.(int)($language['id_lang'])];
|
||||
}
|
||||
}
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
parent::validateFields();
|
||||
$fields['id_editorial'] = (int)($this->id);
|
||||
$fields['body_home_logo_link'] = pSQL($this->body_home_logo_link);
|
||||
return $fields;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>editorial</name>
|
||||
<displayName>Home text editor</displayName>
|
||||
<version>1.6</version>
|
||||
<description>A text editor module for your homepage.</description>
|
||||
<author>PrestaShop</author>
|
||||
<tab>front_office_features</tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{editorial}prestashop>editorial_a46dcd3561c3feeb53903dfc0f796a35'] = 'Startseiten-Text-Editor';
|
||||
$_MODULE['<{editorial}prestashop>editorial_d02076897ed05399e22a0597404924ad'] = 'Ein Texteditor-Modul für Ihre Startseite';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7fc8b5e7597368c070f5bc87c719dcc1'] = 'Sie können diese Handlung nicht ausführen';
|
||||
$_MODULE['<{editorial}prestashop>editorial_07b8c09e490f7afbdcfa9cd5bfcfd4a9'] = 'Ein Fehler trat beim Hochladen des Bilds auf.';
|
||||
$_MODULE['<{editorial}prestashop>editorial_462390017ab0938911d2d4e964c0cab7'] = 'Einstellungen erfolgreich aktualisiert';
|
||||
$_MODULE['<{editorial}prestashop>editorial_0245625ee10f9c6c0ed7f50eb1838856'] = 'Haupttitel';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7496c27605d7ac3462a5dab8ecf1b569'] = 'Erscheint oben auf der Startseite';
|
||||
$_MODULE['<{editorial}prestashop>editorial_e1f46be647e598f00eeb0ab62561d695'] = 'Untertitel';
|
||||
$_MODULE['<{editorial}prestashop>editorial_bf75f228011d1443c4ea7aca23c3cff2'] = 'Einleitungstext';
|
||||
$_MODULE['<{editorial}prestashop>editorial_930919b6f854a62e62401e3e76377cc1'] = 'Text Ihrer Wahl, zum Beispiel erläutern Sie Ihre Mission, heben ein neues Produkt hervor oder beschreiben ein aktuelles Ereignis';
|
||||
$_MODULE['<{editorial}prestashop>editorial_78587f196180054fcb797d40f4a86f10'] = 'Logo der Startseite';
|
||||
$_MODULE['<{editorial}prestashop>editorial_b18c29b8470190a02813415a04a2191f'] = 'Dateigröße';
|
||||
$_MODULE['<{editorial}prestashop>editorial_729a51874fe901b092899e9e8b31c97a'] = 'Sind Sie sicher?';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f2a6c498fb90ee345d997f888fce3b18'] = 'Löschen';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f85e125f2a9ebcd47f420c94b535f50a'] = 'Erscheint neben dem einleitenden Text oben';
|
||||
$_MODULE['<{editorial}prestashop>editorial_28d74ee805e3a162047d8f917b74dcb3'] = 'Startseitenlogo-Link';
|
||||
$_MODULE['<{editorial}prestashop>editorial_62f6077d6d15a35ff4929a225205892f'] = 'Auf dem 2. Logo verwendeter Link ';
|
||||
$_MODULE['<{editorial}prestashop>editorial_98039e8f2a0d93fc0fff503f9166f59b'] = 'Startseitenlogo Untertitel';
|
||||
$_MODULE['<{editorial}prestashop>editorial_c260ede55f0be17068302e7f842802f3'] = 'Aktualisieren Sie den Editor';
|
||||
@@ -1,313 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 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 PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class Editorial extends Module
|
||||
{
|
||||
/** @var max image size */
|
||||
protected $maxImageSize = 307200;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'editorial';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.6';
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Home text editor');
|
||||
$this->description = $this->l('A text editor module for your homepage.');
|
||||
$path = dirname(__FILE__);
|
||||
if (strpos(__FILE__, 'Module.php') !== false)
|
||||
$path .= '/../modules/'.$this->name;
|
||||
include_once($path.'/EditorialClass.php');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
if (!parent::install() OR !$this->registerHook('home') OR !$this->registerHook('header'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'editorial` (
|
||||
`id_editorial` int(10) unsigned NOT NULL auto_increment,
|
||||
`body_home_logo_link` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id_editorial`))
|
||||
ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'editorial_lang` (
|
||||
`id_editorial` int(10) unsigned NOT NULL,
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
`body_title` varchar(255) NOT NULL,
|
||||
`body_subheading` varchar(255) NOT NULL,
|
||||
`body_paragraph` text NOT NULL,
|
||||
`body_logo_subheading` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id_editorial`, `id_lang`))
|
||||
ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'editorial`(`id_editorial`, `body_home_logo_link`)
|
||||
VALUES(1, "http://www.prestashop.com")'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'editorial_lang`(`id_editorial`, `id_lang`, `body_title`, `body_subheading`, `body_paragraph`, `body_logo_subheading`)
|
||||
VALUES(1, 1, "Lorem ipsum dolor sit amet", "Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", "<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p>", "Excepteur sint prestashop cupidatat non proident")'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'editorial_lang`(`id_editorial`, `id_lang`, `body_title`, `body_subheading`, `body_paragraph`, `body_logo_subheading`)
|
||||
VALUES(1, 2, "Lorem ipsum dolor sit amet", "Excepteur sint occaecat cupidatat non proident", "<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p>", "Lorem ipsum presta shop amet")'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
if (!parent::uninstall())
|
||||
return false;
|
||||
return (Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'editorial`') AND
|
||||
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'editorial_lang`'));
|
||||
}
|
||||
|
||||
public function putContent($xml_data, $key, $field, $forbidden, $section)
|
||||
{
|
||||
foreach ($forbidden AS $line)
|
||||
if ($key == $line)
|
||||
return 0;
|
||||
if (!preg_match('/^'.$section.'_/i', $key))
|
||||
return 0;
|
||||
$key = preg_replace('/^'.$section.'_/i', '', $key);
|
||||
$field = htmlspecialchars($field);
|
||||
if (!$field)
|
||||
return 0;
|
||||
return ("\n".' <'.$key.'>'.$field.'</'.$key.'>');
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
/* display the module name */
|
||||
$this->_html = '<h2>'.$this->displayName.'</h2>';
|
||||
$errors = '';
|
||||
|
||||
// Delete logo image
|
||||
if (Tools::isSubmit('deleteImage'))
|
||||
{
|
||||
if (!file_exists(dirname(__FILE__).'/homepage_logo.jpg'))
|
||||
$errors .= $this->displayError($this->l('This action cannot be taken.'));
|
||||
else
|
||||
{
|
||||
unlink(dirname(__FILE__).'/homepage_logo.jpg');
|
||||
Tools::redirectAdmin('index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)($cookie->id_employee)));
|
||||
}
|
||||
$this->_html .= $errors;
|
||||
}
|
||||
|
||||
/* update the editorial xml */
|
||||
if (Tools::isSubmit('submitUpdate'))
|
||||
{
|
||||
// Forbidden key
|
||||
$forbidden = array('submitUpdate');
|
||||
|
||||
$editorial = new EditorialClass(1);
|
||||
$editorial->copyFromPost();
|
||||
$editorial->update();
|
||||
|
||||
/* upload the image */
|
||||
if (isset($_FILES['body_homepage_logo']) AND isset($_FILES['body_homepage_logo']['tmp_name']) AND !empty($_FILES['body_homepage_logo']['tmp_name']))
|
||||
{
|
||||
Configuration::set('PS_IMAGE_GENERATION_METHOD', 1);
|
||||
if ($error = checkImage($_FILES['body_homepage_logo'], $this->maxImageSize))
|
||||
$errors .= $error;
|
||||
elseif (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['body_homepage_logo']['tmp_name'], $tmpName))
|
||||
return false;
|
||||
elseif (!imageResize($tmpName, dirname(__FILE__).'/homepage_logo.jpg'))
|
||||
$errors .= $this->displayError($this->l('An error occurred during the image upload.'));
|
||||
if (isset($tmpName))
|
||||
unlink($tmpName);
|
||||
}
|
||||
$this->_html .= $errors == '' ? $this->displayConfirmation($this->l('Settings updated successfully')) : $errors;
|
||||
if (file_exists(dirname(__FILE__).'/homepage_logo.jpg'))
|
||||
{
|
||||
list($width, $height, $type, $attr) = getimagesize(dirname(__FILE__).'/homepage_logo.jpg');
|
||||
Configuration::updateValue('EDITORIAL_IMAGE_WIDTH', (int)round($width));
|
||||
Configuration::updateValue('EDITORIAL_IMAGE_HEIGHT', (int)round($height));
|
||||
}
|
||||
}
|
||||
|
||||
/* display the editorial's form */
|
||||
$this->_displayForm();
|
||||
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
private function _displayForm()
|
||||
{
|
||||
global $cookie;
|
||||
/* Languages preliminaries */
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
$languages = Language::getLanguages(false);
|
||||
$iso = Language::getIsoById((int)($cookie->id_lang));
|
||||
$divLangName = 'title¤subheading¤cpara¤logo_subheading';
|
||||
|
||||
$editorial = new EditorialClass(1);
|
||||
// TinyMCE
|
||||
global $cookie;
|
||||
$iso = Language::getIsoById((int)($cookie->id_lang));
|
||||
$isoTinyMCE = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en');
|
||||
$ad = dirname($_SERVER["PHP_SELF"]);
|
||||
$this->_html .= '
|
||||
<script type="text/javascript">
|
||||
var iso = \''.$isoTinyMCE.'\' ;
|
||||
var pathCSS = \''._THEME_CSS_DIR_.'\' ;
|
||||
var ad = \''.$ad.'\' ;
|
||||
</script>
|
||||
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>';
|
||||
$this->_html .= '
|
||||
<script type="text/javascript">id_language = Number('.$defaultLanguage.');</script>
|
||||
<form method="post" action="'.$_SERVER['REQUEST_URI'].'" enctype="multipart/form-data">
|
||||
<fieldset style="width: 905px;">
|
||||
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" /> '.$this->displayName.'</legend>
|
||||
<label>'.$this->l('Main title').'</label>
|
||||
<div class="margin-form">';
|
||||
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
$this->_html .= '
|
||||
<div id="title_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $defaultLanguage ? 'block' : 'none').';float: left;">
|
||||
<input type="text" name="body_title_'.$language['id_lang'].'" id="body_title_'.$language['id_lang'].'" size="64" value="'.(isset($editorial->body_title[$language['id_lang']]) ? $editorial->body_title[$language['id_lang']] : '').'" />
|
||||
</div>';
|
||||
}
|
||||
$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'title', true);
|
||||
|
||||
|
||||
$this->_html .= '
|
||||
<p class="clear">'.$this->l('Appears along top of homepage').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Subheading').'</label>
|
||||
<div class="margin-form">';
|
||||
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
$this->_html .= '
|
||||
<div id="subheading_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $defaultLanguage ? 'block' : 'none').';float: left;">
|
||||
<input type="text" name="body_subheading_'.$language['id_lang'].'" id="body_subheading_'.$language['id_lang'].'" size="64" value="'.(isset($editorial->body_subheading[$language['id_lang']]) ? $editorial->body_subheading[$language['id_lang']] : '').'" />
|
||||
</div>';
|
||||
}
|
||||
$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'subheading', true);
|
||||
|
||||
$this->_html .= '
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<label>'.$this->l('Introductory text').'</label>
|
||||
<div class="margin-form">';
|
||||
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
$this->_html .= '
|
||||
<div id="cpara_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $defaultLanguage ? 'block' : 'none').';float: left;">
|
||||
<textarea class="rte" cols="70" rows="30" id="body_paragraph_'.$language['id_lang'].'" name="body_paragraph_'.$language['id_lang'].'">'.(isset($editorial->body_paragraph[$language['id_lang']]) ? $editorial->body_paragraph[$language['id_lang']] : '').'</textarea>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'cpara', true);
|
||||
|
||||
$this->_html .= '
|
||||
<p class="clear">'.$this->l('Text of your choice; for example, explain your mission, highlight a new product, or describe a recent event.').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Homepage logo').' </label>
|
||||
<div class="margin-form">';
|
||||
if (file_exists(dirname(__FILE__).'/homepage_logo.jpg'))
|
||||
$this->_html .= '<div id="image" >
|
||||
<img src="'.$this->_path.'homepage_logo.jpg?t='.time().'" />
|
||||
<p align="center">'.$this->l('Filesize').' '.(filesize(dirname(__FILE__).'/homepage_logo.jpg') / 1000).'kb</p>
|
||||
<a href="'.$_SERVER['REQUEST_URI'].'&deleteImage" onclick="return confirm(\''.$this->l('Are you sure?', __CLASS__, true, false).'\');">
|
||||
<img src="../img/admin/delete.gif" alt="'.$this->l('Delete').'" /> '.$this->l('Delete').'</a>
|
||||
</div>';
|
||||
|
||||
$this->_html .= '<input type="file" name="body_homepage_logo" />
|
||||
<p style="clear: both">'.$this->l('Will appear next to the Introductory Text above').'</p>
|
||||
|
||||
</div>
|
||||
<label>'.$this->l('Homepage logo link').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="body_home_logo_link" size="64" value="'.$editorial->body_home_logo_link.'" />
|
||||
<p style="clear: both">'.$this->l('Link used on the 2nd logo').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Homepage logo subheading').'</label>
|
||||
<div class="margin-form">';
|
||||
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
$this->_html .= '
|
||||
<div id="logo_subheading_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $defaultLanguage ? 'block' : 'none').';float: left;">
|
||||
<input type="text" name="body_logo_subheading_'.$language['id_lang'].'" id="logo_subheading_'.$language['id_lang'].'" size="64" value="'.(isset($editorial->body_logo_subheading[$language['id_lang']]) ? $editorial->body_logo_subheading[$language['id_lang']] : '').'" />
|
||||
</div>';
|
||||
}
|
||||
|
||||
$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'logo_subheading', true);
|
||||
|
||||
$this->_html .= '
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="clear pspace"></div>
|
||||
<div class="margin-form clear"><input type="submit" name="submitUpdate" value="'.$this->l('Update the editor').'" class="button" /></div>
|
||||
</fieldset>
|
||||
</form>';
|
||||
}
|
||||
|
||||
public function hookHome($params)
|
||||
{
|
||||
global $cookie, $smarty;
|
||||
|
||||
$editorial = new EditorialClass(1, (int)$cookie->id_lang);
|
||||
$smarty->assign(array(
|
||||
'editorial' => $editorial,
|
||||
'default_lang' => (int)$cookie->id_lang,
|
||||
'image_width' => Configuration::get('EDITORIAL_IMAGE_WIDTH'),
|
||||
'image_height' => Configuration::get('EDITORIAL_IMAGE_HEIGHT'),
|
||||
'id_lang' => $cookie->id_lang,
|
||||
'homepage_logo' => file_exists('modules/editorial/homepage_logo.jpg'),
|
||||
'image_path' => $this->_path.'homepage_logo.jpg'
|
||||
));
|
||||
return $this->display(__FILE__, 'editorial.tpl');
|
||||
}
|
||||
|
||||
public function hookHeader()
|
||||
{
|
||||
Tools::addCSS(($this->_path).'editorial.css', 'all');
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{*
|
||||
* 2007-2011 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 PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- Module Editorial -->
|
||||
<div id="editorial_block_center" class="editorial_block">
|
||||
{if $editorial->body_home_logo_link}<a href="{$editorial->body_home_logo_link|escape:'htmlall':'UTF-8'}" title="{$editorial->body_title|escape:'htmlall':'UTF-8'|stripslashes}">{/if}
|
||||
{if $homepage_logo}<img src="{$link->getMediaLink($image_path)}" alt="{$editorial->body_title|escape:'htmlall':'UTF-8'|stripslashes}" {if $image_width}width="{$image_width}"{/if} {if $image_height}height="{$image_height}" {/if}/>{/if}
|
||||
{if $editorial->body_home_logo_link}</a>{/if}
|
||||
{if $editorial->body_logo_subheading}<p id="editorial_image_legend">{$editorial->body_logo_subheading|stripslashes}</p>
|
||||
{elseif $editorial->body_logo_subheading}<p id="editorial_image_legend">{$editorial->body_logo_subheading}</p>{/if}
|
||||
{if $editorial->body_title}<h1>{$editorial->body_title|stripslashes}</h1>
|
||||
{elseif $editorial->body_title}<h1>{$editorial->body_title|stripslashes}</h1>{/if}
|
||||
{if $editorial->body_subheading}<h2>{$editorial->body_subheading|stripslashes}</h2>
|
||||
{elseif $editorial->body_subheading}<h2>{$editorial->body_subheading|stripslashes}</h2>{/if}
|
||||
{if $editorial->body_paragraph}<div class="rte">{$editorial->body_paragraph|stripslashes}</div>
|
||||
{elseif $editorial->body_paragraph}<div class="rte">{$editorial->body_paragraph|stripslashes}</div>{/if}
|
||||
</div>
|
||||
<!-- /Module Editorial -->
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<editorial>
|
||||
<header>
|
||||
</header>
|
||||
<body>
|
||||
<title_1>Lorem ipsum dolor sit amet</title_1>
|
||||
<title_2>Lorem ipsum dolor sit amet</title_2>
|
||||
<subheading_1>Excepteur sint occaecat cupidatat non proident</subheading_1>
|
||||
<subheading_2>Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</subheading_2>
|
||||
<paragraph_1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p></paragraph_1>
|
||||
<paragraph_2><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></paragraph_2>
|
||||
<home_logo_link>http://www.prestashop.com</home_logo_link>
|
||||
<logo_subheading_1>Excepteur sint prestashop cupidatat non proident</logo_subheading_1>
|
||||
<logo_subheading_2>Lorem ipsum presta shop amet</logo_subheading_2>
|
||||
</body>
|
||||
</editorial>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{editorial}prestashop>editorial_a46dcd3561c3feeb53903dfc0f796a35'] = 'Editor de textos página de inicio';
|
||||
$_MODULE['<{editorial}prestashop>editorial_d02076897ed05399e22a0597404924ad'] = 'Un módulo de editor de texto para su página de inicio';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7fc8b5e7597368c070f5bc87c719dcc1'] = 'No puede efectuar esta acción';
|
||||
$_MODULE['<{editorial}prestashop>editorial_07b8c09e490f7afbdcfa9cd5bfcfd4a9'] = 'Se ha producido un error mientras se subía la imagen.';
|
||||
$_MODULE['<{editorial}prestashop>editorial_462390017ab0938911d2d4e964c0cab7'] = 'Parámetros actualizados con éxito';
|
||||
$_MODULE['<{editorial}prestashop>editorial_0245625ee10f9c6c0ed7f50eb1838856'] = 'Título principal';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7496c27605d7ac3462a5dab8ecf1b569'] = 'Aparece a lo largo de la parte superior de la página de inicio';
|
||||
$_MODULE['<{editorial}prestashop>editorial_e1f46be647e598f00eeb0ab62561d695'] = 'Subtítulo';
|
||||
$_MODULE['<{editorial}prestashop>editorial_bf75f228011d1443c4ea7aca23c3cff2'] = 'Texto de introducción';
|
||||
$_MODULE['<{editorial}prestashop>editorial_930919b6f854a62e62401e3e76377cc1'] = 'Su texto; por ejm: explique su objetivo, destaque un nuevo producto, describa un evento..';
|
||||
$_MODULE['<{editorial}prestashop>editorial_78587f196180054fcb797d40f4a86f10'] = 'Imagen de página de inicio';
|
||||
$_MODULE['<{editorial}prestashop>editorial_b18c29b8470190a02813415a04a2191f'] = 'Tamaño de la imagen';
|
||||
$_MODULE['<{editorial}prestashop>editorial_729a51874fe901b092899e9e8b31c97a'] = '¿Está seguro?';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f2a6c498fb90ee345d997f888fce3b18'] = 'Borrar';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f85e125f2a9ebcd47f420c94b535f50a'] = 'Aparecerá arriba, junto al texto de introducción';
|
||||
$_MODULE['<{editorial}prestashop>editorial_28d74ee805e3a162047d8f917b74dcb3'] = 'Enlace del logo de página de inicio';
|
||||
$_MODULE['<{editorial}prestashop>editorial_62f6077d6d15a35ff4929a225205892f'] = 'Enlace usado en el segundo logo';
|
||||
$_MODULE['<{editorial}prestashop>editorial_98039e8f2a0d93fc0fff503f9166f59b'] = 'Subtítulo del logo de página de inicio';
|
||||
$_MODULE['<{editorial}prestashop>editorial_c260ede55f0be17068302e7f842802f3'] = 'Actualizar el editor';
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{editorial}prestashop>editorial_a46dcd3561c3feeb53903dfc0f796a35'] = 'Editeur de page d\'accueil';
|
||||
$_MODULE['<{editorial}prestashop>editorial_d02076897ed05399e22a0597404924ad'] = 'Un éditeur de texte pour votre page d\'accueil';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7fc8b5e7597368c070f5bc87c719dcc1'] = 'Vous ne pouvez pas effectuer cette action';
|
||||
$_MODULE['<{editorial}prestashop>editorial_07b8c09e490f7afbdcfa9cd5bfcfd4a9'] = 'Une erreur est survenue lors de l\'upload de l\'image';
|
||||
$_MODULE['<{editorial}prestashop>editorial_462390017ab0938911d2d4e964c0cab7'] = 'Paramètres mis à jour avec succès';
|
||||
$_MODULE['<{editorial}prestashop>editorial_0245625ee10f9c6c0ed7f50eb1838856'] = 'Titre principal';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7496c27605d7ac3462a5dab8ecf1b569'] = 'Apparaît en haut de la page d\'accueil';
|
||||
$_MODULE['<{editorial}prestashop>editorial_e1f46be647e598f00eeb0ab62561d695'] = 'Pré-en-tête';
|
||||
$_MODULE['<{editorial}prestashop>editorial_bf75f228011d1443c4ea7aca23c3cff2'] = 'Texte d\'introduction';
|
||||
$_MODULE['<{editorial}prestashop>editorial_930919b6f854a62e62401e3e76377cc1'] = 'Texte d\'introduction de votre choix ; par exemple expliquez ce que vous vendez ou mettez en avant un produit';
|
||||
$_MODULE['<{editorial}prestashop>editorial_78587f196180054fcb797d40f4a86f10'] = 'Logo de la page d\'accueil';
|
||||
$_MODULE['<{editorial}prestashop>editorial_b18c29b8470190a02813415a04a2191f'] = 'Taille de l\'image';
|
||||
$_MODULE['<{editorial}prestashop>editorial_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr ?';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f2a6c498fb90ee345d997f888fce3b18'] = 'Effacer';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f85e125f2a9ebcd47f420c94b535f50a'] = 'Apparaîtra à côté du texte d\'introduction';
|
||||
$_MODULE['<{editorial}prestashop>editorial_28d74ee805e3a162047d8f917b74dcb3'] = 'Lien de l\'image';
|
||||
$_MODULE['<{editorial}prestashop>editorial_62f6077d6d15a35ff4929a225205892f'] = 'Lien utilisé sur le second logo';
|
||||
$_MODULE['<{editorial}prestashop>editorial_98039e8f2a0d93fc0fff503f9166f59b'] = 'Sous-titre de l\'image';
|
||||
$_MODULE['<{editorial}prestashop>editorial_c260ede55f0be17068302e7f842802f3'] = 'Mettre à jour';
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{editorial}prestashop>editorial_a46dcd3561c3feeb53903dfc0f796a35'] = 'Editor della home page';
|
||||
$_MODULE['<{editorial}prestashop>editorial_d02076897ed05399e22a0597404924ad'] = 'Un modulo editor di testo per la tua home page';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7fc8b5e7597368c070f5bc87c719dcc1'] = 'Non è possibile effettuare questa azione';
|
||||
$_MODULE['<{editorial}prestashop>editorial_07b8c09e490f7afbdcfa9cd5bfcfd4a9'] = 'Errore durante il caricamento delle immagini.';
|
||||
$_MODULE['<{editorial}prestashop>editorial_462390017ab0938911d2d4e964c0cab7'] = 'Impostazioni aggiornate con successo';
|
||||
$_MODULE['<{editorial}prestashop>editorial_0245625ee10f9c6c0ed7f50eb1838856'] = 'Titolo principale';
|
||||
$_MODULE['<{editorial}prestashop>editorial_7496c27605d7ac3462a5dab8ecf1b569'] = 'Appare nella parte superiore della home page';
|
||||
$_MODULE['<{editorial}prestashop>editorial_e1f46be647e598f00eeb0ab62561d695'] = 'Sottotitolo';
|
||||
$_MODULE['<{editorial}prestashop>editorial_bf75f228011d1443c4ea7aca23c3cff2'] = 'Testo introduttivo';
|
||||
$_MODULE['<{editorial}prestashop>editorial_930919b6f854a62e62401e3e76377cc1'] = 'Testo a tua scelta; ad esempio, spiega la tua missione, evidenzia un nuovo prodotto, o descrivi un evento recente';
|
||||
$_MODULE['<{editorial}prestashop>editorial_78587f196180054fcb797d40f4a86f10'] = 'Logo della home page ';
|
||||
$_MODULE['<{editorial}prestashop>editorial_b18c29b8470190a02813415a04a2191f'] = 'Dimensioni file';
|
||||
$_MODULE['<{editorial}prestashop>editorial_729a51874fe901b092899e9e8b31c97a'] = 'Sei sicuro?';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f2a6c498fb90ee345d997f888fce3b18'] = 'Elimina';
|
||||
$_MODULE['<{editorial}prestashop>editorial_f85e125f2a9ebcd47f420c94b535f50a'] = 'Apparirà accanto al testo introduttivo sopra';
|
||||
$_MODULE['<{editorial}prestashop>editorial_28d74ee805e3a162047d8f917b74dcb3'] = 'Link logo home page';
|
||||
$_MODULE['<{editorial}prestashop>editorial_62f6077d6d15a35ff4929a225205892f'] = 'Link utilizzato sul secondo logo';
|
||||
$_MODULE['<{editorial}prestashop>editorial_98039e8f2a0d93fc0fff503f9166f59b'] = 'Sottotitolo logo home page ';
|
||||
$_MODULE['<{editorial}prestashop>editorial_c260ede55f0be17068302e7f842802f3'] = 'Aggiorna l\'editor';
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 627 B |
Reference in New Issue
Block a user