Version Notes
Added dynamic controls that can be activated via the group
Removed group animation settings from config
Download this release
Release Info
| Developer | fishpig |
| Extension | Fishpigs_iBanners |
| Version | 1.0.6 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.4 to 1.0.6
- app/code/community/Fishpig/IBanners/Block/Adminhtml/Group/Edit/Tab/Form.php +20 -15
- app/code/community/Fishpig/IBanners/Block/View.php +32 -6
- app/code/community/Fishpig/IBanners/Helper/Data.php +9 -1
- app/code/community/Fishpig/IBanners/Model/Group.php +39 -24
- app/code/community/Fishpig/IBanners/Model/System/Config/Source/Controls/Position.php +52 -0
- app/code/community/Fishpig/IBanners/controllers/Adminhtml/BannerController.php +15 -1
- app/code/community/Fishpig/IBanners/controllers/Adminhtml/GroupController.php +16 -1
- app/code/community/Fishpig/IBanners/etc/config.xml +4 -9
- app/code/community/Fishpig/IBanners/etc/system.xml +8 -56
- app/code/community/Fishpig/IBanners/notes.txt +5 -2
- app/code/community/Fishpig/IBanners/sql/ibanners_setup/mysql4-upgrade-1.0.4-1.0.5.php +13 -0
- app/code/community/Fishpig/IBanners/sql/ibanners_setup/{mysql4-upgrade-0.9.9-0.9.10.php → mysql4-upgrade-1.0.5-1.0.6.php} +1 -1
- app/design/adminhtml/default/default/layout/ibanners.xml +12 -1
- app/design/frontend/base/default/template/ibanners/default.phtml +4 -4
- package.xml +5 -4
- skin/adminhtml/default/default/ibanners.css +10 -0
- skin/frontend/base/default/css/ibanners.css +11 -2
app/code/community/Fishpig/IBanners/Block/Adminhtml/Group/Edit/Tab/Form.php
CHANGED
|
@@ -113,25 +113,30 @@ class Fishpig_iBanners_Block_Adminhtml_Group_Edit_Tab_Form extends Mage_Adminhtm
|
|
| 113 |
'label' => $this->__('Transition'),
|
| 114 |
'values' => Mage::getModel('ibanners/system_config_source_carousel_transition')->toOptionArray(),
|
| 115 |
));
|
| 116 |
-
|
| 117 |
-
$
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
|
|
|
|
|
|
| 131 |
|
| 132 |
if ($group = Mage::registry('ibanners_group')) {
|
| 133 |
$form->setValues($group->getData());
|
| 134 |
}
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
return parent::_prepareForm();
|
| 137 |
}
|
| 113 |
'label' => $this->__('Transition'),
|
| 114 |
'values' => Mage::getModel('ibanners/system_config_source_carousel_transition')->toOptionArray(),
|
| 115 |
));
|
| 116 |
+
|
| 117 |
+
$fieldset = $form->addFieldset('group_controls', array('legend'=> $this->__('Controls')));
|
| 118 |
+
|
| 119 |
+
$fieldset->addField('controls_position', 'select', array(
|
| 120 |
+
'name' => 'controls_position',
|
| 121 |
+
'title' => $this->__('Position'),
|
| 122 |
+
'label' => $this->__('Position'),
|
| 123 |
+
'values' => Mage::getModel('ibanners/system_config_source_controls_position')->toOptionArray(),
|
| 124 |
+
));
|
| 125 |
+
|
| 126 |
+
$fieldset->addField('controls_overlap', 'select', array(
|
| 127 |
+
'name' => 'controls_overlap',
|
| 128 |
+
'title' => $this->__('Overlap'),
|
| 129 |
+
'label' => $this->__('Overlap'),
|
| 130 |
+
'values' => Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(),
|
| 131 |
+
'note' => $this->__('If yes, the controls will be positioned half inside the banner and half outside.'),
|
| 132 |
+
));
|
| 133 |
|
| 134 |
if ($group = Mage::registry('ibanners_group')) {
|
| 135 |
$form->setValues($group->getData());
|
| 136 |
}
|
| 137 |
+
else {
|
| 138 |
+
$form->setValues(Mage::getModel('ibanners/group')->getAnimationData());
|
| 139 |
+
}
|
| 140 |
|
| 141 |
return parent::_prepareForm();
|
| 142 |
}
|
app/code/community/Fishpig/IBanners/Block/View.php
CHANGED
|
@@ -15,9 +15,30 @@ class Fishpig_iBanners_Block_View extends Mage_Core_Block_Template
|
|
| 15 |
*/
|
| 16 |
public function hasValidGroup()
|
| 17 |
{
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
/**
|
| 22 |
* Retrieve the ID used for the wrapper div
|
| 23 |
*
|
|
@@ -45,15 +66,20 @@ class Fishpig_iBanners_Block_View extends Mage_Core_Block_Template
|
|
| 45 |
|
| 46 |
return $this->_getData('wrapper_class');
|
| 47 |
}
|
| 48 |
-
|
| 49 |
/**
|
| 50 |
-
*
|
|
|
|
| 51 |
*
|
| 52 |
-
* @return
|
| 53 |
*/
|
| 54 |
-
public function
|
| 55 |
{
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
/**
|
| 15 |
*/
|
| 16 |
public function hasValidGroup()
|
| 17 |
{
|
| 18 |
+
if ($this->helper('ibanners')->isEnabled()) {
|
| 19 |
+
return is_object($this->getGroup());
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
return false;
|
| 23 |
}
|
| 24 |
|
| 25 |
+
/**
|
| 26 |
+
* Determine whether the group requires animation
|
| 27 |
+
*
|
| 28 |
+
* @return bool
|
| 29 |
+
*/
|
| 30 |
+
public function canAnimate()
|
| 31 |
+
{
|
| 32 |
+
if ($this->hasValidGroup()) {
|
| 33 |
+
$group = $this->getGroup();
|
| 34 |
+
|
| 35 |
+
return $group->isAnimationEnabled()
|
| 36 |
+
&& $group->getBannerCount() > $group->getCarouselVisibleSlides();
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
return false;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
/**
|
| 43 |
* Retrieve the ID used for the wrapper div
|
| 44 |
*
|
| 66 |
|
| 67 |
return $this->_getData('wrapper_class');
|
| 68 |
}
|
| 69 |
+
|
| 70 |
/**
|
| 71 |
+
* Retrieve the position of the controls (previous/next buttons)
|
| 72 |
+
* If an empty string is returned, do not show controls
|
| 73 |
*
|
| 74 |
+
* @return string
|
| 75 |
*/
|
| 76 |
+
public function getControlsPosition()
|
| 77 |
{
|
| 78 |
+
if (!$this->hasControlsPosition()) {
|
| 79 |
+
$this->setControlsPosition($this->getGroup()->getControlsPosition());
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
return $this->_getData('controls_position');
|
| 83 |
}
|
| 84 |
|
| 85 |
/**
|
app/code/community/Fishpig/IBanners/Helper/Data.php
CHANGED
|
@@ -9,5 +9,13 @@
|
|
| 9 |
|
| 10 |
class Fishpig_iBanners_Helper_Data extends Mage_Core_Helper_Abstract
|
| 11 |
{
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
}
|
| 9 |
|
| 10 |
class Fishpig_iBanners_Helper_Data extends Mage_Core_Helper_Abstract
|
| 11 |
{
|
| 12 |
+
/**
|
| 13 |
+
* Determine whether the extension is enabled
|
| 14 |
+
*
|
| 15 |
+
* @return bool
|
| 16 |
+
*/
|
| 17 |
+
public function isEnabled()
|
| 18 |
+
{
|
| 19 |
+
return Mage::getStoreConfig('ibanners/settings/enabled');
|
| 20 |
+
}
|
| 21 |
}
|
app/code/community/Fishpig/IBanners/Model/Group.php
CHANGED
|
@@ -45,7 +45,7 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 45 |
$this->setBannerCollection($this->getResource()->getBannerCollection($this));
|
| 46 |
}
|
| 47 |
|
| 48 |
-
return $this->
|
| 49 |
}
|
| 50 |
|
| 51 |
/**
|
|
@@ -59,7 +59,7 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 59 |
$this->setBannerCount($this->getBannerCollection()->count());
|
| 60 |
}
|
| 61 |
|
| 62 |
-
return $this->
|
| 63 |
}
|
| 64 |
|
| 65 |
/**
|
|
@@ -79,12 +79,11 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 79 |
*/
|
| 80 |
public function getCarouselDuration()
|
| 81 |
{
|
| 82 |
-
if (!$this->
|
| 83 |
-
$
|
| 84 |
-
$this->setCarouselDuration($duration > 0 ? $duration : 1);
|
| 85 |
}
|
| 86 |
|
| 87 |
-
return (int)$this->
|
| 88 |
}
|
| 89 |
|
| 90 |
/**
|
|
@@ -94,12 +93,11 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 94 |
*/
|
| 95 |
public function getCarouselAuto()
|
| 96 |
{
|
| 97 |
-
if ($this->
|
| 98 |
-
$
|
| 99 |
-
$this->setCarouselAuto($duration ? 1 : 0);
|
| 100 |
}
|
| 101 |
|
| 102 |
-
return (int)$this->
|
| 103 |
}
|
| 104 |
|
| 105 |
/**
|
|
@@ -109,12 +107,11 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 109 |
*/
|
| 110 |
public function getCarouselFrequency()
|
| 111 |
{
|
| 112 |
-
if (!$this->
|
| 113 |
-
$
|
| 114 |
-
$this->setCarouselFrequency($frequency > 1 ? $frequency : 8);
|
| 115 |
}
|
| 116 |
|
| 117 |
-
return (int)$this->
|
| 118 |
}
|
| 119 |
|
| 120 |
/**
|
|
@@ -124,12 +121,11 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 124 |
*/
|
| 125 |
public function getCarouselVisibleSlides()
|
| 126 |
{
|
| 127 |
-
if (!$this->
|
| 128 |
-
$
|
| 129 |
-
$this->setCarouselVisibleSlides($visibleSlides > 0 ? $visibleSlides : 1);
|
| 130 |
}
|
| 131 |
|
| 132 |
-
return (int)$this->
|
| 133 |
}
|
| 134 |
|
| 135 |
/**
|
|
@@ -140,11 +136,11 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 140 |
*/
|
| 141 |
public function getCarouselEffect()
|
| 142 |
{
|
| 143 |
-
if (!$this->
|
| 144 |
-
$this->setCarouselEffect(
|
| 145 |
}
|
| 146 |
|
| 147 |
-
return $this->
|
| 148 |
}
|
| 149 |
|
| 150 |
/**
|
|
@@ -155,10 +151,29 @@ class Fishpig_iBanners_Model_Group extends Mage_Core_Model_Abstract
|
|
| 155 |
*/
|
| 156 |
public function getCarouselTransition()
|
| 157 |
{
|
| 158 |
-
if (!$this->
|
| 159 |
-
$this->setCarouselTransition(
|
| 160 |
}
|
| 161 |
|
| 162 |
-
return $this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
}
|
| 164 |
}
|
| 45 |
$this->setBannerCollection($this->getResource()->getBannerCollection($this));
|
| 46 |
}
|
| 47 |
|
| 48 |
+
return $this->_getData('banner_collection');
|
| 49 |
}
|
| 50 |
|
| 51 |
/**
|
| 59 |
$this->setBannerCount($this->getBannerCollection()->count());
|
| 60 |
}
|
| 61 |
|
| 62 |
+
return $this->_getData('banner_count');
|
| 63 |
}
|
| 64 |
|
| 65 |
/**
|
| 79 |
*/
|
| 80 |
public function getCarouselDuration()
|
| 81 |
{
|
| 82 |
+
if (!$this->_getData('carousel_duration')) {
|
| 83 |
+
$this->setCarouselDuration(1);
|
|
|
|
| 84 |
}
|
| 85 |
|
| 86 |
+
return (int)$this->_getData('carousel_duration');
|
| 87 |
}
|
| 88 |
|
| 89 |
/**
|
| 93 |
*/
|
| 94 |
public function getCarouselAuto()
|
| 95 |
{
|
| 96 |
+
if ($this->_getData('carousel_auto') == '') {
|
| 97 |
+
$this->setCarouselAuto(1);
|
|
|
|
| 98 |
}
|
| 99 |
|
| 100 |
+
return (int)$this->_getData('carousel_auto');
|
| 101 |
}
|
| 102 |
|
| 103 |
/**
|
| 107 |
*/
|
| 108 |
public function getCarouselFrequency()
|
| 109 |
{
|
| 110 |
+
if (!$this->_getData('carousel_frequency')) {
|
| 111 |
+
$this->setCarouselFrequency(8);
|
|
|
|
| 112 |
}
|
| 113 |
|
| 114 |
+
return (int)$this->_getData('carousel_frequency');
|
| 115 |
}
|
| 116 |
|
| 117 |
/**
|
| 121 |
*/
|
| 122 |
public function getCarouselVisibleSlides()
|
| 123 |
{
|
| 124 |
+
if (!$this->_getData('carousel_visible_slides')) {
|
| 125 |
+
$this->setCarouselVisibleSlides(1);
|
|
|
|
| 126 |
}
|
| 127 |
|
| 128 |
+
return (int)$this->_getData('carousel_visible_slides');
|
| 129 |
}
|
| 130 |
|
| 131 |
/**
|
| 136 |
*/
|
| 137 |
public function getCarouselEffect()
|
| 138 |
{
|
| 139 |
+
if (!$this->_getData('carousel_effect')) {
|
| 140 |
+
$this->setCarouselEffect('scroll');
|
| 141 |
}
|
| 142 |
|
| 143 |
+
return $this->_getData('carousel_effect');
|
| 144 |
}
|
| 145 |
|
| 146 |
/**
|
| 151 |
*/
|
| 152 |
public function getCarouselTransition()
|
| 153 |
{
|
| 154 |
+
if (!$this->_getData('carousel_transition')) {
|
| 155 |
+
$this->setCarouselTransition('sinoidal');
|
| 156 |
}
|
| 157 |
|
| 158 |
+
return $this->_getData('carousel_transition');
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
/**
|
| 162 |
+
* Retrieve animation data
|
| 163 |
+
* This is used to popular the Adminhtml form
|
| 164 |
+
*
|
| 165 |
+
* @return array
|
| 166 |
+
*/
|
| 167 |
+
public function getAnimationData()
|
| 168 |
+
{
|
| 169 |
+
return array(
|
| 170 |
+
'carousel_animate' => (int)$this->isAnimationEnabled(),
|
| 171 |
+
'carousel_duration' => $this->getCarouselDuration(),
|
| 172 |
+
'carousel_auto' => $this->getCarouselAuto(),
|
| 173 |
+
'carousel_frequency' => $this->getCarouselFrequency(),
|
| 174 |
+
'carousel_visible_slides' => $this->getCarouselVisibleSlides(),
|
| 175 |
+
'carousel_effect' => $this->getCarouselEffect(),
|
| 176 |
+
'carousel_transition' => $this->getCarouselTransition(),
|
| 177 |
+
);
|
| 178 |
}
|
| 179 |
}
|
app/code/community/Fishpig/IBanners/Model/System/Config/Source/Controls/Position.php
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Fishpig
|
| 4 |
+
* @package Fishpig_iBanners
|
| 5 |
+
* @license http://fishpig.co.uk/license.txt
|
| 6 |
+
* @author Ben Tideswell <help@fishpig.co.uk>
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
class Fishpig_iBanners_Model_System_Config_Source_Controls_Position
|
| 10 |
+
{
|
| 11 |
+
/**
|
| 12 |
+
* Retrieve an array of possible options
|
| 13 |
+
*
|
| 14 |
+
* @return array
|
| 15 |
+
*/
|
| 16 |
+
public function toOptionArray($includeEmpty = false, $emptyText = '-- Please Select --')
|
| 17 |
+
{
|
| 18 |
+
$options = array();
|
| 19 |
+
|
| 20 |
+
if ($includeEmpty) {
|
| 21 |
+
$options[] = array(
|
| 22 |
+
'value' => '',
|
| 23 |
+
'label' => Mage::helper('adminhtml')->__($emptyText),
|
| 24 |
+
);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
foreach($this->getOptions() as $value => $label) {
|
| 28 |
+
$options[] = array(
|
| 29 |
+
'value' => $value,
|
| 30 |
+
'label' => Mage::helper('adminhtml')->__($label),
|
| 31 |
+
);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
return $options;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
/**
|
| 38 |
+
* Retrieve an array of possible options
|
| 39 |
+
*
|
| 40 |
+
* @return array
|
| 41 |
+
*/
|
| 42 |
+
public function getOptions()
|
| 43 |
+
{
|
| 44 |
+
return array(
|
| 45 |
+
'' => 'None',
|
| 46 |
+
'top' => 'Top',
|
| 47 |
+
'middle' => 'Middle',
|
| 48 |
+
'bottom' => 'Bottom',
|
| 49 |
+
'below' => 'Below',
|
| 50 |
+
);
|
| 51 |
+
}
|
| 52 |
+
}
|
app/code/community/Fishpig/IBanners/controllers/Adminhtml/BannerController.php
CHANGED
|
@@ -40,8 +40,22 @@ class Fishpig_iBanners_Adminhtml_BannerController extends Mage_Adminhtml_Control
|
|
| 40 |
*/
|
| 41 |
public function editAction()
|
| 42 |
{
|
| 43 |
-
$this->_initBannerModel();
|
| 44 |
$this->loadLayout();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
$this->renderLayout();
|
| 46 |
}
|
| 47 |
|
| 40 |
*/
|
| 41 |
public function editAction()
|
| 42 |
{
|
| 43 |
+
$banner = $this->_initBannerModel();
|
| 44 |
$this->loadLayout();
|
| 45 |
+
|
| 46 |
+
if ($headBlock = $this->getLayout()->getBlock('head')) {
|
| 47 |
+
$titles = array('iBanners by FishPig');
|
| 48 |
+
|
| 49 |
+
if ($banner) {
|
| 50 |
+
array_unshift($titles, $banner->getTitle());
|
| 51 |
+
}
|
| 52 |
+
else {
|
| 53 |
+
array_unshift($titles, 'Create a Banner');
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
$headBlock->setTitle(implode(' - ', $titles));
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
$this->renderLayout();
|
| 60 |
}
|
| 61 |
|
app/code/community/Fishpig/IBanners/controllers/Adminhtml/GroupController.php
CHANGED
|
@@ -40,8 +40,23 @@ class Fishpig_iBanners_Adminhtml_GroupController extends Mage_Adminhtml_Controll
|
|
| 40 |
*/
|
| 41 |
public function editAction()
|
| 42 |
{
|
| 43 |
-
$this->_initGroupModel();
|
|
|
|
| 44 |
$this->loadLayout();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
$this->renderLayout();
|
| 46 |
}
|
| 47 |
|
| 40 |
*/
|
| 41 |
public function editAction()
|
| 42 |
{
|
| 43 |
+
$group = $this->_initGroupModel();
|
| 44 |
+
|
| 45 |
$this->loadLayout();
|
| 46 |
+
|
| 47 |
+
if ($headBlock = $this->getLayout()->getBlock('head')) {
|
| 48 |
+
$titles = array('iBanners by FishPig');
|
| 49 |
+
|
| 50 |
+
if ($group) {
|
| 51 |
+
array_unshift($titles, $group->getTitle());
|
| 52 |
+
}
|
| 53 |
+
else {
|
| 54 |
+
array_unshift($titles, 'Create a Group');
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
$headBlock->setTitle(implode(' - ', $titles));
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
$this->renderLayout();
|
| 61 |
}
|
| 62 |
|
app/code/community/Fishpig/IBanners/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Fishpig_iBanners>
|
| 5 |
-
<version>1.0.
|
| 6 |
</Fishpig_iBanners>
|
| 7 |
</modules>
|
| 8 |
<global>
|
|
@@ -85,14 +85,9 @@
|
|
| 85 |
</adminhtml>
|
| 86 |
<default>
|
| 87 |
<ibanners>
|
| 88 |
-
<
|
| 89 |
-
<
|
| 90 |
-
|
| 91 |
-
<visible_slides>1</visible_slides>
|
| 92 |
-
<frequency>8</frequency>
|
| 93 |
-
<effect>scroll</effect>
|
| 94 |
-
<transition>sinoidal</transition>
|
| 95 |
-
</carousel>
|
| 96 |
</ibanners>
|
| 97 |
</default>
|
| 98 |
</config>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Fishpig_iBanners>
|
| 5 |
+
<version>1.0.6</version>
|
| 6 |
</Fishpig_iBanners>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 85 |
</adminhtml>
|
| 86 |
<default>
|
| 87 |
<ibanners>
|
| 88 |
+
<settings>
|
| 89 |
+
<enabled>1</enabled>
|
| 90 |
+
</settings>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
</ibanners>
|
| 92 |
</default>
|
| 93 |
</config>
|
app/code/community/Fishpig/IBanners/etc/system.xml
CHANGED
|
@@ -15,72 +15,24 @@
|
|
| 15 |
<show_in_website>1</show_in_website>
|
| 16 |
<show_in_store>1</show_in_store>
|
| 17 |
<groups>
|
| 18 |
-
<
|
| 19 |
-
<label>
|
| 20 |
-
<sort_order>
|
| 21 |
<show_in_default>1</show_in_default>
|
| 22 |
<show_in_website>1</show_in_website>
|
| 23 |
<show_in_store>1</show_in_store>
|
| 24 |
<fields>
|
| 25 |
-
|
| 26 |
-
<label>
|
| 27 |
-
<comment>The number of seconds it takes to change slide</comment>
|
| 28 |
-
<frontend_type>text</frontend_type>
|
| 29 |
-
<sort_order>6</sort_order>
|
| 30 |
-
<show_in_default>1</show_in_default>
|
| 31 |
-
<show_in_website>1</show_in_website>
|
| 32 |
-
<show_in_store>1</show_in_store>
|
| 33 |
-
<validate>validate-greater-than-zero required-entry</validate>
|
| 34 |
-
</duration>
|
| 35 |
-
<auto>
|
| 36 |
-
<label>Auto-Start</label>
|
| 37 |
<frontend_type>select</frontend_type>
|
| 38 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 39 |
-
<sort_order>
|
| 40 |
-
<show_in_default>1</show_in_default>
|
| 41 |
-
<show_in_website>1</show_in_website>
|
| 42 |
-
<show_in_store>1</show_in_store>
|
| 43 |
-
</auto>
|
| 44 |
-
<frequency>
|
| 45 |
-
<label>Animation Frequency</label>
|
| 46 |
-
<comment>The number of seconds before the slide is changed</comment>
|
| 47 |
-
<frontend_type>text</frontend_type>
|
| 48 |
-
<sort_order>16</sort_order>
|
| 49 |
-
<show_in_default>1</show_in_default>
|
| 50 |
-
<show_in_website>1</show_in_website>
|
| 51 |
-
<show_in_store>1</show_in_store>
|
| 52 |
-
<validate>validate-greater-than-zero required-entry</validate>
|
| 53 |
-
</frequency>
|
| 54 |
-
<visible_slides>
|
| 55 |
-
<label>Visible Slides</label>
|
| 56 |
-
<comment>The number of slides to be shown at one time</comment>
|
| 57 |
-
<frontend_type>text</frontend_type>
|
| 58 |
-
<sort_order>21</sort_order>
|
| 59 |
-
<show_in_default>1</show_in_default>
|
| 60 |
-
<show_in_website>1</show_in_website>
|
| 61 |
-
<show_in_store>1</show_in_store>
|
| 62 |
-
<validate>validate-greater-than-zero required-entry</validate>
|
| 63 |
-
</visible_slides>
|
| 64 |
-
<effect>
|
| 65 |
-
<label>Carousel Effect</label>
|
| 66 |
-
<frontend_type>select</frontend_type>
|
| 67 |
-
<source_model>ibanners/system_config_source_carousel_effect</source_model>
|
| 68 |
-
<sort_order>26</sort_order>
|
| 69 |
-
<show_in_default>1</show_in_default>
|
| 70 |
-
<show_in_website>1</show_in_website>
|
| 71 |
-
<show_in_store>1</show_in_store>
|
| 72 |
-
</effect>
|
| 73 |
-
<transition>
|
| 74 |
-
<label>Carousel Transition</label>
|
| 75 |
-
<frontend_type>select</frontend_type>
|
| 76 |
-
<source_model>ibanners/system_config_source_carousel_transition</source_model>
|
| 77 |
-
<sort_order>31</sort_order>
|
| 78 |
<show_in_default>1</show_in_default>
|
| 79 |
<show_in_website>1</show_in_website>
|
| 80 |
<show_in_store>1</show_in_store>
|
| 81 |
-
|
| 82 |
</fields>
|
| 83 |
-
</
|
| 84 |
</groups>
|
| 85 |
</ibanners>
|
| 86 |
</sections>
|
| 15 |
<show_in_website>1</show_in_website>
|
| 16 |
<show_in_store>1</show_in_store>
|
| 17 |
<groups>
|
| 18 |
+
<settings>
|
| 19 |
+
<label>Settings</label>
|
| 20 |
+
<sort_order>1</sort_order>
|
| 21 |
<show_in_default>1</show_in_default>
|
| 22 |
<show_in_website>1</show_in_website>
|
| 23 |
<show_in_store>1</show_in_store>
|
| 24 |
<fields>
|
| 25 |
+
<enabled>
|
| 26 |
+
<label>Enabled</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
<frontend_type>select</frontend_type>
|
| 28 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 29 |
+
<sort_order>1</sort_order>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
<show_in_default>1</show_in_default>
|
| 31 |
<show_in_website>1</show_in_website>
|
| 32 |
<show_in_store>1</show_in_store>
|
| 33 |
+
</enabled>
|
| 34 |
</fields>
|
| 35 |
+
</settings>
|
| 36 |
</groups>
|
| 37 |
</ibanners>
|
| 38 |
</sections>
|
app/code/community/Fishpig/IBanners/notes.txt
CHANGED
|
@@ -8,8 +8,11 @@
|
|
| 8 |
##
|
| 9 |
|
| 10 |
TODO
|
| 11 |
-
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
14/08/2012 - 1.0.4
|
| 15 |
- Added images to controls
|
| 8 |
##
|
| 9 |
|
| 10 |
TODO
|
| 11 |
+
- Convert animation and control values to serialized single columns
|
| 12 |
+
|
| 13 |
+
14/08/2012 - 1.0.6
|
| 14 |
+
- Added dynamic controls that can be activated via the group
|
| 15 |
+
- Removed group animation settings from config
|
| 16 |
|
| 17 |
14/08/2012 - 1.0.4
|
| 18 |
- Added images to controls
|
app/code/community/Fishpig/IBanners/sql/ibanners_setup/mysql4-upgrade-1.0.4-1.0.5.php
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Fishpig
|
| 4 |
+
* @package Fishpig_iBanners
|
| 5 |
+
* @license http://fishpig.co.uk/license.txt
|
| 6 |
+
* @author Ben Tideswell <help@fishpig.co.uk>
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
$this->startSetup();
|
| 10 |
+
|
| 11 |
+
$this->getConnection()->addColumn($this->getTable('ibanners_group'), 'controls_position', " varchar(32) NOT NULL default '' ");
|
| 12 |
+
|
| 13 |
+
$this->endSetup();
|
app/code/community/Fishpig/IBanners/sql/ibanners_setup/{mysql4-upgrade-0.9.9-0.9.10.php → mysql4-upgrade-1.0.5-1.0.6.php}
RENAMED
|
@@ -8,6 +8,6 @@
|
|
| 8 |
|
| 9 |
$this->startSetup();
|
| 10 |
|
| 11 |
-
$this->getConnection()->addColumn($this->getTable('
|
| 12 |
|
| 13 |
$this->endSetup();
|
| 8 |
|
| 9 |
$this->startSetup();
|
| 10 |
|
| 11 |
+
$this->getConnection()->addColumn($this->getTable('ibanners_group'), 'controls_overlap', " int(1) unsigned default 0");
|
| 12 |
|
| 13 |
$this->endSetup();
|
app/design/adminhtml/default/default/layout/ibanners.xml
CHANGED
|
@@ -1,6 +1,15 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<layout>
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
<ibanners_admin_adminhtml_group_index>
|
| 5 |
<reference name="head">
|
| 6 |
<action method="setTitle" translate="title" module="ibanners"><title>Manage Banner Groups - iBanners by Fishpig</title></action>
|
|
@@ -11,6 +20,7 @@
|
|
| 11 |
</ibanners_admin_adminhtml_group_index>
|
| 12 |
|
| 13 |
<ibanners_admin_adminhtml_group_edit>
|
|
|
|
| 14 |
<reference name="left">
|
| 15 |
<block type="ibanners/adminhtml_group_edit_tabs" name="group.tabs" />
|
| 16 |
</reference>
|
|
@@ -29,6 +39,7 @@
|
|
| 29 |
</ibanners_admin_adminhtml_banner_index>
|
| 30 |
|
| 31 |
<ibanners_admin_adminhtml_banner_edit>
|
|
|
|
| 32 |
<reference name="left">
|
| 33 |
<block type="ibanners/adminhtml_banner_edit_tabs" name="banners.tabs" />
|
| 34 |
</reference>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<layout>
|
| 3 |
+
|
| 4 |
+
<ibanners_default>
|
| 5 |
+
<reference name="head">
|
| 6 |
+
<action method="addCss"><css>ibanners.css</css></action>
|
| 7 |
+
</reference>
|
| 8 |
+
<reference name="before_body_end">
|
| 9 |
+
<block type="core/template" name="ibanners.getCode" template="ibanners/getcode.phtml" />
|
| 10 |
+
</reference>
|
| 11 |
+
</ibanners_default>
|
| 12 |
+
|
| 13 |
<ibanners_admin_adminhtml_group_index>
|
| 14 |
<reference name="head">
|
| 15 |
<action method="setTitle" translate="title" module="ibanners"><title>Manage Banner Groups - iBanners by Fishpig</title></action>
|
| 20 |
</ibanners_admin_adminhtml_group_index>
|
| 21 |
|
| 22 |
<ibanners_admin_adminhtml_group_edit>
|
| 23 |
+
<update handle="ibanners_default" />
|
| 24 |
<reference name="left">
|
| 25 |
<block type="ibanners/adminhtml_group_edit_tabs" name="group.tabs" />
|
| 26 |
</reference>
|
| 39 |
</ibanners_admin_adminhtml_banner_index>
|
| 40 |
|
| 41 |
<ibanners_admin_adminhtml_banner_edit>
|
| 42 |
+
<update handle="ibanners_default" />
|
| 43 |
<reference name="left">
|
| 44 |
<block type="ibanners/adminhtml_banner_edit_tabs" name="banners.tabs" />
|
| 45 |
</reference>
|
app/design/frontend/base/default/template/ibanners/default.phtml
CHANGED
|
@@ -69,9 +69,9 @@
|
|
| 69 |
<?php endif; ?>
|
| 70 |
</ul>
|
| 71 |
</div>
|
| 72 |
-
<?php if ($
|
| 73 |
-
<?php if ($this->
|
| 74 |
-
<div class="controls">
|
| 75 |
<div class="control-prev">
|
| 76 |
<a href="#" class="carousel-control" rel="prev"><img src="<?php echo $this->getSkinUrl('images/ibanners/arrow-left.png') ?>" alt="<?php echo $this->__('Previous') ?>" /></a>
|
| 77 |
</div>
|
|
@@ -82,7 +82,7 @@
|
|
| 82 |
<?php endif; ?>
|
| 83 |
<?php endif; ?>
|
| 84 |
</div>
|
| 85 |
-
<?php if ($
|
| 86 |
<script type="text/javascript">
|
| 87 |
//<