├── skin └── frontend │ └── base │ └── default │ ├── js │ └── chapagain │ │ └── facebooklikeboxpopup │ │ ├── jquery-noconflict.js │ │ ├── jquery.colorbox.js │ │ └── jquery-1.10.2.min.js │ ├── images │ └── chapagain │ │ └── facebooklikeboxpopup │ │ ├── border.png │ │ ├── controls.png │ │ ├── loading.gif │ │ ├── overlay.png │ │ └── loading_background.png │ └── css │ └── chapagain │ └── facebooklikeboxpopup │ └── colorbox.css ├── app ├── etc │ └── modules │ │ └── Chapagain_FacebookLikeBoxPopup.xml ├── code │ └── community │ │ └── Chapagain │ │ └── FacebookLikeBoxPopup │ │ ├── Block │ │ ├── Popup.php │ │ └── System │ │ │ └── Config │ │ │ └── Info.php │ │ ├── etc │ │ ├── adminhtml.xml │ │ ├── config.xml │ │ └── system.xml │ │ └── Helper │ │ └── Data.php └── design │ └── frontend │ └── base │ └── default │ ├── layout │ └── chapagain │ │ └── facebooklikeboxpopup.xml │ └── template │ └── chapagain │ └── facebooklikeboxpopup │ ├── sidebar.phtml │ └── popup.phtml ├── README.md ├── LICENSE └── js └── colorbox └── jquery.colorbox.js /skin/frontend/base/default/js/chapagain/facebooklikeboxpopup/jquery-noconflict.js: -------------------------------------------------------------------------------- 1 | // Avoid PrototypeJS conflicts, assign jQuery to $j instead of $ 2 | //var $j = jQuery.noConflict(); 3 | 4 | jQuery.noConflict(); 5 | -------------------------------------------------------------------------------- /skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chapagain/facebook-likebox-magento/master/skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/border.png -------------------------------------------------------------------------------- /skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chapagain/facebook-likebox-magento/master/skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/controls.png -------------------------------------------------------------------------------- /skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chapagain/facebook-likebox-magento/master/skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/loading.gif -------------------------------------------------------------------------------- /skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chapagain/facebook-likebox-magento/master/skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/overlay.png -------------------------------------------------------------------------------- /skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/loading_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chapagain/facebook-likebox-magento/master/skin/frontend/base/default/images/chapagain/facebooklikeboxpopup/loading_background.png -------------------------------------------------------------------------------- /app/etc/modules/Chapagain_FacebookLikeBoxPopup.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | community 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/code/community/Chapagain/FacebookLikeBoxPopup/Block/Popup.php: -------------------------------------------------------------------------------- 1 | getRequest()->getRouteName(); 8 | $identifier = Mage::getSingleton('cms/page')->getIdentifier(); 9 | 10 | if($routeName == 'cms' && $identifier == 'home') { 11 | return true; 12 | } else { 13 | return false; 14 | } 15 | } 16 | 17 | } 18 | 19 | ?> 20 | -------------------------------------------------------------------------------- /app/code/community/Chapagain/FacebookLikeBoxPopup/etc/adminhtml.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Allow Everything 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Chapagain - Information 16 | 17 | 18 | Facebook Like Box Popup 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Facebook LikeBox on Popup and Sidebar - Extension for Magento 1.x 2 | 3 | Facebook Like Box is a way to promote your Facebook page on your website. It allows admins to promote their Pages and embed a simple feed of content from a Page into other sites. 4 | 5 | This extension displays Facebook Likebox as a Popup when you load the page for the first time. It also displays the Likebox on left & right sidebar. 6 | 7 | ## Configuration Settings 8 | 9 | You can manage the display of the Like Box from: 10 | 11 | `System -> Configuration -> CHAPAGAIN EXTENSIONS -> Facebook Like Box Popup` 12 | 13 | - Facebook Page URL, Page Name, Popup width and height, etc. can be adjusted from configuration settings. 14 | - You can enable/disable Facebook Like Box on Popup. 15 | - You can also enable/disable Facebook Like Box on left and right sidebar. 16 | 17 | BLOG: [http://blog.chapagain.com.np/facebook-likebox-on-popup-and-sidebar-magento-extension-free/](http://blog.chapagain.com.np/facebook-likebox-on-popup-and-sidebar-magento-extension-free/) 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Mukesh Chapagain 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/chapagain/facebooklikeboxpopup.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | skin_csscss/chapagain/facebooklikeboxpopup/colorbox.css 12 | skin_jsjs/chapagain/facebooklikeboxpopup/jquery-1.10.2.min.js 13 | skin_jsjs/chapagain/facebooklikeboxpopup/jquery-noconflict.js 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | facebooklikeboxpopup.sidebar 25 | 26 | 27 | 28 | 29 | facebooklikeboxpopup.sidebar 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/chapagain/facebooklikeboxpopup/sidebar.phtml: -------------------------------------------------------------------------------- 1 | helper('facebooklikeboxpopup')->getIsEnableSidebar()): ?> 2 | 3 | helper('facebooklikeboxpopup')->getPopupTextSidebar(); 5 | ?> 6 | 7 |
8 | 15 | 16 |
17 |
18 | __($this->helper('facebooklikeboxpopup')->getPopupTextSidebar()) ?> 19 |
20 | 21 |
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /app/code/community/Chapagain/FacebookLikeBoxPopup/Block/System/Config/Info.php: -------------------------------------------------------------------------------- 1 | 23 |

