From dd5aad1eb551380c0d75aa985850e4d30edcbe34 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 27 Apr 2022 11:16:55 +0530 Subject: [PATCH] Remove blockfacebook --- config/xml/themes/default.xml | 1 - controllers/admin/AdminThemesController.php | 1 - modules/blockfacebook/CHANGELOG.txt | 11 -- modules/blockfacebook/blockfacebook.js | 37 ---- modules/blockfacebook/blockfacebook.php | 170 ------------------ modules/blockfacebook/blockfacebook.tpl | 35 ---- modules/blockfacebook/css/blockfacebook.css | 3 - modules/blockfacebook/css/index.php | 33 ---- modules/blockfacebook/logo.gif | Bin 1306 -> 0 bytes modules/blockfacebook/logo.png | Bin 267 -> 0 bytes modules/blockfacebook/translations/index.php | 35 ---- .../views/admin/_configure/preview.tpl | 17 -- 12 files changed, 343 deletions(-) delete mode 100644 modules/blockfacebook/CHANGELOG.txt delete mode 100644 modules/blockfacebook/blockfacebook.js delete mode 100644 modules/blockfacebook/blockfacebook.php delete mode 100644 modules/blockfacebook/blockfacebook.tpl delete mode 100644 modules/blockfacebook/css/blockfacebook.css delete mode 100644 modules/blockfacebook/css/index.php delete mode 100644 modules/blockfacebook/logo.gif delete mode 100644 modules/blockfacebook/logo.png delete mode 100644 modules/blockfacebook/translations/index.php delete mode 100644 modules/blockfacebook/views/admin/_configure/preview.tpl 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 4614741f5597e19050027b0a699ed4bb4934f3d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1306 zcmZ?wbhEHbRA5kG*v!iiv+T-;@4qiU|Gezn3;U^OtG3;F`2M>=@5!y#-uTYFc;w!P z>BpWZwjTZe|33p5DE{Y;@C{IKNi0bO(l+)L1&PVosU-?Ysp*+{wo31J?^jaDOtDo8 zH}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&Psj#ZZEyztRNmQuF&B-gas<2f`Ovz75 zwF0t1!um=IU?nBlwn~m52?day&iO^D3Z{Any2%D+1`1||dWOa(=H}))3PuKo2Koj@ z`i4fjhUQkrMpgy}3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qXu2*iXmtT~wZ)j<0 z2{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2NtnTP2`NAzsKWfE$}v ztOxdvUUGh}ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqU2Pd za%GTJ1y;^Qsfi`|MIrh5Ij~R+$jC3rFV4s>P;d@5RS3__OUW-U2CMeE=kNw zPW5!LRRZeQ%gju%GBP^Az7BifB^?{Dj z2SqDVG{b~|X$QoFCt4r}p6pZefN8x5n5Y^5|NHyr_phHnzJL4r<@2YHAKt%v`{wnl zmoJ__d-~+@qlXXf-@AL~_N|*Yu3x))1N{AbeZ0LqJ>1<~U7Vd99qjFFZLF;b&a$+n(yzr77C#9qEk5&2HvOr7b-5{LqzGH2 zQCV(6N>Wo#R$q5oZ$|%=iPI+MOwF49rF_`1Q^Ba-)SkgCegnTvNOTwz?yCsE36;D;#0lM zxclOVSe>kU2XFPZ{9@I+P&9AW*^e_%^oAu>xoyxWTquy7t=(7V7ihpB#Z+IzKiw=3 P=sN~aS3j3^P6 -* @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}