Version Notes
Capacity Web Solutions - Responsive Banner Slider
Download this release
Release Info
Developer | Capacity Web Solutions |
Extension | Responsive_Banner_Slider |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Tab/Form.php +9 -3
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup.php +6 -1
- app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SliderController.php +2 -3
- app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SlidergroupController.php +15 -8
- app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/config.xml +2 -4
- app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/system.xml +3 -2
- app/design/frontend/base/default/template/responsivebannerslider/slider.phtml +268 -257
- js/responsivebannerslider/jquery.flexslider.js +11 -2
- package.xml +5 -5
- skin/frontend/base/default/css/responsivebannerslider/default.css +1 -1
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Tab/Form.php
CHANGED
@@ -133,7 +133,7 @@ class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Edit_Ta
|
|
133 |
$wysiwygConfig["widget_plugin_src"] = false;
|
134 |
$wysiwygConfig->setData("plugins",array());
|
135 |
|
136 |
-
|
137 |
$config = $wysiwygConfig;
|
138 |
|
139 |
|
@@ -225,8 +225,14 @@ class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Edit_Ta
|
|
225 |
}
|
226 |
}
|
227 |
}
|
228 |
-
|
229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
$this->setForm($form);
|
231 |
$this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
|
232 |
->addFieldMap($img_video->getHtmlId(), $img_video->getName())
|
133 |
$wysiwygConfig["widget_plugin_src"] = false;
|
134 |
$wysiwygConfig->setData("plugins",array());
|
135 |
|
136 |
+
$style = 'height:20em; width:50em;';
|
137 |
$config = $wysiwygConfig;
|
138 |
|
139 |
|
225 |
}
|
226 |
}
|
227 |
}
|
228 |
+
|
229 |
+
$id = $this->getRequest()->getParam('id');
|
230 |
+
if($id == ''){
|
231 |
+
$dataimg['statuss'] = '1';
|
232 |
+
$form->setValues($dataimg);
|
233 |
+
$this->setForm($form);
|
234 |
+
}
|
235 |
+
|
236 |
$this->setForm($form);
|
237 |
$this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
|
238 |
->addFieldMap($img_video->getHtmlId(), $img_video->getName())
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup.php
CHANGED
@@ -36,10 +36,15 @@ class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup ex
|
|
36 |
|
37 |
public function getGroupData() {
|
38 |
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection()->setOrder('slidergroup_id', 'ASC');
|
|
|
39 |
foreach($groups as $group) {
|
40 |
$options[$group->getData('slidergroup_id')] = $group->getTitle();
|
41 |
}
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
return $options;
|
44 |
}
|
45 |
}
|
36 |
|
37 |
public function getGroupData() {
|
38 |
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection()->setOrder('slidergroup_id', 'ASC');
|
39 |
+
if(count($groups) > 0) {
|
40 |
foreach($groups as $group) {
|
41 |
$options[$group->getData('slidergroup_id')] = $group->getTitle();
|
42 |
}
|
43 |
+
return $options;
|
44 |
+
}
|
45 |
+
else{
|
46 |
+
return false;
|
47 |
+
}
|
48 |
|
|
|
49 |
}
|
50 |
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SliderController.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
***************************************************************************/
|
10 |
|
11 |
|
12 |
-
class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SliderController extends
|
13 |
{
|
14 |
|
15 |
protected function _initAction() {
|
@@ -133,9 +133,8 @@ class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SliderController ext
|
|
133 |
return;
|
134 |
}
|
135 |
|
136 |
-
|
137 |
$model->setData("group_names",$group_label);
|
138 |
-
|
139 |
$model->save();
|
140 |
|
141 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('responsivebannerslider')->__('Slide was successfully saved'));
|
9 |
***************************************************************************/
|
10 |
|
11 |
|
12 |
+
class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SliderController extends Mage_Adminhtml_Controller_Action
|
13 |
{
|
14 |
|
15 |
protected function _initAction() {
|
133 |
return;
|
134 |
}
|
135 |
|
|
|
136 |
$model->setData("group_names",$group_label);
|
137 |
+
|
138 |
$model->save();
|
139 |
|
140 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('responsivebannerslider')->__('Slide was successfully saved'));
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SlidergroupController.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
@support : magento@capacitywebsolutions.com
|
8 |
***************************************************************************/
|
9 |
|
10 |
-
class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SlidergroupController extends
|
11 |
|
12 |
protected function _initAction() {
|
13 |
$this->loadLayout()
|
@@ -116,13 +116,20 @@ class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SlidergroupControlle
|
|
116 |
->addFieldToFilter('slidergroup_id',$dataid);
|
117 |
$page_data->walk('delete');
|
118 |
}
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
$
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
$cate_model = Mage::getModel('responsivebannerslider/categories');
|
127 |
if($dataid != "") {
|
128 |
$cate_data = $cate_model->getCollection()
|
7 |
@support : magento@capacitywebsolutions.com
|
8 |
***************************************************************************/
|
9 |
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SlidergroupController extends Mage_Adminhtml_Controller_Action {
|
11 |
|
12 |
protected function _initAction() {
|
13 |
$this->loadLayout()
|
116 |
->addFieldToFilter('slidergroup_id',$dataid);
|
117 |
$page_data->walk('delete');
|
118 |
}
|
119 |
+
|
120 |
+
$cmspages = $model->getData('pages');
|
121 |
+
|
122 |
+
if(isset($cmspages)) {
|
123 |
+
if(count($model->getData('pages') > 0)) {
|
124 |
+
foreach($model->getData('pages') as $pages) {
|
125 |
+
$data_page['slidergroup_id'] = $model->getData('slidergroup_id');
|
126 |
+
$data_page['pages'] = $pages;
|
127 |
+
$page_model->setData($data_page);
|
128 |
+
$page_model->save();
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
132 |
+
}
|
133 |
$cate_model = Mage::getModel('responsivebannerslider/categories');
|
134 |
if($dataid != "") {
|
135 |
$cate_data = $cate_model->getCollection()
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/config.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<config>
|
13 |
<modules>
|
14 |
<CapacityWebSolutions_Responsivebannerslider>
|
15 |
-
<version>1.0.
|
16 |
</CapacityWebSolutions_Responsivebannerslider>
|
17 |
</modules>
|
18 |
<frontend>
|
@@ -221,9 +221,7 @@
|
|
221 |
<class>CapacityWebSolutions_Responsivebannerslider_Helper</class>
|
222 |
</responsivebannerslider>
|
223 |
</helpers>
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
</global>
|
228 |
|
229 |
<default>
|
12 |
<config>
|
13 |
<modules>
|
14 |
<CapacityWebSolutions_Responsivebannerslider>
|
15 |
+
<version>1.0.3</version>
|
16 |
</CapacityWebSolutions_Responsivebannerslider>
|
17 |
</modules>
|
18 |
<frontend>
|
221 |
<class>CapacityWebSolutions_Responsivebannerslider_Helper</class>
|
222 |
</responsivebannerslider>
|
223 |
</helpers>
|
224 |
+
|
|
|
|
|
225 |
</global>
|
226 |
|
227 |
<default>
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/system.xml
CHANGED
@@ -72,10 +72,11 @@
|
|
72 |
<label>Thumbnail Upload Width</label>
|
73 |
<comment>Set the width of the thumbnails created during upload. Thumbnails are used in carousels (default is 200).</comment>
|
74 |
<frontend_type>text</frontend_type>
|
|
|
75 |
<sort_order>40</sort_order>
|
76 |
<show_in_default>1</show_in_default>
|
77 |
-
<show_in_website>
|
78 |
-
<show_in_store>
|
79 |
</thumbnail_width>
|
80 |
|
81 |
<cms_page translate="label">
|
72 |
<label>Thumbnail Upload Width</label>
|
73 |
<comment>Set the width of the thumbnails created during upload. Thumbnails are used in carousels (default is 200).</comment>
|
74 |
<frontend_type>text</frontend_type>
|
75 |
+
<validate>validate-greater-than-zero</validate>
|
76 |
<sort_order>40</sort_order>
|
77 |
<show_in_default>1</show_in_default>
|
78 |
+
<show_in_website>0</show_in_website>
|
79 |
+
<show_in_store>0</show_in_store>
|
80 |
</thumbnail_width>
|
81 |
|
82 |
<cms_page translate="label">
|
app/design/frontend/base/default/template/responsivebannerslider/slider.phtml
CHANGED
@@ -1,327 +1,336 @@
|
|
1 |
-
<?php
|
2 |
-
/***************************************************************************
|
3 |
-
@extension : Responsive Banner Slider Extension.
|
4 |
-
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
-
( http://www.capacitywebsolutions.com )
|
6 |
-
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
-
@support : magento@capacitywebsolutions.com
|
8 |
-
***************************************************************************/
|
9 |
?>
|
10 |
|
11 |
<?php if ($this->getGroupscollection() != "") { ?>
|
12 |
<?php $groupsdata = $this->getGroupscollection()->getData(); ?>
|
13 |
|
14 |
<?php foreach ($groupsdata as $groups ) { ?>
|
15 |
-
<?php
|
16 |
-
|
17 |
-
if ($groups ['slider_theme'] == "default") {
|
18 |
-
$theme = "defaultTheme";
|
19 |
-
} elseif ($groups ['slider_theme'] == "blank") {
|
20 |
-
$theme = "blankTheme";
|
21 |
-
} elseif ($groups ['slider_theme'] == "drop_shadow") {
|
22 |
-
$theme = "dropShadow";
|
23 |
-
} else {
|
24 |
-
$theme = "emboss";
|
25 |
-
}
|
26 |
-
|
27 |
-
if ($groups ['navigation_arrow'] == "never") {
|
28 |
-
$navarrow = "noNavArw";
|
29 |
-
} elseif ($groups ['navigation_arrow'] == "always") {
|
30 |
-
$navarrow = "alwaysNavArw";
|
31 |
-
} else {
|
32 |
-
$navarrow = "NavArwOnHover";
|
33 |
-
}
|
34 |
-
|
35 |
-
if ($groups ['navigation_style'] == "angle") {
|
36 |
-
$navstyle = "angle";
|
37 |
-
} elseif ($groups ['navigation_style'] == "angle_small") {
|
38 |
-
$navstyle = "angle_small";
|
39 |
-
} elseif ($groups ['navigation_style'] == "angle_circle") {
|
40 |
-
$navstyle = "angle_circle";
|
41 |
-
} elseif ($groups ['navigation_style'] == "angle_square") {
|
42 |
-
$navstyle = "angle_square";
|
43 |
-
} elseif ($groups ['navigation_style'] == "arrow") {
|
44 |
-
$navstyle = "arrow";
|
45 |
-
} elseif ($groups ['navigation_style'] == "arrow_circle") {
|
46 |
-
$navstyle = "arrow_circle";
|
47 |
-
} elseif ($groups ['navigation_style'] == "caret") {
|
48 |
-
$navstyle = "caret";
|
49 |
-
} elseif ($groups ['navigation_style'] == "chevron") {
|
50 |
-
$navstyle = "chevron";
|
51 |
-
} elseif ($groups ['navigation_style'] == "chevron_smooth") {
|
52 |
-
$navstyle = "chevron_smooth";
|
53 |
-
} elseif ($groups ['navigation_style'] == "chevron_circle") {
|
54 |
-
$navstyle = "chevron_circle";
|
55 |
-
} else {
|
56 |
-
$navstyle = "chevron_square";
|
57 |
-
}
|
58 |
-
|
59 |
-
if ($groups ['navigation_aposition'] == "inside") {
|
60 |
-
$navpos = "navArwInside";
|
61 |
-
} elseif ($groups ['navigation_aposition'] == "outside") {
|
62 |
-
$navpos = "navArwOutside";
|
63 |
-
} elseif ($groups ['navigation_aposition'] == "inside_left") {
|
64 |
-
$navpos = "navArwInLeft";
|
65 |
-
} else {
|
66 |
-
$navpos = "navArwInRight";
|
67 |
-
}
|
68 |
-
|
69 |
-
if ($groups ['show_pagination'] == "never") {
|
70 |
-
$showpage = "noPaging";
|
71 |
-
} elseif ($groups ['show_pagination'] == "always") {
|
72 |
-
$showpage = "alwaysPaging";
|
73 |
-
} else {
|
74 |
-
$showpage = "pagingOnHover";
|
75 |
-
}
|
76 |
-
|
77 |
-
if ($groups ['pagination_style'] == "circular") {
|
78 |
-
$pagestyle = "circular";
|
79 |
-
} elseif ($groups ['pagination_style'] == "squared") {
|
80 |
-
$pagestyle = "squared";
|
81 |
-
} elseif ($groups ['pagination_style'] == "circular_bar") {
|
82 |
-
$pagestyle = "cir-bar";
|
83 |
-
} else {
|
84 |
-
$pagestyle = "squ-bar";
|
85 |
-
}
|
86 |
-
|
87 |
-
if ($groups ['pagination_position'] == "below") {
|
88 |
-
$pagepos = "pagerBelow";
|
89 |
-
} elseif ($groups ['pagination_position'] == "above") {
|
90 |
-
$pagepos = "pagerAbove";
|
91 |
-
} elseif ($groups ['pagination_position'] == "inside_top") {
|
92 |
-
$pagepos = "pagerInTop";
|
93 |
-
} elseif ($groups ['pagination_position'] == "inside_bottom") {
|
94 |
-
$pagepos = "pagerInBottom";
|
95 |
-
} elseif ($groups ['pagination_position'] == "inside_bottom_left") {
|
96 |
-
$pagepos = "pagerInBottomleft";
|
97 |
-
} else {
|
98 |
-
$pagepos = "pagerInBottomright";
|
99 |
-
}
|
100 |
-
|
101 |
-
if ($groups ['slider_type'] == "basic") {
|
102 |
-
$bannerStyle = "basSlider";
|
103 |
-
} elseif ($groups ['slider_type'] == "carousel") {
|
104 |
-
$bannerStyle = "basCarousel";
|
105 |
-
} else {
|
106 |
-
$bannerStyle = "slideNcrosel";
|
107 |
-
}
|
108 |
-
|
109 |
?>
|
110 |
<?php $sliedsdata = $this->getSlides($groups['slidergroup_id']); ?>
|
111 |
<?php if(count($sliedsdata) > 0 ) { ?>
|
112 |
-
<?php $groupId = $groups['slidergroup_id']; ?>
|
113 |
-
<link rel="stylesheet" type="text/css"
|
114 |
-
href="<?php echo $this->getSkinUrl('css/responsivebannerslider/group-'.$groupId.'.css');?>"
|
115 |
-
media="all" />
|
116 |
-
<div id="bnrSlider-<?php echo $groups['slidergroup_id']; ?>"
|
117 |
class="cwsSlider <?php echo $bannerStyle.' '.$theme; ?>">
|
118 |
<?php if($groups['slider_type'] != "carousel") { ?>
|
119 |
-
<div class="slider loading">
|
120 |
-
<div id="rwdSlider-<?php echo $groups['slidergroup_id']; ?>"
|
121 |
-
class="cwsRwdSlider <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
122 |
<ul class="slides">
|
123 |
-
<?php
|
124 |
-
$youtube = '';
|
125 |
-
$vimeo = '';
|
126 |
-
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
127 |
-
foreach ( $sliedsdata as $slide ) {
|
128 |
-
|
129 |
-
|
130 |
-
$
|
131 |
-
$
|
132 |
-
|
133 |
-
|
134 |
-
$
|
135 |
-
$
|
136 |
-
|
137 |
-
|
138 |
-
$
|
|
|
139 |
?>
|
140 |
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
141 |
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
142 |
<?php $vimeo = $vimeo + 1; ?>
|
143 |
-
<li class="video"><iframe id="player_<?php echo $videoid; ?>"
|
144 |
-
src="http://player.vimeo.com/video/<?php echo $slide->getVideoId(); ?>?api=1&player_id=player_<?php echo $videoid; ?>"
|
145 |
-
width="100%" height="<?php echo $video_height; ?>" frameborder="0"
|
146 |
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></li>
|
147 |
<?php } elseif($slide->getImgVideo() == "youtube") { ?>
|
148 |
<?php $youtube = $youtube + 1; ?>
|
149 |
-
<li class="video"><iframe class="youtube"
|
150 |
-
id="youtube_<?php echo $videoid; ?>"
|
151 |
-
src="http://www.youtube.com/embed/<?php echo $slide->getVideoId(); ?>?enablejsapi=1&wmode=opaque&playerapiid=youtube_<?php echo $videoid; ?>"
|
152 |
-
width="100%" height="<?php echo $video_height; ?>" frameborder="0"
|
153 |
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></li>
|
154 |
<?php } else { ?>
|
155 |
-
<?php
|
156 |
-
if($slide->getData ( 'img_hosting' )) {
|
157 |
-
if ($slide->getData ( 'hosted_url' )) {
|
158 |
-
$imgsrc = $slide->getHostedUrl ();
|
159 |
-
}
|
160 |
-
}else{
|
161 |
-
if ($slide->getData ( 'filename' )) {
|
162 |
-
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/" . $slide->getData ( 'filename' );
|
163 |
-
}
|
164 |
-
}
|
165 |
-
$loading_img = $this->getSkinUrl ( 'css/responsivebannerslider/loading.gif' );
|
166 |
?>
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
|
|
|
|
175 |
class="sliderdecs"><?php echo $slide->getDescription(); ?></span><?php } ?></li>
|
|
|
|
|
|
|
176 |
<?php } ?>
|
177 |
<?php if($slide->getDateEnabled() == 1) { } } ?> <?php } ?>
|
178 |
-
</ul>
|
179 |
-
</div>
|
180 |
</div>
|
181 |
<?php } ?>
|
182 |
|
183 |
<?php if($groups['slider_type'] == "carousel") { ?>
|
184 |
-
<div class="slider loading">
|
185 |
-
<div id="carousel-<?php echo $groups['slidergroup_id']; ?>"
|
186 |
-
class="rwdCarousel <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
187 |
<ul class="slides">
|
188 |
-
<?php
|
189 |
-
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
190 |
-
foreach ( $sliedsdata as $slide ) {
|
191 |
-
if ($slide->getDateEnabled () == 1) {
|
192 |
-
$fromdate = strtotime ( $slide->getFromDate () );
|
193 |
-
$todate = strtotime ( $slide->getToDate () );
|
194 |
-
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
195 |
-
} else {
|
196 |
-
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
197 |
-
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
198 |
-
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
199 |
-
}
|
200 |
-
$youtube = '';
|
201 |
-
$vimeo = '';
|
202 |
-
$videoid = $slide->getSlideId () . $groups ['slidergroup_id'];
|
203 |
?>
|
204 |
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
205 |
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
206 |
-
<?php
|
207 |
-
$vimeo = $vimeo + 1;
|
208 |
-
$img = $slide->getVideoId ();
|
209 |
-
$hash = unserialize ( file_get_contents ( "http://vimeo.com/api/v2/video/$img.php" ) );
|
210 |
?>
|
211 |
-
<li class="video"><a
|
212 |
-
href="http://vimeo.com/<?php echo $slide->getVideoId(); ?>"
|
213 |
-
title="<?php echo $this->escapeHtml($slide->getTitles()) ?>"
|
214 |
-
target="_blank"><img
|
215 |
-
src="<?php echo $hash[0]['thumbnail_large']; ?>"
|
216 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></a></li>
|
217 |
<?php }elseif($slide->getImgVideo() == "youtube") {?>
|
218 |
<?php $youtube = $youtube + 1; ?>
|
219 |
-
<li class="video"><a
|
220 |
-
href="http://www.youtube.com/watch?v=<?php echo $slide->getVideoId(); ?>"
|
221 |
-
title="<?php echo $this->escapeHtml($slide->getTitles()) ?>"
|
222 |
-
target="_blank"><img
|
223 |
-
src="http://img.youtube.com/vi/<?php echo $slide->getVideoId(); ?>/0.jpg"
|
224 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></a></li>
|
225 |
<?php }else{ ?>
|
226 |
-
<?php
|
227 |
-
if($slide->getData ( 'img_hosting' )) {
|
228 |
-
if ($slide->getData ( 'hosted_thumb' )) {
|
229 |
-
$imgsrc = $slide->getHostedThumb ();
|
230 |
-
}
|
231 |
-
}else{
|
232 |
-
if ($slide->getData ( 'filename' )) {
|
233 |
-
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/thumbnails/" . $slide->getData ( 'filename' );
|
234 |
-
}
|
235 |
-
}
|
236 |
?>
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
|
|
|
|
242 |
alt="<?php echo $slide->getAltText(); ?>" /><?php if($slide->getUrl()) {?></a><?php } ?></li>
|
243 |
-
|
244 |
<?php } ?>
|
245 |
<?php } ?>
|
246 |
-
</ul>
|
247 |
-
</div>
|
248 |
</div>
|
249 |
<?php } ?>
|
250 |
|
251 |
<?php if($groups['slider_type'] == "bas-caro") { ?>
|
252 |
-
<div class="slider loading">
|
253 |
-
<div id="carousel-<?php echo $groups['slidergroup_id']; ?>"
|
254 |
-
class="rwdSlideCrousel <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
255 |
<ul class="slides">
|
256 |
-
<?php
|
257 |
-
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
258 |
-
foreach ( $sliedsdata as $slide ) {
|
259 |
-
if ($slide->getDateEnabled () == 1) {
|
260 |
-
$fromdate = strtotime ( $slide->getFromDate () );
|
261 |
-
$todate = strtotime ( $slide->getToDate () );
|
262 |
-
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
263 |
-
} else {
|
264 |
-
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
265 |
-
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
266 |
-
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
267 |
-
}
|
268 |
-
$youtube = '';
|
269 |
-
$vimeo = '';
|
270 |
-
$videoid = $slide->getSlideId () . $groups ['slidergroup_id'];
|
271 |
?>
|
272 |
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
273 |
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
274 |
-
<?php
|
275 |
-
$vimeo = $vimeo + 1;
|
276 |
-
$img = $slide->getVideoId ();
|
277 |
-
$hash = unserialize ( file_get_contents ( "http://vimeo.com/api/v2/video/$img.php" ) );
|
278 |
?>
|
279 |
-
<li class="video"><img
|
280 |
-
src="<?php echo $hash[0]['thumbnail_large']; ?>"
|
281 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></li>
|
282 |
<?php } elseif($slide->getImgVideo() == "youtube") { ?>
|
283 |
<?php $youtube = $youtube + 1; ?>
|
284 |
-
<li class="video"><img
|
285 |
-
src="http://img.youtube.com/vi/<?php echo $slide->getVideoId(); ?>/0.jpg"
|
286 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></li>
|
287 |
<?php } else { ?>
|
288 |
-
<?php
|
289 |
-
if($slide->getData ( 'img_hosting' )) {
|
290 |
-
if ($slide->getData ( 'hosted_thumb' )) {
|
291 |
-
$imgsrc = $slide->getHostedThumb ();
|
292 |
-
}
|
293 |
-
}else{
|
294 |
-
if ($slide->getData ( 'filename' )) {
|
295 |
-
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/thumbnails/" . $slide->getData ( 'filename' );
|
296 |
-
}
|
297 |
-
}
|
298 |
?>
|
299 |
-
|
|
|
300 |
alt="<?php echo $slide->getAltText(); ?>" /></li>
|
301 |
-
|
302 |
<?php } ?>
|
303 |
<?php } ?>
|
304 |
-
</ul>
|
305 |
-
</div>
|
306 |
</div>
|
307 |
<?php } ?>
|
308 |
-
</div>
|
309 |
-
|
310 |
<script type="text/javascript">
|
311 |
|
312 |
function getGridSize() {
|
313 |
-
|
314 |
-
|
315 |
-
(window.innerWidth < 999) ? 2 : 3;
|
316 |
}
|
317 |
|
318 |
jQuery(window).load(function(){
|
319 |
-
|
320 |
<?php if($groups['slider_type'] != "basic") { ?>
|
321 |
jQuery('#carousel-<?php echo $groups['slidergroup_id']; ?>').flexslider({
|
322 |
animation: "slide",
|
323 |
itemWidth: <?php echo $groups['thumbnail_size']; ?>,
|
324 |
itemMargin: 10,
|
|
|
325 |
directionNav: <?php if($groups['navigation_arrow'] == "never") { echo "false"; } else { echo "true"; } ?>,
|
326 |
<?php if($groups['slider_type']== "bas-caro") { ?>
|
327 |
slideshow: false,
|
@@ -343,10 +352,11 @@
|
|
343 |
showpage : "<?php echo $showpage; ?>",
|
344 |
pagestyle : "<?php echo $pagestyle; ?>",
|
345 |
pagepos : "<?php echo $pagepos; ?>",
|
346 |
-
|
347 |
-
|
348 |
});
|
349 |
|
|
|
350 |
jQuery(window).resize(function() {
|
351 |
var gridSize = getGridSize();
|
352 |
|
@@ -450,6 +460,7 @@
|
|
450 |
},
|
451 |
<?php } ?>
|
452 |
<?php } ?>
|
|
|
453 |
navarrow : "<?php echo $navarrow; ?>",
|
454 |
navstyle : "<?php echo $navstyle; ?>",
|
455 |
showpage : "<?php echo $showpage; ?>",
|
@@ -472,19 +483,19 @@
|
|
472 |
$f(player).addEvent('ready', ready);
|
473 |
|
474 |
function addEvent(element, eventName, callback) {
|
475 |
-
|
476 |
(element.addEventListener) ? element.addEventListener(eventName, callback, false) : element.attachEvent(eventName, callback, false);
|
477 |
}
|
478 |
|
479 |
function ready(player_id) {
|
480 |
var froogaloop = $f(player_id);
|
481 |
-
|
482 |
froogaloop.addEvent('play', function(data) {
|
483 |
-
|
484 |
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?>').flexslider("pause");
|
485 |
});
|
486 |
|
487 |
-
froogaloop.addEvent('pause', function(data) {
|
488 |
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?>').flexslider("play");
|
489 |
});
|
490 |
}
|
@@ -537,7 +548,7 @@
|
|
537 |
<?php } ?>
|
538 |
<?php } ?>
|
539 |
});
|
540 |
-
</script>
|
541 |
<?php } ?>
|
542 |
<?php } ?>
|
543 |
<?php } ?>
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
?>
|
10 |
|
11 |
<?php if ($this->getGroupscollection() != "") { ?>
|
12 |
<?php $groupsdata = $this->getGroupscollection()->getData(); ?>
|
13 |
|
14 |
<?php foreach ($groupsdata as $groups ) { ?>
|
15 |
+
<?php
|
16 |
+
|
17 |
+
if ($groups ['slider_theme'] == "default") {
|
18 |
+
$theme = "defaultTheme";
|
19 |
+
} elseif ($groups ['slider_theme'] == "blank") {
|
20 |
+
$theme = "blankTheme";
|
21 |
+
} elseif ($groups ['slider_theme'] == "drop_shadow") {
|
22 |
+
$theme = "dropShadow";
|
23 |
+
} else {
|
24 |
+
$theme = "emboss";
|
25 |
+
}
|
26 |
+
|
27 |
+
if ($groups ['navigation_arrow'] == "never") {
|
28 |
+
$navarrow = "noNavArw";
|
29 |
+
} elseif ($groups ['navigation_arrow'] == "always") {
|
30 |
+
$navarrow = "alwaysNavArw";
|
31 |
+
} else {
|
32 |
+
$navarrow = "NavArwOnHover";
|
33 |
+
}
|
34 |
+
|
35 |
+
if ($groups ['navigation_style'] == "angle") {
|
36 |
+
$navstyle = "angle";
|
37 |
+
} elseif ($groups ['navigation_style'] == "angle_small") {
|
38 |
+
$navstyle = "angle_small";
|
39 |
+
} elseif ($groups ['navigation_style'] == "angle_circle") {
|
40 |
+
$navstyle = "angle_circle";
|
41 |
+
} elseif ($groups ['navigation_style'] == "angle_square") {
|
42 |
+
$navstyle = "angle_square";
|
43 |
+
} elseif ($groups ['navigation_style'] == "arrow") {
|
44 |
+
$navstyle = "arrow";
|
45 |
+
} elseif ($groups ['navigation_style'] == "arrow_circle") {
|
46 |
+
$navstyle = "arrow_circle";
|
47 |
+
} elseif ($groups ['navigation_style'] == "caret") {
|
48 |
+
$navstyle = "caret";
|
49 |
+
} elseif ($groups ['navigation_style'] == "chevron") {
|
50 |
+
$navstyle = "chevron";
|
51 |
+
} elseif ($groups ['navigation_style'] == "chevron_smooth") {
|
52 |
+
$navstyle = "chevron_smooth";
|
53 |
+
} elseif ($groups ['navigation_style'] == "chevron_circle") {
|
54 |
+
$navstyle = "chevron_circle";
|
55 |
+
} else {
|
56 |
+
$navstyle = "chevron_square";
|
57 |
+
}
|
58 |
+
|
59 |
+
if ($groups ['navigation_aposition'] == "inside") {
|
60 |
+
$navpos = "navArwInside";
|
61 |
+
} elseif ($groups ['navigation_aposition'] == "outside") {
|
62 |
+
$navpos = "navArwOutside";
|
63 |
+
} elseif ($groups ['navigation_aposition'] == "inside_left") {
|
64 |
+
$navpos = "navArwInLeft";
|
65 |
+
} else {
|
66 |
+
$navpos = "navArwInRight";
|
67 |
+
}
|
68 |
+
|
69 |
+
if ($groups ['show_pagination'] == "never") {
|
70 |
+
$showpage = "noPaging";
|
71 |
+
} elseif ($groups ['show_pagination'] == "always") {
|
72 |
+
$showpage = "alwaysPaging";
|
73 |
+
} else {
|
74 |
+
$showpage = "pagingOnHover";
|
75 |
+
}
|
76 |
+
|
77 |
+
if ($groups ['pagination_style'] == "circular") {
|
78 |
+
$pagestyle = "circular";
|
79 |
+
} elseif ($groups ['pagination_style'] == "squared") {
|
80 |
+
$pagestyle = "squared";
|
81 |
+
} elseif ($groups ['pagination_style'] == "circular_bar") {
|
82 |
+
$pagestyle = "cir-bar";
|
83 |
+
} else {
|
84 |
+
$pagestyle = "squ-bar";
|
85 |
+
}
|
86 |
+
|
87 |
+
if ($groups ['pagination_position'] == "below") {
|
88 |
+
$pagepos = "pagerBelow";
|
89 |
+
} elseif ($groups ['pagination_position'] == "above") {
|
90 |
+
$pagepos = "pagerAbove";
|
91 |
+
} elseif ($groups ['pagination_position'] == "inside_top") {
|
92 |
+
$pagepos = "pagerInTop";
|
93 |
+
} elseif ($groups ['pagination_position'] == "inside_bottom") {
|
94 |
+
$pagepos = "pagerInBottom";
|
95 |
+
} elseif ($groups ['pagination_position'] == "inside_bottom_left") {
|
96 |
+
$pagepos = "pagerInBottomleft";
|
97 |
+
} else {
|
98 |
+
$pagepos = "pagerInBottomright";
|
99 |
+
}
|
100 |
+
|
101 |
+
if ($groups ['slider_type'] == "basic") {
|
102 |
+
$bannerStyle = "basSlider";
|
103 |
+
} elseif ($groups ['slider_type'] == "carousel") {
|
104 |
+
$bannerStyle = "basCarousel";
|
105 |
+
} else {
|
106 |
+
$bannerStyle = "slideNcrosel";
|
107 |
+
}
|
108 |
+
|
109 |
?>
|
110 |
<?php $sliedsdata = $this->getSlides($groups['slidergroup_id']); ?>
|
111 |
<?php if(count($sliedsdata) > 0 ) { ?>
|
112 |
+
<?php $groupId = $groups['slidergroup_id']; ?>
|
113 |
+
<link rel="stylesheet" type="text/css"
|
114 |
+
href="<?php echo $this->getSkinUrl('css/responsivebannerslider/group-'.$groupId.'.css');?>"
|
115 |
+
media="all" />
|
116 |
+
<div id="bnrSlider-<?php echo $groups['slidergroup_id']; ?>"
|
117 |
class="cwsSlider <?php echo $bannerStyle.' '.$theme; ?>">
|
118 |
<?php if($groups['slider_type'] != "carousel") { ?>
|
119 |
+
<div class="slider loading">
|
120 |
+
<div id="rwdSlider-<?php echo $groups['slidergroup_id']; ?>"
|
121 |
+
class="cwsRwdSlider <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
122 |
<ul class="slides">
|
123 |
+
<?php
|
124 |
+
$youtube = '';
|
125 |
+
$vimeo = '';
|
126 |
+
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
127 |
+
foreach ( $sliedsdata as $slide ) {
|
128 |
+
|
129 |
+
if ($slide->getDateEnabled () == 1) {
|
130 |
+
$fromdate = strtotime ( $slide->getFromDate () );
|
131 |
+
$todate = strtotime ( $slide->getToDate () );
|
132 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
133 |
+
} else {
|
134 |
+
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
135 |
+
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
136 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
137 |
+
}
|
138 |
+
$videoid = $groups ['slidergroup_id'];
|
139 |
+
$video_height = $slide->getVideoHeight ();
|
140 |
?>
|
141 |
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
142 |
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
143 |
<?php $vimeo = $vimeo + 1; ?>
|
144 |
+
<li class="video"><iframe id="player_<?php echo $videoid; ?>"
|
145 |
+
src="http://player.vimeo.com/video/<?php echo $slide->getVideoId(); ?>?api=1&player_id=player_<?php echo $videoid; ?>"
|
146 |
+
width="100%" height="<?php echo $video_height; ?>" frameborder="0"
|
147 |
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></li>
|
148 |
<?php } elseif($slide->getImgVideo() == "youtube") { ?>
|
149 |
<?php $youtube = $youtube + 1; ?>
|
150 |
+
<li class="video"><iframe class="youtube"
|
151 |
+
id="youtube_<?php echo $videoid; ?>"
|
152 |
+
src="http://www.youtube.com/embed/<?php echo $slide->getVideoId(); ?>?enablejsapi=1&wmode=opaque&playerapiid=youtube_<?php echo $videoid; ?>"
|
153 |
+
width="100%" height="<?php echo $video_height; ?>" frameborder="0"
|
154 |
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></li>
|
155 |
<?php } else { ?>
|
156 |
+
<?php
|
157 |
+
if($slide->getData ( 'img_hosting' )) {
|
158 |
+
if ($slide->getData ( 'hosted_url' )) {
|
159 |
+
$imgsrc = $slide->getHostedUrl ();
|
160 |
+
}
|
161 |
+
}else{
|
162 |
+
if ($slide->getData ( 'filename' )) {
|
163 |
+
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/" . $slide->getData ( 'filename' );
|
164 |
+
}
|
165 |
+
}
|
166 |
+
$loading_img = $this->getSkinUrl ( 'css/responsivebannerslider/loading.gif' );
|
167 |
?>
|
168 |
+
|
169 |
+
<?php if($slide->getData('hosted_url') != "" || $slide->getData('filename') != "") { ?>
|
170 |
+
<li><?php if($slide->getUrl()) {?><a
|
171 |
+
href="<?php echo $slide->getUrl(); ?>"
|
172 |
+
title="<?php echo $slide->getUrl(); ?>"
|
173 |
+
target="<?php if($slide->getUrlTarget() == "new_window") { echo "_blank"; } ?>"><?php } ?><img
|
174 |
+
class="cwslazy" <?php if($this->getLazylaod()) { ?>
|
175 |
+
data-src="<?php echo $imgsrc; ?>" <?php } ?>
|
176 |
+
src="<?php if(!$this->getLazylaod()) { echo $imgsrc; }else { echo $loading_img; } ?>"
|
177 |
+
alt="<?php echo $slide->getAltText(); ?>" /><?php if($slide->getUrl()) {?></a><?php } ?><?php if($slide->getDescription()) { ?><span
|
178 |
class="sliderdecs"><?php echo $slide->getDescription(); ?></span><?php } ?></li>
|
179 |
+
|
180 |
+
<?php } ?>
|
181 |
+
|
182 |
<?php } ?>
|
183 |
<?php if($slide->getDateEnabled() == 1) { } } ?> <?php } ?>
|
184 |
+
</ul>
|
185 |
+
</div>
|
186 |
</div>
|
187 |
<?php } ?>
|
188 |
|
189 |
<?php if($groups['slider_type'] == "carousel") { ?>
|
190 |
+
<div class="slider loading">
|
191 |
+
<div id="carousel-<?php echo $groups['slidergroup_id']; ?>"
|
192 |
+
class="rwdCarousel <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
193 |
<ul class="slides">
|
194 |
+
<?php
|
195 |
+
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
196 |
+
foreach ( $sliedsdata as $slide ) {
|
197 |
+
if ($slide->getDateEnabled () == 1) {
|
198 |
+
$fromdate = strtotime ( $slide->getFromDate () );
|
199 |
+
$todate = strtotime ( $slide->getToDate () );
|
200 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
201 |
+
} else {
|
202 |
+
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
203 |
+
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
204 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
205 |
+
}
|
206 |
+
$youtube = '';
|
207 |
+
$vimeo = '';
|
208 |
+
$videoid = $slide->getSlideId () . $groups ['slidergroup_id'];
|
209 |
?>
|
210 |
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
211 |
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
212 |
+
<?php
|
213 |
+
$vimeo = $vimeo + 1;
|
214 |
+
$img = $slide->getVideoId ();
|
215 |
+
$hash = unserialize ( file_get_contents ( "http://vimeo.com/api/v2/video/$img.php" ) );
|
216 |
?>
|
217 |
+
<li class="video"><a
|
218 |
+
href="http://vimeo.com/<?php echo $slide->getVideoId(); ?>"
|
219 |
+
title="<?php echo $this->escapeHtml($slide->getTitles()) ?>"
|
220 |
+
target="_blank"><img
|
221 |
+
src="<?php echo $hash[0]['thumbnail_large']; ?>"
|
222 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></a></li>
|
223 |
<?php }elseif($slide->getImgVideo() == "youtube") {?>
|
224 |
<?php $youtube = $youtube + 1; ?>
|
225 |
+
<li class="video"><a
|
226 |
+
href="http://www.youtube.com/watch?v=<?php echo $slide->getVideoId(); ?>"
|
227 |
+
title="<?php echo $this->escapeHtml($slide->getTitles()) ?>"
|
228 |
+
target="_blank"><img
|
229 |
+
src="http://img.youtube.com/vi/<?php echo $slide->getVideoId(); ?>/0.jpg"
|
230 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></a></li>
|
231 |
<?php }else{ ?>
|
232 |
+
<?php
|
233 |
+
if($slide->getData ( 'img_hosting' )) {
|
234 |
+
if ($slide->getData ( 'hosted_thumb' )) {
|
235 |
+
$imgsrc = $slide->getHostedThumb ();
|
236 |
+
}
|
237 |
+
}else{
|
238 |
+
if ($slide->getData ( 'filename' )) {
|
239 |
+
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/thumbnails/" . $slide->getData ( 'filename' );
|
240 |
+
}
|
241 |
+
}
|
242 |
?>
|
243 |
+
|
244 |
+
<?php if($slide->getData('hosted_thumb') != "" || $slide->getData('filename') != "") { ?>
|
245 |
+
<li><?php if($slide->getUrl()) {?><a
|
246 |
+
href="<?php echo $slide->getUrl(); ?>"
|
247 |
+
title="<?php echo $slide->getUrl(); ?>"
|
248 |
+
target="<?php if($slide->getUrlTarget() == "new_window") { echo "_blank"; } ?>"><?php } ?><img
|
249 |
+
src="<?php echo $imgsrc; ?>"
|
250 |
alt="<?php echo $slide->getAltText(); ?>" /><?php if($slide->getUrl()) {?></a><?php } ?></li>
|
251 |
+
<?php } } ?>
|
252 |
<?php } ?>
|
253 |
<?php } ?>
|
254 |
+
</ul>
|
255 |
+
</div>
|
256 |
</div>
|
257 |
<?php } ?>
|
258 |
|
259 |
<?php if($groups['slider_type'] == "bas-caro") { ?>
|
260 |
+
<div class="slider loading">
|
261 |
+
<div id="carousel-<?php echo $groups['slidergroup_id']; ?>"
|
262 |
+
class="rwdSlideCrousel <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
263 |
<ul class="slides">
|
264 |
+
<?php
|
265 |
+
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
266 |
+
foreach ( $sliedsdata as $slide ) {
|
267 |
+
if ($slide->getDateEnabled () == 1) {
|
268 |
+
$fromdate = strtotime ( $slide->getFromDate () );
|
269 |
+
$todate = strtotime ( $slide->getToDate () );
|
270 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
271 |
+
} else {
|
272 |
+
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
273 |
+
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
274 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
275 |
+
}
|
276 |
+
$youtube = '';
|
277 |
+
$vimeo = '';
|
278 |
+
$videoid = $slide->getSlideId () . $groups ['slidergroup_id'];
|
279 |
?>
|
280 |
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
281 |
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
282 |
+
<?php
|
283 |
+
$vimeo = $vimeo + 1;
|
284 |
+
$img = $slide->getVideoId ();
|
285 |
+
$hash = unserialize ( file_get_contents ( "http://vimeo.com/api/v2/video/$img.php" ) );
|
286 |
?>
|
287 |
+
<li class="video"><img
|
288 |
+
src="<?php echo $hash[0]['thumbnail_large']; ?>"
|
289 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></li>
|
290 |
<?php } elseif($slide->getImgVideo() == "youtube") { ?>
|
291 |
<?php $youtube = $youtube + 1; ?>
|
292 |
+
<li class="video"><img
|
293 |
+
src="http://img.youtube.com/vi/<?php echo $slide->getVideoId(); ?>/0.jpg"
|
294 |
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></li>
|
295 |
<?php } else { ?>
|
296 |
+
<?php
|
297 |
+
if($slide->getData ( 'img_hosting' )) {
|
298 |
+
if ($slide->getData ( 'hosted_thumb' )) {
|
299 |
+
$imgsrc = $slide->getHostedThumb ();
|
300 |
+
}
|
301 |
+
}else{
|
302 |
+
if ($slide->getData ( 'filename' )) {
|
303 |
+
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/thumbnails/" . $slide->getData ( 'filename' );
|
304 |
+
}
|
305 |
+
}
|
306 |
?>
|
307 |
+
<?php if($slide->getData('hosted_thumb') != "" || $slide->getData('filename') != "") { ?>
|
308 |
+
<li><img src="<?php echo $imgsrc; ?>"
|
309 |
alt="<?php echo $slide->getAltText(); ?>" /></li>
|
310 |
+
<?php } } ?>
|
311 |
<?php } ?>
|
312 |
<?php } ?>
|
313 |
+
</ul>
|
314 |
+
</div>
|
315 |
</div>
|
316 |
<?php } ?>
|
317 |
+
</div>
|
318 |
+
|
319 |
<script type="text/javascript">
|
320 |
|
321 |
function getGridSize() {
|
322 |
+
return (window.innerWidth < 600) ? 2 :
|
323 |
+
(window.innerWidth < 900) ? 3 : 4;
|
|
|
324 |
}
|
325 |
|
326 |
jQuery(window).load(function(){
|
327 |
+
|
328 |
<?php if($groups['slider_type'] != "basic") { ?>
|
329 |
jQuery('#carousel-<?php echo $groups['slidergroup_id']; ?>').flexslider({
|
330 |
animation: "slide",
|
331 |
itemWidth: <?php echo $groups['thumbnail_size']; ?>,
|
332 |
itemMargin: 10,
|
333 |
+
|
334 |
directionNav: <?php if($groups['navigation_arrow'] == "never") { echo "false"; } else { echo "true"; } ?>,
|
335 |
<?php if($groups['slider_type']== "bas-caro") { ?>
|
336 |
slideshow: false,
|
352 |
showpage : "<?php echo $showpage; ?>",
|
353 |
pagestyle : "<?php echo $pagestyle; ?>",
|
354 |
pagepos : "<?php echo $pagepos; ?>",
|
355 |
+
|
356 |
+
|
357 |
});
|
358 |
|
359 |
+
|
360 |
jQuery(window).resize(function() {
|
361 |
var gridSize = getGridSize();
|
362 |
|
460 |
},
|
461 |
<?php } ?>
|
462 |
<?php } ?>
|
463 |
+
|
464 |
navarrow : "<?php echo $navarrow; ?>",
|
465 |
navstyle : "<?php echo $navstyle; ?>",
|
466 |
showpage : "<?php echo $showpage; ?>",
|
483 |
$f(player).addEvent('ready', ready);
|
484 |
|
485 |
function addEvent(element, eventName, callback) {
|
486 |
+
|
487 |
(element.addEventListener) ? element.addEventListener(eventName, callback, false) : element.attachEvent(eventName, callback, false);
|
488 |
}
|
489 |
|
490 |
function ready(player_id) {
|
491 |
var froogaloop = $f(player_id);
|
492 |
+
|
493 |
froogaloop.addEvent('play', function(data) {
|
494 |
+
|
495 |
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?>').flexslider("pause");
|
496 |
});
|
497 |
|
498 |
+
froogaloop.addEvent('pause', function(data) {
|
499 |
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?>').flexslider("play");
|
500 |
});
|
501 |
}
|
548 |
<?php } ?>
|
549 |
<?php } ?>
|
550 |
});
|
551 |
+
</script>
|
552 |
<?php } ?>
|
553 |
<?php } ?>
|
554 |
<?php } ?>
|
js/responsivebannerslider/jquery.flexslider.js
CHANGED
@@ -301,9 +301,18 @@
|
|
301 |
(slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
|
302 |
}
|
303 |
},
|
|
|
304 |
directionNav: {
|
305 |
-
|
306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
|
308 |
// CONTROLSCONTAINER:
|
309 |
if (slider.controlsContainer) {
|
301 |
(slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
|
302 |
}
|
303 |
},
|
304 |
+
|
305 |
directionNav: {
|
306 |
+
|
307 |
+
setup: function() {
|
308 |
+
if(slider.count == 1) {
|
309 |
+
var hidearw = "hideArw";
|
310 |
+
}else {
|
311 |
+
var hidearw = "";
|
312 |
+
}
|
313 |
+
|
314 |
+
|
315 |
+
var directionNavScaffold = $('<ul class="'+namespace+'arw '+navstyle+' '+hidearw+'"><li><a class="' + namespace + 'prev '+ navstyle +'" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next '+ navstyle +'" href="#">' + slider.vars.nextText + '</a></li></ul>');
|
316 |
|
317 |
// CONTROLSCONTAINER:
|
318 |
if (slider.controlsContainer) {
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Responsive_Banner_Slider</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
7 |
<channel>community</channel>
|
@@ -12,9 +12,9 @@ This extension is easy to setup and give many options for settings from admin. Y
|
|
12 |
</description>
|
13 |
<notes>Capacity Web Solutions - Responsive Banner Slider</notes>
|
14 |
<authors><author><name>Capacity Web Solutions</name><user>capacitywebsolutions</user><email>magento@capacitywebsolutions.com</email></author></authors>
|
15 |
-
<date>2015-06-
|
16 |
-
<time>
|
17 |
-
<contents><target name="mageetc"><dir name="modules"><file name="CapacityWebSolutions_Responsivebannerslider.xml" hash="2a99a1b776e46e0f263fd11bbf3734e6"/></dir></target><target name="magecommunity"><dir name="CapacityWebSolutions"><dir name="Responsivebannerslider"><dir name="Block"><dir name="Adminhtml"><dir name="Slider"><dir name="Edit"><file name="Form.php" hash="c693bcac807af9a09d440eb168eb3fe2"/><dir name="Tab"><file name="Form.php" hash="
|
18 |
<compatible/>
|
19 |
-
<dependencies><required><php><min>5.0.0</min><max>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Responsive_Banner_Slider</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
7 |
<channel>community</channel>
|
12 |
</description>
|
13 |
<notes>Capacity Web Solutions - Responsive Banner Slider</notes>
|
14 |
<authors><author><name>Capacity Web Solutions</name><user>capacitywebsolutions</user><email>magento@capacitywebsolutions.com</email></author></authors>
|
15 |
+
<date>2015-06-18</date>
|
16 |
+
<time>05:27:47</time>
|
17 |
+
<contents><target name="mageetc"><dir name="modules"><file name="CapacityWebSolutions_Responsivebannerslider.xml" hash="2a99a1b776e46e0f263fd11bbf3734e6"/></dir></target><target name="magecommunity"><dir name="CapacityWebSolutions"><dir name="Responsivebannerslider"><dir name="Block"><dir name="Adminhtml"><dir name="Slider"><dir name="Edit"><file name="Form.php" hash="c693bcac807af9a09d440eb168eb3fe2"/><dir name="Tab"><file name="Form.php" hash="7dcf146f6ae769ce2bb6e8a9c42e45cf"/></dir><file name="Tabs.php" hash="8925bab36ab5c00e08c11550428f2779"/></dir><file name="Edit.php" hash="50a6189710bd2c95fe797dea961e2b25"/><file name="Grid.php" hash="5aacb488667b8992fb2af5d18570d355"/><dir name="Renderer"><file name="Groups.php" hash="64bf193cdbe365b53f740f42171f1264"/></dir></dir><file name="Slider.php" hash="f43c568cf9cdb2ab00cdcc5570be0124"/><dir name="Slidergroup"><dir name="Edit"><file name="Form.php" hash="15e4ceaab37f2fa892538a832697e72d"/><dir name="Tab"><file name="Categories.php" hash="d340ac103065e332355c25db225dce19"/><file name="Code.php" hash="bc6d2bfc008c7dc062d12f0b95d1b1bb"/><file name="Form.php" hash="1e1f0bec054bbe9ddc779a91e7f1d901"/><file name="Pages.php" hash="0334b4b413b08fad246b1e75a1295b02"/><file name="Product.php" hash="ba020e27a3f51a75d1532b4e93b12564"/><file name="Sliders.php" hash="76bad616a4aeb6038a9b93fe85ec9fe8"/></dir><file name="Tabs.php" hash="7d50ea95fc1b3d889a5f7bfaa0b50961"/></dir><file name="Edit.php" hash="53f1d1360409a52f6d145a449acd98c7"/><file name="Grid.php" hash="443805684f17f487242a12e16bd22415"/></dir><file name="Slidergroup.php" hash="bea6d477bee50e19884d58232edb8891"/></dir><dir name="View"><file name="Bottom.php" hash="9789f6620c9b423fa0fd008ca8b891d6"/><file name="Top.php" hash="4e40ef544497f9ecf2a8475416a856eb"/></dir><file name="View.php" hash="4cb60d2f10505e4de132c7ac4a637593"/></dir><dir name="Helper"><file name="Data.php" hash="7ba54649e54da8b57b88806585a7df55"/></dir><dir name="Model"><file name="Categories.php" hash="8cac29d0e10ed8f42a9715ec171fe8a3"/><file name="Category.php" hash="aa800bbb91d4eed0172493aadb6278bb"/><dir name="Config"><file name="Effect.php" hash="49b86e04e38bd1757bf56d18503e1264"/><dir name="Source"><file name="Animationdirection.php" hash="9904f3f77ecc8f5def84b5f0ac147bca"/><file name="Animationtype.php" hash="eb4341a59f0ed657427cc2e847774553"/><file name="Effect.php" hash="365bfe3aaa0fa7e8235bd9131670ab91"/><file name="Navigation.php" hash="83af4ecbf1e4ab33261a9b5974db1d5d"/><file name="Navigationarrow.php" hash="78e6de8297d88504f0de352027076d76"/><file name="Navigationstyle.php" hash="84087644e9b439178d9a5eeb1a217cab"/><file name="Pages.php" hash="025071e0c33ec7fae54255f6309b60b8"/><file name="Paginationposition.php" hash="d672cc31fd6a35fcdae6b8658bde95a1"/><file name="Paginationstyle.php" hash="a8db3db4636afe540f5148bf4a0aab01"/><file name="Position.php" hash="0d221cdb4209f1dd469d2512d6a76e41"/><file name="Status.php" hash="1217aaf60bdb16c6e05236bbfc663b9a"/><file name="Theme.php" hash="50d77ffc3961aa7cab380d1ef13ccf0c"/><file name="Type.php" hash="249d3e740618010a249029a7bb9f2de1"/><file name="Urltarget.php" hash="f94e29c587735a3371ec951de478911c"/><file name="Video.php" hash="3aebf9b4033a31b8e795954909293ba9"/></dir></dir><dir name="Mysql4"><dir name="Categories"><file name="Collection.php" hash="a6f9741b66824a9fa833ade979a3a742"/></dir><file name="Categories.php" hash="af9c86a9f68ff02398e281f5f9ddbd8a"/><dir name="Page"><file name="Collection.php" hash="d5c87f75df5dba2ccb9f4c69a1ae01ca"/></dir><file name="Page.php" hash="6f9edf1be7105da0237dff5f1e64dc4e"/><dir name="Product"><file name="Collection.php" hash="a7205246e7aa75e22ea0d40efdc42595"/></dir><file name="Product.php" hash="6f4fe1a80df501a543efa6ddd044fa32"/><dir name="Responsivebannerslider"><file name="Collection.php" hash="9f2ded0948a1dd2c842e8636a4136c6b"/></dir><file name="Responsivebannerslider.php" hash="79d630dad9ce750cc53e0b5783927671"/><dir name="Slide"><file name="Collection.php" hash="10b7ee679e1c02de23000faf2146c38d"/></dir><file name="Slide.php" hash="63ed667457c4543861d8ae3ddb3784cf"/><dir name="Store"><file name="Collection.php" hash="83a4477b9ea24237b4aa151c223e3610"/></dir><file name="Store.php" hash="dc35d5d57d9aed5adcdd350df8e70468"/></dir><file name="Observer.php" hash="15a4bab058ed736878f0bde325c8049c"/><file name="Page.php" hash="ce06882b913b33fbdd20bb413004e8d1"/><file name="Product.php" hash="619f0b5ae7de3642fec5aa563e470640"/><file name="Responsivebannerslider.php" hash="308eb76b21f2cbf3403e2f9186213ca1"/><file name="Slide.php" hash="444dc63f5a09ed39bf94f3f1a19ccc07"/><file name="Status.php" hash="e06821c830b4e225d31035949ea117f1"/><file name="Store.php" hash="1828b5e27442c34c1b4faaa9121fcf99"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SliderController.php" hash="335459a25666546a9343c13953a98628"/><file name="SlidergroupController.php" hash="63eb4f86e01b94df860a6f8a9e289755"/></dir><file name="IndexController.php" hash="b9e855e216650c60383de700e844afa7"/></dir><dir name="etc"><file name="config.xml" hash="1ec957323b2aee68449f5784ac65d0e6"/><file name="system.xml" hash="c8d53724d01659acdc6e522bd2e92d98"/></dir><dir name="sql"><dir name="responsivebannerslider_setup"><file name="mysql4-install-1.0.0.php" hash="a3ff6eea114f0c77c308eab7ea8e6130"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="responsivebannerslider"><file name="slider.phtml" hash="290149893458ee0cf23da38a6dbd7589"/></dir></dir><dir name="layout"><file name="responsivebannerslider.xml" hash="7d68272277e21dcda469e0f324bfae83"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="responsivebannerslider.xml" hash="0fd874a3c971f07fd6dc9c43d7298c74"/></dir><dir name="template"><dir name="responsivebannerslider"><dir name="category"><dir name="edit"><dir name="tab"><file name="categories.phtml" hash="95f4e5af33719a2543c73bc2eaae7395"/><file name="product.phtml" hash="8c289cbb0690fae8ea3819269bb369c1"/></dir></dir></dir><file name="code.phtml" hash="e2f283ad329cbb0be32d4bb10547b4f8"/><file name="group.phtml" hash="d61dc612ed18ad9d463dcce2b21149c2"/><file name="store.phtml" hash="9d96b0194b3a4863b44920fccc1db4d2"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="responsivebannerslider"><file name="froogaloop.js" hash="e743b8d812558184ec3d4cae1038d551"/><file name="jquery.easing.js" hash="7a5ecdcd9a7623fbe340b9ab87e87d74"/><file name="jquery.fitvid.js" hash="c6f6443bff74dd462b30e5445ed551f3"/><file name="jquery.flexslider.js" hash="187a981329e19fd8f436c4ca87e472e7"/><file name="jquery.lazy.js" hash="fc16f364749bfc6613f981e443512d44"/><file name="jquery.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><dir name="jscolor"><file name="Thumbs.db" hash="32fb573f166c0f3a4556474b2be54a05"/><file name="arrow.gif" hash="5034704a76cd55c1cbcbc58ea6bf523f"/><file name="cross.gif" hash="ba9a274b9323753cd95bc3b1eb2f4e5f"/><file name="hs.png" hash="fefa1a03d92ebad25c88dca94a0b63db"/><file name="hv.png" hash="990d71cada17da100653636cf8490884"/><file name="jscolor.js" hash="1a38f74bda8ecffcc0130ae4c40259ec"/></dir><file name="product-selector.js" hash="18edba645290825072641d0c032b0a0f"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="responsivebannerslider"><file name="Thumbs.db" hash="f37f36470242a70f0899bbf428653d0a"/><file name="bottom-shadow.png" hash="5f1ff2657b5f90226685492cefa866f6"/><file name="default.css" hash="5de24ed11eff80d11255765ca51f161b"/><dir name="fonts"><file name="cwsarw.eot" hash="41f04937f0acde47c88f749f001bb12f"/><file name="cwsarw.svg" hash="07131191014e36c08d6a67e34d74b709"/><file name="cwsarw.ttf" hash="4006f9d9fa6d69039f9c87bdc9b58c0f"/><file name="cwsarw.woff" hash="a9149ac28397ca3af9949933fb53fb60"/></dir><file name="loading.gif" hash="5d25806dac7cbee5f894b13144783866"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="responsivebannerslider"><file name="cwsarw.eot" hash="41f04937f0acde47c88f749f001bb12f"/><file name="cwsarw.svg" hash="07131191014e36c08d6a67e34d74b709"/><file name="cwsarw.ttf" hash="4006f9d9fa6d69039f9c87bdc9b58c0f"/><file name="cwsarw.woff" hash="a9149ac28397ca3af9949933fb53fb60"/><file name="responsivebannerslider.css" hash="e03584b7abd8cef4f16aab5ff20e809e"/></dir></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
</package>
|
skin/frontend/base/default/css/responsivebannerslider/default.css
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
.std .cwsSlider ul, .std .cwsSlider ul li, .std .cwsSlider ol, .std .cwsSlider ol li,
|
16 |
.cwsSlider ul, .cwsSlider ul li, .cwsSlider ol, .cwsSlider ol li { list-style:none !important; margin:0; padding:0; }
|
17 |
.cwsSlider .slides { zoom:1; }
|
18 |
-
|
19 |
/* Clearfix for the .slides element */
|
20 |
.loading {min-height: 300px; background: url('loading.gif') no-repeat center center;}
|
21 |
.slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
|
15 |
.std .cwsSlider ul, .std .cwsSlider ul li, .std .cwsSlider ol, .std .cwsSlider ol li,
|
16 |
.cwsSlider ul, .cwsSlider ul li, .cwsSlider ol, .cwsSlider ol li { list-style:none !important; margin:0; padding:0; }
|
17 |
.cwsSlider .slides { zoom:1; }
|
18 |
+
.hideArw { display:none; }
|
19 |
/* Clearfix for the .slides element */
|
20 |
.loading {min-height: 300px; background: url('loading.gif') no-repeat center center;}
|
21 |
.slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
|