This commit is contained in:
rGaillard
2011-07-06 10:54:11 +00:00
parent 4d2c770c6f
commit 8fc7f11014
5398 changed files with 482149 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
/* Block store */
.blockstore img { margin: 10px 0 0 0 }
.blockstore p { text-align: center }
+125
View File
@@ -0,0 +1,125 @@
<?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: 7040 $
* @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 BlockStore extends Module
{
function __construct()
{
$this->name = 'blockstore';
$this->tab = 'front_office_features';
$this->version = 1.0;
$this->author = 'PrestaShop';
$this->need_instance = 0;
parent::__construct();
$this->displayName = $this->l('Stores block');
$this->description = $this->l('Displays a block with a link to the store locator.');
}
function install()
{
Configuration::updateValue('BLOCKSTORE_IMG', 'store.jpg');
return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('header'));
}
public function uninstall()
{
Configuration::deleteByName('BLOCKSTORE_IMG');
return parent::uninstall();
}
function hookLeftColumn($params)
{
return $this->hookRightColumn($params);
}
function hookRightColumn($params)
{
global $smarty;
$smarty->assign('store_img', Configuration::get('BLOCKSTORE_IMG'));
return $this->display(__FILE__, 'blockstore.tpl');
}
function hookHeader($params)
{
Tools::addCSS($this->_path.'/blockstore.css', 'all');
}
public function postProcess()
{
if (Tools::isSubmit('submitStoreConf'))
{
if (isset($_FILES['store_img']) AND isset($_FILES['store_img']['tmp_name']) AND !empty($_FILES['store_img']['tmp_name']))
{
if ($error = checkImage($_FILES['store_img'], 4000000))
return $this->displayError($this->l('invalid image'));
else
{
if (!move_uploaded_file($_FILES['store_img']['tmp_name'], dirname(__FILE__).'/'.$_FILES['store_img']['name']))
return $this->displayError($this->l('an error occurred on uploading file'));
else
{
if (Configuration::get('BLOCKSTORE_IMG') != $_FILES['store_img']['name'])
@unlink(dirname(__FILE__).'/'.Configuration::get('BLOCKSTORE_IMG'));
Configuration::updateValue('BLOCKSTORE_IMG', $_FILES['store_img']['name']);
return $this->displayConfirmation($this->l('Settings are updated'));
}
}
}
}
return '';
}
public function getContent()
{
$output = $this->postProcess().'
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" enctype="multipart/form-data">
<fieldset>
<legend>'.$this->l('Store block configuration').'</legend>';
if (Configuration::get('BLOCKSTORE_IMG'))
$output .= '<div class="margin-form"><img src="'.Tools::getProtocol().Tools::getMediaServer($this->name)._MODULE_DIR_.$this->name.'/'.Configuration::get('BLOCKSTORE_IMG').'" alt="'.$this->l('Store image').'" style="height:115px;margin-left: 100px;width:174px"/></div>';
$output .= '
<label for="store_img">'.$this->l('Change image').'</label>
<div class="margin-form">
<input id="store_img" type="file" name="store_img" /> ( '.$this->l('image will be displayed as 174x115').' )
</div>
<p class="center">
<input class="button" type="submit" name="submitStoreConf" value="'.$this->l('Save').'"/>
</p>
</fieldset>
</form>
';
return $output;
}
}
+37
View File
@@ -0,0 +1,37 @@
{*
* 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: 7077 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block stores module -->
<div id="stores_block_left" class="block">
<h4><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4>
<div class="block_content blockstore">
<p>
<a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}"><img src="{$module_dir}{$store_img}" alt="{l s='Our stores' mod='blockstore'}" width="174" height="115" /></a><br />
<a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">{l s='Discover our stores' mod='blockstore'}</a>
</p>
</div>
</div>
<!-- /Block stores module -->
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockstore</name>
<displayName><![CDATA[Stores block]]></displayName>
<version><![CDATA[1]]></version>
<description><![CDATA[Displays a block with a link to the store locator.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>
+18
View File
@@ -0,0 +1,18 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Unsere Shops';
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Entdecken Sie unsere Shops';
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Shop-Block';
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Zeigt ein Block mit einem Link zu der Händlersuche';
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'Bild ungültig';
$_MODULE['<{blockstore}prestashop>blockstore_10857d5f8e303905ada328b4a31d316b'] = 'Fehler beim Hochladen der Datei';
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Die Einstellungen werden aktualisiert';
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Shop-Block-Konfiguration';
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Shop-Bild';
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Bild ändern';
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'Bild wird als 174x115 angezeigt ';
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
?>
+16
View File
@@ -0,0 +1,16 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Bloque tiendas';
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Mostrar un bloque con un link hacia la lista de tiendas';
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'imagen no válida';
$_MODULE['<{blockstore}prestashop>blockstore_10857d5f8e303905ada328b4a31d316b'] = 'se ha producido un error durante el envío';
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Parámetros actualizados';
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Configuració del bloque tiendas';
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Imagen del bloque';
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Cambiar de imagen:';
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'la imagen se mostrará en formato 174x115';
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Nuestras tiendas';
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Descubra nuestras tiendas';
+16
View File
@@ -0,0 +1,16 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Bloc magasins';
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Affiche un bloc avec un lien vers la liste des magasins';
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'image invalide';
$_MODULE['<{blockstore}prestashop>blockstore_10857d5f8e303905ada328b4a31d316b'] = 'une erreur s\'est produite lors de l\'envoi';
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Paramètres mis à jour';
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Configuration du block magasins';
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Image du block';
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Changer l\'image:';
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'l\'image sera affiché au format 174x115';
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Nos magasins';
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Découvrez nos magasins';
+17
View File
@@ -0,0 +1,17 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'I nostri negozi';
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Scopri i nostri negozi';
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Blocco negozi ';
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Visualizza un blocco con un link per il localizzatore del negozio';
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'immagine non valida';
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Le impostazioni sono aggiornate';
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Configurazione blocco negozio';
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Immagine blocco';
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Cambia immagine';
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'immagine verrà visualizzata come 174x115';
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Salva';
?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB