diff --git a/modules/blockcontact/blockcontact.jpg b/modules/blockcontact/blockcontact.jpg new file mode 100644 index 000000000..31d9db63f Binary files /dev/null and b/modules/blockcontact/blockcontact.jpg differ diff --git a/modules/blockcontact/blockcontact.php b/modules/blockcontact/blockcontact.php new file mode 100644 index 000000000..97794e330 --- /dev/null +++ b/modules/blockcontact/blockcontact.php @@ -0,0 +1,98 @@ + +* @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 '
'.$this->l('Configuration updated').'
'; + } + + return ' +

'.$this->displayName.'

+
+
+ + +
 
+ + +
 
+
+
+
+
 
+
+ Addons + '.$this->l('This module has been developped by PrestaShop and can only be sold through').' addons.prestashop.com.
+ '.$this->l('Please report all bugs to').' addons@prestashop.com '.$this->l('or using our').' '.$this->l('contact form').'. +
'; + } + + public function hookRightColumn() + { + global $smarty; + + $smarty->assign(array( + 'telnumber' => Configuration::get('blockcontact_telnumber'), + 'email' => Configuration::get('blockcontact_email') + )); + return $this->display(__FILE__, 'blockcontact.tpl'); + } +} +?> \ No newline at end of file diff --git a/modules/blockcontact/blockcontact.tpl b/modules/blockcontact/blockcontact.tpl new file mode 100644 index 000000000..3244d02a7 --- /dev/null +++ b/modules/blockcontact/blockcontact.tpl @@ -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 +* @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 +*} + +
+

{l s='Contact us' mod='blockcontact'}

+
+

{l s='Our hotline' mod='blockcontact'}
{l s='is available 24/24' mod='blockcontact'}

+ {if $telnumber != ''}

{l s='Phone : ' mod='blockcontact'}{$telnumber}

{/if} + {if $email != ''}{l s='Contact' mod='blockcontact'}
{l s='our hotline' mod='blockcontact'}
{/if} + +
+
diff --git a/modules/blockcontact/config.xml b/modules/blockcontact/config.xml new file mode 100644 index 000000000..26a325e26 --- /dev/null +++ b/modules/blockcontact/config.xml @@ -0,0 +1,12 @@ + + + blockcontact + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/blockcontact/fr.php b/modules/blockcontact/fr.php new file mode 100644 index 000000000..fac5ef6b7 --- /dev/null +++ b/modules/blockcontact/fr.php @@ -0,0 +1,19 @@ +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'; diff --git a/modules/blockcontact/logo.gif b/modules/blockcontact/logo.gif new file mode 100644 index 000000000..de614414b Binary files /dev/null and b/modules/blockcontact/logo.gif differ diff --git a/modules/blockcontactinfos/blockcontactinfos.php b/modules/blockcontactinfos/blockcontactinfos.php new file mode 100644 index 000000000..124bd8806 --- /dev/null +++ b/modules/blockcontactinfos/blockcontactinfos.php @@ -0,0 +1,116 @@ + +* @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 '
'.$this->l('Configuration updated').'
'; + } + + $content = ' +

'.$this->displayName.'

+
+
+

+

+

+

+

+

+

+

+
 
+
+
+
+
 
+
+ Addons + '.$this->l('This module has been developped by PrestaShop and can only be sold through').' addons.prestashop.com.
+ '.$this->l('Please report all bugs to').' addons@prestashop.com '.$this->l('or using our').' '.$this->l('contact form').'. +
'; + + 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'); + } +} +?> \ No newline at end of file diff --git a/modules/blockcontactinfos/blockcontactinfos.tpl b/modules/blockcontactinfos/blockcontactinfos.tpl new file mode 100644 index 000000000..7a7b269f1 --- /dev/null +++ b/modules/blockcontactinfos/blockcontactinfos.tpl @@ -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 +* @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 +*} + + +
+

{l s='Contact us' mod='blockcontactinfos'}

+
    + {if $company != ''}
  • {$company}
  • {/if} + {if $address != ''}
  • {$address}
  • {/if} + {if $phone != ''}
  • {l s='Tel:'} {$phone}
  • {/if} + {if $email != ''}
  • {l s='Email:'} {$email}
  • {/if} +
