diff --git a/config/xml/themes/default.xml b/config/xml/themes/default.xml index fc6b07a99..c754e2508 100644 --- a/config/xml/themes/default.xml +++ b/config/xml/themes/default.xml @@ -64,7 +64,6 @@ - diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index 08e9050b5..fff7b82bc 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -2090,7 +2090,6 @@ class AdminThemesControllerCore extends AdminController 'blockcmsinfo', 'blockcurrencies', 'blockcustomerprivacy', - 'blockfacebook', 'blocklanguages', 'blocklayered', 'blocklink', diff --git a/modules/blockfacebook/CHANGELOG.txt b/modules/blockfacebook/CHANGELOG.txt deleted file mode 100644 index 8e5c2845a..000000000 --- a/modules/blockfacebook/CHANGELOG.txt +++ /dev/null @@ -1,11 +0,0 @@ -2014-04-22 18:57:13 +0200 // Changelog updated -2014-04-01 16:41:02 +0200 // fix bracket missing && ++version -2014-04-01 14:13:46 +0200 Merge pull request #1 from f31n/patch-1 -2014-03-29 23:49:00 +0300 // full url is required for blockFacebook -2014-03-28 09:56:54 +0100 logic in php -2014-03-28 09:48:56 +0100 Update blockfacebook.tpl -2014-03-25 21:21:01 +0100 accepting full url and only name -2014-03-25 18:31:27 +0100 bug @ v0.1 didn't work on prestashop 1.6.0.5 -2014-03-24 11:43:28 +0100 / MO blockfacebook : ps_versions_compliancy modified (1.5.6.1 => 1.6) -2014-03-24 11:02:17 +0100 // MO blockfacebook/ : ps_versions_compliancy added -2014-03-20 14:22:40 +0100 Initial commit diff --git a/modules/blockfacebook/blockfacebook.js b/modules/blockfacebook/blockfacebook.js deleted file mode 100644 index 41719d72e..000000000 --- a/modules/blockfacebook/blockfacebook.js +++ /dev/null @@ -1,37 +0,0 @@ -/* -* 2007-2016 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-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ -$(document).ready(function() { - initfb(document, 'script', 'facebook-jssdk'); -}); - -function initfb(d, s, id) -{ - var js, fjs = d.getElementsByTagName(s)[0]; - if (d.getElementById(id)) - return; - js = d.createElement(s); js.id = id; - js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=334341610034299"; - fjs.parentNode.insertBefore(js, fjs); -} \ No newline at end of file diff --git a/modules/blockfacebook/blockfacebook.php b/modules/blockfacebook/blockfacebook.php deleted file mode 100644 index 969c6323d..000000000 --- a/modules/blockfacebook/blockfacebook.php +++ /dev/null @@ -1,170 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -if (!defined('_PS_VERSION_')) - exit; - -class BlockFacebook extends Module -{ - public function __construct() - { - $this->name = 'blockfacebook'; - $this->tab = 'front_office_features'; - $this->version = '1.4.1'; - $this->author = 'PrestaShop'; - - $this->bootstrap = true; - parent::__construct(); - $this->displayName = $this->l('Facebook Like Box block'); - $this->description = $this->l('Displays a block for subscribing to your Facebook Page.'); - $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99'); - } - - - public function install() - { - return parent::install() && - Configuration::updateValue('blockfacebook_url', 'https://www.facebook.com/prestashop') && - $this->registerHook('displayHome') && - $this->registerHook('displayHeader'); - } - - public function uninstall() - { - // Delete configuration - return Configuration::deleteByName('blockfacebook_url') && parent::uninstall(); - } - - public function getContent() - { - $html = ''; - // If we try to update the settings - if (Tools::isSubmit('submitModule')) - { - Configuration::updateValue('blockfacebook_url', Tools::getValue('blockfacebook_url')); - $html .= $this->displayConfirmation($this->l('Configuration updated')); - $this->_clearCache('blockfacebook.tpl'); - Tools::redirectAdmin('index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules')); - } - - $html .= $this->renderForm(); - $facebookurl = Configuration::get('blockfacebook_url'); - if(!strstr($facebookurl, "facebook.com")) $facebookurl="https://www.facebook.com/".$facebookurl; - $this->context->smarty->assign('facebookurl', $facebookurl); - $this->context->smarty->assign('facebook_js_url', $this->_path.'blockfacebook.js'); - $this->context->smarty->assign('facebook_css_url', $this->_path.'css/blockfacebook.css'); - $html .= $this->context->smarty->fetch($this->local_path.'views/admin/_configure/preview.tpl'); - return $html; - } - - public function hookDisplayHome() - { - if (!$this->isCached('blockfacebook.tpl', $this->getCacheId())) - { - $facebookurl = Configuration::get('blockfacebook_url'); - if (!strstr($facebookurl, 'facebook.com')) - $facebookurl = 'https://www.facebook.com/'.$facebookurl; - $this->context->smarty->assign('facebookurl', $facebookurl); - } - return $this->display(__FILE__, 'blockfacebook.tpl', $this->getCacheId()); - } - - public function hookDisplayLeftColumn() - { - if ($this->page_name !== 'index') - $this->_assignMedia(); - return $this->hookDisplayHome(); - } - - public function hookDisplayRightColumn() - { - if ($this->page_name !== 'index') - $this->_assignMedia(); - return $this->hookDisplayHome(); - } - - public function hookHeader() - { - $this->page_name = Dispatcher::getInstance()->getController(); - if ($this->page_name == 'index') - $this->_assignMedia(); - } - - protected function _assignMedia() - { - $this->context->controller->addCss(($this->_path).'css/blockfacebook.css'); - $this->context->controller->addJS(($this->_path).'blockfacebook.js'); - } - - public function renderForm() - { - $fields_form = array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Settings'), - 'icon' => 'icon-cogs' - ), - 'input' => array( - array( - 'type' => 'text', - 'label' => $this->l('Facebook link (full URL is required)'), - 'name' => 'blockfacebook_url', - ), - ), - 'submit' => array( - 'title' => $this->l('Save') - ) - ), - ); - - $helper = new HelperForm(); - $helper->show_toolbar = false; - $helper->table = $this->table; - $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); - $helper->default_form_language = $lang->id; - $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; - $this->fields_form = array(); - - $helper->identifier = $this->identifier; - $helper->submit_action = 'submitModule'; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; - $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->tpl_vars = array( - 'fields_value' => $this->getConfigFieldsValues(), - 'languages' => $this->context->controller->getLanguages(), - 'id_language' => $this->context->language->id - ); - - return $helper->generateForm(array($fields_form)); - } - - public function getConfigFieldsValues() - { - return array( - 'blockfacebook_url' => Tools::getValue('blockfacebook_url', Configuration::get('blockfacebook_url')), - ); - } -} diff --git a/modules/blockfacebook/blockfacebook.tpl b/modules/blockfacebook/blockfacebook.tpl deleted file mode 100644 index efae75b87..000000000 --- a/modules/blockfacebook/blockfacebook.tpl +++ /dev/null @@ -1,35 +0,0 @@ -{* -* 2007-2016 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-2016 PrestaShop SA - -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} -{if $facebookurl != ''} - - - {l s='Follow us on Facebook' mod='blockfacebook'} - - - - - -{/if} diff --git a/modules/blockfacebook/css/blockfacebook.css b/modules/blockfacebook/css/blockfacebook.css deleted file mode 100644 index 454bf0477..000000000 --- a/modules/blockfacebook/css/blockfacebook.css +++ /dev/null @@ -1,3 +0,0 @@ -.facebook-fanbox { - overflow-x : hidden; -} \ No newline at end of file diff --git a/modules/blockfacebook/css/index.php b/modules/blockfacebook/css/index.php deleted file mode 100644 index a87fdfd18..000000000 --- a/modules/blockfacebook/css/index.php +++ /dev/null @@ -1,33 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -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; \ No newline at end of file diff --git a/modules/blockfacebook/logo.gif b/modules/blockfacebook/logo.gif deleted file mode 100644 index 4614741f5..000000000 Binary files a/modules/blockfacebook/logo.gif and /dev/null differ diff --git a/modules/blockfacebook/logo.png b/modules/blockfacebook/logo.png deleted file mode 100644 index 721cb8261..000000000 Binary files a/modules/blockfacebook/logo.png and /dev/null differ diff --git a/modules/blockfacebook/translations/index.php b/modules/blockfacebook/translations/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blockfacebook/translations/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -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; \ No newline at end of file diff --git a/modules/blockfacebook/views/admin/_configure/preview.tpl b/modules/blockfacebook/views/admin/_configure/preview.tpl deleted file mode 100644 index 252297cc1..000000000 --- a/modules/blockfacebook/views/admin/_configure/preview.tpl +++ /dev/null @@ -1,17 +0,0 @@ - - -{if $facebookurl != ''} - - - {l s='Preview' mod='blockfacebook'} - - - - {l s='Follow us on Facebook' mod='blockfacebook'} - - - - - - -{/if}