integration new theme standard

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8169 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lCherifi
2011-08-23 14:27:30 +00:00
parent 2a1e42606b
commit 2d228a4fb8
60 changed files with 1912 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

+103
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');
}
}
?>
+34
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>
+12
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>
+19
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