integration new theme standard

This commit is contained in:
lCherifi
2011-08-23 14:27:30 +00:00
parent bf9a25fd59
commit 13480f5fef
60 changed files with 1912 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,98 @@
<?php
/*
* 2007-2010 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2010 Prestashop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class blockcontact extends Module
{
public function __construct()
{
$this->name = 'blockcontact';
$this->tab = 'front_office_features';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Block contact');
$this->description = $this->l('Allows you to add extra information about customer service');
}
public function install()
{
return (parent::install() AND Configuration::updateValue('blockcontact_telnumber', '') AND Configuration::updateValue('blockcontact_email', '') AND $this->registerHook('rightColumn'));
}
public function uninstall()
{
//Delete configuration
return (Configuration::deleteByName('blockcontact_telnumber') AND Configuration::deleteByName('blockcontact_email') AND parent::uninstall());
}
public function getContent()
{
// If we try to update the settings
if (isset($_POST['submitModule']))
{
Configuration::updateValue('blockcontact_telnumber', (preg_match('/^[0-9]+/', $_POST['telnumber']) ? $_POST['telnumber']: ''));
Configuration::updateValue('blockcontact_email', (($_POST['email'] != '') ? $_POST['email']: ''));
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
}
return '
<h2>'.$this->displayName.'</h2>
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset class="width2">
<label for="telnumber">'.$this->l('Telephone number : ').'</label>
<input type="text" id="telnumber" name="telnumber" value="'.((Configuration::get('blockcontact_telnumber') != "") ? Configuration::get('blockcontact_telnumber') : "").'" />
<div class="clear">&nbsp;</div>
<label for="email">'.$this->l('Email : ').'</label>
<input type="text" id="email" name="email" value="'.((Configuration::get('blockcontact_email') != "") ? Configuration::get('blockcontact_email') : "").'" />
<div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset>
</form>
<div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
}
public function hookRightColumn()
{
global $smarty;
$smarty->assign(array(
'telnumber' => Configuration::get('blockcontact_telnumber'),
'email' => Configuration::get('blockcontact_email')
));
return $this->display(__FILE__, 'blockcontact.tpl');
}
}
?>

View File

@@ -0,0 +1,35 @@
{*
* 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: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div id="contact_block" class="block">
<h4>{l s='Contact us' mod='blockcontact'}</h4>
<div class="block_content clearfix">
<p>{l s='Our hotline' mod='blockcontact'}<br />{l s='is available 24/24' mod='blockcontact'}</p>
{if $telnumber != ''}<p class="tel">{l s='Phone : ' mod='blockcontact'}{$telnumber}</p>{/if}
{if $email != ''}<a href="mailto:{$email}">{l s='Contact' mod='blockcontact'}<br/> {l s='our hotline' mod='blockcontact'}</a>{/if}
</form>
</div>
</div>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcontact</name>
<displayName><![CDATA[Block contact]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Allows you to add extra information about customer service]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,19 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockcontact}prestashop>blockcontact_2c4eb35e7132cbb2dce2f3a72cbb4787'] = 'Bloc contact';
$_MODULE['<{blockcontact}prestashop>blockcontact_df000a5bfb01a3605e4d9343561a0d3d'] = 'Permet d\'ajouter des informations supplémentaires concernant le service client';
$_MODULE['<{blockcontact}prestashop>blockcontact_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Module mis à jour';
$_MODULE['<{blockcontact}prestashop>blockcontact_85d1aa4e14d72add27a7c236962627e9'] = 'Numéro de téléphone';
$_MODULE['<{blockcontact}prestashop>blockcontact_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour';
$_MODULE['<{blockcontact}prestashop>blockcontact_1b9441f293cd7307b59296f616bb858a'] = 'Ce module a été développé par PrestaShop et est uniquement vendu sur';
$_MODULE['<{blockcontact}prestashop>blockcontact_6df4dad510fb08e2e6df44b53cb2ce29'] = 'Veuillez nous signaler tout bogue à ';
$_MODULE['<{blockcontact}prestashop>blockcontact_d575acff7e1035a4212d2a53d5a8c115'] = 'ou en utilisant notre';
$_MODULE['<{blockcontact}prestashop>blockcontact_23372c0d3713719764670087006fc1b6'] = 'formulaire de contact';
$_MODULE['<{blockcontact}prestashop>blockcontact_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous';
$_MODULE['<{blockcontact}prestashop>blockcontact_6e6a51212bd633f9901a22cea27194d8'] = 'Une conseillère';
$_MODULE['<{blockcontact}prestashop>blockcontact_689681c4a40a1e95c35a83771253e8fd'] = 'à votre disposition 24/ 24h';
$_MODULE['<{blockcontact}prestashop>blockcontact_6e6c05a143d676b33ca265b0306813fb'] = 'Tél :';
$_MODULE['<{blockcontact}prestashop>blockcontact_bbaff12800505b22a853e8b7f4eb6a22'] = 'Contacter';
$_MODULE['<{blockcontact}prestashop>blockcontact_e9376117c97ae76d0eefdc3e1f4486e7'] = 'notre conseillère';

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

View File

@@ -0,0 +1,116 @@
<?php
/*
* 2007-2010 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2010 Prestashop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class blockcontactinfos extends Module
{
public function __construct()
{
$this->name = 'blockcontactinfos';
if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0)
$this->tab = 'front_office_features';
else
$this->tab = 'Blocks';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Block contact infos');
$this->description = $this->l('Add a block to add some informations about contacting the shop');
}
public function install()
{
return (parent::install()
AND Configuration::updateValue('blockcontactinfos_company', Configuration::get('PS_SHOP_NAME'))
AND Configuration::updateValue('blockcontactinfos_address', '') AND Configuration::updateValue('blockcontactinfos_phone', '')
AND Configuration::updateValue('blockcontactinfos_email', Configuration::get('PS_SHOP_EMAIL')) AND $this->registerHook('footer'));
}
public function uninstall()
{
//Delete configuration
return (Configuration::deleteByName('blockcontactinfos_company')
AND Configuration::deleteByName('blockcontactinfos_address') AND Configuration::deleteByName('blockcontactinfos_phone')
AND Configuration::deleteByName('blockcontactinfos_email') AND parent::uninstall());
}
public function getContent()
{
// If we try to update the settings
if (isset($_POST['submitModule']))
{
Configuration::updateValue('blockcontactinfos_company', ((isset($_POST['company']) AND $_POST['company'] != '') ? $_POST['company'] : Configuration::get('PS_SHOP_NAME')));
Configuration::updateValue('blockcontactinfos_address', ((isset($_POST['address']) AND $_POST['address'] != '') ? $_POST['address'] : ''));
Configuration::updateValue('blockcontactinfos_phone', ((isset($_POST['phone']) AND $_POST['phone'] != '') ? $_POST['phone'] : ''));
Configuration::updateValue('blockcontactinfos_email', ((isset($_POST['email']) AND $_POST['email'] != '') ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL')));
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
}
$content = '
<h2>'.$this->displayName.'</h2>
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset class="width2">
<p><label for="company">'.$this->l('Company name').' :</label>
<input type="text" id="company" name="company" value="'.Configuration::get('blockcontactinfos_company').'" /></p>
<p><label for="address">'.$this->l('Address').' :</label>
<textarea id="address" name="address">'.Configuration::get('blockcontactinfos_address').'</textarea></p>
<p><label for="phone">'.$this->l('Phone number').' :</label>
<input type="text" id="phone" name="phone" value="'.Configuration::get('blockcontactinfos_phone').'" /></p>
<p><label for="email">'.$this->l('Email').' :</label>
<input type="text" id="email" name="email" value="'.Configuration::get('blockcontactinfos_email').'" /> </p>
<div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset>
</form>
<div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
return $content;
}
public function hookFooter($params)
{
global $smarty;
$smarty->assign(array(
'company' => Configuration::get('blockcontactinfos_company'),
'address' => Configuration::get('blockcontactinfos_address'),
'phone' => Configuration::get('blockcontactinfos_phone'),
'email' => Configuration::get('blockcontactinfos_email')
));
return $this->display(__FILE__, 'blockcontactinfos.tpl');
}
}
?>

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: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- MODULE Block contact infos -->
<div id="block_contact_infos">
<h4>{l s='Contact us' mod='blockcontactinfos'}</h4>
<ul>
{if $company != ''}<li><strong>{$company}</strong></li>{/if}
{if $address != ''}<li><pre>{$address}</pre></li>{/if}
{if $phone != ''}<li>{l s='Tel:'} {$phone}</li>{/if}
{if $email != ''}<li>{l s='Email:'} <a href="mailto:{$email}">{$email}</a></li>{/if}
</ul>
</div>
<!-- /MODULE Block contact infos -->

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcontactinfos</name>
<displayName><![CDATA[Block contact infos]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Add a block to add some informations about contacting the shop]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,17 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_6bde6531cb3dc89a517c203d2177315d'] = 'Bloc infos contact';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_94ef396566461a04e263191e90bdf447'] = 'Ajoute un bloc pour afficher certaines informations pour contacter la boutique';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_c281f92b77ba329f692077d23636f5c9'] = 'Nom de la société';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_1f8261d17452a959e013666c5df45e07'] = 'Numéro de téléphone';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour la configuration';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_1b9441f293cd7307b59296f616bb858a'] = 'Ce module a été développé par PrestaShop et ne peut être vendu que sur';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_6df4dad510fb08e2e6df44b53cb2ce29'] = 'Pour toute demande d\'information n\'hésitez pas à nous contacter sur';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_d575acff7e1035a4212d2a53d5a8c115'] = 'ou en utilisant notre';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_23372c0d3713719764670087006fc1b6'] = 'formulaire de contact';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous';

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

View File

@@ -0,0 +1,214 @@
<?php
/*
* 2007-2010 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2010 Prestashop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class blockreinsurance extends Module
{
public function __construct()
{
$this->name = 'blockreinsurance';
if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0)
$this->tab = 'front_office_features';
else
$this->tab = 'Blocks';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Bloc reinsurance');
$this->description = $this->l('Add a block to display more infos to reassure your customers');
}
public function install()
{
return (parent::install() AND $this->installDB() AND Configuration::updateValue('blockreinsurance_nbblocks', 5) AND $this->registerHook('footer'));
}
public function installDB()
{
return Db::getInstance()->Execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance` (
`id_contactinfos` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`filename` VARCHAR(100) NOT NULL,
`text` VARCHAR(300) NOT NULL,
PRIMARY KEY (`id_contactinfos`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;');
}
public function uninstall()
{
//Delete configuration
return (Configuration::deleteByName('blockreinsurance_nbblocks') AND $this->uninstallDB() AND parent::uninstall());
}
public function uninstallDB()
{
return Db::getInstance()->Execute('
DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance`');
}
public function addToDB()
{
$maxImageSize = 3007200;
if(isset($_POST['nbblocks']))
{
for($i = 1; $i <= (int)$_POST['nbblocks']; $i++)
{
$filename = explode('.', $_FILES['info'.$i.'_file']['name']);
if (isset($_FILES['info'.$i.'_file']) AND isset($_FILES['info'.$i.'_file']['tmp_name']) AND !empty($_FILES['info'.$i.'_file']['tmp_name']))
{
if ($error = checkImage($_FILES['info'.$i.'_file'], $maxImageSize))
return false;
elseif (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['info'.$i.'_file']['tmp_name'], $tmpName))
return false;
elseif (!imageResize($tmpName, dirname(__FILE__).'/img/'.$filename[0].'.jpg'))
return false;
unlink($tmpName);
}
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'reinsurance` (`filename`,`text`)
VALUES ("'.((isset($filename[0]) AND $filename[0] != '') ? pSQL($filename[0]) : '').
'", "'.((isset($_POST['info'.$i.'_text']) AND $_POST['info'.$i.'_text'] != '') ? pSQL($_POST['info'.$i.'_text']) : '').'")');
}
return true;
} else
return false;
}
public function removeFromDB()
{
$dir = opendir(dirname(__FILE__).'/img');
while (false !== ($file = readdir($dir)))
{
$path = dirname(__FILE__).'/img/'.$file;
if ($file != ".." AND $file != "." AND !is_dir($file))
{
unlink($path);
}
}
closedir($dir);
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'reinsurance`');
}
public function getAllFromDB()
{
return Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'reinsurance`');
}
public function getContent()
{
// If we try to update the settings
if (isset($_POST['submitModule']))
{
Configuration::updateValue('blockreinsurance_nbblocks', ((isset($_POST['nbblocks']) AND $_POST['nbblocks'] != '') ? (int)$_POST['nbblocks'] : ''));
if($this->removeFromDB() && $this->addToDB())
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
else
echo '<div class="conf error"><img src="../img/admin/disabled.gif"/>'.$this->l('An error occurred during the save').'</div>';
}
$nb_blocks = Configuration::get('blockreinsurance_nbblocks');
$infos = $this->getAllFromDB();
$content = '
<script type="text/javascript">
$(document).ready(function(){
var nb_blocks = 5;
nb_blocks = $("select[name=nbblocks]").val();
$("div.container_infos").each(function(){
id_div = $(this).attr("id").split("container_infos");
if(parseInt(id_div[1]) <= nb_blocks)
$(this).show();
else
$(this).hide();
});
$("select[name=nbblocks]").change(function(){
nb_blocks = $("select[name=nbblocks]").val();
$("div.container_infos").each(function(){
id_div = $(this).attr("id").split("container_infos");
if(parseInt(id_div[1]) <= nb_blocks)
$(this).show();
else
$(this).hide();
});
});
});
</script>
<h2>'.$this->displayName.'</h2>
<form method="post" action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" enctype="multipart/form-data">
<fieldset class="width2">
<select name="nbblocks">';
// Show by default 5 blocks maximum
for($i = 1; $i <= 5; $i++)
{
$content .= '<option value="'.$i.'" '.(($i == $nb_blocks) ? 'selected="selected"' : '').'>'.$i.' '.$this->l('block(s)').'</option>';
}
$content .= '</select>
<div class="clear">&nbsp;</div>';
// Show by default 5 blocks maximum
for($i = 1; $i <= 5; $i++)
{
$content .= '<div id="container_infos'.$i.'" class="container_infos"><h3>'.$this->l('Block number').' '.$i.'</h3>'.
((!empty($infos[$i-1]) && $infos[$i-1]['filename'] != '') ? '<img src="'.Tools::getHttpHost(true)._MODULE_DIR_.$this->name.'/img/'.$infos[$i-1]['filename'].'.jpg" />' : '').
'<div class="clear">&nbsp;</div>
<p><label for="info'.$i.'_file">'.$this->l('Image for this block').' :</label>
<input type="file" name="info'.$i.'_file" /></p>
<p><label for="info'.$i.'_text">'.$this->l('Alternative text for this block').' :</label>
<input type="text" id="info'.$i.'_text" name="info'.$i.'_text" value="'.((!empty($infos[$i-1]) && $infos[$i-1]['text'] != '') ? $infos[$i-1]['text'] : '').'" /></p></div>';
}
$content .= '<div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset>
</form>
<div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
return $content;
}
public function hookFooter($params)
{
global $smarty;
$infos = $this->getAllFromDB();
$smarty->assign(array(
'nbblocks' => Configuration::get('blockreinsurance_nbblocks'),
'infos' => $infos
));
return $this->display(__FILE__, 'blockreinsurance.tpl');
}
}
?>

View File

@@ -0,0 +1,35 @@
{*
* 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: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- MODULE Block reinsurance -->
<div id="reinsurance_block" class="clearfix">
<ul class="width{$nbblocks}">
{foreach from=$infos item=info}
<li><img src="{$module_dir}img/{$info.filename}.jpg" alt="{$info.text}" /> <span>{$info.text}</span></li>
{/foreach}
</ul>
</div>
<!-- /MODULE Block reinsurance -->

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockreinsurance</name>
<displayName><![CDATA[Bloc reinsurance]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Add a block to display more infos to reassure your customers]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,17 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_ac50afdeca5a62e1c47c3f216ec7638a'] = 'Bloc réassurance';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_0cdd94b6a03ddcd4014822a822b675eb'] = 'Ajoute un bloc pour afficher des informations pour rassurer vos clients';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_31c78485b2a9d9151e0cde196934aad8'] = 'Une erreur est survenue lors de la sauvegarde';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_1216aaefbc8bc11aa42f4ec5eec702dd'] = 'bloc(s)';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_0845a5f7fbe242ef2472a78cc5ecae4d'] = 'Bloc numéro';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_0dbf96dfb0a180d634c89bff8b258fba'] = 'Image pour ce bloc';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_b7be073d3d2f885cc9ab4e5cb69a57d1'] = 'Texte alternatif pour ce bloc';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour la configuration';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_1b9441f293cd7307b59296f616bb858a'] = 'Ce module a été développé par PrestaShop et ne peut être vendu que sur';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_6df4dad510fb08e2e6df44b53cb2ce29'] = 'Pour toute demande d\'information n\'hésitez pas à nous contacter sur';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_d575acff7e1035a4212d2a53d5a8c115'] = 'ou en utilisant notre';
$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_23372c0d3713719764670087006fc1b6'] = 'formulaire de contact';

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

View File

@@ -0,0 +1,79 @@
<?php
/*
* 2007-2010 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2010 Prestashop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class blocksharefb extends Module
{
public function __construct()
{
$this->name = 'blocksharefb';
if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0)
$this->tab = 'front_office_features';
else
$this->tab = 'Blocks';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Block Share on Facebook');
$this->description = $this->l('Adds a block to display a link "Share on Facebook" on product pages.');
}
public function install()
{
return (parent::install() AND $this->registerHook('extraLeft'));
}
public function uninstall()
{
//Delete configuration
return (parent::uninstall() AND $this->unregisterHook(Hook::get('extraLeft')));
}
public function hookExtraLeft($params)
{
global $smarty, $cookie, $link;
$id_product = Tools::getValue('id_product');
if (isset($id_product) && $id_product != '')
{
$product_infos = new Product((int)$id_product, true, $cookie->id_lang);
$smarty->assign(array(
'product_link' => urlencode($link->getProductLink($product_infos)),
'product_title' => urlencode($product_infos->name),
));
return $this->display(__FILE__, 'blocksharefb.tpl');
} else {
return '';
}
}
}
?>

View File

@@ -0,0 +1,29 @@
{*
* 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: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li id="left_share_fb">
<a href="http://www.facebook.com/sharer.php?u={$product_link}&t={$product_title}" target="blank">{l s='Share on Facebook' mod='blocksharefb'}</a>
</li>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocksharefb</name>
<displayName><![CDATA[Block Share on Facebook]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Adds a block to display a link &quot;Share on Facebook&quot; on product pages.]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,7 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blocksharefb}prestashop>blocksharefb_16ccb12664ffe3713264cc592c98f710'] = 'Bloc Partager sur Facebook';
$_MODULE['<{blocksharefb}prestashop>blocksharefb_feb5ea2f87814eb831ecb334749c9305'] = 'Ajoute un bloc permettant d\'avoir un lien \"Partager sur Facebook\" sur les pages produits.';
$_MODULE['<{blocksharefb}prestashop>blocksharefb_3e0fa00ee2fba747e8419e80c1da2d72'] = 'Partager sur Facebook';

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,103 @@
<?php
/*
* 2007-2010 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2010 Prestashop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class blocksocial extends Module
{
public function __construct()
{
$this->name = 'blocksocial';
$this->tab = 'front_office_features';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Block social');
$this->description = $this->l('Allows you to add extra information about social networks');
}
public function install()
{
return (parent::install() AND Configuration::updateValue('blocksocial_facebook', '') AND Configuration::updateValue('blocksocial_twitter', '') AND Configuration::updateValue('blocksocial_rss', '') AND $this->registerHook('footer'));
}
public function uninstall()
{
//Delete configuration
return (Configuration::deleteByName('blocksocial_facebook') AND Configuration::deleteByName('blocksocial_twitter') AND Configuration::deleteByName('blocksocial_rss') AND parent::uninstall());
}
public function getContent()
{
// If we try to update the settings
if (isset($_POST['submitModule']))
{
Configuration::updateValue('blocksocial_facebook', (($_POST['facebook_url'] != '') ? $_POST['facebook_url']: ''));
Configuration::updateValue('blocksocial_twitter', (($_POST['twitter_url'] != '') ? $_POST['twitter_url']: ''));
Configuration::updateValue('blocksocial_rss', (($_POST['rss_url'] != '') ? $_POST['rss_url']: ''));
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
}
return '
<h2>'.$this->displayName.'</h2>
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset class="width2">
<label for="facebook_url">'.$this->l('Facebook URL : ').'</label>
<input type="text" id="facebook_url" name="facebook_url" value="'.((Configuration::get('blocksocial_facebook') != "") ? Configuration::get('blocksocial_facebook') : "").'" />
<div class="clear">&nbsp;</div>
<label for="twitter_url">'.$this->l('Twitter URL : ').'</label>
<input type="text" id="twitter_url" name="twitter_url" value="'.((Configuration::get('blocksocial_twitter') != "") ? Configuration::get('blocksocial_twitter') : "").'" />
<div class="clear">&nbsp;</div>
<label for="rss_url">'.$this->l('RSS URL : ').'</label>
<input type="text" id="rss_url" name="rss_url" value="'.((Configuration::get('blocksocial_rss') != "") ? Configuration::get('blocksocial_rss') : "").'" />
<div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset>
</form>
<div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
}
public function hookFooter()
{
global $smarty;
$smarty->assign(array(
'facebook_url' => Configuration::get('blocksocial_facebook'),
'twitter_url' => Configuration::get('blocksocial_twitter'),
'rss_url' => Configuration::get('blocksocial_rss')
));
return $this->display(__FILE__, 'blocksocial.tpl');
}
}
?>

View File

@@ -0,0 +1,34 @@
{*
* 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: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div id="social_block">
<h4>{l s='Follow us' mod='blocksocial'}</h4>
<ul>
{if $facebook_url != ''}<li class="facebook"><a href="{$facebook_url}">{l s='Facebook' mod='blocksocial'}</a></li>{/if}
{if $twitter_url != ''}<li class="twitter"><a href="{$twitter_url}">{l s='Twitter' mod='blocksocial'}</a></li>{/if}
{if $rss_url != ''}<li class="rss"><a href="{$rss_url}">{l s='RSS' mod='blocksocial'}</a></li>{/if}
</ul>
</div>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocksocial</name>
<displayName><![CDATA[Block social]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Allows you to add extra information about social networks]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,19 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blocksocial}prestashop>blocksocial_23708265ee2f98d3b6abb33c6ce1a7a8'] = 'Bloc social';
$_MODULE['<{blocksocial}prestashop>blocksocial_d855ede707b7d778b3fb19309997c90e'] = 'Permet d\'ajouter des informations supplémentaires concernant les réseaux sociaux';
$_MODULE['<{blocksocial}prestashop>blocksocial_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Module mis à jour';
$_MODULE['<{blocksocial}prestashop>blocksocial_9fc251a1d89eea353b33106e03389f49'] = 'URL Facebook';
$_MODULE['<{blocksocial}prestashop>blocksocial_9d34e20e55c38a6fbcc7e5d6d9254789'] = 'URL Twitter';
$_MODULE['<{blocksocial}prestashop>blocksocial_e8d006ba67389f52a246124985ca2ed9'] = 'URL du flux RSS';
$_MODULE['<{blocksocial}prestashop>blocksocial_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour';
$_MODULE['<{blocksocial}prestashop>blocksocial_1b9441f293cd7307b59296f616bb858a'] = 'Ce module a été développé par PrestaShop et est uniquement vendu sur';
$_MODULE['<{blocksocial}prestashop>blocksocial_6df4dad510fb08e2e6df44b53cb2ce29'] = 'Veuillez nous signaler tout bogue à';
$_MODULE['<{blocksocial}prestashop>blocksocial_d575acff7e1035a4212d2a53d5a8c115'] = 'ou en utilisant notre';
$_MODULE['<{blocksocial}prestashop>blocksocial_23372c0d3713719764670087006fc1b6'] = 'formulaire de contact';
$_MODULE['<{blocksocial}prestashop>blocksocial_d918f99442796e88b6fe5ad32c217f76'] = 'Nous suivre';
$_MODULE['<{blocksocial}prestashop>blocksocial_d85544fce402c7a2a96a48078edaf203'] = 'Facebook';
$_MODULE['<{blocksocial}prestashop>blocksocial_2491bc9c7d8731e1ae33124093bc7026'] = 'Twitter';
$_MODULE['<{blocksocial}prestashop>blocksocial_bf1981220040a8ac147698c85d55334f'] = 'RSS';

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

View File

@@ -0,0 +1,443 @@
<?php
include _PS_MODULE_DIR_.'blocktopmenu/menutoplinks.class.php';
class blocktopmenu extends Module
{
private $_menu = '';
private $_html = '';
public function __construct()
{
$this->name = 'blocktopmenu';
$this->tab = 'Julien Breux Developpement';
$this->version = 1.3;
parent::__construct();
$this->displayName = $this->l('Top horizontal menu');
$this->description = $this->l('Add a new menu on top of your shop.');
}
public function install()
{
if(!parent::install() ||
!$this->registerHook('top') ||
!Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') ||
!Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', '1') ||
!$this->installDB())
return false;
return true;
}
public function installDb()
{
Db::getInstance()->ExecuteS('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` (
`id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`new_window` TINYINT( 1 ) NOT NULL,
`link` VARCHAR( 128 ) NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;');
Db::getInstance()->ExecuteS('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` (
`id_link` INT NOT NULL ,
`id_lang` INT NOT NULL ,
`label` VARCHAR( 128 ) NOT NULL ,
INDEX ( `id_link` , `id_lang` )
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;');
return true;
}
public function uninstall()
{
if(!parent::uninstall() ||
!Configuration::deleteByName('MOD_BLOCKTOPMENU_ITEMS') ||
!Configuration::deleteByName('MOD_BLOCKTOPMENU_SEARCH') ||
!$this->uninstallDB())
return false;
return true;
}
private function uninstallDb()
{
Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop`');
Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`');
return true;
}
public function getContent()
{
global $cookie;
if(Tools::isSubmit('submitBlocktopmenu'))
{
if(Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items')))
$this->_html .= $this->displayConfirmation($this->l('Settings Updated'));
else
$this->_html .= $this->displayError($this->l('Unable to update settings'));
Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', (bool)Tools::getValue('search'));
}
if(Tools::isSubmit('submitBlocktopmenuLinks'))
{
if(Tools::getValue('link') == '')
{
$this->_html .= $this->displayError($this->l('Unable to add this link'));
}
else
{
MenuTopLinks::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0));
$this->_html .= $this->displayConfirmation($this->l('The link has been added'));
}
}
if(Tools::isSubmit('submitBlocktopmenuRemove'))
{
$id_link = Tools::getValue('id_link', 0);
MenuTopLinks::remove($id_link);
Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK'.$id_link.',', 'LNK'.$id_link), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS')));
$this->_html .= $this->displayConfirmation($this->l('The link has been removed'));
}
$this->_html .= '
<fieldset>
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" id="form">
<div style="display: none">
<label>'.$this->l('Items').'</label>
<div class="margin-form">
<input type="text" name="items" id="itemsInput" value="'.Configuration::get('MOD_BLOCKTOPMENU_ITEMS').'" size="70" />
</div>
</div>
<div class="clear">&nbsp;</div>
<table style="margin-left: 130px;">
<tbody>
<tr>
<td>
<select multiple="multiple" id="items" style="width: 300px; height: 160px;">';
$this->makeMenuOption();
$this->_html .= '</select><br/>
<br/>
<a href="#" id="removeItem" style="border: 1px solid rgb(170, 170, 170); margin: 2px; padding: 2px; text-align: center; display: block; text-decoration: none; background-color: rgb(250, 250, 250); color: rgb(18, 52, 86);">'.$this->l('Remove').' &gt;&gt;</a>
</td>
<td style="padding-left: 20px;">
<select multiple="multiple" id="availableItems" style="width: 300px; height: 160px;">';
// BEGIN CMS
$this->_html .= '<optgroup label="'.$this->l('CMS').'">';
$_cms = CMS::listCms($cookie->id_lang);
foreach($_cms as $cms)
$this->_html .= '<option value="CMS'.$cms['id_cms'].'" style="margin-left:10px;">'.$cms['meta_title'].'</option>';
$this->_html .= '</optgroup>';
// END CMS
// BEGIN SUPPLIER
$this->_html .= '<optgroup label="'.$this->l('Supplier').'">';
$suppliers = Supplier::getSuppliers(false, $cookie->id_lang);
foreach($suppliers as $supplier)
$this->_html .= '<option value="SUP'.$supplier['id_supplier'].'" style="margin-left:10px;">'.$supplier['name'].'</option>';
$this->_html .= '</optgroup>';
// END SUPPLIER
// BEGIN Manufacturer
$this->_html .= '<optgroup label="'.$this->l('Manufacturer').'">';
$manufacturers = Manufacturer::getManufacturers(false, $cookie->id_lang);
foreach($manufacturers as $manufacturer)
$this->_html .= '<option value="MAN'.$manufacturer['id_manufacturer'].'" style="margin-left:10px;">'.$manufacturer['name'].'</option>';
$this->_html .= '</optgroup>';
// END Manufacturer
// BEGIN Categories
$this->_html .= '<optgroup label="'.$this->l('Categories').'">';
$this->getCategoryOption(1, $cookie->id_lang);
$this->_html .= '</optgroup>';
// END Categories
// BEGIN Products
$this->_html .= '<optgroup label="'.$this->l('Products').'">';
$this->_html .= '<option value="PRODUCT" style="margin-left:10px;font-style:italic">'.$this->l('Choose ID product').'</option>';
$this->_html .= '</optgroup>';
// END Products
// BEGIN Menu Top Links
$this->_html .= '<optgroup label="'.$this->l('Menu Top Links').'">';
$links = MenuTopLinks::gets($cookie->id_lang);
foreach($links as $link)
$this->_html .= '<option value="LNK'.$link['id_link'].'" style="margin-left:10px;">'.$link['label'].'</option>';
$this->_html .= '</optgroup>';
// END Menu Top Links
$this->_html .= '</select><br />
<br />
<a href="#" id="addItem" style="border: 1px solid rgb(170, 170, 170); margin: 2px; padding: 2px; text-align: center; display: block; text-decoration: none; background-color: rgb(250, 250, 250); color: rgb(18, 52, 86);">&lt;&lt; '.$this->l('Add').'</a>
</td>
</tr>
</tbody>
</table>
<div class="clear">&nbsp;</div>
<script type="text/javascript">
$(document).ready(function(){
$("#addItem").click(add);
$("#availableItems").dblclick(add);
$("#removeItem").click(remove);
$("#items").dblclick(remove);
function add()
{
$("#availableItems option:selected").each(function(i){
var val = $(this).val();
var text = $(this).text();
if(val == "PRODUCT")
{
val = prompt("'.$this->l('Set ID product').'");
if(val == null || val == "" || isNaN(val))
return;
text = "'.$this->l('Product ID').' "+val;
val = "PRD"+val;
}
$("#items").append("<option value=\""+val+"\">"+text+"</option>");
});
serialize();
return false;
}
function remove()
{
$("#items option:selected").each(function(i){
$(this).remove();
});
serialize();
return false;
}
function serialize()
{
var options = "";
$("#items option").each(function(i){
options += $(this).val()+",";
});
$("#itemsInput").val(options.substr(0, options.length - 1));
}
});
</script>
<label for="s">'.$this->l('Search Bar').'</label>
<div class="margin-form">
<input type="checkbox" name="search" id="s" value="1"'.((Configuration::get('MOD_BLOCKTOPMENU_SEARCH')) ? ' checked=""': '').'/>
</div>
<p class="center">
<input type="submit" name="submitBlocktopmenu" value="'.$this->l(' Save ').'" class="button" />
</p>
</form>
</fieldset><br />';
$defaultLanguage = intval(Configuration::get('PS_LANG_DEFAULT'));
$languages = Language::getLanguages();
$iso = Language::getIsoById($defaultLanguage);
$divLangName = 'link_label';
$this->_html .= '
<fieldset>
<legend><img src="../img/admin/add.gif" alt="" title="" />'.$this->l('Add Menu Top Link').'</legend>
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" id="form">
<label>'.$this->l('Label').'</label>
<div class="margin-form">';
foreach ($languages as $language)
{
$this->_html .= '
<div id="link_label_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $defaultLanguage ? 'block' : 'none').';float: left;">
<input type="text" name="label['.$language['id_lang'].']" id="label_'.$language['id_lang'].'" size="70" value="" />
</div>';
}
$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'link_label', true);
$this->_html .= '</div><p class="clear"> </p>
<label>'.$this->l('Link').'</label>
<div class="margin-form">
<input type="text" name="link" value="" size="70" />
</div>
<label>'.$this->l('New Window').'</label>
<div class="margin-form">
<input type="checkbox" name="new_window" value="1" />
</div>
<p class="center">
<input type="submit" name="submitBlocktopmenuLinks" value="'.$this->l(' Add ').'" class="button" />
</p>
</form>
</fieldset><br />';
$this->_html .= '
<fieldset>
<legend><img src="../img/admin/details.gif" alt="" title="" />'.$this->l('List Menu Top Link').'</legend>
<table style="width:100%;">
<thead>
<tr>
<th>'.$this->l('Id Link').'</th>
<th>'.$this->l('Label').'</th>
<th>'.$this->l('Link').'</th>
<th>'.$this->l('New Window').'</th>
<th>'.$this->l('Action').'</th>
</tr>
</thead>
<tbody>';
$links = MenuTopLinks::gets($cookie->id_lang);
foreach($links as $link)
{
$this->_html .= '
<tr>
<td>'.$link['id_link'].'</td>
<td>'.$link['label'].'</td>
<td>'.$link['link'].'</td>
<td>'.(($link['new_window']) ? $this->l('Yes') : $this->l('No')).'</td>
<td>
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
<input type="hidden" name="id_link" value="'.$link['id_link'].'" />
<input type="submit" name="submitBlocktopmenuRemove" value="'.$this->l('Remove').'" class="button" />
</form>
</td>
</tr>';
}
$this->_html .= '</tbody>
</table>
</fieldset>';
echo $this->_html;
}
private function getMenuItems()
{
$items = Configuration::get('MOD_BLOCKTOPMENU_ITEMS');
$items = explode(',', $items);
return $items;
}
private function makeMenuOption()
{
global $cookie;
foreach($this->getMenuItems() as $item)
{
$id = (int)substr($item, 3, strlen($item));
switch(substr($item, 0, 3))
{
case'CAT':
$this->getCategoryOption($id, $cookie->id_lang, false);
break;
case'PRD':
$product = new Product($id, true, $cookie->id_lang);
if(!is_null($product->id))
$this->_html .= '<option value="PRD'.$id.'">'.$product->name.'</option>'.PHP_EOL;
break;
case'CMS':
$cms = CMS::getLinks($cookie->id_lang, array($id));
if(count($cms))
$this->_html .= '<option value="CMS'.$id.'">'.$cms[0]['meta_title'].'</option>'.PHP_EOL;
break;
case'MAN':
$manufacturer = new Manufacturer($id, $cookie->id_lang);
if(!is_null($manufacturer->id))
$this->_html .= '<option value="MAN'.$id.'">'.$manufacturer->name.'</option>'.PHP_EOL;
break;
case'SUP':
$supplier = new Supplier($id, $cookie->id_lang);
if(!is_null($supplier->id))
$this->_html .= '<option value="SUP'.$id.'">'.$supplier->name.'</option>'.PHP_EOL;
break;
case'LNK':
$link = MenuTopLinks::get($id, $cookie->id_lang);
if(count($link))
$this->_html .= '<option value="LNK'.$id.'">'.$link[0]['label'].'</option>'.PHP_EOL;
break;
}
}
}
private function makeMenu()
{
global $cookie, $page_name;
foreach($this->getMenuItems() as $item)
{
$id = (int)substr($item, 3, strlen($item));
switch(substr($item, 0, 3))
{
case'CAT':
$this->getCategory($id, $cookie->id_lang);
break;
case'PRD':
$selected = ($page_name == 'product' && (Tools::getValue('id_product') == $id)) ? ' class="sfHover"' : '';
$product = new Product($id, true, $cookie->id_lang);
if(!is_null($product->id))
$this->_menu .= '<li'.$selected.'><a href="'.$product->getLink().'">'.$product->name.'</a></li>'.PHP_EOL;
break;
case'CMS':
$selected = ($page_name == 'cms' && (Tools::getValue('id_cms') == $id)) ? ' class="sfHover"' : '';
$cms = CMS::getLinks($cookie->id_lang, array($id));
if(count($cms))
$this->_menu .= '<li'.$selected.'><a href="'.$cms[0]['link'].'">'.$cms[0]['meta_title'].'</a></li>'.PHP_EOL;
break;
case'MAN':
$selected = ($page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : '';
$manufacturer = new Manufacturer($id, $cookie->id_lang);
if(!is_null($manufacturer->id))
{
if (intval(Configuration::get('PS_REWRITING_SETTINGS')))
$manufacturer->link_rewrite = Tools::link_rewrite($manufacturer->name, false);
else
$manufacturer->link_rewrite = 0;
$link = new Link;
$this->_menu .= '<li'.$selected.'><a href="'.$link->getManufacturerLink($id, $manufacturer->link_rewrite).'">'.$manufacturer->name.'</a></li>'.PHP_EOL;
}
break;
case'SUP':
$selected = ($page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : '';
$supplier = new Supplier($id, $cookie->id_lang);
if(!is_null($supplier->id))
{
$link = new Link;
$this->_menu .= '<li'.$selected.'><a href="'.$link->getSupplierLink($id, $supplier->link_rewrite).'">'.$supplier->name.'</a></li>'.PHP_EOL;
}
break;
case'LNK':
$link = MenuTopLinks::get($id, $cookie->id_lang);
if(count($link))
$this->_menu .= '<li><a href="'.$link[0]['link'].'"'.(($link[0]['new_window']) ? ' target="_blank"': '').'>'.$link[0]['label'].'</a></li>'.PHP_EOL;
break;
}
}
}
private function getCategoryOption($id_category, $id_lang, $children = true)
{
$categorie = new Category($id_category, $id_lang);
if(is_null($categorie->id))
return;
if(count(explode('.', $categorie->name)) > 1)
$name = str_replace('.', '', strstr($categorie->name, '.'));
else
$name = $categorie->name;
$this->_html .= '<option value="CAT'.$categorie->id.'" style="margin-left:'.(($children) ? round(15+(15*(int)$categorie->level_depth)) : 0).'px;">'.$name.'</option>';
if($children)
{
$childrens = Category::getChildren($id_category, $id_lang);
if(count($childrens))
foreach($childrens as $children)
$this->getCategoryOption($children['id_category'], $id_lang);
}
}
private function getCategory($id_category, $id_lang)
{
global $page_name;
$categorie = new Category($id_category, $id_lang);
if(is_null($categorie->id))
return;
$selected = ($page_name == 'category' && ((int)Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : '';
$this->_menu .= '<li'.$selected.'>';
if(count(explode('.', $categorie->name)) > 1)
$name = str_replace('.', '', strstr($categorie->name, '.'));
else
$name = $categorie->name;
$this->_menu .= '<a href="'.$categorie->getLink().'">'.$name.'</a>';
$childrens = Category::getChildren($id_category, $id_lang);
if(count($childrens))
{
$this->_menu .= '<ul>';
foreach($childrens as $children)
$this->getCategory($children['id_category'], $id_lang);
$this->_menu .= '</ul>';
}
$this->_menu .= '</li>';
}
public function hooktop($param)
{
global $smarty;
$this->makeMenu();
$smarty->assign('MENU_SEARCH', Configuration::get('MOD_BLOCKTOPMENU_SEARCH'));
$smarty->assign('MENU', $this->_menu);
$smarty->assign('this_path', $this->_path);
return $this->display(__FILE__, 'blocktopmenu.tpl');
}
}
?>

View File

@@ -0,0 +1,22 @@
{if $MENU != ''}
</div>
<!-- Menu -->
<div class="sf-contener clearfix">
<ul class="sf-menu clearfix">
{$MENU}
{if $MENU_SEARCH}
<li class="sf-search noBack" style="float:right">
<form id="searchbox" action="search.php" method="get">
<input type="hidden" value="position" name="orderby"/>
<input type="hidden" value="desc" name="orderway"/>
<input type="text" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query}{/if}" />
</form>
</li>
{/if}
</ul>
<div class="sf-right">&nbsp;</div>
<script type="text/javascript" src="{$this_path}js/hoverIntent.js"></script>
<script type="text/javascript" src="{$this_path}js/superfish-modified.js"></script>
<link rel="stylesheet" type="text/css" href="{$this_path}css/superfish-modified.css" media="screen">
<!--/ Menu -->
{/if}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocktopmenu</name>
<displayName><![CDATA[Top horizontal menu]]></displayName>
<version><![CDATA[1.3]]></version>
<description><![CDATA[Add a new menu on top of your shop.]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[Julien Breux Developpement]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
?>

View File

@@ -0,0 +1,171 @@
/*** ESSENTIAL STYLES ***/
.sf-contener {
clear: both;
}
.sf-right {
margin-right: 14px;
float: right;
width: 7px;
}
.sf-menu, .sf-menu * {
margin: 0;
padding: 0;
list-style: none;
}
.sf-menu {
margin: 10px 0;
padding:0 5px;
width:970px;/* 980 */
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background: transparent url(../img/bg_blocktopmenu.png) repeat-x 0 0;
-moz-box-shadow: 0px 1px 2px #c6c6c6;
-webkit-box-shadow: 0px 1px 2px #c6c6c6;
box-shadow: 0px 1px 2px #c6c6c6;
}
.sf-menu ul {
position: absolute;
top: -999em;
width: 10em; /* left offset of submenus need to match (see below) */
}
.sf-menu ul li {
width: 100%;
}
.sf-menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
.sf-menu li {
float: left;
position: relative;
background: transparent url(../img/bg_li_blocktopmenu.png) no-repeat 100% 0;
}
.sf-menu a {
display: block;
position: relative;
color:#fff;
text-shadow:0 1px 0 #333;
}
.sf-menu li:hover ul,
.sf-menu li.sfHover ul {
left: 0;
top: 34px; /* match top ul list item height */
z-index: 99;
width:auto
}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
top: -999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
left: 10em; /* match ul width */
top: 0;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
top: -999em;
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
left: 10em; /* match ul width */
top: 0;
}
/*** DEMO SKIN ***/
.sf-menu {
float: left;
margin-bottom: 1em;
}
.sf-menu a {
display:block;
margin-right:2px;
padding: 0 22px 0 20px;
line-height:34px;
border: 0;
text-decoration:none;
}
.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
color: #fff;
white-space:nowrap;
}
.sf-menu li li {
background: rgba(113, 113, 113, 0.9);
}
.sf-menu li li li {
background: #ebebed;
}
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: transparent url(../img/bg_blocktopmenu_li_hover.png) repeat-x 0 0;
}
.sf-menu ul li:hover, .sf-menu ul li.sfHover,
.sf-menu ul li a:focus, .sf-menu ul li a:hover, .sf-menu ul li a:active {
background: #4e4e4e;
outline: 0;
}
/*** arrows **/
.sf-menu a.sf-with-ul {
padding-right: 2.25em;
min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */
}
.sf-sub-indicator {
position: absolute;
display: block;
right: 10px;
top: 1.05em; /* IE6 only */
width: 10px;
height: 10px;
text-indent: -999em;
overflow: hidden;
background: url('../img/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a > .sf-sub-indicator { /* give all except IE6 the correct values */
top: 11px;
background-position: 0 -100px; /* use translucent arrow for modern browsers*/
}
/* apply hovers to modern browsers */
a:focus > .sf-sub-indicator,
a:hover > .sf-sub-indicator,
a:active > .sf-sub-indicator,
li:hover > a > .sf-sub-indicator,
li.sfHover > a > .sf-sub-indicator {
background-position: -10px -100px; /* arrow hovers for modern browsers*/
}
/* point right for anchors in subs */
.sf-menu ul .sf-sub-indicator { background-position: -10px 0; }
.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; }
/* apply hovers to modern browsers */
.sf-menu ul a:focus > .sf-sub-indicator,
.sf-menu ul a:hover > .sf-sub-indicator,
.sf-menu ul a:active > .sf-sub-indicator,
.sf-menu ul li:hover > a > .sf-sub-indicator,
.sf-menu ul li.sfHover > a > .sf-sub-indicator {
background-position: -10px 0; /* arrow hovers for modern browsers*/
}
/*** shadows for all but IE6 ***/
.sf-shadow ul {
background: url('../img/shadow.png') no-repeat bottom right;
padding: 0 8px 9px 0;
-moz-border-radius-bottomleft: 17px;
-moz-border-radius-topright: 17px;
-webkit-border-top-right-radius: 17px;
-webkit-border-bottom-left-radius: 17px;
}
.sf-shadow ul.sf-shadow-off {
background: transparent;
}
li.sf-search {
background: inherit;
float: right;
line-height: 25px;
}
li.sf-search input {
-moz-border-radius: 0 5px 5px 0;
padding: 3px 0;
padding-left: 20px;
margin-top: 4px;
background: #fff url(../img/search.gif) no-repeat left center;
}