About the Developer

24 |

25 | Mukesh Chapagain
26 | Web developer, Programmer, Blogger, Engineer
27 | Freelancer with specialization in Magento eCommerce
28 |
29 | Blog | 30 | Email | 31 | LinkedIn | 32 | GitHub | 33 | Twitter | 34 | Facebook 35 |
36 | More extensions by the developer at MagentoConnect 37 |

38 | '; 39 | 40 | return $html; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/code/community/Chapagain/FacebookLikeBoxPopup/etc/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0.1.0 6 | 7 | 8 | 9 | 10 | 11 | standard 12 | 13 | Chapagain_FacebookLikeBoxPopup 14 | facebooklikeboxpopup 15 | 16 | 17 | 18 | 19 | 20 | 21 | chapagain/facebooklikeboxpopup.xml 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | admin 30 | 31 | Chapagain_FacebookLikeBoxPopup 32 | facebooklikeboxpopupadmin 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Chapagain_FacebookLikeBoxPopup_Model 41 | 42 | 43 | 44 | 45 | Chapagain_FacebookLikeBoxPopup_Block 46 | 47 | 48 | 49 | 50 | Chapagain_FacebookLikeBoxPopup_Helper 51 | 52 | 53 | 54 | 55 | 56 | 57 | 1 58 | http://www.facebook.com/mukesh.chapagain 59 | Mukesh Chapagain 60 | 400 61 | 220 62 | Like us on Facebook 63 | 1 64 | 1 65 | 66 | 67 | 1 68 | 1 69 | http://www.facebook.com/mukesh.chapagain 70 | Mukesh Chapagain 71 | 400 72 | 220 73 | Like us on Facebook 74 | 1 75 | 1 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/chapagain/facebooklikeboxpopup/popup.phtml: -------------------------------------------------------------------------------- 1 | helper('facebooklikeboxpopup')->getIsEnable()): ?> 2 | get('fb_popup')): ?> 3 | 4 | 23 | 24 | 25 |
26 | 33 | 34 | 35 |
36 |
37 |

helper('facebooklikeboxpopup')->getPopupText() ?>