+
+ \ No newline at end of file diff --git a/modules/blockcontactinfos/config.xml b/modules/blockcontactinfos/config.xml new file mode 100644 index 000000000..bfbbfdc0f --- /dev/null +++ b/modules/blockcontactinfos/config.xml @@ -0,0 +1,12 @@ + + + blockcontactinfos + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/blockcontactinfos/fr.php b/modules/blockcontactinfos/fr.php new file mode 100644 index 000000000..16ca0623e --- /dev/null +++ b/modules/blockcontactinfos/fr.php @@ -0,0 +1,17 @@ +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'; diff --git a/modules/blockcontactinfos/logo.gif b/modules/blockcontactinfos/logo.gif new file mode 100644 index 000000000..15471afd4 Binary files /dev/null and b/modules/blockcontactinfos/logo.gif differ diff --git a/modules/blockreinsurance/blockreinsurance.php b/modules/blockreinsurance/blockreinsurance.php new file mode 100644 index 000000000..9b7257a3c --- /dev/null +++ b/modules/blockreinsurance/blockreinsurance.php @@ -0,0 +1,214 @@ + +* @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 '
'.$this->l('Configuration updated').'
'; + else + echo '
'.$this->l('An error occurred during the save').'
'; + } + + $nb_blocks = Configuration::get('blockreinsurance_nbblocks'); + $infos = $this->getAllFromDB(); + + $content = ' + +

'.$this->displayName.'

+
+
+ +
 
'; + // Show by default 5 blocks maximum + for($i = 1; $i <= 5; $i++) + { + $content .= '

'.$this->l('Block number').' '.$i.'

'. + ((!empty($infos[$i-1]) && $infos[$i-1]['filename'] != '') ? '' : ''). + '
 
+

+

+

+

'; + } + $content .= '
 
+
+
+
+
 
+
+ Addons + '.$this->l('This module has been developped by PrestaShop and can only be sold through').' addons.prestashop.com.
+ '.$this->l('Please report all bugs to').' addons@prestashop.com '.$this->l('or using our').' '.$this->l('contact form').'. +
'; + + 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'); + } +} +?> \ No newline at end of file diff --git a/modules/blockreinsurance/blockreinsurance.tpl b/modules/blockreinsurance/blockreinsurance.tpl new file mode 100644 index 000000000..663ce392a --- /dev/null +++ b/modules/blockreinsurance/blockreinsurance.tpl @@ -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 +* @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 +*} + + +
+
    + {foreach from=$infos item=info} +
  • {$info.text} {$info.text}
  • + {/foreach} +