View File

@@ -0,0 +1,36 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_e5b7525b4214a759876af4448bd6b87d'] = 'Menu Haut Horizontal';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_925a8a825a28f69e7a96f5996f9cfcc5'] = 'Ajouter un nouveau menu en haut de votre boutique.';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_597582c140dd691b522fe42299a24d34'] = 'Paramètres mis à jour';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_b9129c167a73844d16d28b0949719155'] = 'Impossible de mettre à jour les paramètres';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_5eef1a8aef991f41dc621dd69e97ad80'] = 'Impossible d\'ajouter ce lien';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_11ad009c1b7c0615be18fe91185c179a'] = 'Le lien a été ajouté';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_15772d25000bce9fc3a2a2fd7d41a717'] = 'Le lien a été supprimé';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_9dea4016dbcc290b773ab2fae678aaa8'] = 'Elements';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_1063e38cb53d94d386f21227fcd84717'] = 'Supprimer';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c7da501f54544eba6787960200d9efdb'] = 'CMS';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ec136b444eede3bc85639fac0dd06229'] = 'Fournisseurs';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c0bd7654d5b278e65f21cf4e9153fdb4'] = 'Fabricants';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_068f80c7519d0528fb08e82137a72131'] = 'Produits';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ac3b3f2d1984171e48eaa3d0bc56d75f'] = 'Choisissez un ID produit';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_56e8bf6c54f1638e7bce5a2fcd5b20fe'] = 'Liens du menu';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_fcd7ab4061bb3846392cc34376902165'] = 'ID du produit';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_97f08a40f22a625d0cbfe03db3349108'] = 'Produit ID';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_8cc149b77eaece54cee2e7e02f40018a'] = 'Barre de recherche';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c436854b135c3dd00ab95b2d4344b0ed'] = 'Enregistrer';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_9f1b01ac44ff287d5b8ed20ec8ee180b'] = 'Ajouter un lien';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_b021df6aac4654c454f46c77646e745f'] = 'Label';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Lien';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_7a115fe2bd8b94ead1550a2da953cf87'] = 'Nouvelle fenêtre';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_19488f2956dc859eb635dbb0deaa15e1'] = 'Ajouter';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_814579fdad9baf2cdcac456468265384'] = 'Liste des liens';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_4443702c8a13a65ac66d074b7a82af9a'] = 'ID Lien';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_004bf6c9a40003140292e97330236c53'] = 'Action';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