38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /skin/frontend/base/default/css/chapagain/facebooklikeboxpopup/colorbox.css: -------------------------------------------------------------------------------- 1 | /* 2 | Colorbox Core Style: 3 | The following CSS is consistent between example themes and should not be altered. 4 | */ 5 | #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} 6 | #cboxWrapper {max-width:none;} 7 | #cboxOverlay{position:fixed; width:100%; height:100%;} 8 | #cboxMiddleLeft, #cboxBottomLeft{clear:left;} 9 | #cboxContent{position:relative;} 10 | #cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} 11 | #cboxTitle{margin:0;} 12 | #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} 13 | #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} 14 | .cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} 15 | .cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} 16 | #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} 17 | 18 | /* 19 | User Style: 20 | Change the following styles to modify the appearance of Colorbox. They are 21 | ordered & tabbed in a way that represents the nesting of the generated HTML. 22 | */ 23 | #cboxOverlay{background:url(../../../images/chapagain/facebooklikeboxpopup/overlay.png) repeat 0 0; opacity: 0.9; filter: alpha(opacity = 90);} 24 | #colorbox{outline:0;} 25 | #cboxTopLeft{width:21px; height:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) no-repeat -101px 0;} 26 | #cboxTopRight{width:21px; height:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) no-repeat -130px 0;} 27 | #cboxBottomLeft{width:21px; height:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) no-repeat -101px -29px;} 28 | #cboxBottomRight{width:21px; height:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) no-repeat -130px -29px;} 29 | #cboxMiddleLeft{width:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) left top repeat-y;} 30 | #cboxMiddleRight{width:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) right top repeat-y;} 31 | #cboxTopCenter{height:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/border.png) 0 0 repeat-x;} 32 | #cboxBottomCenter{height:21px; background:url(../../../images/chapagain/facebooklikeboxpopup/border.png) 0 -29px repeat-x;} 33 | #cboxContent{background:#fff; overflow:hidden;} 34 | .cboxIframe{background:#fff;} 35 | #cboxError{padding:50px; border:1px solid #ccc;} 36 | #cboxLoadedContent{margin-bottom:28px;} 37 | #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;} 38 | #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;} 39 | #cboxLoadingOverlay{background:url(../../../images/chapagain/facebooklikeboxpopup/loading_background.png) no-repeat center center;} 40 | #cboxLoadingGraphic{background:url(../../../images/chapagain/facebooklikeboxpopup/loading.gif) no-repeat center center;} 41 | 42 | /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ 43 | #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } 44 | 45 | /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ 46 | #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} 47 | 48 | #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;} 49 | #cboxPrevious{position:absolute; bottom:0; left:0; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;} 50 | #cboxPrevious:hover{background-position:-75px -25px;} 51 | #cboxNext{position:absolute; bottom:0; left:27px; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;} 52 | #cboxNext:hover{background-position:-50px -25px;} 53 | #cboxClose{position:absolute; bottom:0; right:0; background:url(../../../images/chapagain/facebooklikeboxpopup/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;} 54 | #cboxClose:hover{background-position:-25px -25px;} 55 | 56 | /* 57 | The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill 58 | when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9. 59 | See: http://jacklmoore.com/notes/ie-transparency-problems/ 60 | */ 61 | .cboxIE #cboxTopLeft, 62 | .cboxIE #cboxTopCenter, 63 | .cboxIE #cboxTopRight, 64 | .cboxIE #cboxBottomLeft, 65 | .cboxIE #cboxBottomCenter, 66 | .cboxIE #cboxBottomRight, 67 | .cboxIE #cboxMiddleLeft, 68 | .cboxIE #cboxMiddleRight { 69 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); 70 | } 71 | -------------------------------------------------------------------------------- /app/code/community/Chapagain/FacebookLikeBoxPopup/Helper/Data.php: -------------------------------------------------------------------------------- 1 | 0 ? $value : 400; 58 | } 59 | 60 | public function getPopupHeight() 61 | { 62 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_POPUP_HEIGHT); 63 | return $value > 0 ? $value : 220; 64 | } 65 | 66 | public function getShowStream() 67 | { 68 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_STREAM); 69 | return $value == 0 ? 'false' : 'true'; 70 | } 71 | 72 | public function getShowHeader() 73 | { 74 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_HEADER); 75 | return $value == 0 ? 'false' : 'true'; 76 | } 77 | 78 | public function getShowFaces() 79 | { 80 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_FACES); 81 | return $value == 0 ? 'false' : 'true'; 82 | } 83 | 84 | public function getHideCoverPhoto() 85 | { 86 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_HIDE_COVER_PHOTO); 87 | return $value == 0 ? 'false' : 'true'; 88 | } 89 | 90 | public function getAdaptContainerWidth() 91 | { 92 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_ADAPT_CONTAINER_WIDTH); 93 | return $value == 0 ? 'false' : 'true'; 94 | } 95 | 96 | /************************************************************** 97 | * SIDEBAR SETTINGS 98 | **************************************************************/ 99 | 100 | public function getIsEnableSidebar() 101 | { 102 | return Mage::getStoreConfig(self::CONFIG_FBPOPUP_IS_ENABLE_SIDEBAR); 103 | } 104 | 105 | public function getShowInLeftSidebar() 106 | { 107 | return Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_LEFT_SIDEBAR); 108 | } 109 | 110 | public function getShowInRightSidebar() 111 | { 112 | return Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_RIGHT_SIDEBAR); 113 | } 114 | 115 | public function getFbLinkSidebar() 116 | { 117 | return Mage::getStoreConfig(self::CONFIG_FBPOPUP_FB_LINK_SIDEBAR); 118 | } 119 | 120 | public function getFbNameSidebar() 121 | { 122 | return Mage::getStoreConfig(self::CONFIG_FBPOPUP_FB_NAME_SIDEBAR); 123 | } 124 | 125 | public function getPopupTextSidebar() 126 | { 127 | return Mage::getStoreConfig(self::CONFIG_FBPOPUP_POPUP_TEXT_SIDEBAR); 128 | } 129 | 130 | public function getPopupWidthSidebar() 131 | { 132 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_POPUP_WIDTH_SIDEBAR); 133 | return $value > 0 ? $value : 400; 134 | } 135 | 136 | public function getPopupHeightSidebar() 137 | { 138 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_POPUP_HEIGHT_SIDEBAR); 139 | return $value > 0 ? $value : 220; 140 | } 141 | 142 | public function getShowStreamSidebar() 143 | { 144 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_STREAM_SIDEBAR); 145 | return $value == 0 ? 'false' : 'true'; 146 | } 147 | 148 | public function getShowHeaderSidebar() 149 | { 150 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_HEADER_SIDEBAR); 151 | return $value == 0 ? 'false' : 'true'; 152 | } 153 | 154 | public function getShowFacesSidebar() 155 | { 156 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_SHOW_FACES_SIDEBAR); 157 | return $value == 0 ? 'false' : 'true'; 158 | } 159 | 160 | public function getHideCoverPhotoSidebar() 161 | { 162 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_HIDE_COVER_PHOTO_SIDEBAR); 163 | return $value == 0 ? 'false' : 'true'; 164 | } 165 | 166 | public function getAdaptContainerWidthSidebar() 167 | { 168 | $value = Mage::getStoreConfig(self::CONFIG_FBPOPUP_ADAPT_CONTAINER_WIDTH_SIDEBAR); 169 | return $value == 0 ? 'false' : 'true'; 170 | } 171 | } 172 | 173 | ?> 174 | -------------------------------------------------------------------------------- /app/code/community/Chapagain/FacebookLikeBoxPopup/etc/system.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 250 7 | 8 | 9 | 10 | 11 | 12 | chapagainall 13 | text 14 | 10 15 | 1 16 | 1 17 | 1 18 | 19 | 20 | facebooklikeboxpopup/system_config_info 21 | 10 22 | 1 23 | 1 24 | 1 25 | 26 | 27 | 28 | 29 | 30 | 31 | chapagainall 32 | text 33 | 100 34 | 1 35 | 1 36 | 1 37 | 38 | 39 | 40 | text 41 | 10 42 | 1 43 | 1 44 | 1 45 | 46 | 47 | 48 | Enable/Disable Facebook Like Box Popup 49 | select 50 | adminhtml/system_config_source_yesno 51 | 10 52 | 1 53 | 1 54 | 1 55 | 56 | 57 | 58 | text 59 | 20 60 | 1 61 | 1 62 | 1 63 | 64 | 65 | 66 | text 67 | 25 68 | 1 69 | 1 70 | 1 71 | 72 | 73 | 74 | text 75 | 30 76 | 1 77 | 1 78 | 1 79 | 80 | 81 | 82 | Like Box Width in pixels (px) 83 | text 84 | 40 85 | 1 86 | 1 87 | 1 88 | 89 | 90 | 91 | Like Box Height in pixels (px) 92 | text 93 | 50 94 | 1 95 | 1 96 | 1 97 | 98 | 99 | 100 | select 101 | adminhtml/system_config_source_yesno 102 | 60 103 | 1 104 | 1 105 | 1 106 | 107 | 108 | 109 | select 110 | adminhtml/system_config_source_yesno 111 | 70 112 | 1 113 | 1 114 | 1 115 | 116 | 117 | 118 | select 119 | adminhtml/system_config_source_yesno 120 | 80 121 | 1 122 | 1 123 | 1 124 | 125 | 126 | 127 | select 128 | adminhtml/system_config_source_yesno 129 | 90 130 | 1 131 | 1 132 | 1 133 | 134 | 135 | 136 | select 137 | adminhtml/system_config_source_yesno 138 | 100 139 | 1 140 | 1 141 | 1 142 | 143 | 144 | 145 | 146 | 147 | text 148 | 20 149 | 1 150 | 1 151 | 1 152 | 153 | 154 | 155 | Enable/Disable Like Box on Sidebar 156 | select 157 | adminhtml/system_config_source_yesno 158 | 10 159 | 1 160 | 1 161 | 1 162 | 163 | 164 | 165 | select 166 | adminhtml/system_config_source_yesno 167 | 20 168 | 1 169 | 1 170 | 1 171 | 172 | 173 | 174 | select 175 | adminhtml/system_config_source_yesno 176 | 30 177 | 1 178 | 1 179 | 1 180 | 181 | 182 | 183 | text 184 | 40 185 | 1 186 | 1 187 | 1 188 | 189 | 190 | 191 | text 192 | 50 193 | 1 194 | 1 195 | 1 196 | 197 | 198 | 199 | text 200 | 60 201 | 1 202 | 1 203 | 1 204 | 205 | 206 | 207 | Like Box Width in pixels (px) 208 | text 209 | 70 210 | 1 211 | 1 212 | 1 213 | 214 | 215 | 216 | Like Box Height in pixels (px) 217 | text 218 | 80 219 | 1 220 | 1 221 | 1 222 | 223 | 224 | 225 | select 226 | adminhtml/system_config_source_yesno 227 | 90 228 | 1 229 | 1 230 | 1 231 | 232 | 233 | 234 | select 235 | adminhtml/system_config_source_yesno 236 | 100 237 | 1 238 | 1 239 | 1 240 | 241 | 242 | 243 | select 244 | adminhtml/system_config_source_yesno 245 | 110 246 | 1 247 | 1 248 | 1 249 | 250 | 251 | 252 | select 253 | adminhtml/system_config_source_yesno 254 | 120 255 | 1 256 | 1 257 | 1 258 | 259 | 260 | 261 | select 262 | adminhtml/system_config_source_yesno 263 | 130 264 | 1 265 | 1 266 | 1 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /js/colorbox/jquery.colorbox.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Colorbox v1.5.4 - 2014-03-07 3 | jQuery lightbox and modal window plugin 4 | (c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox 5 | license: http://www.opensource.org/licenses/mit-license.php 6 | */ 7 | (function ($, document, window) { 8 | var 9 | // Default settings object. 10 | // See http://jacklmoore.com/colorbox for details. 11 | defaults = { 12 | // data sources 13 | html: false, 14 | photo: false, 15 | iframe: false, 16 | inline: false, 17 | 18 | // behavior and appearance 19 | transition: "elastic", 20 | speed: 300, 21 | fadeOut: 300, 22 | width: false, 23 | initialWidth: "600", 24 | innerWidth: false, 25 | maxWidth: false, 26 | height: false, 27 | initialHeight: "450", 28 | innerHeight: false, 29 | maxHeight: false, 30 | scalePhotos: true, 31 | scrolling: true, 32 | opacity: 0.9, 33 | preloading: true, 34 | className: false, 35 | overlayClose: true, 36 | escKey: true, 37 | arrowKey: true, 38 | top: false, 39 | bottom: false, 40 | left: false, 41 | right: false, 42 | fixed: false, 43 | data: undefined, 44 | closeButton: true, 45 | fastIframe: true, 46 | open: false, 47 | reposition: true, 48 | loop: true, 49 | slideshow: false, 50 | slideshowAuto: true, 51 | slideshowSpeed: 2500, 52 | slideshowStart: "start slideshow", 53 | slideshowStop: "stop slideshow", 54 | photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i, 55 | 56 | // alternate image paths for high-res displays 57 | retinaImage: false, 58 | retinaUrl: false, 59 | retinaSuffix: '@2x.$1', 60 | 61 | // internationalization 62 | current: "image {current} of {total}", 63 | previous: "previous", 64 | next: "next", 65 | close: "close", 66 | xhrError: "This content failed to load.", 67 | imgError: "This image failed to load.", 68 | 69 | // accessbility 70 | returnFocus: true, 71 | trapFocus: true, 72 | 73 | // callbacks 74 | onOpen: false, 75 | onLoad: false, 76 | onComplete: false, 77 | onCleanup: false, 78 | onClosed: false, 79 | 80 | rel: function() { 81 | return this.rel; 82 | }, 83 | href: function() { 84 | // Using .attr() so that the href can also be used to provide a selector for inline content 85 | return $(this).attr('href'); 86 | }, 87 | title: function() { 88 | return this.title; 89 | } 90 | }, 91 | 92 | 93 | // Abstracting the HTML and event identifiers for easy rebranding 94 | colorbox = 'colorbox', 95 | prefix = 'cbox', 96 | boxElement = prefix + 'Element', 97 | 98 | // Events 99 | event_open = prefix + '_open', 100 | event_load = prefix + '_load', 101 | event_complete = prefix + '_complete', 102 | event_cleanup = prefix + '_cleanup', 103 | event_closed = prefix + '_closed', 104 | event_purge = prefix + '_purge', 105 | 106 | // Cached jQuery Object Variables 107 | $overlay, 108 | $box, 109 | $wrap, 110 | $content, 111 | $topBorder, 112 | $leftBorder, 113 | $rightBorder, 114 | $bottomBorder, 115 | $related, 116 | $window, 117 | $loaded, 118 | $loadingBay, 119 | $loadingOverlay, 120 | $title, 121 | $current, 122 | $slideshow, 123 | $next, 124 | $prev, 125 | $close, 126 | $groupControls, 127 | $events = $(''), // $({}) would be prefered, but there is an issue with jQuery 1.4.2 128 | 129 | // Variables for cached values or use across multiple functions 130 | settings, 131 | interfaceHeight, 132 | interfaceWidth, 133 | loadedHeight, 134 | loadedWidth, 135 | index, 136 | photo, 137 | open, 138 | active, 139 | closing, 140 | loadingTimer, 141 | publicMethod, 142 | div = "div", 143 | requests = 0, 144 | previousCSS = {}, 145 | init; 146 | 147 | // **************** 148 | // HELPER FUNCTIONS 149 | // **************** 150 | 151 | // Convenience function for creating new jQuery objects 152 | function $tag(tag, id, css) { 153 | var element = document.createElement(tag); 154 | 155 | if (id) { 156 | element.id = prefix + id; 157 | } 158 | 159 | if (css) { 160 | element.style.cssText = css; 161 | } 162 | 163 | return $(element); 164 | } 165 | 166 | // Get the window height using innerHeight when available to avoid an issue with iOS 167 | // http://bugs.jquery.com/ticket/6724 168 | function winheight() { 169 | return window.innerHeight ? window.innerHeight : $(window).height(); 170 | } 171 | 172 | function Settings(element, options) { 173 | if (options !== Object(options)) { 174 | options = {}; 175 | } 176 | 177 | this.cache = {}; 178 | this.el = element; 179 | 180 | this.value = function(key) { 181 | var dataAttr; 182 | 183 | if (this.cache[key] === undefined) { 184 | dataAttr = $(this.el).attr('data-cbox-'+key); 185 | 186 | if (dataAttr !== undefined) { 187 | this.cache[key] = dataAttr; 188 | } else if (options[key] !== undefined) { 189 | this.cache[key] = options[key]; 190 | } else if (defaults[key] !== undefined) { 191 | this.cache[key] = defaults[key]; 192 | } 193 | } 194 | 195 | return this.cache[key]; 196 | }; 197 | 198 | this.get = function(key) { 199 | var value = this.value(key); 200 | return $.isFunction(value) ? value.call(this.el, this) : value; 201 | }; 202 | } 203 | 204 | // Determine the next and previous members in a group. 205 | function getIndex(increment) { 206 | var 207 | max = $related.length, 208 | newIndex = (index + increment) % max; 209 | 210 | return (newIndex < 0) ? max + newIndex : newIndex; 211 | } 212 | 213 | // Convert '%' and 'px' values to integers 214 | function setSize(size, dimension) { 215 | return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10)); 216 | } 217 | 218 | // Checks an href to see if it is a photo. 219 | // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex. 220 | function isImage(settings, url) { 221 | return settings.get('photo') || settings.get('photoRegex').test(url); 222 | } 223 | 224 | function retinaUrl(settings, url) { 225 | return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url; 226 | } 227 | 228 | function trapFocus(e) { 229 | if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) { 230 | e.stopPropagation(); 231 | $box.focus(); 232 | } 233 | } 234 | 235 | function setClass(str) { 236 | if (setClass.str !== str) { 237 | $box.add($overlay).removeClass(setClass.str).addClass(str); 238 | setClass.str = str; 239 | } 240 | } 241 | 242 | function getRelated() { 243 | index = 0; 244 | 245 | if (rel && rel !== 'nofollow') { 246 | $related = $('.' + boxElement).filter(function () { 247 | var options = $.data(this, colorbox); 248 | var settings = new Settings(this, options); 249 | return (settings.get('rel') === rel); 250 | }); 251 | index = $related.index(settings.el); 252 | 253 | // Check direct calls to Colorbox. 254 | if (index === -1) { 255 | $related = $related.add(settings.el); 256 | index = $related.length - 1; 257 | } 258 | } else { 259 | $related = $(settings.el); 260 | } 261 | } 262 | 263 | function trigger(event) { 264 | // for external use 265 | $(document).trigger(event); 266 | // for internal use 267 | $events.triggerHandler(event); 268 | } 269 | 270 | var slideshow = (function(){ 271 | var active, 272 | className = prefix + "Slideshow_", 273 | click = "click." + prefix, 274 | timeOut; 275 | 276 | function clear () { 277 | clearTimeout(timeOut); 278 | } 279 | 280 | function set() { 281 | if (settings.get('loop') || $related[index + 1]) { 282 | clear(); 283 | timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed')); 284 | } 285 | } 286 | 287 | function start() { 288 | $slideshow 289 | .html(settings.get('slideshowStop')) 290 | .unbind(click) 291 | .one(click, stop); 292 | 293 | $events 294 | .bind(event_complete, set) 295 | .bind(event_load, clear); 296 | 297 | $box.removeClass(className + "off").addClass(className + "on"); 298 | } 299 | 300 | function stop() { 301 | clear(); 302 | 303 | $events 304 | .unbind(event_complete, set) 305 | .unbind(event_load, clear); 306 | 307 | $slideshow 308 | .html(settings.get('slideshowStart')) 309 | .unbind(click) 310 | .one(click, function () { 311 | publicMethod.next(); 312 | start(); 313 | }); 314 | 315 | $box.removeClass(className + "on").addClass(className + "off"); 316 | } 317 | 318 | function reset() { 319 | active = false; 320 | $slideshow.hide(); 321 | clear(); 322 | $events 323 | .unbind(event_complete, set) 324 | .unbind(event_load, clear); 325 | $box.removeClass(className + "off " + className + "on"); 326 | } 327 | 328 | return function(){ 329 | if (active) { 330 | if (!settings.get('slideshow')) { 331 | $events.unbind(event_cleanup, reset); 332 | reset(); 333 | } 334 | } else { 335 | if (settings.get('slideshow') && $related[1]) { 336 | active = true; 337 | $events.one(event_cleanup, reset); 338 | if (settings.get('slideshowAuto')) { 339 | start(); 340 | } else { 341 | stop(); 342 | } 343 | $slideshow.show(); 344 | } 345 | } 346 | }; 347 | 348 | }()); 349 | 350 | 351 | function launch(element) { 352 | var options; 353 | 354 | if (!closing) { 355 | 356 | options = $(element).data('colorbox'); 357 | 358 | settings = new Settings(element, options); 359 | 360 | rel = settings.get('rel'); 361 | 362 | getRelated(); 363 | 364 | if (!open) { 365 | open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. 366 | 367 | setClass(settings.get('className')); 368 | 369 | // Show colorbox so the sizes can be calculated in older versions of jQuery 370 | $box.css({visibility:'hidden', display:'block'}); 371 | 372 | $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden'); 373 | $content.css({width:'', height:''}).append($loaded); 374 | 375 | // Cache values needed for size calculations 376 | interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height(); 377 | interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); 378 | loadedHeight = $loaded.outerHeight(true); 379 | loadedWidth = $loaded.outerWidth(true); 380 | 381 | // Opens inital empty Colorbox prior to content being loaded. 382 | settings.w = setSize(settings.get('initialWidth'), 'x'); 383 | settings.h = setSize(settings.get('initialHeight'), 'y'); 384 | $loaded.css({width:'', height:settings.h}); 385 | publicMethod.position(); 386 | 387 | trigger(event_open); 388 | settings.get('onOpen'); 389 | 390 | $groupControls.add($title).hide(); 391 | 392 | $box.focus(); 393 | 394 | if (settings.get('trapFocus')) { 395 | // Confine focus to the modal 396 | // Uses event capturing that is not supported in IE8- 397 | if (document.addEventListener) { 398 | 399 | document.addEventListener('focus', trapFocus, true); 400 | 401 | $events.one(event_closed, function () { 402 | document.removeEventListener('focus', trapFocus, true); 403 | }); 404 | } 405 | } 406 | 407 | // Return focus on closing 408 | if (settings.get('returnFocus')) { 409 | $events.one(event_closed, function () { 410 | $(settings.el).focus(); 411 | }); 412 | } 413 | } 414 | 415 | $overlay.css({ 416 | opacity: parseFloat(settings.get('opacity')), 417 | cursor: settings.get('overlayClose') ? "pointer" : "auto", 418 | visibility: 'visible' 419 | }).show(); 420 | 421 | if (settings.get('closeButton')) { 422 | $close.html(settings.get('close')).appendTo($content); 423 | } else { 424 | $close.appendTo('
'); // replace with .detach() when dropping jQuery < 1.4 425 | } 426 | 427 | load(); 428 | } 429 | } 430 | 431 | // Colorbox's markup needs to be added to the DOM prior to being called 432 | // so that the browser will go ahead and load the CSS background images. 433 | function appendHTML() { 434 | if (!$box && document.body) { 435 | init = false; 436 | $window = $(window); 437 | $box = $tag(div).attr({ 438 | id: colorbox, 439 | 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS. 440 | role: 'dialog', 441 | tabindex: '-1' 442 | }).hide(); 443 | $overlay = $tag(div, "Overlay").hide(); 444 | $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]); 445 | $wrap = $tag(div, "Wrapper"); 446 | $content = $tag(div, "Content").append( 447 | $title = $tag(div, "Title"), 448 | $current = $tag(div, "Current"), 449 | $prev = $('