ost - Version 1.1.0

Version Notes

Instagram slider configuration settings are available in System->Configuration->Instagram Slider

Instagram slider status needs to be enabled in configuration settings to be visible at front end.

Short code to display slider at any page is:

{{block type="instagramslider/instagramslider" name="instagramslider" template="instagramslider/instagramslider.phtml"}}

Download this release

Release Info

Developer Manish Mittal
Extension ost
Version 1.1.0
Comparing to
See all releases


Version 1.1.0

app/code/local/Ost/Instagramslider/Block/Instagramslider.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ost_Instagramslider_Block_Instagramslider extends Mage_Core_Block_Template
4
+ {
5
+ public function getModelInstagram()
6
+ {
7
+ return Mage::getModel('instagramslider/instagramslider')->getDetailData();
8
+ }
9
+ }
app/code/local/Ost/Instagramslider/Helper/Data.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ost_Instagramslider_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ public function getConfigData()
5
+ {
6
+ $storeId = Mage::app()->getStore()->getId();
7
+
8
+ $configData = Mage::getStoreConfig('instagramslider/instagramslider_settings',$storeId);
9
+
10
+ $data = '';
11
+ if($configData['instagramslider_status'] == 1){
12
+ $url = "https://api.instagram.com/v1/users/".$configData['instagramslider_userid']."/media/recent?s=150&access_token=".$configData['instagramslider_token']."&count=".$configData['instagramslider_item'];
13
+
14
+ $ch = curl_init($url);
15
+
16
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
17
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
18
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
19
+ $json = curl_exec($ch);
20
+ curl_close($ch);
21
+ $result = json_decode($json);
22
+
23
+ $width='';
24
+ switch($configData['instagramslider_dimension'])
25
+ {
26
+ case '1':
27
+ $width=50;
28
+ $width_height='50x50';
29
+ break;
30
+ case '2':
31
+ $width=100;
32
+ $width_height='100x100';
33
+ break;
34
+ case '3':
35
+ $width=150;
36
+ $width_height='150x150';
37
+ break;
38
+ case '4':
39
+ $width=200;
40
+ $width_height='200x200';
41
+ break;
42
+ case '5':
43
+ $width=350;
44
+ $width_height='350x350';
45
+ break;
46
+ case '6':
47
+ $width=640;
48
+ $width_height='640x640';
49
+ break;
50
+ case '7':
51
+ $width=1080;
52
+ $width_height='1080x1080';
53
+ break;
54
+
55
+ }
56
+ foreach ($result->data as $post) {
57
+ $data['images'][] = array(
58
+ 'title' => ($post->caption)? (($post->caption->text) ? $post->caption->text :'') : '',
59
+ 'link' => $post->link,
60
+ 'image' => str_replace('s320x320','s'.$width_height,$post->images->low_resolution->url)
61
+ );
62
+ }
63
+ $data['title'] = $configData['instagramslider_title'];
64
+ $data['item'] = ($configData['instagramslider_item'] == '')?0:$configData['instagramslider_item'];
65
+ $data['width'] = $width;
66
+ $data['autoplay'] = ($configData['instagramslider_play']==0)?"false":"true";
67
+ $data['autoplayspeed'] = ($configData['instagramslider_play']==0)?0:$configData['instagramslider_play_speed'];
68
+ $data['status'] = $configData['instagramslider_status'];
69
+ $data['navigation'] = ($configData['instagramslider_navigation']==0)?"false":"true";
70
+ $data['pagination'] = ($configData['instagramslider_pagination']==0)?"false":"true";
71
+ $data['rewindnav'] = ($configData['instagramslider_rewind']==0)?"false":"true";
72
+ $data['margin']= ($configData['instagramslider_margin']== '')?10:$configData['instagramslider_margin'];;
73
+
74
+ return $data;
75
+ }
76
+ else
77
+ {
78
+ return ;
79
+ }
80
+ }
81
+ }
app/code/local/Ost/Instagramslider/Model/Animationin.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ost_Instagramslider_Model_Animationin
3
+ {
4
+ public function toOptionArray()
5
+ {
6
+ return array(
7
+ array('value' => 'bounce', 'label' => 'bounce'),
8
+ array('value' => 'flash', 'label' => 'flash'),
9
+ array('value' => 'pulse', 'label' => 'pulse'),
10
+ array('value' => 'rubberBand', 'label' => 'rubberBand'),
11
+ array('value' => 'shake', 'label' => 'shake'),
12
+ array('value' => 'swing', 'label' => 'swing'),
13
+ array('value' => 'tada', 'label' => 'tada'),
14
+ array('value' => 'wobble', 'label' => 'wobble'),
15
+ array('value' => 'jello', 'label' => 'jello'),
16
+ array('value' => 'bounceIn', 'label' => 'bounceIn'),
17
+ array('value' => 'bounceInDown', 'label' => 'bounceInDown'),
18
+ array('value' => 'bounceInLeft', 'label' => 'bounceInLeft'),
19
+ array('value' => 'bounceInRight', 'label' => 'bounceInRight'),
20
+ array('value' => 'bounceInUp', 'label' => 'bounceInUp'),
21
+ array('value' => 'fadeIn', 'label' => 'fadeIn'),
22
+ array('value' => 'fadeInDown', 'label' => 'fadeInDown'),
23
+ array('value' => 'fadeInDownBig', 'label' => 'fadeInDownBig'),
24
+ array('value' => 'fadeInLeft', 'label' => 'fadeInLeft'),
25
+ array('value' => 'fadeInLeftBig', 'label' => 'fadeInLeftBig'),
26
+ array('value' => 'fadeInRight', 'label' => 'fadeInRight'),
27
+ array('value' => 'fadeInRightBig', 'label' => 'fadeInRightBig'),
28
+ array('value' => 'fadeInUp', 'label' => 'fadeInUp'),
29
+ array('value' => 'fadeInUpBig', 'label' => 'fadeInUpBig'),
30
+ array('value' => 'flipInX', 'label' => 'flipInX'),
31
+ array('value' => 'flipInY', 'label' => 'flipInY'),
32
+ array('value' => 'lightSpeedIn', 'label' => 'lightSpeedIn'),
33
+ array('value' => 'rotateIn', 'label' => 'rotateIn'),
34
+ array('value' => 'rotateInDownLeft', 'label' => 'rotateInDownLeft'),
35
+ array('value' => 'rotateInDownRight', 'label' => 'rotateInDownRight'),
36
+ array('value' => 'rotateInUpLeft', 'label' => 'rotateInUpLeft'),
37
+ array('value' => 'rotateInUpRight', 'label' => 'rotateInUpRight'),
38
+ array('value' => 'hinge', 'label' => 'hinge'),
39
+ array('value' => 'rollIn', 'label' => 'rollIn'),
40
+ array('value' => 'zoomIn', 'label' => 'zoomIn'),
41
+ array('value' => 'zoomInDown', 'label' => 'zoomInDown'),
42
+ array('value' => 'zoomInLeft', 'label' => 'zoomInLeft'),
43
+ array('value' => 'zoomInRight', 'label' => 'zoomInRight'),
44
+ array('value' => 'zoomInUp', 'label' => 'zoomInUp'),
45
+ array('value' => 'slideInDown', 'label' => 'slideInDown'),
46
+ array('value' => 'slideInLeft', 'label' => 'slideInLeft'),
47
+ array('value' => 'slideInRight', 'label' => 'slideInRight'),
48
+ array('value' => 'slideInUp', 'label' => 'slideInUp'),
49
+ );
50
+ }
51
+
52
+ public function toArray()
53
+ {
54
+ return array(
55
+ 1 => Mage::helper('adminhtml')->__('50x50'),
56
+ 2 => Mage::helper('adminhtml')->__('100x100'),
57
+ 3 => Mage::helper('adminhtml')->__('150x150'),
58
+ 4 => Mage::helper('adminhtml')->__('200x200'),
59
+ 5 => Mage::helper('adminhtml')->__('350x350'),
60
+ 6 => Mage::helper('adminhtml')->__('640x640'),
61
+ 7 => Mage::helper('adminhtml')->__('1080x1080'),
62
+ );
63
+ }
64
+ }
app/code/local/Ost/Instagramslider/Model/Animationout.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ost_Instagramslider_Model_Animationout
3
+ {
4
+ public function toOptionArray()
5
+ {
6
+ return array(
7
+ array('value' => 'bounce', 'label' => 'bounce'),
8
+ array('value' => 'flash', 'label' => 'flash'),
9
+ array('value' => 'pulse', 'label' => 'pulse'),
10
+ array('value' => 'rubberBand', 'label' => 'rubberBand'),
11
+ array('value' => 'shake', 'label' => 'shake'),
12
+ array('value' => 'swing', 'label' => 'swing'),
13
+ array('value' => 'tada', 'label' => 'tada'),
14
+ array('value' => 'wobble', 'label' => 'wobble'),
15
+ array('value' => 'jello', 'label' => 'jello'),
16
+ array('value' => 'bounceOut', 'label' => 'bounceOut'),
17
+ array('value' => 'bounceOutDown', 'label' => 'bounceOutDown'),
18
+ array('value' => 'bounceOutLeft', 'label' => 'bounceOutLeft'),
19
+ array('value' => 'bounceOutRight', 'label' => 'bounceOutRight'),
20
+ array('value' => 'bounceOutUp', 'label' => 'bounceOutUp'),
21
+ array('value' => 'fadeOut', 'label' => 'fadeOut'),
22
+ array('value' => 'fadeOutDown', 'label' => 'fadeOutDown'),
23
+ array('value' => 'fadeOutDownBig', 'label' => 'fadeOutDownBig'),
24
+ array('value' => 'fadeOutLeft', 'label' => 'fadeOutLeft'),
25
+ array('value' => 'fadeOutLeftBig', 'label' => 'fadeOutLeftBig'),
26
+ array('value' => 'fadeOutRight', 'label' => 'fadeOutRight'),
27
+ array('value' => 'fadeOutRightBig', 'label' => 'fadeOutRightBig'),
28
+ array('value' => 'fadeOutUp', 'label' => 'fadeOutUp'),
29
+ array('value' => 'fadeOutUpBig', 'label' => 'fadeOutUpBig'),
30
+ array('value' => 'flipOutX', 'label' => 'flipOutX'),
31
+ array('value' => 'flipOutY', 'label' => 'flipOutY'),
32
+ array('value' => 'lightSpeedOut', 'label' => 'lightSpeedOut'),
33
+ array('value' => 'rotateOut', 'label' => 'rotateOut'),
34
+ array('value' => 'rotateOutDownLeft', 'label' => 'rotateOutDownLeft'),
35
+ array('value' => 'rotateOutDownRight', 'label' => 'rotateOutDownRight'),
36
+ array('value' => 'rotateOutUpLeft', 'label' => 'rotateOutUpLeft'),
37
+ array('value' => 'rotateOutUpRight', 'label' => 'rotateOutUpRight'),
38
+ array('value' => 'hinge', 'label' => 'hinge'),
39
+ array('value' => 'rollOut', 'label' => 'rollOut'),
40
+ array('value' => 'zoomOut', 'label' => 'zoomOut'),
41
+ array('value' => 'zoomOutDown', 'label' => 'zoomOutDown'),
42
+ array('value' => 'zoomOutLeft', 'label' => 'zoomOutLeft'),
43
+ array('value' => 'zoomOutRight', 'label' => 'zoomOutRight'),
44
+ array('value' => 'zoomOutUp', 'label' => 'zoomOutUp'),
45
+ array('value' => 'slideOutDown', 'label' => 'slideOutDown'),
46
+ array('value' => 'slideOutLeft', 'label' => 'slideOutLeft'),
47
+ array('value' => 'slideOutRight', 'label' => 'slideOutRight'),
48
+ array('value' => 'slideOutUp', 'label' => 'slideOutUp')
49
+ );
50
+ }
51
+ }
app/code/local/Ost/Instagramslider/Model/Dimension.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ost_Instagramslider_Model_Dimension
3
+ {
4
+
5
+ /**
6
+ * Options getter
7
+ *
8
+ * @return array
9
+ */
10
+ public function toOptionArray()
11
+ {
12
+ return array(
13
+ array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('50x50')),
14
+ array('value' => 2, 'label'=>Mage::helper('adminhtml')->__('100x100')),
15
+ array('value' => 3, 'label'=>Mage::helper('adminhtml')->__('150x150')),
16
+ array('value' => 4, 'label'=>Mage::helper('adminhtml')->__('200x200')),
17
+ array('value' => 5, 'label'=>Mage::helper('adminhtml')->__('350x350')),
18
+ array('value' => 6, 'label'=>Mage::helper('adminhtml')->__('640x640')),
19
+ array('value' => 7, 'label'=>Mage::helper('adminhtml')->__('1080x1080')),
20
+ );
21
+ }
22
+
23
+ /**
24
+ * Get options in "key-value" format
25
+ *
26
+ * @return array
27
+ */
28
+ public function toArray()
29
+ {
30
+ return array(
31
+ 1 => Mage::helper('adminhtml')->__('50x50'),
32
+ 2 => Mage::helper('adminhtml')->__('100x100'),
33
+ 3 => Mage::helper('adminhtml')->__('150x150'),
34
+ 4 => Mage::helper('adminhtml')->__('200x200'),
35
+ 5 => Mage::helper('adminhtml')->__('350x350'),
36
+ 6 => Mage::helper('adminhtml')->__('640x640'),
37
+ 7 => Mage::helper('adminhtml')->__('1080x1080'),
38
+ );
39
+ }
40
+
41
+ }
app/code/local/Ost/Instagramslider/Model/Instagramslider.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ost_Instagramslider_Model_Instagramslider extends Mage_Core_Model_Abstract{
3
+
4
+ public function getDbConfigData(){
5
+ $storeId = Mage::app()->getStore()->getId();
6
+
7
+ return Mage::getStoreConfig('instagramslider/instagramslider_settings',$storeId);
8
+
9
+ }
10
+
11
+ public function getDetailData(){
12
+
13
+
14
+ $configData = $this->getDbConfigData();
15
+
16
+ $data = '';
17
+ if($configData['instagramslider_status'] == 1){
18
+ $url = "https://api.instagram.com/v1/users/".$configData['instagramslider_userid']."/media/recent?s=150&access_token=".$configData['instagramslider_token'];
19
+
20
+ $ch = curl_init($url);
21
+
22
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
23
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
24
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
25
+ $json = curl_exec($ch);
26
+ curl_close($ch);
27
+ $result = json_decode($json);
28
+
29
+ $width='';
30
+ switch($configData['instagramslider_dimension'])
31
+ {
32
+ case '1':
33
+ $width=50;
34
+ $width_height='50x50';
35
+ break;
36
+ case '2':
37
+ $width=100;
38
+ $width_height='100x100';
39
+ break;
40
+ case '3':
41
+ $width=150;
42
+ $width_height='150x150';
43
+ break;
44
+ case '4':
45
+ $width=200;
46
+ $width_height='200x200';
47
+ break;
48
+ case '5':
49
+ $width=350;
50
+ $width_height='350x350';
51
+ break;
52
+ case '6':
53
+ $width=640;
54
+ $width_height='640x640';
55
+ break;
56
+ case '7':
57
+ $width=1080;
58
+ $width_height='1080x1080';
59
+ break;
60
+
61
+ }
62
+ foreach ($result->data as $post) {
63
+ $data['images'][] = array(
64
+ 'title' => ($post->caption)? (($post->caption->text) ? $post->caption->text :'') : '',
65
+ 'link' => $post->link,
66
+ 'image' => str_replace('s320x320','s'.$width_height,$post->images->low_resolution->url)
67
+ );
68
+ }
69
+ $data['title'] = $configData['instagramslider_title'];
70
+ $data['item'] = $configData['instagramslider_item'];
71
+ $data['width'] = $width;
72
+ $data['autoplay'] = $configData['instagramslider_play'];
73
+ $data['status'] = $configData['instagramslider_status'];
74
+ $data['navigation'] = $configData['instagramslider_navigation'];
75
+ $data['pagination'] = $configData['instagramslider_pagination'];
76
+ $data['rewindnav'] = $configData['instagramslider_rewind'];
77
+
78
+ return $data;
79
+ }
80
+
81
+ $storeId = Mage::app()->getStore()->getId();
82
+
83
+ return Mage::getStoreConfig('instagramslider/instagramslider_settings',$storeId);
84
+
85
+ }
86
+ }
app/code/local/Ost/Instagramslider/Model/Instagramslider_model.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ost_Instagramslider_Model_Instagramslider extends Mage_Core_Model_Abstract{
3
+
4
+ public function getDbConfigData(){
5
+ $storeId = Mage::app()->getStore()->getId();
6
+
7
+ return Mage::getStoreConfig('instagramslider/instagramslider_settings',$storeId);
8
+
9
+ }
10
+
11
+ public function getDetailData(){
12
+
13
+
14
+ $configData = $this->getDbConfigData();
15
+
16
+ $data = '';
17
+ if($configData['instagramslider_status'] == 1){
18
+ $url = "https://api.instagram.com/v1/users/".$configData['instagramslider_userid']."/media/recent?s=150&access_token=".$configData['instagramslider_token'];
19
+
20
+ $ch = curl_init($url);
21
+
22
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
23
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
24
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
25
+ $json = curl_exec($ch);
26
+ curl_close($ch);
27
+ $result = json_decode($json);
28
+
29
+ $width='';
30
+ switch($configData['instagramslider_dimension'])
31
+ {
32
+ case '1':
33
+ $width=50;
34
+ $width_height='50x50';
35
+ break;
36
+ case '2':
37
+ $width=100;
38
+ $width_height='100x100';
39
+ break;
40
+ case '3':
41
+ $width=150;
42
+ $width_height='150x150';
43
+ break;
44
+ case '4':
45
+ $width=200;
46
+ $width_height='200x200';
47
+ break;
48
+ case '5':
49
+ $width=350;
50
+ $width_height='350x350';
51
+ break;
52
+ case '6':
53
+ $width=640;
54
+ $width_height='640x640';
55
+ break;
56
+ case '7':
57
+ $width=1080;
58
+ $width_height='1080x1080';
59
+ break;
60
+
61
+ }
62
+ foreach ($result->data as $post) {
63
+ $data['images'][] = array(
64
+ 'title' => ($post->caption)? (($post->caption->text) ? $post->caption->text :'') : '',
65
+ 'link' => $post->link,
66
+ 'image' => str_replace('s320x320','s'.$width_height,$post->images->low_resolution->url)
67
+ );
68
+ }
69
+ $data['title'] = $configData['instagramslider_title'];
70
+ $data['item'] = $configData['instagramslider_item'];
71
+ $data['width'] = $width;
72
+ $data['autoplay'] = $configData['instagramslider_play'];
73
+ $data['status'] = $configData['instagramslider_status'];
74
+ $data['navigation'] = $configData['instagramslider_navigation'];
75
+ $data['pagination'] = $configData['instagramslider_pagination'];
76
+ $data['rewindnav'] = $configData['instagramslider_rewind'];
77
+
78
+ return $data;
79
+ }
80
+
81
+ $storeId = Mage::app()->getStore()->getId();
82
+
83
+ return Mage::getStoreConfig('instagramslider/instagramslider_settings',$storeId);
84
+
85
+ }
86
+ }
app/code/local/Ost/Instagramslider/controllers/IndexController.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ost_Instagramslider_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ protected function _getHelper()
5
+ {
6
+ return Mage::helper('instagramslider')->getConfigData();
7
+ }
8
+
9
+ public function indexAction()
10
+ {
11
+ $dataInsta = $this->_getHelper();
12
+ Mage::register('feedbackOst', $dataInsta);
13
+ $this->loadLayout();
14
+ $this->renderLayout();
15
+ }
16
+
17
+ }
18
+
19
+ ?>
app/code/local/Ost/Instagramslider/etc/config.xml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ost_Instagramslider>
5
+ <version>1.1.0</version>
6
+ </Ost_Instagramslider>
7
+ </modules>
8
+ <blocks>
9
+ <instagramslider>
10
+ <rewrite>
11
+ <instagramslider>Ost_Instagramslider_Block_Instagramslider</instagramslider>
12
+ </rewrite>
13
+ </instagramslider>
14
+ </blocks>
15
+ <frontend>
16
+ <routers>
17
+ <instagramslider>
18
+ <use>standard</use>
19
+ <args>
20
+ <module>Ost_Instagramslider</module>
21
+ <frontName>instagramslider</frontName>
22
+ </args>
23
+ </instagramslider>
24
+ </routers>
25
+ <layout>
26
+ <updates>
27
+ <instagramslider module="Ost_Instagramslider_Layout">
28
+ <file>instagramslider.xml</file>
29
+ </instagramslider>
30
+ </updates>
31
+ </layout>
32
+ </frontend>
33
+ <global>
34
+ <blocks>
35
+ <instagramslider>
36
+ <class>Ost_Instagramslider_Block</class>
37
+ </instagramslider>
38
+ </blocks>
39
+ <models>
40
+ <instagramslider>
41
+ <class>Ost_Instagramslider_Model</class>
42
+ <resourceModel>instagramslider_resource</resourceModel>
43
+ </instagramslider>
44
+ <instagramslider_resource>
45
+ <class>Ost_Instagramslider_Model_Resource</class>
46
+ </instagramslider_resource>
47
+ </models>
48
+ <resources>
49
+ <instagramslider_setup>
50
+ <setup>
51
+ <module>Ost_Instagramslider</module>
52
+ </setup>
53
+ <connection>
54
+ <use>core_setup</use>
55
+ </connection>
56
+ </instagramslider_setup>
57
+ <instagramslider_write>
58
+ <connection>
59
+ <use>core_write</use>
60
+ </connection>
61
+ </instagramslider_write>
62
+ <instagramslider_read>
63
+ <connection>
64
+ <use>core_read</use>
65
+ </connection>
66
+ </instagramslider_read>
67
+ </resources>
68
+ <helpers>
69
+ <instagramslider>
70
+ <class>Ost_Instagramslider_Helper</class>
71
+ </instagramslider>
72
+ </helpers>
73
+ </global>
74
+ <default>
75
+ <instagramslider>
76
+ <instagramslider_settings>
77
+ <instagramslider_status>1</instagramslider_status>
78
+ <instagramslider_title>Instagram Slider</instagramslider_title>
79
+ <instagramslider_play>1</instagramslider_play>
80
+ <instagramslider_play_speed>3000</instagramslider_play_speed>
81
+ <instagramslider_navigation>1</instagramslider_navigation>
82
+ <instagramslider_pagination>1</instagramslider_pagination>
83
+ <instagramslider_rewind>1</instagramslider_rewind>
84
+ <instagramslider_item>20</instagramslider_item>
85
+ <instagramslider_margin>8</instagramslider_margin>
86
+ </instagramslider_settings>
87
+ </instagramslider>
88
+ </default>
89
+ <adminhtml>
90
+ <layout>
91
+ <updates>
92
+ <instagramslider>
93
+ <file>instagramslider.xml</file>
94
+ </instagramslider>
95
+ </updates>
96
+ </layout>
97
+ <acl>
98
+ <resources>
99
+ <all>
100
+ <title>Allow Everything</title>
101
+ </all>
102
+ <admin>
103
+ <children>
104
+ <system>
105
+ <children>
106
+ <config>
107
+ <children>
108
+ <instagramslider>
109
+ <title>instagramslider - All</title>
110
+ </instagramslider>
111
+ </children>
112
+ </config>
113
+ </children>
114
+ </system>
115
+ </children>
116
+ </admin>
117
+ </resources>
118
+ </acl>
119
+ </adminhtml>
120
+ </config>
app/code/local/Ost/Instagramslider/etc/system.xml ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <instagramslider translate="label" module="instagramslider">
5
+ <label>Instagramslider</label>
6
+ <sort_order>100</sort_order>
7
+ </instagramslider>
8
+ </tabs>
9
+ <sections>
10
+ <instagramslider translate="label" module="instagramslider">
11
+ <label>Instagramslider Options</label>
12
+ <tab>instagramslider</tab>
13
+ <sort_order>1000</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ <groups>
18
+ <instagramslider_settings translate="label" module="instagramslider">
19
+ <label>Instagramslider Settings</label>
20
+ <frontend_type>text</frontend_type>
21
+ <sort_order>1000</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+
26
+ <fields>
27
+ <instagramslider_title translate="label">
28
+ <label>Title</label>
29
+ <comment>This title display at front end as module name.</comment>
30
+ <frontend_type>text</frontend_type>
31
+ <sort_order>20</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </instagramslider_title>
36
+ <instagramslider_userid translate="label">
37
+ <label>User Id</label>
38
+ <comment>User Id of Instagram</comment>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>90</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </instagramslider_userid>
45
+ <instagramslider_token translate="label">
46
+ <label>Access Token</label>
47
+ <comment>Access Token of Instagram</comment>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>90</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ </instagramslider_token>
54
+ <instagramslider_dimension translate="label">
55
+ <label>Dimension</label>
56
+ <frontend_type>select</frontend_type>
57
+ <sort_order>90</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ <source_model>instagramslider/dimension</source_model>
62
+ </instagramslider_dimension>
63
+ <instagramslider_play translate="label">
64
+ <label>Auto Play</label>
65
+ <frontend_type>select</frontend_type>
66
+ <sort_order>90</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>1</show_in_store>
70
+ <source_model>adminhtml/system_config_source_yesno</source_model>
71
+ </instagramslider_play>
72
+ <instagramslider_play_speed translate="label">
73
+ <label>Auto Play Speed</label>
74
+ <frontend_type>text</frontend_type>
75
+ <sort_order>90</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ </instagramslider_play_speed>
80
+ <instagramslider_navigation translate="label">
81
+ <label>Navigation</label>
82
+ <frontend_type>select</frontend_type>
83
+ <sort_order>90</sort_order>
84
+ <show_in_default>1</show_in_default>
85
+ <show_in_website>1</show_in_website>
86
+ <show_in_store>1</show_in_store>
87
+ <source_model>adminhtml/system_config_source_yesno</source_model>
88
+ </instagramslider_navigation>
89
+ <instagramslider_pagination translate="label">
90
+ <label>Pagination</label>
91
+ <frontend_type>select</frontend_type>
92
+ <sort_order>90</sort_order>
93
+ <show_in_default>1</show_in_default>
94
+ <show_in_website>1</show_in_website>
95
+ <show_in_store>1</show_in_store>
96
+ <source_model>adminhtml/system_config_source_yesno</source_model>
97
+ </instagramslider_pagination>
98
+ <instagramslider_rewind translate="label">
99
+ <label>Rewind Nav</label>
100
+ <frontend_type>select</frontend_type>
101
+ <sort_order>90</sort_order>
102
+ <show_in_default>1</show_in_default>
103
+ <show_in_website>1</show_in_website>
104
+ <show_in_store>1</show_in_store>
105
+ <source_model>adminhtml/system_config_source_yesno</source_model>
106
+ </instagramslider_rewind>
107
+ <instagramslider_item translate="label">
108
+ <label>No. Item to show</label>
109
+ <frontend_type>text</frontend_type>
110
+ <sort_order>90</sort_order>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>1</show_in_website>
113
+ <show_in_store>1</show_in_store>
114
+ </instagramslider_item>
115
+ <instagramslider_status translate="label">
116
+ <label>Status</label>
117
+ <comment>This needs to be enable to show slider at front end.</comment>
118
+ <frontend_type>select</frontend_type>
119
+ <sort_order>90</sort_order>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ <source_model>adminhtml/system_config_source_Enabledisable</source_model>
124
+ </instagramslider_status>
125
+ <!-- <instagramslider_animationin translate="label">
126
+ <label>Animation In</label>
127
+ <frontend_type>select</frontend_type>
128
+ <sort_order>90</sort_order>
129
+ <show_in_default>1</show_in_default>
130
+ <show_in_website>1</show_in_website>
131
+ <show_in_store>1</show_in_store>
132
+ <source_model>instagramslider/Animationout</source_model>
133
+ </instagramslider_animationin>
134
+ <instagramslider_animationout translate="label">
135
+ <label>Animation In</label>
136
+ <frontend_type>select</frontend_type>
137
+ <sort_order>90</sort_order>
138
+ <show_in_default>1</show_in_default>
139
+ <show_in_website>1</show_in_website>
140
+ <show_in_store>1</show_in_store>
141
+ <source_model>instagramslider/Animationin</source_model>
142
+ </instagramslider_animationout>-->
143
+ <instagramslider_margin translate="label">
144
+ <label>Margin</label>
145
+ <frontend_type>text</frontend_type>
146
+ <sort_order>90</sort_order>
147
+ <show_in_default>1</show_in_default>
148
+ <show_in_website>1</show_in_website>
149
+ <show_in_store>1</show_in_store>
150
+ </instagramslider_margin>
151
+ </fields>
152
+ </instagramslider_settings>
153
+ </groups>
154
+ </instagramslider>
155
+ </sections>
156
+ </config>
app/etc/modules/Ost_Instagramslider.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ost_Instagramslider>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Ost_Instagramslider>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>ost</name>
4
+ <version>1.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL">GNU</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This is responsive instagram slider.</summary>
10
+ <description>This is responsive instagram slider. This displays instagram images in a slider.</description>
11
+ <notes>Instagram slider configuration settings are available in System-&amp;gt;Configuration-&amp;gt;Instagram Slider&amp;#xD;&#xD;
12
+ &amp;#xD;&#xD;
13
+ Instagram slider status needs to be enabled in configuration settings to be visible at front end.&amp;#xD;&#xD;
14
+ &amp;#xD;&#xD;
15
+ Short code to display slider at any page is:&amp;#xD;&#xD;
16
+ &amp;#xD;&#xD;
17
+ {{block type="instagramslider/instagramslider" name="instagramslider" template="instagramslider/instagramslider.phtml"}}</notes>
18
+ <authors><author><name>Manish Mittal</name><user>OSTechnologies</user><email>manish@opensourcetechnologies.com</email></author></authors>
19
+ <date>2016-06-27</date>
20
+ <time>11:33:12</time>
21
+ <contents><target name="magelocal"><dir name="Ost"><dir name="Instagramslider"><dir name="Block"><file name="Instagramslider.php" hash="750386f493a7b94aa69963ee19526b36"/></dir><dir name="Helper"><file name="Data.php" hash="274151cd7b271ccb2ad5adec3ca67d20"/></dir><dir name="Model"><file name="Animationin.php" hash="2a72579a6a6f4b8451275656ffdde8aa"/><file name="Animationout.php" hash="9e5da3e7d4e842e5c991e67c18225007"/><file name="Dimension.php" hash="7a7794d290a6dfbc709828882e6c66d4"/><file name="Instagramslider.php" hash="55071b1f1ff13285ac1a96cd278dc085"/><file name="Instagramslider_model.php" hash="55071b1f1ff13285ac1a96cd278dc085"/></dir><dir name="controllers"><file name="IndexController.php" hash="8e5531f72d0301ad0fd1e29e8c2c6dfe"/></dir><dir name="etc"><file name="config.xml" hash="13bf6792edbb9b0cd67967461e178ac0"/><file name="system.xml" hash="531ae45d299294593a8efe47cd90469c"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ost_Instagramslider.xml" hash="58ffa91d5fcd16dc13af25f943c74650"/></dir></target></contents>
22
+ <compatible/>
23
+ <dependencies><required><php><min>5.3.0</min><max>5.6.2</max></php></required></dependencies>
24
+ </package>