View File

@@ -0,0 +1,12 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,12 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
?>

View File

@@ -0,0 +1,84 @@
(function($){
/* hoverIntent by Brian Cherne */
$.fn.hoverIntent = function(f,g) {
// default configuration options
var cfg = {
sensitivity: 7,
interval: 100,
timeout: 0
};
// override configuration options with user supplied object
cfg = $.extend(cfg, g ? { over: f, out: g } : f );
// instantiate variables
// cX, cY = current X and Y position of mouse, updated by mousemove event
// pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
var cX, cY, pX, pY;
// A private function for getting mouse position
var track = function(ev) {
cX = ev.pageX;
cY = ev.pageY;
};
// A private function for comparing current and previous mouse position
var compare = function(ev,ob) {
ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
// compare mouse positions to see if they've crossed the threshold
if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
$(ob).unbind("mousemove",track);
// set hoverIntent state to true (so mouseOut can be called)
ob.hoverIntent_s = 1;
return cfg.over.apply(ob,[ev]);
} else {
// set previous coordinates for next time
pX = cX; pY = cY;
// use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
}
};
// A private function for delaying the mouseOut function
var delay = function(ev,ob) {
ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
ob.hoverIntent_s = 0;
return cfg.out.apply(ob,[ev]);
};
// A private function for handling mouse 'hovering'
var handleHover = function(e) {
// next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
if ( p == this ) { return false; }
// copy objects to be passed into t (required for event object to be passed in IE)
var ev = jQuery.extend({},e);
var ob = this;
// cancel hoverIntent timer if it exists
if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
// else e.type == "onmouseover"
if (e.type == "mouseover") {
// set "previous" X and Y position based on initial entry point
pX = ev.pageX; pY = ev.pageY;
// update "current" X and Y position based on mousemove
$(ob).bind("mousemove",track);
// start polling interval (self-calling timeout) to compare mouse coordinates over time
if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
// else e.type == "onmouseout"
} else {
// unbind expensive mousemove event
$(ob).unbind("mousemove",track);
// if hoverIntent state is true, then call the mouseOut function after the specified delay
if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
}
};
// bind the function to the two event listeners
return this.mouseover(handleHover).mouseout(handleHover);
};
})(jQuery);