+
+ \ No newline at end of file diff --git a/modules/blockreinsurance/config.xml b/modules/blockreinsurance/config.xml new file mode 100644 index 000000000..000742c52 --- /dev/null +++ b/modules/blockreinsurance/config.xml @@ -0,0 +1,12 @@ + + + blockreinsurance + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/blockreinsurance/fr.php b/modules/blockreinsurance/fr.php new file mode 100644 index 000000000..b22857360 --- /dev/null +++ b/modules/blockreinsurance/fr.php @@ -0,0 +1,17 @@ +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'; diff --git a/modules/blockreinsurance/img/reassurance1.jpg b/modules/blockreinsurance/img/reassurance1.jpg new file mode 100644 index 000000000..bb8e0f41f Binary files /dev/null and b/modules/blockreinsurance/img/reassurance1.jpg differ diff --git a/modules/blockreinsurance/img/reassurance2.jpg b/modules/blockreinsurance/img/reassurance2.jpg new file mode 100644 index 000000000..16e686f44 Binary files /dev/null and b/modules/blockreinsurance/img/reassurance2.jpg differ diff --git a/modules/blockreinsurance/img/reassurance3.jpg b/modules/blockreinsurance/img/reassurance3.jpg new file mode 100644 index 000000000..7cd524fe8 Binary files /dev/null and b/modules/blockreinsurance/img/reassurance3.jpg differ diff --git a/modules/blockreinsurance/img/reassurance4.jpg b/modules/blockreinsurance/img/reassurance4.jpg new file mode 100644 index 000000000..9aa175cb4 Binary files /dev/null and b/modules/blockreinsurance/img/reassurance4.jpg differ diff --git a/modules/blockreinsurance/img/reassurance5.jpg b/modules/blockreinsurance/img/reassurance5.jpg new file mode 100644 index 000000000..1f88565bf Binary files /dev/null and b/modules/blockreinsurance/img/reassurance5.jpg differ diff --git a/modules/blockreinsurance/logo.gif b/modules/blockreinsurance/logo.gif new file mode 100644 index 000000000..15471afd4 Binary files /dev/null and b/modules/blockreinsurance/logo.gif differ diff --git a/modules/blocksharefb/blocksharefb.php b/modules/blocksharefb/blocksharefb.php new file mode 100644 index 000000000..d06e78326 --- /dev/null +++ b/modules/blocksharefb/blocksharefb.php @@ -0,0 +1,79 @@ + +* @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 ''; + } + } +} +?> \ No newline at end of file diff --git a/modules/blocksharefb/blocksharefb.tpl b/modules/blocksharefb/blocksharefb.tpl new file mode 100644 index 000000000..4597c9b66 --- /dev/null +++ b/modules/blocksharefb/blocksharefb.tpl @@ -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 +* @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 +*} + +
  • + {l s='Share on Facebook' mod='blocksharefb'} +
  • \ No newline at end of file diff --git a/modules/blocksharefb/config.xml b/modules/blocksharefb/config.xml new file mode 100644 index 000000000..840baab24 --- /dev/null +++ b/modules/blocksharefb/config.xml @@ -0,0 +1,12 @@ + + + blocksharefb + + + + + + 0 + 1 + + \ No newline at end of file diff --git a/modules/blocksharefb/fr.php b/modules/blocksharefb/fr.php new file mode 100644 index 000000000..5f9f2e769 --- /dev/null +++ b/modules/blocksharefb/fr.php @@ -0,0 +1,7 @@ +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'; diff --git a/modules/blocksocial/blocksocial.jpg b/modules/blocksocial/blocksocial.jpg new file mode 100644 index 000000000..31d9db63f Binary files /dev/null and b/modules/blocksocial/blocksocial.jpg differ diff --git a/modules/blocksocial/blocksocial.php b/modules/blocksocial/blocksocial.php new file mode 100644 index 000000000..b8a1b1ae2 --- /dev/null +++ b/modules/blocksocial/blocksocial.php @@ -0,0 +1,103 @@ + +* @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 '
    '.$this->l('Configuration updated').'
    '; + } + + return ' +

    '.$this->displayName.'

    +
    +
    + + +
     
    + + +
     
    + + +
     
    +
    +
    +
    +
     
    +
    + Addons + '.$this->l('This module has been developped by PrestaShop and can only be sold through').' addons.prestashop.com.
    + '.$this->l('Please report all bugs to').' addons@prestashop.com '.$this->l('or using our').' '.$this->l('contact form').'. +
    '; + } + + 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'); + } +} +?> \ No newline at end of file diff --git a/modules/blocksocial/blocksocial.tpl b/modules/blocksocial/blocksocial.tpl new file mode 100644 index 000000000..9e6fd186f --- /dev/null +++ b/modules/blocksocial/blocksocial.tpl @@ -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 +* @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 +*} + +
    +

    {l s='Follow us' mod='blocksocial'}

    + +
    \ No newline at end of file diff --git a/modules/blocksocial/config.xml b/modules/blocksocial/config.xml new file mode 100644 index 000000000..0014e50ce --- /dev/null +++ b/modules/blocksocial/config.xml @@ -0,0 +1,12 @@ + + + blocksocial + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/blocksocial/fr.php b/modules/blocksocial/fr.php new file mode 100644 index 000000000..0759537b4 --- /dev/null +++ b/modules/blocksocial/fr.php @@ -0,0 +1,19 @@ +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'; diff --git a/modules/blocksocial/logo.gif b/modules/blocksocial/logo.gif new file mode 100644 index 000000000..de614414b Binary files /dev/null and b/modules/blocksocial/logo.gif differ diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php new file mode 100644 index 000000000..0cd0fe57c --- /dev/null +++ b/modules/blocktopmenu/blocktopmenu.php @@ -0,0 +1,443 @@ +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 .= ' +
    + '.$this->l('Settings').' +
    +
    + +
    + +
    +
    + +
     
    + + + + + + + +
    +
    +
    + '.$this->l('Remove').' >> +
    +
    +
    + << '.$this->l('Add').' +
    +
     
    + + +
    + +
    +

    + +

    +
    +

    '; + + $defaultLanguage = intval(Configuration::get('PS_LANG_DEFAULT')); + $languages = Language::getLanguages(); + $iso = Language::getIsoById($defaultLanguage); + $divLangName = 'link_label'; + $this->_html .= ' +
    + '.$this->l('Add Menu Top Link').' +
    + +
    '; + foreach ($languages as $language) + { + $this->_html .= ' + '; + } + $this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'link_label', true); + + $this->_html .= '

    + +
    + +
    + +
    + +
    +

    + +

    +
    +

    '; + + $this->_html .= ' +
    + '.$this->l('List Menu Top Link').' + + + + + + + + + + + '; + $links = MenuTopLinks::gets($cookie->id_lang); + foreach($links as $link) + { + $this->_html .= ' + + + + + + + '; + } + $this->_html .= ' +
    '.$this->l('Id Link').''.$this->l('Label').''.$this->l('Link').''.$this->l('New Window').''.$this->l('Action').'
    '.$link['id_link'].''.$link['label'].''.$link['link'].''.(($link['new_window']) ? $this->l('Yes') : $this->l('No')).' +
    + + +
    +
    +
    '; + 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 .= ''.PHP_EOL; + break; + case'CMS': + $cms = CMS::getLinks($cookie->id_lang, array($id)); + if(count($cms)) + $this->_html .= ''.PHP_EOL; + break; + case'MAN': + $manufacturer = new Manufacturer($id, $cookie->id_lang); + if(!is_null($manufacturer->id)) + $this->_html .= ''.PHP_EOL; + break; + case'SUP': + $supplier = new Supplier($id, $cookie->id_lang); + if(!is_null($supplier->id)) + $this->_html .= ''.PHP_EOL; + break; + case'LNK': + $link = MenuTopLinks::get($id, $cookie->id_lang); + if(count($link)) + $this->_html .= ''.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 .= ''.$product->name.''.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 .= ''.$cms[0]['meta_title'].''.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 .= ''.$manufacturer->name.''.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 .= ''.$supplier->name.''.PHP_EOL; + } + break; + case'LNK': + $link = MenuTopLinks::get($id, $cookie->id_lang); + if(count($link)) + $this->_menu .= '
  • '.$link[0]['label'].'
  • '.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 .= ''; + 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 .= ''; + if(count(explode('.', $categorie->name)) > 1) + $name = str_replace('.', '', strstr($categorie->name, '.')); + else + $name = $categorie->name; + $this->_menu .= ''.$name.''; + $childrens = Category::getChildren($id_category, $id_lang); + if(count($childrens)) + { + $this->_menu .= '
      '; + foreach($childrens as $children) + $this->getCategory($children['id_category'], $id_lang); + $this->_menu .= '
    '; + } + $this->_menu .= ''; + } + + 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'); + } +} +?> \ No newline at end of file diff --git a/modules/blocktopmenu/blocktopmenu.tpl b/modules/blocktopmenu/blocktopmenu.tpl new file mode 100644 index 000000000..bb80693fa --- /dev/null +++ b/modules/blocktopmenu/blocktopmenu.tpl @@ -0,0 +1,22 @@ + {if $MENU != ''} + + +
    +
      + {$MENU} + {if $MENU_SEARCH} + + {/if} +
    +
     
    + + + + + {/if} \ No newline at end of file diff --git a/modules/blocktopmenu/config.xml b/modules/blocktopmenu/config.xml new file mode 100644 index 000000000..72d1934f5 --- /dev/null +++ b/modules/blocktopmenu/config.xml @@ -0,0 +1,12 @@ + + + blocktopmenu + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/blocktopmenu/css/index.php b/modules/blocktopmenu/css/index.php new file mode 100644 index 000000000..4a2aa31b2 --- /dev/null +++ b/modules/blocktopmenu/css/index.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/blocktopmenu/css/superfish-modified.css b/modules/blocktopmenu/css/superfish-modified.css new file mode 100644 index 000000000..559da4afc --- /dev/null +++ b/modules/blocktopmenu/css/superfish-modified.css @@ -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; +} \ No newline at end of file diff --git a/modules/blocktopmenu/fr.php b/modules/blocktopmenu/fr.php new file mode 100644 index 000000000..830e55b10 --- /dev/null +++ b/modules/blocktopmenu/fr.php @@ -0,0 +1,36 @@ +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'; diff --git a/modules/blocktopmenu/img/arrows-ffffff.png b/modules/blocktopmenu/img/arrows-ffffff.png new file mode 100644 index 000000000..995df5206 Binary files /dev/null and b/modules/blocktopmenu/img/arrows-ffffff.png differ diff --git a/modules/blocktopmenu/img/bg_blocktopmenu.png b/modules/blocktopmenu/img/bg_blocktopmenu.png new file mode 100644 index 000000000..2bea83011 Binary files /dev/null and b/modules/blocktopmenu/img/bg_blocktopmenu.png differ diff --git a/modules/blocktopmenu/img/bg_blocktopmenu_li_hover.png b/modules/blocktopmenu/img/bg_blocktopmenu_li_hover.png new file mode 100644 index 000000000..780424962 Binary files /dev/null and b/modules/blocktopmenu/img/bg_blocktopmenu_li_hover.png differ diff --git a/modules/blocktopmenu/img/bg_blocktopmenu_li_seleted.png b/modules/blocktopmenu/img/bg_blocktopmenu_li_seleted.png new file mode 100644 index 000000000..3d6fb04b5 Binary files /dev/null and b/modules/blocktopmenu/img/bg_blocktopmenu_li_seleted.png differ diff --git a/modules/blocktopmenu/img/bg_li_blocktopmenu.png b/modules/blocktopmenu/img/bg_li_blocktopmenu.png new file mode 100644 index 000000000..f19e13557 Binary files /dev/null and b/modules/blocktopmenu/img/bg_li_blocktopmenu.png differ diff --git a/modules/blocktopmenu/img/blocktopmenu.gif b/modules/blocktopmenu/img/blocktopmenu.gif new file mode 100644 index 000000000..b4b507de5 Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu.gif differ diff --git a/modules/blocktopmenu/img/blocktopmenu_hover.gif b/modules/blocktopmenu/img/blocktopmenu_hover.gif new file mode 100644 index 000000000..09f9c0af5 Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_hover.gif differ diff --git a/modules/blocktopmenu/img/blocktopmenu_left.gif b/modules/blocktopmenu/img/blocktopmenu_left.gif new file mode 100644 index 000000000..589804321 Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_left.gif differ diff --git a/modules/blocktopmenu/img/blocktopmenu_left.gif.old b/modules/blocktopmenu/img/blocktopmenu_left.gif.old new file mode 100644 index 000000000..d81bc54cc Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_left.gif.old differ diff --git a/modules/blocktopmenu/img/blocktopmenu_right.gif b/modules/blocktopmenu/img/blocktopmenu_right.gif new file mode 100644 index 000000000..d8ab24191 Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_right.gif differ diff --git a/modules/blocktopmenu/img/blocktopmenu_right.gif.old b/modules/blocktopmenu/img/blocktopmenu_right.gif.old new file mode 100644 index 000000000..64ccfd7c2 Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_right.gif.old differ diff --git a/modules/blocktopmenu/img/index.php b/modules/blocktopmenu/img/index.php new file mode 100644 index 000000000..4a2aa31b2 --- /dev/null +++ b/modules/blocktopmenu/img/index.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/blocktopmenu/img/search.gif b/modules/blocktopmenu/img/search.gif new file mode 100644 index 000000000..e32a989f1 Binary files /dev/null and b/modules/blocktopmenu/img/search.gif differ diff --git a/modules/blocktopmenu/img/shadow.png b/modules/blocktopmenu/img/shadow.png new file mode 100644 index 000000000..c04d21b76 Binary files /dev/null and b/modules/blocktopmenu/img/shadow.png differ diff --git a/modules/blocktopmenu/index.php b/modules/blocktopmenu/index.php new file mode 100644 index 000000000..4a2aa31b2 --- /dev/null +++ b/modules/blocktopmenu/index.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/blocktopmenu/js/hoverIntent.js b/modules/blocktopmenu/js/hoverIntent.js new file mode 100644 index 000000000..91da57b24 --- /dev/null +++ b/modules/blocktopmenu/js/hoverIntent.js @@ -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); \ No newline at end of file diff --git a/modules/blocktopmenu/js/index.php b/modules/blocktopmenu/js/index.php new file mode 100644 index 000000000..4a2aa31b2 --- /dev/null +++ b/modules/blocktopmenu/js/index.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/blocktopmenu/js/superfish-modified.js b/modules/blocktopmenu/js/superfish-modified.js new file mode 100644 index 000000000..16ecef735 --- /dev/null +++ b/modules/blocktopmenu/js/superfish-modified.js @@ -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 = $([' »'].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(); +}); \ No newline at end of file diff --git a/modules/blocktopmenu/logo.gif b/modules/blocktopmenu/logo.gif new file mode 100644 index 000000000..5e0095b0b Binary files /dev/null and b/modules/blocktopmenu/logo.gif differ diff --git a/modules/blocktopmenu/menutoplinks.class.php b/modules/blocktopmenu/menutoplinks.class.php new file mode 100644 index 000000000..d0727e695 --- /dev/null +++ b/modules/blocktopmenu/menutoplinks.class.php @@ -0,0 +1,53 @@ +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}'"); + } +} +?> \ No newline at end of file diff --git a/modules/canadapost/fr.php b/modules/canadapost/fr.php new file mode 100644 index 000000000..e69de29bb diff --git a/modules/productcomments/img/bg_bt.gif b/modules/productcomments/img/bg_bt.gif new file mode 100644 index 000000000..202d52afb Binary files /dev/null and b/modules/productcomments/img/bg_bt.gif differ diff --git a/modules/productcomments/img/bg_li.png b/modules/productcomments/img/bg_li.png new file mode 100644 index 000000000..c970f18ef Binary files /dev/null and b/modules/productcomments/img/bg_li.png differ