View File

@@ -0,0 +1,12 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
?>

View File

@@ -0,0 +1,124 @@
/*
* Superfish v1.4.8 - jQuery menu widget
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
;(function($){
$.fn.superfish = function(op){
var sf = $.fn.superfish,
c = sf.c,
$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
over = function(){
var $$ = $(this), menu = getMenu($$);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},
out = function(){
var $$ = $(this), menu = getMenu($$), o = sf.op;
clearTimeout(menu.sfTimer);
menu.sfTimer=setTimeout(function(){
o.retainPath=($.inArray($$[0],o.$path)>-1);
$$.hideSuperfishUl();
if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
},o.delay);
},
getMenu = function($menu){
var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
sf.op = sf.o[menu.serial];
return menu;
},
addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
return this.each(function() {
var s = this.serial = sf.o.length;
var o = $.extend({},sf.defaults,op);
o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
$(this).addClass([o.hoverClass,c.bcClass].join(' '))
.filter('li:has(ul)').removeClass(o.pathClass);
});
sf.o[s] = sf.op = o;
$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
if (o.autoArrows) addArrow( $('>a:first-child',this) );
})
.not('.'+c.bcClass)
.hideSuperfishUl();
var $a = $('a',this);
$a.each(function(i){
var $li = $a.eq(i).parents('li');
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
});
o.onInit.call(this);
}).each(function() {
menuClasses = [c.menuClass];
if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
$(this).addClass(menuClasses.join(' '));
});
};
var sf = $.fn.superfish;
sf.o = [];
sf.op = {};
sf.IE7fix = function(){
var o = sf.op;
if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');
};
sf.c = {
bcClass : 'sf-breadcrumb',
menuClass : 'sf-js-enabled',
anchorClass : 'sf-with-ul',
arrowClass : 'sf-sub-indicator',
shadowClass : 'sf-shadow'
};
sf.defaults = {
hoverClass : 'sfHover',
pathClass : 'overideThisToUse',
pathLevels : 1,
delay : 800,
animation : {opacity:'show'},
speed : 'fast',
autoArrows : true,
dropShadows : true,
disableHI : false, // true disables hoverIntent detection
onInit : function(){}, // callback functions
onBeforeShow: function(){},
onShow : function(){},
onHide : function(){}
};
$.fn.extend({
hideSuperfishUl : function(){
var o = sf.op,
not = (o.retainPath===true) ? o.$path : '';
o.retainPath = false;
var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
.find('>ul').hide().css('visibility','hidden');
o.onHide.call($ul);
return this;
},
showSuperfishUl : function(){
var o = sf.op,
sh = sf.c.shadowClass+'-off',
$ul = this.addClass(o.hoverClass)
.find('>ul:hidden').css('visibility','visible');
sf.IE7fix.call($ul);
o.onBeforeShow.call($ul);
$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
return this;
}
});
})(jQuery);
jQuery(function(){
jQuery('ul.sf-menu').superfish();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

View File

@@ -0,0 +1,53 @@
<?php
class MenuTopLinks
{
public static function gets($id_lang, $id_link = null)
{
return Db::getInstance()->ExecuteS('
SELECT l.id_link, l.new_window, l.link, ll.label
FROM '._DB_PREFIX_.'linksmenutop l
LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_link = ll.id_link AND ll.id_lang = "'.$id_lang.'")
'.((!is_null($id_link)) ? 'WHERE l.id_link = "'.$id_link.'"' : '').'
');
}
public static function get($id_link, $id_lang)
{
return self::gets($id_lang, $id_link);
}
public static function add($link, $label, $newWindow = 0)
{
if(!is_array($label))
return false;
Db::getInstance()->autoExecute(
_DB_PREFIX_.'linksmenutop',
array(
'new_window'=>(int)$newWindow,
'link'=>$link
),
'INSERT'
);
$id_link = Db::getInstance()->Insert_ID();
foreach($label as $id_lang=>$label)
{
Db::getInstance()->autoExecute(
_DB_PREFIX_.'linksmenutop_lang',
array(
'id_link'=>$id_link,
'id_lang'=>$id_lang,
'label'=>$label
),
'INSERT'
);
}
}
public static function remove($id_link)
{
Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop', "id_link = '{$id_link}'");
Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop_lang', "id_link = '{$id_link}'");
}
}
?>

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B