Netgo_Socialfeeds - Version 1.0.1

Version Notes

Second Preview Release

Download this release

Release Info

Developer NetGo
Extension Netgo_Socialfeeds
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

Files changed (40) hide show
  1. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed.php +42 -0
  2. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit.php +82 -0
  3. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Form.php +52 -0
  4. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tab/Form.php +95 -0
  5. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tabs.php +74 -0
  6. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Grid.php +206 -0
  7. app/code/community/Netgo/Socialfeeds/Block/Socialfeed/List.php +72 -61
  8. app/code/community/Netgo/Socialfeeds/Block/Socialfeed/Socialfeeds.php +129 -118
  9. app/code/community/Netgo/Socialfeeds/Block/Socialfeed/View.php +37 -26
  10. app/code/community/Netgo/Socialfeeds/Controller/Adminhtml/Socialfeeds.php +60 -0
  11. app/code/community/Netgo/Socialfeeds/Controller/Router.php +114 -0
  12. app/code/community/Netgo/Socialfeeds/Helper/Data.php +45 -34
  13. app/code/community/Netgo/Socialfeeds/Helper/Socialfeed.php +100 -88
  14. app/code/community/Netgo/Socialfeeds/Model/Resource/Setup.php +26 -15
  15. app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed.php +180 -169
  16. app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed/Collection.php +84 -73
  17. app/code/community/Netgo/Socialfeeds/Model/Socialfeed.php +141 -130
  18. app/code/community/Netgo/Socialfeeds/controllers/Adminhtml/Socialfeeds/SocialfeedController.php +328 -0
  19. app/code/community/Netgo/Socialfeeds/controllers/SocialfeedController.php +139 -0
  20. app/code/community/Netgo/Socialfeeds/etc/adminhtml.xml +61 -57
  21. app/code/community/Netgo/Socialfeeds/etc/config.xml +132 -128
  22. app/code/community/Netgo/Socialfeeds/etc/system.xml +250 -270
  23. app/code/community/Netgo/Socialfeeds/sql/netgo_socialfeeds_setup/install-1.0.0.php +74 -0
  24. app/design/frontend/base/default/layout/netgo_socialfeeds.xml +72 -74
  25. app/design/frontend/base/default/template/netgo_socialfeeds/socialfeed/list.phtml +44 -33
  26. app/design/frontend/base/default/template/netgo_socialfeeds/socialfeed/socialfeeds.phtml +183 -172
  27. app/design/frontend/base/default/template/netgo_socialfeeds/socialfeed/view.phtml +36 -25
  28. app/etc/modules/Netgo_Socialfeeds.xml +29 -25
  29. lib/Socialfeeds/fb/base_facebook.php +1441 -1408
  30. lib/Socialfeeds/fb/facebook.php +116 -100
  31. lib/Socialfeeds/in/instagram.php +11 -11
  32. lib/Socialfeeds/pi/pinterest.php +24 -24
  33. lib/Socialfeeds/tw/twitter.php +177 -152
  34. lib/Socialfeeds/yt/youtube.php +5 -5
  35. package.xml +8 -19
  36. skin/frontend/base/default/socialfeeds/css/front-style.css +728 -708
  37. skin/frontend/base/default/socialfeeds/js/init.js +47 -57
  38. skin/frontend/base/default/socialfeeds/js/popup2.2.js +604 -559
  39. skin/frontend/base/default/socialfeeds/js/scroller/jquery.mCustomScrollbar.concat.min.js +4 -14
  40. skin/frontend/base/default/socialfeeds/js/scroller/jquery.mCustomScrollbar.css +1272 -1258
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed extends Mage_Adminhtml_Block_Widget_Grid_Container
25
+ {
26
+ /**
27
+ * constructor
28
+ *
29
+ * @access public
30
+ * @return void
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function __construct()
34
+ {
35
+ $this->_controller = 'adminhtml_socialfeed';
36
+ $this->_blockGroup = 'netgo_socialfeeds';
37
+ parent::__construct();
38
+ $this->_headerText = Mage::helper('netgo_socialfeeds')->__('Socialfeed');
39
+ $this->_updateButton('add', 'label', Mage::helper('netgo_socialfeeds')->__('Add Socialfeed'));
40
+
41
+ }
42
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin edit form
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
25
+ {
26
+ /**
27
+ * constructor
28
+ *
29
+ * @access public
30
+ * @return void
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function __construct()
34
+ {
35
+ parent::__construct();
36
+ $this->_blockGroup = 'netgo_socialfeeds';
37
+ $this->_controller = 'adminhtml_socialfeed';
38
+ $this->_updateButton(
39
+ 'save',
40
+ 'label',
41
+ Mage::helper('netgo_socialfeeds')->__('Save Socialfeed')
42
+ );
43
+ $this->_updateButton(
44
+ 'delete',
45
+ 'label',
46
+ Mage::helper('netgo_socialfeeds')->__('Delete Socialfeed')
47
+ );
48
+ $this->_addButton(
49
+ 'saveandcontinue',
50
+ array(
51
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Save And Continue Edit'),
52
+ 'onclick' => 'saveAndContinueEdit()',
53
+ 'class' => 'save',
54
+ ),
55
+ -100
56
+ );
57
+ $this->_formScripts[] = "
58
+ function saveAndContinueEdit() {
59
+ editForm.submit($('edit_form').action+'back/edit/');
60
+ }
61
+ ";
62
+ }
63
+
64
+ /**
65
+ * get the edit form header
66
+ *
67
+ * @access public
68
+ * @return string
69
+ * @author Ultimate Module Creator
70
+ */
71
+ public function getHeaderText()
72
+ {
73
+ if (Mage::registry('current_socialfeed') && Mage::registry('current_socialfeed')->getId()) {
74
+ return Mage::helper('netgo_socialfeeds')->__(
75
+ "Edit Socialfeed '%s'",
76
+ $this->escapeHtml(Mage::registry('current_socialfeed')->getSocialfeedsStatus())
77
+ );
78
+ } else {
79
+ return Mage::helper('netgo_socialfeeds')->__('Add Socialfeed');
80
+ }
81
+ }
82
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Form.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed edit form
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
25
+ {
26
+ /**
27
+ * prepare form
28
+ *
29
+ * @access protected
30
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Form
31
+ * @author Ultimate Module Creator
32
+ */
33
+ protected function _prepareForm()
34
+ {
35
+ $form = new Varien_Data_Form(
36
+ array(
37
+ 'id' => 'edit_form',
38
+ 'action' => $this->getUrl(
39
+ '*/*/save',
40
+ array(
41
+ 'id' => $this->getRequest()->getParam('id')
42
+ )
43
+ ),
44
+ 'method' => 'post',
45
+ 'enctype' => 'multipart/form-data'
46
+ )
47
+ );
48
+ $form->setUseContainer(true);
49
+ $this->setForm($form);
50
+ return parent::_prepareForm();
51
+ }
52
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tab/Form.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed edit form tab
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
25
+ {
26
+ /**
27
+ * prepare the form
28
+ *
29
+ * @access protected
30
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tab_Form
31
+ * @author Ultimate Module Creator
32
+ */
33
+ protected function _prepareForm()
34
+ {
35
+ $form = new Varien_Data_Form();
36
+ $form->setHtmlIdPrefix('socialfeed_');
37
+ $form->setFieldNameSuffix('socialfeed');
38
+ $this->setForm($form);
39
+ $fieldset = $form->addFieldset(
40
+ 'socialfeed_form',
41
+ array('legend' => Mage::helper('netgo_socialfeeds')->__('Socialfeed'))
42
+ );
43
+
44
+ $fieldset->addField(
45
+ 'socialfeeds_status',
46
+ 'text',
47
+ array(
48
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds Status'),
49
+ 'name' => 'socialfeeds_status',
50
+ 'required' => true,
51
+ 'class' => 'required-entry',
52
+
53
+ )
54
+ );
55
+ $fieldset->addField(
56
+ 'url_key',
57
+ 'text',
58
+ array(
59
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Url key'),
60
+ 'name' => 'url_key',
61
+ 'note' => Mage::helper('netgo_socialfeeds')->__('Relative to Website Base URL')
62
+ )
63
+ );
64
+ $fieldset->addField(
65
+ 'status',
66
+ 'select',
67
+ array(
68
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Status'),
69
+ 'name' => 'status',
70
+ 'values' => array(
71
+ array(
72
+ 'value' => 1,
73
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Enabled'),
74
+ ),
75
+ array(
76
+ 'value' => 0,
77
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Disabled'),
78
+ ),
79
+ ),
80
+ )
81
+ );
82
+ $formValues = Mage::registry('current_socialfeed')->getDefaultValues();
83
+ if (!is_array($formValues)) {
84
+ $formValues = array();
85
+ }
86
+ if (Mage::getSingleton('adminhtml/session')->getSocialfeedData()) {
87
+ $formValues = array_merge($formValues, Mage::getSingleton('adminhtml/session')->getSocialfeedData());
88
+ Mage::getSingleton('adminhtml/session')->setSocialfeedData(null);
89
+ } elseif (Mage::registry('current_socialfeed')) {
90
+ $formValues = array_merge($formValues, Mage::registry('current_socialfeed')->getData());
91
+ }
92
+ $form->setValues($formValues);
93
+ return parent::_prepareForm();
94
+ }
95
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tabs.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin edit tabs
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
25
+ {
26
+ /**
27
+ * Initialize Tabs
28
+ *
29
+ * @access public
30
+ * @author Ultimate Module Creator
31
+ */
32
+ public function __construct()
33
+ {
34
+ parent::__construct();
35
+ $this->setId('socialfeed_tabs');
36
+ $this->setDestElementId('edit_form');
37
+ $this->setTitle(Mage::helper('netgo_socialfeeds')->__('Socialfeed'));
38
+ }
39
+
40
+ /**
41
+ * before render html
42
+ *
43
+ * @access protected
44
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tabs
45
+ * @author Ultimate Module Creator
46
+ */
47
+ protected function _beforeToHtml()
48
+ {
49
+ $this->addTab(
50
+ 'form_socialfeed',
51
+ array(
52
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeed'),
53
+ 'title' => Mage::helper('netgo_socialfeeds')->__('Socialfeed'),
54
+ 'content' => $this->getLayout()->createBlock(
55
+ 'netgo_socialfeeds/adminhtml_socialfeed_edit_tab_form'
56
+ )
57
+ ->toHtml(),
58
+ )
59
+ );
60
+ return parent::_beforeToHtml();
61
+ }
62
+
63
+ /**
64
+ * Retrieve socialfeed entity
65
+ *
66
+ * @access public
67
+ * @return Netgo_Socialfeeds_Model_Socialfeed
68
+ * @author Ultimate Module Creator
69
+ */
70
+ public function getSocialfeed()
71
+ {
72
+ return Mage::registry('current_socialfeed');
73
+ }
74
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Grid.php ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin grid block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid extends Mage_Adminhtml_Block_Widget_Grid
25
+ {
26
+ /**
27
+ * constructor
28
+ *
29
+ * @access public
30
+ * @author Ultimate Module Creator
31
+ */
32
+ public function __construct()
33
+ {
34
+ parent::__construct();
35
+ $this->setId('socialfeedGrid');
36
+ $this->setDefaultSort('entity_id');
37
+ $this->setDefaultDir('ASC');
38
+ $this->setSaveParametersInSession(true);
39
+ $this->setUseAjax(true);
40
+ }
41
+
42
+ /**
43
+ * prepare collection
44
+ *
45
+ * @access protected
46
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
47
+ * @author Ultimate Module Creator
48
+ */
49
+ protected function _prepareCollection()
50
+ {
51
+ $collection = Mage::getModel('netgo_socialfeeds/socialfeed')
52
+ ->getCollection();
53
+
54
+ $this->setCollection($collection);
55
+ return parent::_prepareCollection();
56
+ }
57
+
58
+ /**
59
+ * prepare grid collection
60
+ *
61
+ * @access protected
62
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
63
+ * @author Ultimate Module Creator
64
+ */
65
+ protected function _prepareColumns()
66
+ {
67
+ $this->addColumn(
68
+ 'entity_id',
69
+ array(
70
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Id'),
71
+ 'index' => 'entity_id',
72
+ 'type' => 'number'
73
+ )
74
+ );
75
+ $this->addColumn(
76
+ 'socialfeeds_status',
77
+ array(
78
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds Status'),
79
+ 'align' => 'left',
80
+ 'index' => 'socialfeeds_status',
81
+ )
82
+ );
83
+
84
+ $this->addColumn(
85
+ 'status',
86
+ array(
87
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Status'),
88
+ 'index' => 'status',
89
+ 'type' => 'options',
90
+ 'options' => array(
91
+ '1' => Mage::helper('netgo_socialfeeds')->__('Enabled'),
92
+ '0' => Mage::helper('netgo_socialfeeds')->__('Disabled'),
93
+ )
94
+ )
95
+ );
96
+ $this->addColumn(
97
+ 'url_key',
98
+ array(
99
+ 'header' => Mage::helper('netgo_socialfeeds')->__('URL key'),
100
+ 'index' => 'url_key',
101
+ )
102
+ );
103
+ $this->addColumn(
104
+ 'action',
105
+ array(
106
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Action'),
107
+ 'width' => '100',
108
+ 'type' => 'action',
109
+ 'getter' => 'getId',
110
+ 'actions' => array(
111
+ array(
112
+ 'caption' => Mage::helper('netgo_socialfeeds')->__('Edit'),
113
+ 'url' => array('base'=> '*/*/edit'),
114
+ 'field' => 'id'
115
+ )
116
+ ),
117
+ 'filter' => false,
118
+ 'is_system' => true,
119
+ 'sortable' => false,
120
+ )
121
+ );
122
+ $this->addExportType('*/*/exportCsv', Mage::helper('netgo_socialfeeds')->__('CSV'));
123
+ $this->addExportType('*/*/exportExcel', Mage::helper('netgo_socialfeeds')->__('Excel'));
124
+ $this->addExportType('*/*/exportXml', Mage::helper('netgo_socialfeeds')->__('XML'));
125
+ return parent::_prepareColumns();
126
+ }
127
+
128
+ /**
129
+ * prepare mass action
130
+ *
131
+ * @access protected
132
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
133
+ * @author Ultimate Module Creator
134
+ */
135
+ protected function _prepareMassaction()
136
+ {
137
+ $this->setMassactionIdField('entity_id');
138
+ $this->getMassactionBlock()->setFormFieldName('socialfeed');
139
+ $this->getMassactionBlock()->addItem(
140
+ 'delete',
141
+ array(
142
+ 'label'=> Mage::helper('netgo_socialfeeds')->__('Delete'),
143
+ 'url' => $this->getUrl('*/*/massDelete'),
144
+ 'confirm' => Mage::helper('netgo_socialfeeds')->__('Are you sure?')
145
+ )
146
+ );
147
+ $this->getMassactionBlock()->addItem(
148
+ 'status',
149
+ array(
150
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Change status'),
151
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
152
+ 'additional' => array(
153
+ 'status' => array(
154
+ 'name' => 'status',
155
+ 'type' => 'select',
156
+ 'class' => 'required-entry',
157
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Status'),
158
+ 'values' => array(
159
+ '1' => Mage::helper('netgo_socialfeeds')->__('Enabled'),
160
+ '0' => Mage::helper('netgo_socialfeeds')->__('Disabled'),
161
+ )
162
+ )
163
+ )
164
+ )
165
+ );
166
+ return $this;
167
+ }
168
+
169
+ /**
170
+ * get the row url
171
+ *
172
+ * @access public
173
+ * @param Netgo_Socialfeeds_Model_Socialfeed
174
+ * @return string
175
+ * @author Ultimate Module Creator
176
+ */
177
+ public function getRowUrl($row)
178
+ {
179
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
180
+ }
181
+
182
+ /**
183
+ * get the grid url
184
+ *
185
+ * @access public
186
+ * @return string
187
+ * @author Ultimate Module Creator
188
+ */
189
+ public function getGridUrl()
190
+ {
191
+ return $this->getUrl('*/*/grid', array('_current'=>true));
192
+ }
193
+
194
+ /**
195
+ * after collection load
196
+ *
197
+ * @access protected
198
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
199
+ * @author Ultimate Module Creator
200
+ */
201
+ protected function _afterLoadCollection()
202
+ {
203
+ $this->getCollection()->walk('afterLoad');
204
+ parent::_afterLoadCollection();
205
+ }
206
+ }
app/code/community/Netgo/Socialfeeds/Block/Socialfeed/List.php CHANGED
@@ -1,61 +1,72 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Socialfeeds_Block_Socialfeed_List extends Mage_Core_Block_Template
14
- {
15
- /**
16
- * initialize
17
- *
18
- * @access public
19
- * @author NetGo
20
- */
21
- public function __construct()
22
- {
23
- parent::__construct();
24
- $socialfeeds = Mage::getResourceModel('netgo_socialfeeds/socialfeed_collection')
25
- ->addFieldToFilter('status', 1);
26
- $socialfeeds->setOrder('socialfeeds_status', 'asc');
27
- $this->setSocialfeeds($socialfeeds);
28
- }
29
-
30
- /**
31
- * prepare the layout
32
- *
33
- * @access protected
34
- * @return Netgo_Socialfeeds_Block_Socialfeed_List
35
- * @author NetGo
36
- */
37
- protected function _prepareLayout()
38
- {
39
- parent::_prepareLayout();
40
- $pager = $this->getLayout()->createBlock(
41
- 'page/html_pager',
42
- 'netgo_socialfeeds.socialfeed.html.pager'
43
- )
44
- ->setCollection($this->getSocialfeeds());
45
- $this->setChild('pager', $pager);
46
- $this->getSocialfeeds()->load();
47
- return $this;
48
- }
49
-
50
- /**
51
- * get the pager html
52
- *
53
- * @access public
54
- * @return string
55
- * @author NetGo
56
- */
57
- public function getPagerHtml()
58
- {
59
- return $this->getChildHtml('pager');
60
- }
61
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed list block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Socialfeed_List extends Mage_Core_Block_Template
25
+ {
26
+ /**
27
+ * initialize
28
+ *
29
+ * @access public
30
+ * @author Ultimate Module Creator
31
+ */
32
+ public function __construct()
33
+ {
34
+ parent::__construct();
35
+ $socialfeeds = Mage::getResourceModel('netgo_socialfeeds/socialfeed_collection')
36
+ ->addFieldToFilter('status', 1);
37
+ $socialfeeds->setOrder('socialfeeds_status', 'asc');
38
+ $this->setSocialfeeds($socialfeeds);
39
+ }
40
+
41
+ /**
42
+ * prepare the layout
43
+ *
44
+ * @access protected
45
+ * @return Netgo_Socialfeeds_Block_Socialfeed_List
46
+ * @author Ultimate Module Creator
47
+ */
48
+ protected function _prepareLayout()
49
+ {
50
+ parent::_prepareLayout();
51
+ $pager = $this->getLayout()->createBlock(
52
+ 'page/html_pager',
53
+ 'netgo_socialfeeds.socialfeed.html.pager'
54
+ )
55
+ ->setCollection($this->getSocialfeeds());
56
+ $this->setChild('pager', $pager);
57
+ $this->getSocialfeeds()->load();
58
+ return $this;
59
+ }
60
+
61
+ /**
62
+ * get the pager html
63
+ *
64
+ * @access public
65
+ * @return string
66
+ * @author Ultimate Module Creator
67
+ */
68
+ public function getPagerHtml()
69
+ {
70
+ return $this->getChildHtml('pager');
71
+ }
72
+ }
app/code/community/Netgo/Socialfeeds/Block/Socialfeed/Socialfeeds.php CHANGED
@@ -1,118 +1,129 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- $lib_path = Mage::getBaseDir('lib');
14
- require_once $lib_path."/Socialfeeds/fb/facebook.php";
15
- require_once $lib_path."/Socialfeeds/tw/twitter.php";
16
- require_once $lib_path."/Socialfeeds/in/instagram.php";
17
- require_once $lib_path."/Socialfeeds/pi/pinterest.php";
18
- require_once $lib_path."/Socialfeeds/yt/youtube.php";
19
-
20
- class Netgo_Socialfeeds_Block_Socialfeed_Socialfeeds extends Mage_Core_Block_Template
21
- {
22
-
23
- /**
24
- * get the url to the socialfeeds list page
25
- *
26
- * @access public
27
- * @return string
28
- * @author NetGo
29
- */
30
- public function _construct()
31
- {
32
- $_helper = Mage::helper('netgo_socialfeeds/socialfeed');
33
- if(!$_helper->getCheckMod()){
34
- return;
35
- }
36
- }
37
-
38
- /**
39
- * get the current socialfeed
40
- *
41
- * @access public
42
- * @return mixed (Netgo_Socialfeeds_Model_Socialfeed|null)
43
- * @author NetGo
44
- */
45
- public function getCurrentSocialfeed()
46
- {
47
- return Mage::registry('current_socialfeed');
48
- }
49
-
50
- /**
51
- * Set the facebook credentials
52
- */
53
- public function initFB(){
54
- $config = array();
55
- $pageid = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_page_id'));
56
- $config['appId'] = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_app_id'));
57
- $config['secret'] = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_secret_key'));
58
- $config['fileUpload'] = true;
59
- if($config['appId'] != '' && $config['secret'] != '' && $pageid != ''){
60
- return new Facebook($config);
61
- }
62
- }
63
-
64
- /**
65
- * Set the twitter credentials
66
- */
67
- public function initTW(){
68
-
69
- $config = array(
70
- 'oauth_access_token' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_access_token')),
71
- 'oauth_access_token_secret' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_access_token_secret')),
72
- 'consumer_key' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_consumer_key')),
73
- 'consumer_secret' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_consumer_secret')),
74
- );
75
- $sc_name = trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_screen_name'));
76
- $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
77
- $getfield = '?screen_name='.$sc_name;
78
- $requestMethod = 'GET';
79
- $twitter = new TwitterAPIExchange($config);
80
- $response = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();
81
- if($config['oauth_access_token'] != '' && $config['oauth_access_token_secret'] != '' && $config['consumer_key'] != '' && $config['consumer_secret'] != '' && $sc_name != ''){
82
- return $response;
83
- }
84
- }
85
-
86
- /**
87
- * Set the instagram credentials
88
- */
89
- public function initIN(){
90
-
91
- $user_id = trim(Mage::getStoreConfig('netgo_socialfeeds/ins_socialfeed/ins_user_id'));
92
- $access_token = trim(Mage::getStoreConfig('netgo_socialfeeds/ins_socialfeed/ins_access_token'));
93
- $response = fetchData("https://api.instagram.com/v1/users/".$user_id."/media/recent/?access_token=".$access_token);
94
- return $response;
95
- }
96
-
97
- /**
98
- * Set the pinterest credentials
99
- */
100
- public function initPI(){
101
-
102
- $user_name = trim(Mage::getStoreConfig('netgo_socialfeeds/pi_socialfeed/ins_user_name'));
103
- $response = getPinterest($user_name);
104
- return $response;
105
- }
106
-
107
- /**
108
- * Get the youtube video
109
- */
110
- public function initYT(){
111
- $video_url = trim(Mage::getStoreConfig('netgo_socialfeeds/yt_socialfeed/yt_url'));
112
- $response = '';
113
- if($video_url != ''){
114
- $response = getVideo($video_url);
115
- }
116
- return $response;
117
- }
118
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed view block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ $lib_path = Mage::getBaseDir('lib');
25
+ require_once $lib_path."/Socialfeeds/fb/facebook.php";
26
+ require_once $lib_path."/Socialfeeds/tw/twitter.php";
27
+ require_once $lib_path."/Socialfeeds/in/instagram.php";
28
+ require_once $lib_path."/Socialfeeds/pi/pinterest.php";
29
+ require_once $lib_path."/Socialfeeds/yt/youtube.php";
30
+
31
+ class Netgo_Socialfeeds_Block_Socialfeed_Socialfeeds extends Mage_Core_Block_Template
32
+ {
33
+
34
+ /**
35
+ * get the url to the socialfeeds list page
36
+ *
37
+ * @access public
38
+ * @return string
39
+ * @author Ultimate Module Creator
40
+ */
41
+ public function _construct()
42
+ {
43
+ $_helper = Mage::helper('netgo_socialfeeds/socialfeed');
44
+ if(!$_helper->getCheckMod()){
45
+ return;
46
+ }
47
+ }
48
+
49
+ /**
50
+ * get the current socialfeed
51
+ *
52
+ * @access public
53
+ * @return mixed (Netgo_Socialfeeds_Model_Socialfeed|null)
54
+ * @author Ultimate Module Creator
55
+ */
56
+ public function getCurrentSocialfeed()
57
+ {
58
+ return Mage::registry('current_socialfeed');
59
+ }
60
+
61
+ /**
62
+ * Set the facebook credentials
63
+ */
64
+ public function initFB(){
65
+ $config = array();
66
+ $pageid = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_page_id'));
67
+ $config['appId'] = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_app_id'));
68
+ $config['secret'] = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_secret_key'));
69
+ $config['fileUpload'] = true;
70
+ if($config['appId'] != '' && $config['secret'] != '' && $pageid != ''){
71
+ return new Facebook($config);
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Set the twitter credentials
77
+ */
78
+ public function initTW(){
79
+
80
+ $config = array(
81
+ 'oauth_access_token' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_access_token')),
82
+ 'oauth_access_token_secret' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_access_token_secret')),
83
+ 'consumer_key' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_consumer_key')),
84
+ 'consumer_secret' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_consumer_secret')),
85
+ );
86
+ $sc_name = trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_screen_name'));
87
+ $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
88
+ $getfield = '?screen_name='.$sc_name;
89
+ $requestMethod = 'GET';
90
+ $twitter = new TwitterAPIExchange($config);
91
+ $response = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();
92
+ if($config['oauth_access_token'] != '' && $config['oauth_access_token_secret'] != '' && $config['consumer_key'] != '' && $config['consumer_secret'] != '' && $sc_name != ''){
93
+ return $response;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Set the instagram credentials
99
+ */
100
+ public function initIN(){
101
+
102
+ $user_id = trim(Mage::getStoreConfig('netgo_socialfeeds/ins_socialfeed/ins_user_id'));
103
+ $access_token = trim(Mage::getStoreConfig('netgo_socialfeeds/ins_socialfeed/ins_access_token'));
104
+ $response = fetchData("https://api.instagram.com/v1/users/".$user_id."/media/recent/?access_token=".$access_token);
105
+ return $response;
106
+ }
107
+
108
+ /**
109
+ * Set the pinterest credentials
110
+ */
111
+ public function initPI(){
112
+
113
+ $user_name = trim(Mage::getStoreConfig('netgo_socialfeeds/pi_socialfeed/ins_user_name'));
114
+ $response = getPinterest($user_name);
115
+ return $response;
116
+ }
117
+
118
+ /**
119
+ * Get the youtube video
120
+ */
121
+ public function initYT(){
122
+ $video_url = trim(Mage::getStoreConfig('netgo_socialfeeds/yt_socialfeed/yt_url'));
123
+ $response = '';
124
+ if($video_url != ''){
125
+ $response = getVideo($video_url);
126
+ }
127
+ return $response;
128
+ }
129
+ }
app/code/community/Netgo/Socialfeeds/Block/Socialfeed/View.php CHANGED
@@ -1,26 +1,37 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Socialfeeds_Block_Socialfeed_View extends Mage_Core_Block_Template
14
- {
15
- /**
16
- * get the current socialfeed
17
- *
18
- * @access public
19
- * @return mixed (Netgo_Socialfeeds_Model_Socialfeed|null)
20
- * @author NetGo
21
- */
22
- public function getCurrentSocialfeed()
23
- {
24
- return Mage::registry('current_socialfeed');
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed view block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Socialfeed_View extends Mage_Core_Block_Template
25
+ {
26
+ /**
27
+ * get the current socialfeed
28
+ *
29
+ * @access public
30
+ * @return mixed (Netgo_Socialfeeds_Model_Socialfeed|null)
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function getCurrentSocialfeed()
34
+ {
35
+ return Mage::registry('current_socialfeed');
36
+ }
37
+ }
app/code/community/Netgo/Socialfeeds/Controller/Adminhtml/Socialfeeds.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * module base admin controller
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Controller_Adminhtml_Socialfeeds extends Mage_Adminhtml_Controller_Action
25
+ {
26
+ /**
27
+ * upload file and get the uploaded name
28
+ *
29
+ * @access public
30
+ * @param string $input
31
+ * @param string $destinationFolder
32
+ * @param array $data
33
+ * @return string
34
+ * @author Ultimate Module Creator
35
+ */
36
+ protected function _uploadAndGetName($input, $destinationFolder, $data)
37
+ {
38
+ try {
39
+ if (isset($data[$input]['delete'])) {
40
+ return '';
41
+ } else {
42
+ $uploader = new Varien_File_Uploader($input);
43
+ $uploader->setAllowRenameFiles(true);
44
+ $uploader->setFilesDispersion(true);
45
+ $uploader->setAllowCreateFolders(true);
46
+ $result = $uploader->save($destinationFolder);
47
+ return $result['file'];
48
+ }
49
+ } catch (Exception $e) {
50
+ if ($e->getCode() != Varien_File_Uploader::TMP_NAME_EMPTY) {
51
+ throw $e;
52
+ } else {
53
+ if (isset($data[$input]['value'])) {
54
+ return $data[$input]['value'];
55
+ }
56
+ }
57
+ }
58
+ return '';
59
+ }
60
+ }
app/code/community/Netgo/Socialfeeds/Controller/Router.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Router
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract
25
+ {
26
+ /**
27
+ * init routes
28
+ *
29
+ * @access public
30
+ * @param Varien_Event_Observer $observer
31
+ * @return Netgo_Socialfeeds_Controller_Router
32
+ * @author Ultimate Module Creator
33
+ */
34
+ public function initControllerRouters($observer)
35
+ {
36
+ $front = $observer->getEvent()->getFront();
37
+ $front->addRouter('netgo_socialfeeds', $this);
38
+ return $this;
39
+ }
40
+
41
+ /**
42
+ * Validate and match entities and modify request
43
+ *
44
+ * @access public
45
+ * @param Zend_Controller_Request_Http $request
46
+ * @return bool
47
+ * @author Ultimate Module Creator
48
+ */
49
+ public function match(Zend_Controller_Request_Http $request)
50
+ {
51
+ if (!Mage::isInstalled()) {
52
+ Mage::app()->getFrontController()->getResponse()
53
+ ->setRedirect(Mage::getUrl('install'))
54
+ ->sendResponse();
55
+ exit;
56
+ }
57
+ $urlKey = trim($request->getPathInfo(), '/');
58
+ $check = array();
59
+ $check['socialfeed'] = new Varien_Object(
60
+ array(
61
+ 'prefix' => Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_prefix'),
62
+ 'suffix' => Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_suffix'),
63
+ 'list_key' => Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_rewrite_list'),
64
+ 'list_action' => 'index',
65
+ 'model' =>'netgo_socialfeeds/socialfeed',
66
+ 'controller' => 'socialfeed',
67
+ 'action' => 'view',
68
+ 'param' => 'id',
69
+ 'check_path' => 0
70
+ )
71
+ );
72
+ foreach ($check as $key=>$settings) {
73
+ if ($settings->getListKey()) {
74
+ if ($urlKey == $settings->getListKey()) {
75
+ $request->setModuleName('netgo_social feeds')
76
+ ->setControllerName($settings->getController())
77
+ ->setActionName($settings->getListAction());
78
+ $request->setAlias(
79
+ Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
80
+ $urlKey
81
+ );
82
+ return true;
83
+ }
84
+ }
85
+ if ($settings['prefix']) {
86
+ $parts = explode('/', $urlKey);
87
+ if ($parts[0] != $settings['prefix'] || count($parts) != 2) {
88
+ continue;
89
+ }
90
+ $urlKey = $parts[1];
91
+ }
92
+ if ($settings['suffix']) {
93
+ $urlKey = substr($urlKey, 0, -strlen($settings['suffix']) - 1);
94
+ }
95
+ $model = Mage::getModel($settings->getModel());
96
+ $id = $model->checkUrlKey($urlKey, Mage::app()->getStore()->getId());
97
+ if ($id) {
98
+ if ($settings->getCheckPath() && !$model->load($id)->getStatusPath()) {
99
+ continue;
100
+ }
101
+ $request->setModuleName('netgo_social feeds')
102
+ ->setControllerName($settings->getController())
103
+ ->setActionName($settings->getAction())
104
+ ->setParam($settings->getParam(), $id);
105
+ $request->setAlias(
106
+ Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
107
+ $urlKey
108
+ );
109
+ return true;
110
+ }
111
+ }
112
+ return false;
113
+ }
114
+ }
app/code/community/Netgo/Socialfeeds/Helper/Data.php CHANGED
@@ -1,34 +1,45 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Socialfeeds_Helper_Data extends Mage_Core_Helper_Abstract
14
- {
15
- /**
16
- * convert array to options
17
- *
18
- * @access public
19
- * @param $options
20
- * @return array
21
- * @author NetGo
22
- */
23
- public function convertOptions($options)
24
- {
25
- $converted = array();
26
- foreach ($options as $option) {
27
- if (isset($option['value']) && !is_array($option['value']) &&
28
- isset($option['label']) && !is_array($option['label'])) {
29
- $converted[$option['value']] = $option['label'];
30
- }
31
- }
32
- return $converted;
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeeds default helper
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Helper_Data extends Mage_Core_Helper_Abstract
25
+ {
26
+ /**
27
+ * convert array to options
28
+ *
29
+ * @access public
30
+ * @param $options
31
+ * @return array
32
+ * @author Ultimate Module Creator
33
+ */
34
+ public function convertOptions($options)
35
+ {
36
+ $converted = array();
37
+ foreach ($options as $option) {
38
+ if (isset($option['value']) && !is_array($option['value']) &&
39
+ isset($option['label']) && !is_array($option['label'])) {
40
+ $converted[$option['value']] = $option['label'];
41
+ }
42
+ }
43
+ return $converted;
44
+ }
45
+ }
app/code/community/Netgo/Socialfeeds/Helper/Socialfeed.php CHANGED
@@ -1,88 +1,100 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
-
14
- class Netgo_Socialfeeds_Helper_Socialfeed extends Mage_Core_Helper_Abstract
15
- {
16
-
17
- /**
18
- * check if breadcrumbs can be used
19
- *
20
- * @access public
21
- * @return bool
22
- * @author NetGo
23
- */
24
- public function getCheckMod()
25
- {
26
- return Mage::getStoreConfigFlag('netgo_socialfeeds/socialfeed/mod_status');
27
- }
28
-
29
- /**
30
- * check if breadcrumbs can be used
31
- *
32
- * @access public
33
- * @return bool
34
- * @author NetGo
35
- */
36
- public function getCheckFB()
37
- {
38
- return Mage::getStoreConfigFlag('netgo_socialfeeds/fb_socialfeed/fb_status');
39
- }
40
-
41
- /**
42
- * check if breadcrumbs can be used
43
- *
44
- * @access public
45
- * @return bool
46
- * @author NetGo
47
- */
48
- public function getCheckTW()
49
- {
50
- return Mage::getStoreConfigFlag('netgo_socialfeeds/tw_socialfeed/tw_status');
51
- }
52
-
53
- /**
54
- * check if breadcrumbs can be used
55
- *
56
- * @access public
57
- * @return bool
58
- * @author NetGo
59
- */
60
- public function getCheckIN()
61
- {
62
- return Mage::getStoreConfigFlag('netgo_socialfeeds/ins_socialfeed/ins_status');
63
- }
64
-
65
- /**
66
- * check if breadcrumbs can be used
67
- *
68
- * @access public
69
- * @return bool
70
- * @author NetGo
71
- */
72
- public function getCheckPI()
73
- {
74
- return Mage::getStoreConfigFlag('netgo_socialfeeds/pi_socialfeed/pi_status');
75
- }
76
-
77
- /**
78
- * check if breadcrumbs can be used
79
- *
80
- * @access public
81
- * @return bool
82
- * @author NetGo
83
- */
84
- public function getCheckYT()
85
- {
86
- return Mage::getStoreConfigFlag('netgo_socialfeeds/yt_socialfeed/yt_status');
87
- }
88
- }
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed helper
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+
25
+
26
+ class Netgo_Socialfeeds_Helper_Socialfeed extends Mage_Core_Helper_Abstract
27
+ {
28
+
29
+ /**
30
+ * check if breadcrumbs can be used
31
+ *
32
+ * @access public
33
+ * @return bool
34
+ * @author Ultimate Module Creator
35
+ */
36
+ public function getCheckMod()
37
+ {
38
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/socialfeed/mod_status');
39
+ }
40
+
41
+ /**
42
+ * check if breadcrumbs can be used
43
+ *
44
+ * @access public
45
+ * @return bool
46
+ * @author Ultimate Module Creator
47
+ */
48
+ public function getCheckFB()
49
+ {
50
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/fb_socialfeed/fb_status');
51
+ }
52
+
53
+ /**
54
+ * check if breadcrumbs can be used
55
+ *
56
+ * @access public
57
+ * @return bool
58
+ * @author Ultimate Module Creator
59
+ */
60
+ public function getCheckTW()
61
+ {
62
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/tw_socialfeed/tw_status');
63
+ }
64
+
65
+ /**
66
+ * check if breadcrumbs can be used
67
+ *
68
+ * @access public
69
+ * @return bool
70
+ * @author Ultimate Module Creator
71
+ */
72
+ public function getCheckIN()
73
+ {
74
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/ins_socialfeed/ins_status');
75
+ }
76
+
77
+ /**
78
+ * check if breadcrumbs can be used
79
+ *
80
+ * @access public
81
+ * @return bool
82
+ * @author Ultimate Module Creator
83
+ */
84
+ public function getCheckPI()
85
+ {
86
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/pi_socialfeed/pi_status');
87
+ }
88
+
89
+ /**
90
+ * check if breadcrumbs can be used
91
+ *
92
+ * @access public
93
+ * @return bool
94
+ * @author Ultimate Module Creator
95
+ */
96
+ public function getCheckYT()
97
+ {
98
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/yt_socialfeed/yt_status');
99
+ }
100
+ }
app/code/community/Netgo/Socialfeeds/Model/Resource/Setup.php CHANGED
@@ -1,15 +1,26 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Socialfeeds_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
14
- {
15
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeeds setup
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
25
+ {
26
+ }
app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed.php CHANGED
@@ -1,169 +1,180 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Socialfeeds_Model_Resource_Socialfeed extends Mage_Core_Model_Resource_Db_Abstract
14
- {
15
-
16
- /**
17
- * constructor
18
- *
19
- * @access public
20
- * @author NetGo
21
- */
22
- public function _construct()
23
- {
24
- $this->_init('netgo_socialfeeds/socialfeed', 'entity_id');
25
- }
26
-
27
- /**
28
- * check url key
29
- *
30
- * @access public
31
- * @param string $urlKey
32
- * @param int $storeId
33
- * @param bool $active
34
- * @return mixed
35
- * @author NetGo
36
- */
37
- public function checkUrlKey($urlKey, $storeId, $active = true)
38
- {
39
- $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID, $storeId);
40
- $select = $this->_initCheckUrlKeySelect($urlKey, $stores);
41
- if ($active) {
42
- $select->where('e.status = ?', $active);
43
- }
44
- $select->reset(Zend_Db_Select::COLUMNS)
45
- ->columns('e.entity_id')
46
- ->limit(1);
47
-
48
- return $this->_getReadAdapter()->fetchOne($select);
49
- }
50
-
51
- /**
52
- * Check for unique URL key
53
- *
54
- * @access public
55
- * @param Mage_Core_Model_Abstract $object
56
- * @return bool
57
- * @author NetGo
58
- */
59
- public function getIsUniqueUrlKey(Mage_Core_Model_Abstract $object)
60
- {
61
- if (Mage::app()->isSingleStoreMode() || !$object->hasStores()) {
62
- $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID);
63
- } else {
64
- $stores = (array)$object->getData('stores');
65
- }
66
- $select = $this->_initCheckUrlKeySelect($object->getData('url_key'), $stores);
67
- if ($object->getId()) {
68
- $select->where('e.entity_id <> ?', $object->getId());
69
- }
70
- if ($this->_getWriteAdapter()->fetchRow($select)) {
71
- return false;
72
- }
73
- return true;
74
- }
75
-
76
- /**
77
- * Check if the URL key is numeric
78
- *
79
- * @access public
80
- * @param Mage_Core_Model_Abstract $object
81
- * @return bool
82
- * @author NetGo
83
- */
84
- protected function isNumericUrlKey(Mage_Core_Model_Abstract $object)
85
- {
86
- return preg_match('/^[0-9]+$/', $object->getData('url_key'));
87
- }
88
-
89
- /**
90
- * Check if the URL key is valid
91
- *
92
- * @access public
93
- * @param Mage_Core_Model_Abstract $object
94
- * @return bool
95
- * @author NetGo
96
- */
97
- protected function isValidUrlKey(Mage_Core_Model_Abstract $object)
98
- {
99
- return preg_match('/^[a-z0-9][a-z0-9_\/-]+(\.[a-z0-9_-]+)?$/', $object->getData('url_key'));
100
- }
101
-
102
- /**
103
- * format string as url key
104
- *
105
- * @access public
106
- * @param string $str
107
- * @return string
108
- * @author NetGo
109
- */
110
- public function formatUrlKey($str)
111
- {
112
- $urlKey = preg_replace('#[^0-9a-z]+#i', '-', Mage::helper('catalog/product_url')->format($str));
113
- $urlKey = strtolower($urlKey);
114
- $urlKey = trim($urlKey, '-');
115
- return $urlKey;
116
- }
117
-
118
- /**
119
- * init the check select
120
- *
121
- * @access protected
122
- * @param string $urlKey
123
- * @param array $store
124
- * @return Zend_Db_Select
125
- * @author NetGo
126
- */
127
- protected function _initCheckUrlKeySelect($urlKey, $store)
128
- {
129
- $select = $this->_getReadAdapter()->select()
130
- ->from(array('e' => $this->getMainTable()))
131
- ->where('e.url_key = ?', $urlKey);
132
- return $select;
133
- }
134
- /**
135
- * validate before saving
136
- *
137
- * @access protected
138
- * @param $object
139
- * @return Netgo_Socialfeeds_Model_Resource_Socialfeed
140
- * @author NetGo
141
- */
142
- protected function _beforeSave(Mage_Core_Model_Abstract $object)
143
- {
144
- $urlKey = $object->getData('url_key');
145
- if ($urlKey == '') {
146
- $urlKey = $object->getSocialfeedsStatus();
147
- }
148
- $urlKey = $this->formatUrlKey($urlKey);
149
- $validKey = false;
150
- while (!$validKey) {
151
- $entityId = $this->checkUrlKey($urlKey, $object->getStoreId(), false);
152
- if ($entityId == $object->getId() || empty($entityId)) {
153
- $validKey = true;
154
- } else {
155
- $parts = explode('-', $urlKey);
156
- $last = $parts[count($parts) - 1];
157
- if (!is_numeric($last)) {
158
- $urlKey = $urlKey.'-1';
159
- } else {
160
- $suffix = '-'.($last + 1);
161
- unset($parts[count($parts) - 1]);
162
- $urlKey = implode('-', $parts).$suffix;
163
- }
164
- }
165
- }
166
- $object->setData('url_key', $urlKey);
167
- return parent::_beforeSave($object);
168
- }
169
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed resource model
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Resource_Socialfeed extends Mage_Core_Model_Resource_Db_Abstract
25
+ {
26
+
27
+ /**
28
+ * constructor
29
+ *
30
+ * @access public
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function _construct()
34
+ {
35
+ $this->_init('netgo_socialfeeds/socialfeed', 'entity_id');
36
+ }
37
+
38
+ /**
39
+ * check url key
40
+ *
41
+ * @access public
42
+ * @param string $urlKey
43
+ * @param int $storeId
44
+ * @param bool $active
45
+ * @return mixed
46
+ * @author Ultimate Module Creator
47
+ */
48
+ public function checkUrlKey($urlKey, $storeId, $active = true)
49
+ {
50
+ $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID, $storeId);
51
+ $select = $this->_initCheckUrlKeySelect($urlKey, $stores);
52
+ if ($active) {
53
+ $select->where('e.status = ?', $active);
54
+ }
55
+ $select->reset(Zend_Db_Select::COLUMNS)
56
+ ->columns('e.entity_id')
57
+ ->limit(1);
58
+
59
+ return $this->_getReadAdapter()->fetchOne($select);
60
+ }
61
+
62
+ /**
63
+ * Check for unique URL key
64
+ *
65
+ * @access public
66
+ * @param Mage_Core_Model_Abstract $object
67
+ * @return bool
68
+ * @author Ultimate Module Creator
69
+ */
70
+ public function getIsUniqueUrlKey(Mage_Core_Model_Abstract $object)
71
+ {
72
+ if (Mage::app()->isSingleStoreMode() || !$object->hasStores()) {
73
+ $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID);
74
+ } else {
75
+ $stores = (array)$object->getData('stores');
76
+ }
77
+ $select = $this->_initCheckUrlKeySelect($object->getData('url_key'), $stores);
78
+ if ($object->getId()) {
79
+ $select->where('e.entity_id <> ?', $object->getId());
80
+ }
81
+ if ($this->_getWriteAdapter()->fetchRow($select)) {
82
+ return false;
83
+ }
84
+ return true;
85
+ }
86
+
87
+ /**
88
+ * Check if the URL key is numeric
89
+ *
90
+ * @access public
91
+ * @param Mage_Core_Model_Abstract $object
92
+ * @return bool
93
+ * @author Ultimate Module Creator
94
+ */
95
+ protected function isNumericUrlKey(Mage_Core_Model_Abstract $object)
96
+ {
97
+ return preg_match('/^[0-9]+$/', $object->getData('url_key'));
98
+ }
99
+
100
+ /**
101
+ * Check if the URL key is valid
102
+ *
103
+ * @access public
104
+ * @param Mage_Core_Model_Abstract $object
105
+ * @return bool
106
+ * @author Ultimate Module Creator
107
+ */
108
+ protected function isValidUrlKey(Mage_Core_Model_Abstract $object)
109
+ {
110
+ return preg_match('/^[a-z0-9][a-z0-9_\/-]+(\.[a-z0-9_-]+)?$/', $object->getData('url_key'));
111
+ }
112
+
113
+ /**
114
+ * format string as url key
115
+ *
116
+ * @access public
117
+ * @param string $str
118
+ * @return string
119
+ * @author Ultimate Module Creator
120
+ */
121
+ public function formatUrlKey($str)
122
+ {
123
+ $urlKey = preg_replace('#[^0-9a-z]+#i', '-', Mage::helper('catalog/product_url')->format($str));
124
+ $urlKey = strtolower($urlKey);
125
+ $urlKey = trim($urlKey, '-');
126
+ return $urlKey;
127
+ }
128
+
129
+ /**
130
+ * init the check select
131
+ *
132
+ * @access protected
133
+ * @param string $urlKey
134
+ * @param array $store
135
+ * @return Zend_Db_Select
136
+ * @author Ultimate Module Creator
137
+ */
138
+ protected function _initCheckUrlKeySelect($urlKey, $store)
139
+ {
140
+ $select = $this->_getReadAdapter()->select()
141
+ ->from(array('e' => $this->getMainTable()))
142
+ ->where('e.url_key = ?', $urlKey);
143
+ return $select;
144
+ }
145
+ /**
146
+ * validate before saving
147
+ *
148
+ * @access protected
149
+ * @param $object
150
+ * @return Netgo_Socialfeeds_Model_Resource_Socialfeed
151
+ * @author Ultimate Module Creator
152
+ */
153
+ protected function _beforeSave(Mage_Core_Model_Abstract $object)
154
+ {
155
+ $urlKey = $object->getData('url_key');
156
+ if ($urlKey == '') {
157
+ $urlKey = $object->getSocialfeedsStatus();
158
+ }
159
+ $urlKey = $this->formatUrlKey($urlKey);
160
+ $validKey = false;
161
+ while (!$validKey) {
162
+ $entityId = $this->checkUrlKey($urlKey, $object->getStoreId(), false);
163
+ if ($entityId == $object->getId() || empty($entityId)) {
164
+ $validKey = true;
165
+ } else {
166
+ $parts = explode('-', $urlKey);
167
+ $last = $parts[count($parts) - 1];
168
+ if (!is_numeric($last)) {
169
+ $urlKey = $urlKey.'-1';
170
+ } else {
171
+ $suffix = '-'.($last + 1);
172
+ unset($parts[count($parts) - 1]);
173
+ $urlKey = implode('-', $parts).$suffix;
174
+ }
175
+ }
176
+ }
177
+ $object->setData('url_key', $urlKey);
178
+ return parent::_beforeSave($object);
179
+ }
180
+ }
app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed/Collection.php CHANGED
@@ -1,73 +1,84 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Socialfeeds_Model_Resource_Socialfeed_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
14
- {
15
- protected $_joinedFields = array();
16
-
17
- /**
18
- * constructor
19
- *
20
- * @access public
21
- * @return void
22
- * @author NetGo
23
- */
24
- protected function _construct()
25
- {
26
- parent::_construct();
27
- $this->_init('netgo_socialfeeds/socialfeed');
28
- }
29
-
30
- /**
31
- * get socialfeeds as array
32
- *
33
- * @access protected
34
- * @param string $valueField
35
- * @param string $labelField
36
- * @param array $additional
37
- * @return array
38
- * @author NetGo
39
- */
40
- protected function _toOptionArray($valueField='entity_id', $labelField='socialfeeds_status', $additional=array())
41
- {
42
- return parent::_toOptionArray($valueField, $labelField, $additional);
43
- }
44
-
45
- /**
46
- * get options hash
47
- *
48
- * @access protected
49
- * @param string $valueField
50
- * @param string $labelField
51
- * @return array
52
- * @author NetGo
53
- */
54
- protected function _toOptionHash($valueField='entity_id', $labelField='socialfeeds_status')
55
- {
56
- return parent::_toOptionHash($valueField, $labelField);
57
- }
58
-
59
- /**
60
- * Get SQL for get record count.
61
- * Extra GROUP BY strip added.
62
- *
63
- * @access public
64
- * @return Varien_Db_Select
65
- * @author NetGo
66
- */
67
- public function getSelectCountSql()
68
- {
69
- $countSelect = parent::getSelectCountSql();
70
- $countSelect->reset(Zend_Db_Select::GROUP);
71
- return $countSelect;
72
- }
73
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed collection resource model
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Resource_Socialfeed_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
25
+ {
26
+ protected $_joinedFields = array();
27
+
28
+ /**
29
+ * constructor
30
+ *
31
+ * @access public
32
+ * @return void
33
+ * @author Ultimate Module Creator
34
+ */
35
+ protected function _construct()
36
+ {
37
+ parent::_construct();
38
+ $this->_init('netgo_socialfeeds/socialfeed');
39
+ }
40
+
41
+ /**
42
+ * get socialfeeds as array
43
+ *
44
+ * @access protected
45
+ * @param string $valueField
46
+ * @param string $labelField
47
+ * @param array $additional
48
+ * @return array
49
+ * @author Ultimate Module Creator
50
+ */
51
+ protected function _toOptionArray($valueField='entity_id', $labelField='socialfeeds_status', $additional=array())
52
+ {
53
+ return parent::_toOptionArray($valueField, $labelField, $additional);
54
+ }
55
+
56
+ /**
57
+ * get options hash
58
+ *
59
+ * @access protected
60
+ * @param string $valueField
61
+ * @param string $labelField
62
+ * @return array
63
+ * @author Ultimate Module Creator
64
+ */
65
+ protected function _toOptionHash($valueField='entity_id', $labelField='socialfeeds_status')
66
+ {
67
+ return parent::_toOptionHash($valueField, $labelField);
68
+ }
69
+
70
+ /**
71
+ * Get SQL for get record count.
72
+ * Extra GROUP BY strip added.
73
+ *
74
+ * @access public
75
+ * @return Varien_Db_Select
76
+ * @author Ultimate Module Creator
77
+ */
78
+ public function getSelectCountSql()
79
+ {
80
+ $countSelect = parent::getSelectCountSql();
81
+ $countSelect->reset(Zend_Db_Select::GROUP);
82
+ return $countSelect;
83
+ }
84
+ }
app/code/community/Netgo/Socialfeeds/Model/Socialfeed.php CHANGED
@@ -1,130 +1,141 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Socialfeeds_Model_Socialfeed extends Mage_Core_Model_Abstract
14
- {
15
- /**
16
- * Entity code.
17
- * Can be used as part of method name for entity processing
18
- */
19
- const ENTITY = 'netgo_socialfeeds_socialfeed';
20
- const CACHE_TAG = 'netgo_socialfeeds_socialfeed';
21
-
22
- /**
23
- * Prefix of model events names
24
- *
25
- * @var string
26
- */
27
- protected $_eventPrefix = 'netgo_socialfeeds_socialfeed';
28
-
29
- /**
30
- * Parameter name in event
31
- *
32
- * @var string
33
- */
34
- protected $_eventObject = 'socialfeed';
35
-
36
- /**
37
- * constructor
38
- *
39
- * @access public
40
- * @return void
41
- * @author NetGo
42
- */
43
- public function _construct()
44
- {
45
- parent::_construct();
46
- $this->_init('netgo_socialfeeds/socialfeed');
47
- }
48
-
49
- /**
50
- * before save socialfeed
51
- *
52
- * @access protected
53
- * @return Netgo_Socialfeeds_Model_Socialfeed
54
- * @author NetGo
55
- */
56
- protected function _beforeSave()
57
- {
58
- parent::_beforeSave();
59
- $now = Mage::getSingleton('core/date')->gmtDate();
60
- if ($this->isObjectNew()) {
61
- $this->setCreatedAt($now);
62
- }
63
- $this->setUpdatedAt($now);
64
- return $this;
65
- }
66
-
67
- /**
68
- * get the url to the socialfeed details page
69
- *
70
- * @access public
71
- * @return string
72
- * @author NetGo
73
- */
74
- public function getSocialfeedUrl()
75
- {
76
- if ($this->getUrlKey()) {
77
- $urlKey = '';
78
- if ($prefix = Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_prefix')) {
79
- $urlKey .= $prefix.'/';
80
- }
81
- $urlKey .= $this->getUrlKey();
82
- if ($suffix = Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_suffix')) {
83
- $urlKey .= '.'.$suffix;
84
- }
85
- return Mage::getUrl('', array('_direct'=>$urlKey));
86
- }
87
- return Mage::getUrl('netgo_socialfeeds/socialfeed/view', array('id'=>$this->getId()));
88
- }
89
-
90
- /**
91
- * check URL key
92
- *
93
- * @access public
94
- * @param string $urlKey
95
- * @param bool $active
96
- * @return mixed
97
- * @author NetGo
98
- */
99
- public function checkUrlKey($urlKey, $active = true)
100
- {
101
- return $this->_getResource()->checkUrlKey($urlKey, $active);
102
- }
103
-
104
- /**
105
- * save socialfeed relation
106
- *
107
- * @access public
108
- * @return Netgo_Socialfeeds_Model_Socialfeed
109
- * @author NetGo
110
- */
111
- protected function _afterSave()
112
- {
113
- return parent::_afterSave();
114
- }
115
-
116
- /**
117
- * get default values
118
- *
119
- * @access public
120
- * @return array
121
- * @author NetGo
122
- */
123
- public function getDefaultValues()
124
- {
125
- $values = array();
126
- $values['status'] = 1;
127
- return $values;
128
- }
129
-
130
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed model
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Socialfeed extends Mage_Core_Model_Abstract
25
+ {
26
+ /**
27
+ * Entity code.
28
+ * Can be used as part of method name for entity processing
29
+ */
30
+ const ENTITY = 'netgo_socialfeeds_socialfeed';
31
+ const CACHE_TAG = 'netgo_socialfeeds_socialfeed';
32
+
33
+ /**
34
+ * Prefix of model events names
35
+ *
36
+ * @var string
37
+ */
38
+ protected $_eventPrefix = 'netgo_socialfeeds_socialfeed';
39
+
40
+ /**
41
+ * Parameter name in event
42
+ *
43
+ * @var string
44
+ */
45
+ protected $_eventObject = 'socialfeed';
46
+
47
+ /**
48
+ * constructor
49
+ *
50
+ * @access public
51
+ * @return void
52
+ * @author Ultimate Module Creator
53
+ */
54
+ public function _construct()
55
+ {
56
+ parent::_construct();
57
+ $this->_init('netgo_socialfeeds/socialfeed');
58
+ }
59
+
60
+ /**
61
+ * before save socialfeed
62
+ *
63
+ * @access protected
64
+ * @return Netgo_Socialfeeds_Model_Socialfeed
65
+ * @author Ultimate Module Creator
66
+ */
67
+ protected function _beforeSave()
68
+ {
69
+ parent::_beforeSave();
70
+ $now = Mage::getSingleton('core/date')->gmtDate();
71
+ if ($this->isObjectNew()) {
72
+ $this->setCreatedAt($now);
73
+ }
74
+ $this->setUpdatedAt($now);
75
+ return $this;
76
+ }
77
+
78
+ /**
79
+ * get the url to the socialfeed details page
80
+ *
81
+ * @access public
82
+ * @return string
83
+ * @author Ultimate Module Creator
84
+ */
85
+ public function getSocialfeedUrl()
86
+ {
87
+ if ($this->getUrlKey()) {
88
+ $urlKey = '';
89
+ if ($prefix = Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_prefix')) {
90
+ $urlKey .= $prefix.'/';
91
+ }
92
+ $urlKey .= $this->getUrlKey();
93
+ if ($suffix = Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_suffix')) {
94
+ $urlKey .= '.'.$suffix;
95
+ }
96
+ return Mage::getUrl('', array('_direct'=>$urlKey));
97
+ }
98
+ return Mage::getUrl('netgo_socialfeeds/socialfeed/view', array('id'=>$this->getId()));
99
+ }
100
+
101
+ /**
102
+ * check URL key
103
+ *
104
+ * @access public
105
+ * @param string $urlKey
106
+ * @param bool $active
107
+ * @return mixed
108
+ * @author Ultimate Module Creator
109
+ */
110
+ public function checkUrlKey($urlKey, $active = true)
111
+ {
112
+ return $this->_getResource()->checkUrlKey($urlKey, $active);
113
+ }
114
+
115
+ /**
116
+ * save socialfeed relation
117
+ *
118
+ * @access public
119
+ * @return Netgo_Socialfeeds_Model_Socialfeed
120
+ * @author Ultimate Module Creator
121
+ */
122
+ protected function _afterSave()
123
+ {
124
+ return parent::_afterSave();
125
+ }
126
+
127
+ /**
128
+ * get default values
129
+ *
130
+ * @access public
131
+ * @return array
132
+ * @author Ultimate Module Creator
133
+ */
134
+ public function getDefaultValues()
135
+ {
136
+ $values = array();
137
+ $values['status'] = 1;
138
+ return $values;
139
+ }
140
+
141
+ }
app/code/community/Netgo/Socialfeeds/controllers/Adminhtml/Socialfeeds/SocialfeedController.php ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin controller
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Adminhtml_Socialfeeds_SocialfeedController extends Netgo_Socialfeeds_Controller_Adminhtml_Socialfeeds
25
+ {
26
+ /**
27
+ * init the socialfeed
28
+ *
29
+ * @access protected
30
+ * @return Netgo_Socialfeeds_Model_Socialfeed
31
+ */
32
+ protected function _initSocialfeed()
33
+ {
34
+ $socialfeedId = (int) $this->getRequest()->getParam('id');
35
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed');
36
+ if ($socialfeedId) {
37
+ $socialfeed->load($socialfeedId);
38
+ }
39
+ Mage::register('current_socialfeed', $socialfeed);
40
+ return $socialfeed;
41
+ }
42
+
43
+ /**
44
+ * default action
45
+ *
46
+ * @access public
47
+ * @return void
48
+ * @author Ultimate Module Creator
49
+ */
50
+ public function indexAction()
51
+ {
52
+ $this->loadLayout();
53
+ $this->_title(Mage::helper('netgo_socialfeeds')->__('Social Feeds'))
54
+ ->_title(Mage::helper('netgo_socialfeeds')->__('Socialfeeds'));
55
+ $this->renderLayout();
56
+ }
57
+
58
+ /**
59
+ * grid action
60
+ *
61
+ * @access public
62
+ * @return void
63
+ * @author Ultimate Module Creator
64
+ */
65
+ public function gridAction()
66
+ {
67
+ $this->loadLayout()->renderLayout();
68
+ }
69
+
70
+ /**
71
+ * edit socialfeed - action
72
+ *
73
+ * @access public
74
+ * @return void
75
+ * @author Ultimate Module Creator
76
+ */
77
+ public function editAction()
78
+ {
79
+ $socialfeedId = $this->getRequest()->getParam('id');
80
+ $socialfeed = $this->_initSocialfeed();
81
+ if ($socialfeedId && !$socialfeed->getId()) {
82
+ $this->_getSession()->addError(
83
+ Mage::helper('netgo_socialfeeds')->__('This socialfeed no longer exists.')
84
+ );
85
+ $this->_redirect('*/*/');
86
+ return;
87
+ }
88
+ $data = Mage::getSingleton('adminhtml/session')->getSocialfeedData(true);
89
+ if (!empty($data)) {
90
+ $socialfeed->setData($data);
91
+ }
92
+ Mage::register('socialfeed_data', $socialfeed);
93
+ $this->loadLayout();
94
+ $this->_title(Mage::helper('netgo_socialfeeds')->__('Social Feeds'))
95
+ ->_title(Mage::helper('netgo_socialfeeds')->__('Socialfeeds'));
96
+ if ($socialfeed->getId()) {
97
+ $this->_title($socialfeed->getSocialfeedsStatus());
98
+ } else {
99
+ $this->_title(Mage::helper('netgo_socialfeeds')->__('Add socialfeed'));
100
+ }
101
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
102
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
103
+ }
104
+ $this->renderLayout();
105
+ }
106
+
107
+ /**
108
+ * new socialfeed action
109
+ *
110
+ * @access public
111
+ * @return void
112
+ * @author Ultimate Module Creator
113
+ */
114
+ public function newAction()
115
+ {
116
+ $this->_forward('edit');
117
+ }
118
+
119
+ /**
120
+ * save socialfeed - action
121
+ *
122
+ * @access public
123
+ * @return void
124
+ * @author Ultimate Module Creator
125
+ */
126
+ public function saveAction()
127
+ {
128
+ if ($data = $this->getRequest()->getPost('socialfeed')) {
129
+ try {
130
+ $socialfeed = $this->_initSocialfeed();
131
+ $socialfeed->addData($data);
132
+ $socialfeed->save();
133
+ Mage::getSingleton('adminhtml/session')->addSuccess(
134
+ Mage::helper('netgo_socialfeeds')->__('Socialfeed was successfully saved')
135
+ );
136
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
137
+ if ($this->getRequest()->getParam('back')) {
138
+ $this->_redirect('*/*/edit', array('id' => $socialfeed->getId()));
139
+ return;
140
+ }
141
+ $this->_redirect('*/*/');
142
+ return;
143
+ } catch (Mage_Core_Exception $e) {
144
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
145
+ Mage::getSingleton('adminhtml/session')->setSocialfeedData($data);
146
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
147
+ return;
148
+ } catch (Exception $e) {
149
+ Mage::logException($e);
150
+ Mage::getSingleton('adminhtml/session')->addError(
151
+ Mage::helper('netgo_socialfeeds')->__('There was a problem saving the socialfeed.')
152
+ );
153
+ Mage::getSingleton('adminhtml/session')->setSocialfeedData($data);
154
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
155
+ return;
156
+ }
157
+ }
158
+ Mage::getSingleton('adminhtml/session')->addError(
159
+ Mage::helper('netgo_socialfeeds')->__('Unable to find socialfeed to save.')
160
+ );
161
+ $this->_redirect('*/*/');
162
+ }
163
+
164
+ /**
165
+ * delete socialfeed - action
166
+ *
167
+ * @access public
168
+ * @return void
169
+ * @author Ultimate Module Creator
170
+ */
171
+ public function deleteAction()
172
+ {
173
+ if ( $this->getRequest()->getParam('id') > 0) {
174
+ try {
175
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed');
176
+ $socialfeed->setId($this->getRequest()->getParam('id'))->delete();
177
+ Mage::getSingleton('adminhtml/session')->addSuccess(
178
+ Mage::helper('netgo_socialfeeds')->__('Socialfeed was successfully deleted.')
179
+ );
180
+ $this->_redirect('*/*/');
181
+ return;
182
+ } catch (Mage_Core_Exception $e) {
183
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
184
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
185
+ } catch (Exception $e) {
186
+ Mage::getSingleton('adminhtml/session')->addError(
187
+ Mage::helper('netgo_socialfeeds')->__('There was an error deleting socialfeed.')
188
+ );
189
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
190
+ Mage::logException($e);
191
+ return;
192
+ }
193
+ }
194
+ Mage::getSingleton('adminhtml/session')->addError(
195
+ Mage::helper('netgo_socialfeeds')->__('Could not find socialfeed to delete.')
196
+ );
197
+ $this->_redirect('*/*/');
198
+ }
199
+
200
+ /**
201
+ * mass delete socialfeed - action
202
+ *
203
+ * @access public
204
+ * @return void
205
+ * @author Ultimate Module Creator
206
+ */
207
+ public function massDeleteAction()
208
+ {
209
+ $socialfeedIds = $this->getRequest()->getParam('socialfeed');
210
+ if (!is_array($socialfeedIds)) {
211
+ Mage::getSingleton('adminhtml/session')->addError(
212
+ Mage::helper('netgo_socialfeeds')->__('Please select socialfeeds to delete.')
213
+ );
214
+ } else {
215
+ try {
216
+ foreach ($socialfeedIds as $socialfeedId) {
217
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed');
218
+ $socialfeed->setId($socialfeedId)->delete();
219
+ }
220
+ Mage::getSingleton('adminhtml/session')->addSuccess(
221
+ Mage::helper('netgo_socialfeeds')->__('Total of %d socialfeeds were successfully deleted.', count($socialfeedIds))
222
+ );
223
+ } catch (Mage_Core_Exception $e) {
224
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
225
+ } catch (Exception $e) {
226
+ Mage::getSingleton('adminhtml/session')->addError(
227
+ Mage::helper('netgo_socialfeeds')->__('There was an error deleting socialfeeds.')
228
+ );
229
+ Mage::logException($e);
230
+ }
231
+ }
232
+ $this->_redirect('*/*/index');
233
+ }
234
+
235
+ /**
236
+ * mass status change - action
237
+ *
238
+ * @access public
239
+ * @return void
240
+ * @author Ultimate Module Creator
241
+ */
242
+ public function massStatusAction()
243
+ {
244
+ $socialfeedIds = $this->getRequest()->getParam('socialfeed');
245
+ if (!is_array($socialfeedIds)) {
246
+ Mage::getSingleton('adminhtml/session')->addError(
247
+ Mage::helper('netgo_socialfeeds')->__('Please select socialfeeds.')
248
+ );
249
+ } else {
250
+ try {
251
+ foreach ($socialfeedIds as $socialfeedId) {
252
+ $socialfeed = Mage::getSingleton('netgo_socialfeeds/socialfeed')->load($socialfeedId)
253
+ ->setStatus($this->getRequest()->getParam('status'))
254
+ ->setIsMassupdate(true)
255
+ ->save();
256
+ }
257
+ $this->_getSession()->addSuccess(
258
+ $this->__('Total of %d socialfeeds were successfully updated.', count($socialfeedIds))
259
+ );
260
+ } catch (Mage_Core_Exception $e) {
261
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
262
+ } catch (Exception $e) {
263
+ Mage::getSingleton('adminhtml/session')->addError(
264
+ Mage::helper('netgo_socialfeeds')->__('There was an error updating socialfeeds.')
265
+ );
266
+ Mage::logException($e);
267
+ }
268
+ }
269
+ $this->_redirect('*/*/index');
270
+ }
271
+
272
+ /**
273
+ * export as csv - action
274
+ *
275
+ * @access public
276
+ * @return void
277
+ * @author Ultimate Module Creator
278
+ */
279
+ public function exportCsvAction()
280
+ {
281
+ $fileName = 'socialfeed.csv';
282
+ $content = $this->getLayout()->createBlock('netgo_socialfeeds/adminhtml_socialfeed_grid')
283
+ ->getCsv();
284
+ $this->_prepareDownloadResponse($fileName, $content);
285
+ }
286
+
287
+ /**
288
+ * export as MsExcel - action
289
+ *
290
+ * @access public
291
+ * @return void
292
+ * @author Ultimate Module Creator
293
+ */
294
+ public function exportExcelAction()
295
+ {
296
+ $fileName = 'socialfeed.xls';
297
+ $content = $this->getLayout()->createBlock('netgo_socialfeeds/adminhtml_socialfeed_grid')
298
+ ->getExcelFile();
299
+ $this->_prepareDownloadResponse($fileName, $content);
300
+ }
301
+
302
+ /**
303
+ * export as xml - action
304
+ *
305
+ * @access public
306
+ * @return void
307
+ * @author Ultimate Module Creator
308
+ */
309
+ public function exportXmlAction()
310
+ {
311
+ $fileName = 'socialfeed.xml';
312
+ $content = $this->getLayout()->createBlock('netgo_socialfeeds/adminhtml_socialfeed_grid')
313
+ ->getXml();
314
+ $this->_prepareDownloadResponse($fileName, $content);
315
+ }
316
+
317
+ /**
318
+ * Check if admin has permissions to visit related pages
319
+ *
320
+ * @access protected
321
+ * @return boolean
322
+ * @author Ultimate Module Creator
323
+ */
324
+ protected function _isAllowed()
325
+ {
326
+ return Mage::getSingleton('admin/session')->isAllowed('netgo_socialfeeds/socialfeed');
327
+ }
328
+ }
app/code/community/Netgo/Socialfeeds/controllers/SocialfeedController.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed front contrller
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_SocialfeedController extends Mage_Core_Controller_Front_Action
25
+ {
26
+
27
+ /**
28
+ * default action
29
+ *
30
+ * @access public
31
+ * @return void
32
+ * @author Ultimate Module Creator
33
+ */
34
+ public function indexAction()
35
+ {
36
+ $this->loadLayout();
37
+ $this->_initLayoutMessages('catalog/session');
38
+ $this->_initLayoutMessages('customer/session');
39
+ $this->_initLayoutMessages('checkout/session');
40
+ if (Mage::helper('netgo_socialfeeds/socialfeed')->getUseBreadcrumbs()) {
41
+ if ($breadcrumbBlock = $this->getLayout()->getBlock('breadcrumbs')) {
42
+ $breadcrumbBlock->addCrumb(
43
+ 'home',
44
+ array(
45
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Home'),
46
+ 'link' => Mage::getUrl(),
47
+ )
48
+ );
49
+ $breadcrumbBlock->addCrumb(
50
+ 'socialfeeds',
51
+ array(
52
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds'),
53
+ 'link' => '',
54
+ )
55
+ );
56
+ }
57
+ }
58
+ $headBlock = $this->getLayout()->getBlock('head');
59
+ if ($headBlock) {
60
+ $headBlock->addLinkRel('canonical', Mage::helper('netgo_socialfeeds/socialfeed')->getSocialfeedsUrl());
61
+ }
62
+ $this->renderLayout();
63
+ }
64
+
65
+ /**
66
+ * init Socialfeed
67
+ *
68
+ * @access protected
69
+ * @return Netgo_Socialfeeds_Model_Socialfeed
70
+ * @author Ultimate Module Creator
71
+ */
72
+ protected function _initSocialfeed()
73
+ {
74
+ $socialfeedId = $this->getRequest()->getParam('id', 0);
75
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed')
76
+ ->setStoreId(Mage::app()->getStore()->getId())
77
+ ->load($socialfeedId);
78
+ if (!$socialfeed->getId()) {
79
+ return false;
80
+ } elseif (!$socialfeed->getStatus()) {
81
+ return false;
82
+ }
83
+ return $socialfeed;
84
+ }
85
+
86
+ /**
87
+ * view socialfeed action
88
+ *
89
+ * @access public
90
+ * @return void
91
+ * @author Ultimate Module Creator
92
+ */
93
+ public function viewAction()
94
+ {
95
+ $socialfeed = $this->_initSocialfeed();
96
+ if (!$socialfeed) {
97
+ $this->_forward('no-route');
98
+ return;
99
+ }
100
+ Mage::register('current_socialfeed', $socialfeed);
101
+ $this->loadLayout();
102
+ $this->_initLayoutMessages('catalog/session');
103
+ $this->_initLayoutMessages('customer/session');
104
+ $this->_initLayoutMessages('checkout/session');
105
+ if ($root = $this->getLayout()->getBlock('root')) {
106
+ $root->addBodyClass('socialfeeds-socialfeed socialfeeds-socialfeed' . $socialfeed->getId());
107
+ }
108
+ if (Mage::helper('netgo_socialfeeds/socialfeed')->getUseBreadcrumbs()) {
109
+ if ($breadcrumbBlock = $this->getLayout()->getBlock('breadcrumbs')) {
110
+ $breadcrumbBlock->addCrumb(
111
+ 'home',
112
+ array(
113
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Home'),
114
+ 'link' => Mage::getUrl(),
115
+ )
116
+ );
117
+ $breadcrumbBlock->addCrumb(
118
+ 'socialfeeds',
119
+ array(
120
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds'),
121
+ 'link' => Mage::helper('netgo_socialfeeds/socialfeed')->getSocialfeedsUrl(),
122
+ )
123
+ );
124
+ $breadcrumbBlock->addCrumb(
125
+ 'socialfeed',
126
+ array(
127
+ 'label' => $socialfeed->getSocialfeedsStatus(),
128
+ 'link' => '',
129
+ )
130
+ );
131
+ }
132
+ }
133
+ $headBlock = $this->getLayout()->getBlock('head');
134
+ if ($headBlock) {
135
+ $headBlock->addLinkRel('canonical', $socialfeed->getSocialfeedUrl());
136
+ }
137
+ $this->renderLayout();
138
+ }
139
+ }
app/code/community/Netgo/Socialfeeds/etc/adminhtml.xml CHANGED
@@ -1,57 +1,61 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Social Feeds ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Socialfeeds
10
- * @author NetGo
11
- * @dev netattingomails@gmail.com
12
- *
13
- */
14
- -->
15
- <config>
16
- <acl>
17
- <resources>
18
- <admin>
19
- <children>
20
- <system>
21
- <children>
22
- <config>
23
- <children>
24
- <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
25
- <title>Socialfeeds</title>
26
- </netgo_socialfeeds>
27
- </children>
28
- </config>
29
- </children>
30
- </system>
31
- <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
32
- <title>Social Feeds</title>
33
- <children>
34
- <socialfeed translate="title" module="netgo_socialfeeds">
35
- <title>Socialfeed</title>
36
- <sort_order>0</sort_order>
37
- </socialfeed>
38
- </children>
39
- </netgo_socialfeeds>
40
- </children>
41
- </admin>
42
- </resources>
43
- </acl>
44
- <!--<menu>
45
- <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
46
- <title>Social Feeds</title>
47
- <sort_order>37</sort_order>
48
- <children>
49
- <socialfeed translate="title" module="netgo_socialfeeds">
50
- <title>Socialfeed</title>
51
- <action>adminhtml/socialfeeds_socialfeed</action>
52
- <sort_order>0</sort_order>
53
- </socialfeed>
54
- </children>
55
- </netgo_socialfeeds>
56
- </menu>-->
57
- </config>
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <config>
20
+ <acl>
21
+ <resources>
22
+ <admin>
23
+ <children>
24
+ <system>
25
+ <children>
26
+ <config>
27
+ <children>
28
+ <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
29
+ <title>Socialfeeds</title>
30
+ </netgo_socialfeeds>
31
+ </children>
32
+ </config>
33
+ </children>
34
+ </system>
35
+ <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
36
+ <title>Social Feeds</title>
37
+ <children>
38
+ <socialfeed translate="title" module="netgo_socialfeeds">
39
+ <title>Socialfeed</title>
40
+ <sort_order>0</sort_order>
41
+ </socialfeed>
42
+ </children>
43
+ </netgo_socialfeeds>
44
+ </children>
45
+ </admin>
46
+ </resources>
47
+ </acl>
48
+ <menu>
49
+ <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
50
+ <title>Social Feeds</title>
51
+ <sort_order>37</sort_order>
52
+ <children>
53
+ <socialfeed translate="title" module="netgo_socialfeeds">
54
+ <title>Socialfeed</title>
55
+ <action>adminhtml/socialfeeds_socialfeed</action>
56
+ <sort_order>0</sort_order>
57
+ </socialfeed>
58
+ </children>
59
+ </netgo_socialfeeds>
60
+ </menu>
61
+ </config>
app/code/community/Netgo/Socialfeeds/etc/config.xml CHANGED
@@ -1,128 +1,132 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Social Feeds ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Socialfeeds
10
- * @author NetGo
11
- * @dev netattingomails@gmail.com
12
- *
13
- */
14
- -->
15
- <config>
16
- <modules>
17
- <Netgo_Socialfeeds>
18
- <version>1.0.0</version>
19
- </Netgo_Socialfeeds>
20
- </modules>
21
- <global>
22
- <resources>
23
- <netgo_socialfeeds_setup>
24
- <setup>
25
- <module>Netgo_Socialfeeds</module>
26
- <class>Netgo_Socialfeeds_Model_Resource_Setup</class>
27
- </setup>
28
- </netgo_socialfeeds_setup>
29
- </resources>
30
- <blocks>
31
- <netgo_socialfeeds>
32
- <class>Netgo_Socialfeeds_Block</class>
33
- </netgo_socialfeeds>
34
- </blocks>
35
- <helpers>
36
- <netgo_socialfeeds>
37
- <class>Netgo_Socialfeeds_Helper</class>
38
- </netgo_socialfeeds>
39
- </helpers>
40
- <models>
41
- <netgo_socialfeeds>
42
- <class>Netgo_Socialfeeds_Model</class>
43
- <resourceModel>netgo_socialfeeds_resource</resourceModel>
44
- </netgo_socialfeeds>
45
- <netgo_socialfeeds_resource>
46
- <class>Netgo_Socialfeeds_Model_Resource</class>
47
- <entities>
48
- <socialfeed>
49
- <table>netgo_socialfeeds_socialfeed</table>
50
- </socialfeed>
51
- </entities>
52
- </netgo_socialfeeds_resource>
53
- </models>
54
- <events>
55
- <controller_front_init_routers>
56
- <observers>
57
- <netgo_socialfeeds>
58
- <class>Netgo_Socialfeeds_Controller_Router</class>
59
- <method>initControllerRouters</method>
60
- </netgo_socialfeeds>
61
- </observers>
62
- </controller_front_init_routers>
63
- </events>
64
- </global>
65
- <adminhtml>
66
- <layout>
67
- <updates>
68
- <netgo_socialfeeds>
69
- <file>netgo_socialfeeds.xml</file>
70
- </netgo_socialfeeds>
71
- </updates>
72
- </layout>
73
- <translate>
74
- <modules>
75
- <Netgo_Socialfeeds>
76
- <files>
77
- <default>Netgo_Socialfeeds.csv</default>
78
- </files>
79
- </Netgo_Socialfeeds>
80
- </modules>
81
- </translate>
82
- </adminhtml>
83
- <admin>
84
- <routers>
85
- <adminhtml>
86
- <args>
87
- <modules>
88
- <Netgo_Socialfeeds before="Mage_Adminhtml">Netgo_Socialfeeds_Adminhtml</Netgo_Socialfeeds>
89
- </modules>
90
- </args>
91
- </adminhtml>
92
- </routers>
93
- </admin>
94
- <frontend>
95
- <routers>
96
- <netgo_socialfeeds>
97
- <use>standard</use>
98
- <args>
99
- <module>Netgo_Socialfeeds</module>
100
- <frontName>netgo_social feeds</frontName>
101
- </args>
102
- </netgo_socialfeeds>
103
- </routers>
104
- <layout>
105
- <updates>
106
- <netgo_socialfeeds>
107
- <file>netgo_socialfeeds.xml</file>
108
- </netgo_socialfeeds>
109
- </updates>
110
- </layout>
111
- <translate>
112
- <modules>
113
- <Netgo_Socialfeeds>
114
- <files>
115
- <default>Netgo_Socialfeeds.csv</default>
116
- </files>
117
- </Netgo_Socialfeeds>
118
- </modules>
119
- </translate>
120
- </frontend>
121
- <default>
122
- <netgo_socialfeeds>
123
- <socialfeed>
124
- <breadcrumbs>1</breadcrumbs>
125
- </socialfeed>
126
- </netgo_socialfeeds>
127
- </default>
128
- </config>
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <Netgo_Socialfeeds>
22
+ <version>1.0.1</version>
23
+ </Netgo_Socialfeeds>
24
+ </modules>
25
+ <global>
26
+ <resources>
27
+ <netgo_socialfeeds_setup>
28
+ <setup>
29
+ <module>Netgo_Socialfeeds</module>
30
+ <class>Netgo_Socialfeeds_Model_Resource_Setup</class>
31
+ </setup>
32
+ </netgo_socialfeeds_setup>
33
+ </resources>
34
+ <blocks>
35
+ <netgo_socialfeeds>
36
+ <class>Netgo_Socialfeeds_Block</class>
37
+ </netgo_socialfeeds>
38
+ </blocks>
39
+ <helpers>
40
+ <netgo_socialfeeds>
41
+ <class>Netgo_Socialfeeds_Helper</class>
42
+ </netgo_socialfeeds>
43
+ </helpers>
44
+ <models>
45
+ <netgo_socialfeeds>
46
+ <class>Netgo_Socialfeeds_Model</class>
47
+ <resourceModel>netgo_socialfeeds_resource</resourceModel>
48
+ </netgo_socialfeeds>
49
+ <netgo_socialfeeds_resource>
50
+ <class>Netgo_Socialfeeds_Model_Resource</class>
51
+ <entities>
52
+ <socialfeed>
53
+ <table>netgo_socialfeeds_socialfeed</table>
54
+ </socialfeed>
55
+ </entities>
56
+ </netgo_socialfeeds_resource>
57
+ </models>
58
+ <events>
59
+ <controller_front_init_routers>
60
+ <observers>
61
+ <netgo_socialfeeds>
62
+ <class>Netgo_Socialfeeds_Controller_Router</class>
63
+ <method>initControllerRouters</method>
64
+ </netgo_socialfeeds>
65
+ </observers>
66
+ </controller_front_init_routers>
67
+ </events>
68
+ </global>
69
+ <adminhtml>
70
+ <layout>
71
+ <updates>
72
+ <netgo_socialfeeds>
73
+ <file>netgo_socialfeeds.xml</file>
74
+ </netgo_socialfeeds>
75
+ </updates>
76
+ </layout>
77
+ <translate>
78
+ <modules>
79
+ <Netgo_Socialfeeds>
80
+ <files>
81
+ <default>Netgo_Socialfeeds.csv</default>
82
+ </files>
83
+ </Netgo_Socialfeeds>
84
+ </modules>
85
+ </translate>
86
+ </adminhtml>
87
+ <admin>
88
+ <routers>
89
+ <adminhtml>
90
+ <args>
91
+ <modules>
92
+ <Netgo_Socialfeeds before="Mage_Adminhtml">Netgo_Socialfeeds_Adminhtml</Netgo_Socialfeeds>
93
+ </modules>
94
+ </args>
95
+ </adminhtml>
96
+ </routers>
97
+ </admin>
98
+ <frontend>
99
+ <routers>
100
+ <netgo_socialfeeds>
101
+ <use>standard</use>
102
+ <args>
103
+ <module>Netgo_Socialfeeds</module>
104
+ <frontName>netgo_social feeds</frontName>
105
+ </args>
106
+ </netgo_socialfeeds>
107
+ </routers>
108
+ <layout>
109
+ <updates>
110
+ <netgo_socialfeeds>
111
+ <file>netgo_socialfeeds.xml</file>
112
+ </netgo_socialfeeds>
113
+ </updates>
114
+ </layout>
115
+ <translate>
116
+ <modules>
117
+ <Netgo_Socialfeeds>
118
+ <files>
119
+ <default>Netgo_Socialfeeds.csv</default>
120
+ </files>
121
+ </Netgo_Socialfeeds>
122
+ </modules>
123
+ </translate>
124
+ </frontend>
125
+ <default>
126
+ <netgo_socialfeeds>
127
+ <socialfeed>
128
+ <breadcrumbs>1</breadcrumbs>
129
+ </socialfeed>
130
+ </netgo_socialfeeds>
131
+ </default>
132
+ </config>
app/code/community/Netgo/Socialfeeds/etc/system.xml CHANGED
@@ -1,270 +1,250 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Social Feeds ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Socialfeeds
10
- * @author NetGo
11
- * @dev netattingomails@gmail.com
12
- *
13
- */
14
- -->
15
- <config>
16
- <tabs>
17
- <netgo translate="label" module="netgo_socialfeeds">
18
- <label>Netgo</label>
19
- <sort_order>1</sort_order>
20
- </netgo>
21
- </tabs>
22
- <sections>
23
- <netgo_socialfeeds translate="label" module="netgo_socialfeeds">
24
- <class>separator-top</class>
25
- <label>All in one Social feeds</label>
26
- <tab>netgo</tab>
27
- <frontend_type>text</frontend_type>
28
- <sort_order>1</sort_order>
29
- <show_in_default>1</show_in_default>
30
- <show_in_website>1</show_in_website>
31
- <show_in_store>1</show_in_store>
32
- <groups>
33
- <socialfeed translate="label" module="netgo_socialfeeds">
34
- <label>All in one Social feeds</label>
35
- <frontend_type>text</frontend_type>
36
- <sort_order>10</sort_order>
37
- <show_in_default>1</show_in_default>
38
- <show_in_website>1</show_in_website>
39
- <show_in_store>1</show_in_store>
40
- <fields>
41
- <mod_status translate="label">
42
- <label>Status</label>
43
- <frontend_type>select</frontend_type>
44
- <source_model>adminhtml/system_config_source_yesno</source_model>
45
- <sort_order>10</sort_order>
46
- <show_in_default>1</show_in_default>
47
- <show_in_website>1</show_in_website>
48
- <show_in_store>1</show_in_store>
49
- </mod_status>
50
- </fields>
51
-
52
- <fields>
53
- <mod_status_left translate="label">
54
- <label>Show on left</label>
55
- <frontend_type>select</frontend_type>
56
- <source_model>adminhtml/system_config_source_yesno</source_model>
57
- <sort_order>11</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
- </mod_status_left>
62
- </fields>
63
- <fields>
64
- <mod_status_right translate="label">
65
- <label>Show on right</label>
66
- <frontend_type>select</frontend_type>
67
- <source_model>adminhtml/system_config_source_yesno</source_model>
68
- <sort_order>12</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
- </mod_status_right>
73
- </fields>
74
-
75
- </socialfeed>
76
- <fb_socialfeed translate="label" module="netgo_socialfeeds">
77
- <label>Facebook Credentials</label>
78
- <frontend_type>text</frontend_type>
79
- <sort_order>20</sort_order>
80
- <show_in_default>1</show_in_default>
81
- <show_in_website>1</show_in_website>
82
- <show_in_store>1</show_in_store>
83
- <fields>
84
- <fb_status translate="label">
85
- <label>Status</label>
86
- <frontend_type>select</frontend_type>
87
- <source_model>adminhtml/system_config_source_yesno</source_model>
88
- <sort_order>10</sort_order>
89
- <show_in_default>1</show_in_default>
90
- <show_in_website>1</show_in_website>
91
- <show_in_store>1</show_in_store>
92
- </fb_status>
93
- <fb_app_id translate="label">
94
- <label>Facebook APP ID</label>
95
- <frontend_type>text</frontend_type>
96
- <sort_order>20</sort_order>
97
- <show_in_default>1</show_in_default>
98
- <show_in_website>1</show_in_website>
99
- <show_in_store>1</show_in_store>
100
- </fb_app_id>
101
- <fb_secret_key translate="label">
102
- <label>Facebook Secret Key</label>
103
- <frontend_type>text</frontend_type>
104
- <sort_order>30</sort_order>
105
- <show_in_default>1</show_in_default>
106
- <show_in_website>1</show_in_website>
107
- <show_in_store>1</show_in_store>
108
- </fb_secret_key>
109
- <fb_page_id translate="label">
110
- <label>Facebook Page ID</label>
111
- <frontend_type>text</frontend_type>
112
- <sort_order>40</sort_order>
113
- <show_in_default>1</show_in_default>
114
- <show_in_website>1</show_in_website>
115
- <show_in_store>1</show_in_store>
116
- </fb_page_id>
117
- </fields>
118
- </fb_socialfeed>
119
- <tw_socialfeed translate="label" module="netgo_socialfeeds">
120
- <label>Twitter Credentials</label>
121
- <frontend_type>text</frontend_type>
122
- <sort_order>30</sort_order>
123
- <show_in_default>1</show_in_default>
124
- <show_in_website>1</show_in_website>
125
- <show_in_store>1</show_in_store>
126
- <fields>
127
- <tw_status translate="label">
128
- <label>Status</label>
129
- <frontend_type>select</frontend_type>
130
- <source_model>adminhtml/system_config_source_yesno</source_model>
131
- <sort_order>10</sort_order>
132
- <show_in_default>1</show_in_default>
133
- <show_in_website>1</show_in_website>
134
- <show_in_store>1</show_in_store>
135
- </tw_status>
136
- <tw_screen_name translate="label">
137
- <label>Screen Name</label>
138
- <frontend_type>text</frontend_type>
139
- <sort_order>20</sort_order>
140
- <show_in_default>1</show_in_default>
141
- <show_in_website>1</show_in_website>
142
- <show_in_store>1</show_in_store>
143
- </tw_screen_name>
144
- <tw_consumer_key translate="label">
145
- <label>Consumer Key</label>
146
- <frontend_type>text</frontend_type>
147
- <sort_order>30</sort_order>
148
- <show_in_default>1</show_in_default>
149
- <show_in_website>1</show_in_website>
150
- <show_in_store>1</show_in_store>
151
- </tw_consumer_key>
152
- <tw_consumer_secret translate="label">
153
- <label>Consumer Secret</label>
154
- <frontend_type>text</frontend_type>
155
- <sort_order>40</sort_order>
156
- <show_in_default>1</show_in_default>
157
- <show_in_website>1</show_in_website>
158
- <show_in_store>1</show_in_store>
159
- </tw_consumer_secret>
160
- <tw_access_token translate="label">
161
- <label>Access Token</label>
162
- <frontend_type>text</frontend_type>
163
- <sort_order>50</sort_order>
164
- <show_in_default>1</show_in_default>
165
- <show_in_website>1</show_in_website>
166
- <show_in_store>1</show_in_store>
167
- </tw_access_token>
168
- <tw_access_token_secret translate="label">
169
- <label>Access Token Secret</label>
170
- <frontend_type>text</frontend_type>
171
- <sort_order>60</sort_order>
172
- <show_in_default>1</show_in_default>
173
- <show_in_website>1</show_in_website>
174
- <show_in_store>1</show_in_store>
175
- </tw_access_token_secret>
176
- </fields>
177
- </tw_socialfeed>
178
- <ins_socialfeed translate="label" module="netgo_socialfeeds">
179
- <label>Instagram Credentials</label>
180
- <frontend_type>text</frontend_type>
181
- <sort_order>40</sort_order>
182
- <show_in_default>1</show_in_default>
183
- <show_in_website>1</show_in_website>
184
- <show_in_store>1</show_in_store>
185
- <fields>
186
- <ins_status translate="label">
187
- <label>Status</label>
188
- <frontend_type>select</frontend_type>
189
- <source_model>adminhtml/system_config_source_yesno</source_model>
190
- <sort_order>10</sort_order>
191
- <show_in_default>1</show_in_default>
192
- <show_in_website>1</show_in_website>
193
- <show_in_store>1</show_in_store>
194
- </ins_status>
195
- <ins_user_id translate="label">
196
- <label>User ID</label>
197
- <frontend_type>text</frontend_type>
198
- <sort_order>20</sort_order>
199
- <show_in_default>1</show_in_default>
200
- <show_in_website>1</show_in_website>
201
- <show_in_store>1</show_in_store>
202
- </ins_user_id>
203
- <ins_access_token translate="label">
204
- <label>Access Token</label>
205
- <frontend_type>text</frontend_type>
206
- <sort_order>30</sort_order>
207
- <show_in_default>1</show_in_default>
208
- <show_in_website>1</show_in_website>
209
- <show_in_store>1</show_in_store>
210
- </ins_access_token>
211
- </fields>
212
- </ins_socialfeed>
213
- <pi_socialfeed translate="label" module="netgo_socialfeeds">
214
- <label>Pinterest Credentials</label>
215
- <frontend_type>text</frontend_type>
216
- <sort_order>50</sort_order>
217
- <show_in_default>1</show_in_default>
218
- <show_in_website>1</show_in_website>
219
- <show_in_store>1</show_in_store>
220
- <fields>
221
- <pi_status translate="label">
222
- <label>Status</label>
223
- <frontend_type>select</frontend_type>
224
- <source_model>adminhtml/system_config_source_yesno</source_model>
225
- <sort_order>10</sort_order>
226
- <show_in_default>1</show_in_default>
227
- <show_in_website>1</show_in_website>
228
- <show_in_store>1</show_in_store>
229
- </pi_status>
230
- <ins_user_name translate="label">
231
- <label>User Name</label>
232
- <frontend_type>text</frontend_type>
233
- <sort_order>20</sort_order>
234
- <show_in_default>1</show_in_default>
235
- <show_in_website>1</show_in_website>
236
- <show_in_store>1</show_in_store>
237
- </ins_user_name>
238
- </fields>
239
- </pi_socialfeed>
240
- <yt_socialfeed translate="label" module="netgo_socialfeeds">
241
- <label>YouTube Credentials</label>
242
- <frontend_type>text</frontend_type>
243
- <sort_order>60</sort_order>
244
- <show_in_default>1</show_in_default>
245
- <show_in_website>1</show_in_website>
246
- <show_in_store>1</show_in_store>
247
- <fields>
248
- <yt_status translate="label">
249
- <label>Status</label>
250
- <frontend_type>select</frontend_type>
251
- <source_model>adminhtml/system_config_source_yesno</source_model>
252
- <sort_order>10</sort_order>
253
- <show_in_default>1</show_in_default>
254
- <show_in_website>1</show_in_website>
255
- <show_in_store>1</show_in_store>
256
- </yt_status>
257
- <yt_url translate="label">
258
- <label>YouTube Video URL</label>
259
- <frontend_type>text</frontend_type>
260
- <sort_order>20</sort_order>
261
- <show_in_default>1</show_in_default>
262
- <show_in_website>1</show_in_website>
263
- <show_in_store>1</show_in_store>
264
- </yt_url>
265
- </fields>
266
- </yt_socialfeed>
267
- </groups>
268
- </netgo_socialfeeds>
269
- </sections>
270
- </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <config>
20
+ <tabs>
21
+ <netgo translate="label" module="netgo_socialfeeds">
22
+ <label>Netgo</label>
23
+ <sort_order>2000</sort_order>
24
+ </netgo>
25
+ </tabs>
26
+ <sections>
27
+ <netgo_socialfeeds translate="label" module="netgo_socialfeeds">
28
+ <class>separator-top</class>
29
+ <label>All in one Social feeds</label>
30
+ <tab>netgo</tab>
31
+ <frontend_type>text</frontend_type>
32
+ <sort_order>100</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ <groups>
37
+ <socialfeed translate="label" module="netgo_socialfeeds">
38
+ <label>All in one Social feeds</label>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>10</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
+ <fields>
45
+ <mod_status translate="label">
46
+ <label>Status</label>
47
+ <frontend_type>select</frontend_type>
48
+ <source_model>adminhtml/system_config_source_yesno</source_model>
49
+ <sort_order>10</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
+ </mod_status>
54
+ </fields>
55
+ </socialfeed>
56
+ <fb_socialfeed translate="label" module="netgo_socialfeeds">
57
+ <label>Facebook Credentials</label>
58
+ <frontend_type>text</frontend_type>
59
+ <sort_order>20</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ <fields>
64
+ <fb_status translate="label">
65
+ <label>Status</label>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ <sort_order>10</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
+ </fb_status>
73
+ <fb_app_id translate="label">
74
+ <label>Facebook APP ID</label>
75
+ <frontend_type>text</frontend_type>
76
+ <sort_order>20</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ </fb_app_id>
81
+ <fb_secret_key translate="label">
82
+ <label>Facebook Secret Key</label>
83
+ <frontend_type>text</frontend_type>
84
+ <sort_order>30</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
+ </fb_secret_key>
89
+ <fb_page_id translate="label">
90
+ <label>Facebook Page ID</label>
91
+ <frontend_type>text</frontend_type>
92
+ <sort_order>40</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
+ </fb_page_id>
97
+ </fields>
98
+ </fb_socialfeed>
99
+ <tw_socialfeed translate="label" module="netgo_socialfeeds">
100
+ <label>Twitter Credentials</label>
101
+ <frontend_type>text</frontend_type>
102
+ <sort_order>30</sort_order>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
+ <show_in_store>1</show_in_store>
106
+ <fields>
107
+ <tw_status translate="label">
108
+ <label>Status</label>
109
+ <frontend_type>select</frontend_type>
110
+ <source_model>adminhtml/system_config_source_yesno</source_model>
111
+ <sort_order>10</sort_order>
112
+ <show_in_default>1</show_in_default>
113
+ <show_in_website>1</show_in_website>
114
+ <show_in_store>1</show_in_store>
115
+ </tw_status>
116
+ <tw_screen_name translate="label">
117
+ <label>Screen Name</label>
118
+ <frontend_type>text</frontend_type>
119
+ <sort_order>20</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
+ </tw_screen_name>
124
+ <tw_consumer_key translate="label">
125
+ <label>Consumer Key</label>
126
+ <frontend_type>text</frontend_type>
127
+ <sort_order>30</sort_order>
128
+ <show_in_default>1</show_in_default>
129
+ <show_in_website>1</show_in_website>
130
+ <show_in_store>1</show_in_store>
131
+ </tw_consumer_key>
132
+ <tw_consumer_secret translate="label">
133
+ <label>Consumer Secret</label>
134
+ <frontend_type>text</frontend_type>
135
+ <sort_order>40</sort_order>
136
+ <show_in_default>1</show_in_default>
137
+ <show_in_website>1</show_in_website>
138
+ <show_in_store>1</show_in_store>
139
+ </tw_consumer_secret>
140
+ <tw_access_token translate="label">
141
+ <label>Access Token</label>
142
+ <frontend_type>text</frontend_type>
143
+ <sort_order>50</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ </tw_access_token>
148
+ <tw_access_token_secret translate="label">
149
+ <label>Access Token Secret</label>
150
+ <frontend_type>text</frontend_type>
151
+ <sort_order>60</sort_order>
152
+ <show_in_default>1</show_in_default>
153
+ <show_in_website>1</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
+ </tw_access_token_secret>
156
+ </fields>
157
+ </tw_socialfeed>
158
+ <ins_socialfeed translate="label" module="netgo_socialfeeds">
159
+ <label>Instagram Credentials</label>
160
+ <frontend_type>text</frontend_type>
161
+ <sort_order>40</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ <fields>
166
+ <ins_status translate="label">
167
+ <label>Status</label>
168
+ <frontend_type>select</frontend_type>
169
+ <source_model>adminhtml/system_config_source_yesno</source_model>
170
+ <sort_order>10</sort_order>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_website>1</show_in_website>
173
+ <show_in_store>1</show_in_store>
174
+ </ins_status>
175
+ <ins_user_id translate="label">
176
+ <label>User ID</label>
177
+ <frontend_type>text</frontend_type>
178
+ <sort_order>20</sort_order>
179
+ <show_in_default>1</show_in_default>
180
+ <show_in_website>1</show_in_website>
181
+ <show_in_store>1</show_in_store>
182
+ </ins_user_id>
183
+ <ins_access_token translate="label">
184
+ <label>Access Token</label>
185
+ <frontend_type>text</frontend_type>
186
+ <sort_order>30</sort_order>
187
+ <show_in_default>1</show_in_default>
188
+ <show_in_website>1</show_in_website>
189
+ <show_in_store>1</show_in_store>
190
+ </ins_access_token>
191
+ </fields>
192
+ </ins_socialfeed>
193
+ <pi_socialfeed translate="label" module="netgo_socialfeeds">
194
+ <label>Pinterest Credentials</label>
195
+ <frontend_type>text</frontend_type>
196
+ <sort_order>50</sort_order>
197
+ <show_in_default>1</show_in_default>
198
+ <show_in_website>1</show_in_website>
199
+ <show_in_store>1</show_in_store>
200
+ <fields>
201
+ <pi_status translate="label">
202
+ <label>Status</label>
203
+ <frontend_type>select</frontend_type>
204
+ <source_model>adminhtml/system_config_source_yesno</source_model>
205
+ <sort_order>10</sort_order>
206
+ <show_in_default>1</show_in_default>
207
+ <show_in_website>1</show_in_website>
208
+ <show_in_store>1</show_in_store>
209
+ </pi_status>
210
+ <ins_user_name translate="label">
211
+ <label>User Name</label>
212
+ <frontend_type>text</frontend_type>
213
+ <sort_order>20</sort_order>
214
+ <show_in_default>1</show_in_default>
215
+ <show_in_website>1</show_in_website>
216
+ <show_in_store>1</show_in_store>
217
+ </ins_user_name>
218
+ </fields>
219
+ </pi_socialfeed>
220
+ <yt_socialfeed translate="label" module="netgo_socialfeeds">
221
+ <label>YouTube Credentials</label>
222
+ <frontend_type>text</frontend_type>
223
+ <sort_order>60</sort_order>
224
+ <show_in_default>1</show_in_default>
225
+ <show_in_website>1</show_in_website>
226
+ <show_in_store>1</show_in_store>
227
+ <fields>
228
+ <yt_status translate="label">
229
+ <label>Status</label>
230
+ <frontend_type>select</frontend_type>
231
+ <source_model>adminhtml/system_config_source_yesno</source_model>
232
+ <sort_order>10</sort_order>
233
+ <show_in_default>1</show_in_default>
234
+ <show_in_website>1</show_in_website>
235
+ <show_in_store>1</show_in_store>
236
+ </yt_status>
237
+ <yt_url translate="label">
238
+ <label>YouTube Video URL</label>
239
+ <frontend_type>text</frontend_type>
240
+ <sort_order>20</sort_order>
241
+ <show_in_default>1</show_in_default>
242
+ <show_in_website>1</show_in_website>
243
+ <show_in_store>1</show_in_store>
244
+ </yt_url>
245
+ </fields>
246
+ </yt_socialfeed>
247
+ </groups>
248
+ </netgo_socialfeeds>
249
+ </sections>
250
+ </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Netgo/Socialfeeds/sql/netgo_socialfeeds_setup/install-1.0.0.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeeds module install script
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ $this->startSetup();
25
+ $table = $this->getConnection()
26
+ ->newTable($this->getTable('netgo_socialfeeds/socialfeed'))
27
+ ->addColumn(
28
+ 'entity_id',
29
+ Varien_Db_Ddl_Table::TYPE_INTEGER,
30
+ null,
31
+ array(
32
+ 'identity' => true,
33
+ 'nullable' => false,
34
+ 'primary' => true,
35
+ ),
36
+ 'Socialfeed ID'
37
+ )
38
+ ->addColumn(
39
+ 'socialfeeds_status',
40
+ Varien_Db_Ddl_Table::TYPE_TEXT, 255,
41
+ array(
42
+ 'nullable' => false,
43
+ ),
44
+ 'Socialfeeds Status'
45
+ )
46
+ ->addColumn(
47
+ 'status',
48
+ Varien_Db_Ddl_Table::TYPE_SMALLINT, null,
49
+ array(),
50
+ 'Enabled'
51
+ )
52
+ ->addColumn(
53
+ 'url_key',
54
+ Varien_Db_Ddl_Table::TYPE_TEXT, 255,
55
+ array(),
56
+ 'URL key'
57
+ )
58
+ ->addColumn(
59
+ 'updated_at',
60
+ Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
61
+ null,
62
+ array(),
63
+ 'Socialfeed Modification Time'
64
+ )
65
+ ->addColumn(
66
+ 'created_at',
67
+ Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
68
+ null,
69
+ array(),
70
+ 'Socialfeed Creation Time'
71
+ )
72
+ ->setComment('Socialfeed Table');
73
+ $this->getConnection()->createTable($table);
74
+ $this->endSetup();
app/design/frontend/base/default/layout/netgo_socialfeeds.xml CHANGED
@@ -1,74 +1,72 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Social Feeds ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Socialfeeds
10
- * @author NetGo
11
- * @dev netattingomails@gmail.com
12
- *
13
- */
14
- -->
15
- <layout>
16
- <default>
17
- <block type="netgo_socialfeeds/socialfeed_socialfeeds" name="socialfeed_view" template="netgo_socialfeeds/socialfeed/socialfeeds.phtml" />
18
- <reference name="left">
19
-
20
- <action method="append" ifconfig="netgo_socialfeeds/socialfeed/mod_status_left">
21
- <block>socialfeed_view</block>
22
- </action>
23
- </reference>
24
-
25
- <reference name="right">
26
-
27
- <action method="append" ifconfig="netgo_socialfeeds/socialfeed/mod_status_right">
28
- <block>socialfeed_view</block>
29
- </action>
30
- </reference>
31
-
32
- <reference name="head">
33
- <action method="addItem">
34
- <type>skin_js</type>
35
- <name>socialfeeds/js/popup2.2.js</name>
36
- <params/>
37
- </action>
38
- <action method="addItem">
39
- <type>skin_js</type>
40
- <name>socialfeeds/js/scroller/jquery.mCustomScrollbar.concat.min.js</name>
41
- <params/>
42
- </action>
43
- <action method="addItem">
44
- <type>skin_js</type>
45
- <name>socialfeeds/js/init.js</name>
46
- <params/>
47
- </action>
48
- <action method="addItem">
49
- <type>skin_css</type>
50
- <name>socialfeeds/css/front-style.css</name>
51
- </action>
52
- <action method="addItem">
53
- <type>skin_css</type>
54
- <name>socialfeeds/js/scroller/jquery.mCustomScrollbar.css</name>
55
- </action>
56
- </reference>
57
- </default>
58
-
59
-
60
- <netgo_socialfeeds_socialfeed_index translate="label" module="netgo_socialfeeds">
61
- <label>Socialfeeds list</label>
62
- <update handle="page_two_columns_left" />
63
- <reference name="content">
64
- <block type="netgo_socialfeeds/socialfeed_list" name="socialfeed_list" template="netgo_socialfeeds/socialfeed/list.phtml" />
65
- </reference>
66
- </netgo_socialfeeds_socialfeed_index>
67
- <netgo_socialfeeds_socialfeed_view translate="label" module="netgo_socialfeeds">
68
- <label>Socialfeed view page</label>
69
- <update handle="page_two_columns_left" />
70
- <reference name="content">
71
- <block type="netgo_socialfeeds/socialfeed_view" name="socialfeed_view" template="netgo_socialfeeds/socialfeed/view.phtml" />
72
- </reference>
73
- </netgo_socialfeeds_socialfeed_view>
74
- </layout>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <layout>
20
+ <default>
21
+
22
+ <reference name="left">
23
+ <block type="netgo_socialfeeds/socialfeed_socialfeeds" name="socialfeed_view" template="netgo_socialfeeds/socialfeed/socialfeeds.phtml" />
24
+ </reference>
25
+
26
+ <reference name="right">
27
+ <block type="netgo_socialfeeds/socialfeed_socialfeeds" name="socialfeed_view" template="netgo_socialfeeds/socialfeed/socialfeeds.phtml" />
28
+ </reference>
29
+
30
+ <reference name="head">
31
+ <action method="addItem">
32
+ <type>skin_js</type>
33
+ <name>socialfeeds/js/popup2.2.js</name>
34
+ <params/>
35
+ </action>
36
+ <action method="addItem">
37
+ <type>skin_js</type>
38
+ <name>socialfeeds/js/scroller/jquery.mCustomScrollbar.concat.min.js</name>
39
+ <params/>
40
+ </action>
41
+ <action method="addItem">
42
+ <type>skin_js</type>
43
+ <name>socialfeeds/js/init.js</name>
44
+ <params/>
45
+ </action>
46
+ <action method="addItem">
47
+ <type>skin_css</type>
48
+ <name>socialfeeds/css/front-style.css</name>
49
+ </action>
50
+ <action method="addItem">
51
+ <type>skin_css</type>
52
+ <name>socialfeeds/js/scroller/jquery.mCustomScrollbar.css</name>
53
+ </action>
54
+ </reference>
55
+ </default>
56
+
57
+
58
+ <netgo_socialfeeds_socialfeed_index translate="label" module="netgo_socialfeeds">
59
+ <label>Socialfeeds list</label>
60
+ <update handle="page_two_columns_left" />
61
+ <reference name="content">
62
+ <block type="netgo_socialfeeds/socialfeed_list" name="socialfeed_list" template="netgo_socialfeeds/socialfeed/list.phtml" />
63
+ </reference>
64
+ </netgo_socialfeeds_socialfeed_index>
65
+ <netgo_socialfeeds_socialfeed_view translate="label" module="netgo_socialfeeds">
66
+ <label>Socialfeed view page</label>
67
+ <update handle="page_two_columns_left" />
68
+ <reference name="content">
69
+ <block type="netgo_socialfeeds/socialfeed_view" name="socialfeed_view" template="netgo_socialfeeds/socialfeed/view.phtml" />
70
+ </reference>
71
+ </netgo_socialfeeds_socialfeed_view>
72
+ </layout>
 
 
app/design/frontend/base/default/template/netgo_socialfeeds/socialfeed/list.phtml CHANGED
@@ -1,33 +1,44 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- ?>
14
- <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
15
- <?php $_socialfeeds = $this->getSocialfeeds(); ?>
16
- <div class="page-title socialfeed-title">
17
- <h1><?php echo Mage::helper('netgo_socialfeeds')->__('Socialfeeds') ?></h1>
18
- </div>
19
- <?php if ($_socialfeeds->getSize() > 0) :?>
20
- <?php echo $this->getPagerHtml(); ?>
21
- <div class="socialfeed-list-container">
22
- <?php foreach ($_socialfeeds as $_socialfeed) : ?>
23
- <div class="socialfeed-list-item">
24
- <a href="<?php echo $_socialfeed->getSocialfeedUrl()?>">
25
- <?php echo $_socialfeed->getSocialfeedsStatus();?>
26
- </a><br />
27
- </div>
28
- <?php endforeach;?>
29
- </div>
30
- <?php echo $this->getPagerHtml(); ?>
31
- <?php else : ?>
32
- <?php echo Mage::helper('netgo_socialfeeds')->__('There are no socialfeeds at this moment');?>
33
- <?php endif;?>
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed list template
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ ?>
25
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
26
+ <?php $_socialfeeds = $this->getSocialfeeds(); ?>
27
+ <div class="page-title socialfeed-title">
28
+ <h1><?php echo Mage::helper('netgo_socialfeeds')->__('Socialfeeds') ?></h1>
29
+ </div>
30
+ <?php if ($_socialfeeds->getSize() > 0) :?>
31
+ <?php echo $this->getPagerHtml(); ?>
32
+ <div class="socialfeed-list-container">
33
+ <?php foreach ($_socialfeeds as $_socialfeed) : ?>
34
+ <div class="socialfeed-list-item">
35
+ <a href="<?php echo $_socialfeed->getSocialfeedUrl()?>">
36
+ <?php echo $_socialfeed->getSocialfeedsStatus();?>
37
+ </a><br />
38
+ </div>
39
+ <?php endforeach;?>
40
+ </div>
41
+ <?php echo $this->getPagerHtml(); ?>
42
+ <?php else : ?>
43
+ <?php echo Mage::helper('netgo_socialfeeds')->__('There are no socialfeeds at this moment');?>
44
+ <?php endif;?>
app/design/frontend/base/default/template/netgo_socialfeeds/socialfeed/socialfeeds.phtml CHANGED
@@ -1,172 +1,183 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
-
14
- $facebook = $this->initFB();
15
- $twitter = $this->initTW();
16
- $instagram = $this->initIN();
17
- $pinterest = $this->initPI();
18
- $youtube_url = $this->initYT();
19
- $_helper = Mage::helper('netgo_socialfeeds/socialfeed');
20
-
21
- if($_helper->getCheckMod()){
22
- ?>
23
- <div class="all-in-one">
24
- <div class="container">
25
- <ul class="tabs">
26
- <?php if($_helper->getCheckFB()){ ?>
27
- <li class="aiosf-facebook"><a href="#tab1">FB</a></li>
28
- <?php } ?>
29
-
30
- <?php if($_helper->getCheckTW()){ ?>
31
- <li class="aiosf-twitter"><a href="#tab2">TW</a></li>
32
- <?php } ?>
33
-
34
- <?php if($_helper->getCheckIN()){ ?>
35
- <li class="aiosf-instagram"><a href="#tab3">In</a></li>
36
- <?php } ?>
37
-
38
- <?php if($_helper->getCheckPI()){ ?>
39
- <li class="aiosf-pintrest"><a href="#tab4">Pi</a></li>
40
- <?php } ?>
41
-
42
- <?php if($_helper->getCheckYT()){ ?>
43
- <li class="aiosf-youtube"><a href="#tab5">YT</a></li>
44
- <?php } ?>
45
- </ul>
46
-
47
- <div class="tab_container">
48
- <?php if($_helper->getCheckFB()){ ?>
49
- <div id="tab1" class="tab_content">
50
- <h4>FaceBook</h4>
51
- <div class="fb-feeds">
52
- <?php
53
- try {
54
- $pageid = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_page_id'));
55
- if(is_object($facebook)){
56
- $pagefeed = $facebook->api("/" . $pageid . "/posts?fields=attachments,id,object_id,message,description,full_picture,source,created_time");
57
- }
58
- ?>
59
- <?php
60
- if(!empty($pagefeed)){ $flag=1; ?>
61
- <ul id="fbfeed" class="fb-feed-grid-view">
62
- <?php foreach($pagefeed['data'] as $post): //print_r($post); ?>
63
- <li id="<?php echo $flag; ?><?php echo ($flag%4); ?>">
64
- <div class="product_box">
65
- <div class="img_box">
66
- <?php if(isset($post['full_picture']) && $post['full_picture'] != '') { ?>
67
- <a target="_blank" href="<?php echo $post['attachments']['data'][0]['url']; ?>"></a>
68
- <?php } ?>
69
- </div>
70
- <div class="content">
71
- <div class="contant_box1">
72
- <?php echo substr($post['message'], 0, 100); ?>
73
- </div>
74
- <div class="date_box"><?php echo date("d/M/Y H:i", (strtotime($post['created_time']))) ?> </div>
75
- </div>
76
- </div>
77
- </li>
78
- <?php $flag++; endforeach; ?>
79
- </ul>
80
- <div style="clear:both;"></div><?php
81
- }else{
82
- echo '<div class="nopost"><h3>No Post Found!</h3></div>';
83
- }
84
- }catch(Exception $e) {
85
- echo '<b>Message: </b> Invalid "Facebook App Id" ,"Facebook Secret Key" or "Facebook Page Id"';
86
- }
87
- ?>
88
- </div>
89
- </div>
90
- <?php } ?>
91
-
92
- <?php if($_helper->getCheckTW()){ ?>
93
- <div id="tab2" class="tab_content">
94
- <h4>Twitter</h4>
95
- <div class="tw-feeds">
96
- <?php
97
- /*Here you will get all info from user timeline */
98
- $valid_data = json_decode($twitter);
99
- if(isset($valid_data) && count($valid_data)){
100
- $twit = "<ul class='tw-f'>";
101
- foreach ($valid_data as $key=>$value) {
102
- $twit .= "<li>";
103
- $twit .= "<div class='tw-desc'>".$value->text."<span class='tw-date'>".$value->created_at."</span></div>";
104
- $twit .= "</li>";
105
- }
106
- $twit .= "</ul>";
107
- }else{
108
- $twit = "<ul class='tw-f'>";
109
- $twit .= "<li><div class='nopost'><h3>No Post Found!</h3></div></li>";
110
- $twit .= "</ul>";
111
- }
112
- echo $twit;
113
- ?>
114
- </div>
115
- </div>
116
- <?php } ?>
117
-
118
- <?php if($_helper->getCheckIN()){ ?>
119
- <div id="tab3" class="tab_content">
120
- <h4>Instagram</h4>
121
- <div class="ins-feeds">
122
- <?php
123
- $instagram_res = json_decode($instagram);
124
- if(isset($instagram_res) && count($instagram_res) > 0){
125
- foreach ($instagram_res->data as $post) { ?>
126
- <img src="<?php echo $post->images->thumbnail->url; ?>" alt="" name="<?php echo $post->images->standard_resolution->url; ?>" class="popup" title="Instagram">
127
- <?php } ?>
128
- <?php }else{ echo "<ul class='tw-f'><li><div class='nopost'><h3>No Post Found!</h3></div></li></ul>"; } ?>
129
- </div>
130
- </div>
131
- <?php } ?>
132
-
133
- <?php if($_helper->getCheckPI()){ ?>
134
- <div id="tab4" class="tab_content">
135
- <h4>Pinterest</h4>
136
- <div class="pin-feeds">
137
- <?php
138
- $pin = " ";
139
- if(isset($pinterest) && count($pinterest) > 0 ){
140
- for($x=0;$x<count($pinterest);$x++) { //Displays first three pins (can be changed)
141
- $title = str_replace(' & ', ' &amp; ', $pinterest[$x]['title']);
142
- $link = $pinterest[$x]['link'];
143
- $start = strpos($pinterest[$x]['description'],"<img src") + 10; //Find position of source image url from description
144
- $length = strpos($pinterest[$x]['description'],"></a>") - 1 - $start; //Find length of source image url from description
145
- $image = substr($pinterest[$x]['description'],$start,$length); //Extract source image url from description
146
- $date = date('l F d, Y', strtotime($pinterest[$x]['date'])); //Date format can be changed
147
- $pin .= "<a href='".$link."'><img src='".$image."' border=0 alt='".$title."'></a>";
148
- }
149
- echo $pin;
150
- }else{
151
- echo "<ul class='tw-f'><li><div class='nopost'><h3>No Post Found!</h3></div></li></ul>";
152
- }
153
- ?>
154
- </div>
155
- </div>
156
- <?php } ?>
157
-
158
- <?php if($_helper->getCheckYT()){ ?>
159
- <div id="tab5" class="tab_content">
160
- <h4>YouTube</h4>
161
- <div class="yt-video">
162
- <?php if($youtube_url != ''){ ?>
163
- <iframe id="ytplayer" type="text/html" src="https://www.youtube.com/embed/<?php echo $youtube_url ?>?rel=0&showinfo=0&color=white&iv_load_policy=3"
164
- frameborder="0" allowfullscreen></iframe>
165
- <?php } ?>
166
- </div>
167
- </div>
168
- <?php } ?>
169
- </div>
170
- </div>
171
- </div>
172
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed view template
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+
25
+ $facebook = $this->initFB();
26
+ $twitter = $this->initTW();
27
+ $instagram = $this->initIN();
28
+ $pinterest = $this->initPI();
29
+ $youtube_url = $this->initYT();
30
+ $_helper = Mage::helper('netgo_socialfeeds/socialfeed');
31
+
32
+ if($_helper->getCheckMod()){
33
+ ?>
34
+ <div class="all-in-one">
35
+ <div class="container">
36
+ <ul class="tabs">
37
+ <?php if($_helper->getCheckFB()){ ?>
38
+ <li class="aiosf-facebook"><a href="#tab1">FB</a></li>
39
+ <?php } ?>
40
+
41
+ <?php if($_helper->getCheckTW()){ ?>
42
+ <li class="aiosf-twitter"><a href="#tab2">TW</a></li>
43
+ <?php } ?>
44
+
45
+ <?php if($_helper->getCheckIN()){ ?>
46
+ <li class="aiosf-instagram"><a href="#tab3">In</a></li>
47
+ <?php } ?>
48
+
49
+ <?php if($_helper->getCheckPI()){ ?>
50
+ <li class="aiosf-pintrest"><a href="#tab4">Pi</a></li>
51
+ <?php } ?>
52
+
53
+ <?php if($_helper->getCheckYT()){ ?>
54
+ <li class="aiosf-youtube"><a href="#tab5">YT</a></li>
55
+ <?php } ?>
56
+ </ul>
57
+
58
+ <div class="tab_container">
59
+ <?php if($_helper->getCheckFB()){ ?>
60
+ <div id="tab1" class="tab_content">
61
+ <h4>FaceBook</h4>
62
+ <div class="fb-feeds">
63
+ <?php
64
+ try {
65
+ $pageid = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_page_id'));
66
+ if(is_object($facebook)){
67
+ $pagefeed = $facebook->api("/" . $pageid . "/posts?fields=attachments,id,object_id,message,description,full_picture,source,created_time");
68
+ }
69
+ ?>
70
+ <?php
71
+ if(!empty($pagefeed)){ $flag=1; ?>
72
+ <ul id="fbfeed" class="fb-feed-grid-view">
73
+ <?php foreach($pagefeed['data'] as $post): //print_r($post); ?>
74
+ <li id="<?php echo $flag; ?><?php echo ($flag%4); ?>">
75
+ <div class="product_box">
76
+ <div class="img_box">
77
+ <?php if(isset($post['full_picture']) && $post['full_picture'] != '') { ?>
78
+ <a target="_blank" href="<?php echo $post['attachments']['data'][0]['url']; ?>"></a>
79
+ <?php } ?>
80
+ </div>
81
+ <div class="content">
82
+ <div class="contant_box1">
83
+ <?php echo substr($post['message'], 0, 100); ?>
84
+ </div>
85
+ <div class="date_box"><?php echo date("d/M/Y H:i", (strtotime($post['created_time']))) ?> </div>
86
+ </div>
87
+ </div>
88
+ </li>
89
+ <?php $flag++; endforeach; ?>
90
+ </ul>
91
+ <div style="clear:both;"></div><?php
92
+ }else{
93
+ echo '<div class="nopost"><h3>No Post Found!</h3></div>';
94
+ }
95
+ }catch(Exception $e) {
96
+ echo '<b>Message: </b> Invalid "Facebook App Id" ,"Facebook Secret Key" or "Facebook Page Id"';
97
+ }
98
+ ?>
99
+ </div>
100
+ </div>
101
+ <?php } ?>
102
+
103
+ <?php if($_helper->getCheckTW()){ ?>
104
+ <div id="tab2" class="tab_content">
105
+ <h4>Twitter</h4>
106
+ <div class="tw-feeds">
107
+ <?php
108
+ /*Here you will get all info from user timeline */
109
+ $valid_data = json_decode($twitter);
110
+ if(isset($valid_data) && count($valid_data)){
111
+ $twit = "<ul class='tw-f'>";
112
+ foreach ($valid_data as $key=>$value) {
113
+ $twit .= "<li>";
114
+ $twit .= "<div class='tw-desc'>".$value->text."<span class='tw-date'>".$value->created_at."</span></div>";
115
+ $twit .= "</li>";
116
+ }
117
+ $twit .= "</ul>";
118
+ }else{
119
+ $twit = "<ul class='tw-f'>";
120
+ $twit .= "<li><div class='nopost'><h3>No Post Found!</h3></div></li>";
121
+ $twit .= "</ul>";
122
+ }
123
+ echo $twit;
124
+ ?>
125
+ </div>
126
+ </div>
127
+ <?php } ?>
128
+
129
+ <?php if($_helper->getCheckIN()){ ?>
130
+ <div id="tab3" class="tab_content">
131
+ <h4>Instagram</h4>
132
+ <div class="ins-feeds">
133
+ <?php
134
+ $instagram_res = json_decode($instagram);
135
+ if(isset($instagram_res) && count($instagram_res) > 0){
136
+ foreach ($instagram_res->data as $post) { ?>
137
+ <img src="<?php echo $post->images->thumbnail->url; ?>" alt="" name="<?php echo $post->images->standard_resolution->url; ?>" class="popup" title="Instagram">
138
+ <?php } ?>
139
+ <?php }else{ echo "<ul class='tw-f'><li><div class='nopost'><h3>No Post Found!</h3></div></li></ul>"; } ?>
140
+ </div>
141
+ </div>
142
+ <?php } ?>
143
+
144
+ <?php if($_helper->getCheckPI()){ ?>
145
+ <div id="tab4" class="tab_content">
146
+ <h4>Pinterest</h4>
147
+ <div class="pin-feeds">
148
+ <?php
149
+ $pin = " ";
150
+ if(isset($pinterest) && count($pinterest) > 0 ){
151
+ for($x=0;$x<count($pinterest);$x++) { //Displays first three pins (can be changed)
152
+ $title = str_replace(' & ', ' &amp; ', $pinterest[$x]['title']);
153
+ $link = $pinterest[$x]['link'];
154
+ $start = strpos($pinterest[$x]['description'],"<img src") + 10; //Find position of source image url from description
155
+ $length = strpos($pinterest[$x]['description'],"></a>") - 1 - $start; //Find length of source image url from description
156
+ $image = substr($pinterest[$x]['description'],$start,$length); //Extract source image url from description
157
+ $date = date('l F d, Y', strtotime($pinterest[$x]['date'])); //Date format can be changed
158
+ $pin .= "<a href='".$link."'><img src='".$image."' border=0 alt='".$title."'></a>";
159
+ }
160
+ echo $pin;
161
+ }else{
162
+ echo "<ul class='tw-f'><li><div class='nopost'><h3>No Post Found!</h3></div></li></ul>";
163
+ }
164
+ ?>
165
+ </div>
166
+ </div>
167
+ <?php } ?>
168
+
169
+ <?php if($_helper->getCheckYT()){ ?>
170
+ <div id="tab5" class="tab_content">
171
+ <h4>YouTube</h4>
172
+ <div class="yt-video">
173
+ <?php if($youtube_url != ''){ ?>
174
+ <iframe id="ytplayer" type="text/html" src="https://www.youtube.com/embed/<?php echo $youtube_url ?>?rel=0&showinfo=0&color=white&iv_load_policy=3"
175
+ frameborder="0" allowfullscreen></iframe>
176
+ <?php } ?>
177
+ </div>
178
+ </div>
179
+ <?php } ?>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ <?php } ?>
app/design/frontend/base/default/template/netgo_socialfeeds/socialfeed/view.phtml CHANGED
@@ -1,25 +1,36 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- ?>
14
- <?php $_socialfeed = $this->getCurrentSocialfeed();?>
15
- <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
16
- <div class="page-title socialfeed-title">
17
- <h1><?php echo $_socialfeed->getSocialfeedsStatus(); ?></h1>
18
- </div>
19
- <div class="socialfeed-view">
20
- <div class="socialfeed-socialfeeds_status">
21
- <?php echo Mage::helper('netgo_socialfeeds')->__('Socialfeeds Status');?>:<?php echo $_socialfeed->getSocialfeedsStatus();?>
22
-
23
- </div>
24
-
25
- </div>
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed view template
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ ?>
25
+ <?php $_socialfeed = $this->getCurrentSocialfeed();?>
26
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
27
+ <div class="page-title socialfeed-title">
28
+ <h1><?php echo $_socialfeed->getSocialfeedsStatus(); ?></h1>
29
+ </div>
30
+ <div class="socialfeed-view">
31
+ <div class="socialfeed-socialfeeds_status">
32
+ <?php echo Mage::helper('netgo_socialfeeds')->__('Socialfeeds Status');?>:<?php echo $_socialfeed->getSocialfeedsStatus();?>
33
+
34
+ </div>
35
+
36
+ </div>
app/etc/modules/Netgo_Socialfeeds.xml CHANGED
@@ -1,25 +1,29 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Social Feeds ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Socialfeeds
10
- * @author NetGo
11
- * @dev netattingomails@gmail.com
12
- *
13
- */
14
- -->
15
- <config>
16
- <modules>
17
- <Netgo_Socialfeeds>
18
- <active>true</active>
19
- <codePool>community</codePool>
20
- <depends>
21
- <Mage_Core />
22
- </depends>
23
- </Netgo_Socialfeeds>
24
- </modules>
25
- </config>
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <Netgo_Socialfeeds>
22
+ <active>true</active>
23
+ <codePool>community</codePool>
24
+ <depends>
25
+ <Mage_Core />
26
+ </depends>
27
+ </Netgo_Socialfeeds>
28
+ </modules>
29
+ </config>
lib/Socialfeeds/fb/base_facebook.php CHANGED
@@ -1,1408 +1,1441 @@
1
- <?php
2
- /***************************************
3
- *** Social Feeds ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Socialfeeds
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
-
14
- if (!function_exists('curl_init')) {
15
- throw new Exception('Facebook needs the CURL PHP extension.');
16
- }
17
- if (!function_exists('json_decode')) {
18
- throw new Exception('Facebook needs the JSON PHP extension.');
19
- }
20
-
21
- /**
22
- * Thrown when an API call returns an exception.
23
- *
24
- * @author NetGo
25
- */
26
- class FacebookApiException extends Exception
27
- {
28
- /**
29
- * The result from the API server that represents the exception information.
30
- */
31
- protected $result;
32
-
33
-
34
- public function __construct($result) {
35
- $this->result = $result;
36
-
37
- $code = isset($result['error_code']) ? $result['error_code'] : 0;
38
-
39
- if (isset($result['error_description'])) {
40
- // OAuth 2.0 Draft 10 style
41
- $msg = $result['error_description'];
42
- } else if (isset($result['error']) && is_array($result['error'])) {
43
- // OAuth 2.0 Draft 00 style
44
- $msg = $result['error']['message'];
45
- } else if (isset($result['error_msg'])) {
46
- // Rest server style
47
- $msg = $result['error_msg'];
48
- } else {
49
- $msg = 'Unknown Error. Check getResult()';
50
- }
51
-
52
- parent::__construct($msg, $code);
53
- }
54
-
55
- /**
56
- * Return the associated result object returned by the API server.
57
- *
58
- * @return array The result from the API server
59
- */
60
- public function getResult() {
61
- return $this->result;
62
- }
63
-
64
- /**
65
- * Returns the associated type for the error. This will default to
66
- * 'Exception' when a type is not available.
67
- *
68
- * @return string
69
- */
70
- public function getType() {
71
- if (isset($this->result['error'])) {
72
- $error = $this->result['error'];
73
- if (is_string($error)) {
74
- // OAuth 2.0 Draft 10 style
75
- return $error;
76
- } else if (is_array($error)) {
77
- // OAuth 2.0 Draft 00 style
78
- if (isset($error['type'])) {
79
- return $error['type'];
80
- }
81
- }
82
- }
83
-
84
- return 'Exception';
85
- }
86
-
87
- /**
88
- * To make debugging easier.
89
- *
90
- * @return string The string representation of the error
91
- */
92
- public function __toString() {
93
- $str = $this->getType() . ': ';
94
- if ($this->code != 0) {
95
- $str .= $this->code . ': ';
96
- }
97
- return $str . $this->message;
98
- }
99
- }
100
-
101
- /**
102
- * Provides access to the Facebook Platform. This class provides
103
- * a majority of the functionality needed, but the class is abstract
104
- * because it is designed to be sub-classed. The subclass must
105
- * implement the four abstract methods listed at the bottom of
106
- * the file.
107
- *
108
- * @author NetGo
109
- */
110
- abstract class BaseFacebook
111
- {
112
- /**
113
- * Version.
114
- */
115
- const VERSION = '3.2.2';
116
-
117
- /**
118
- * Signed Request Algorithm.
119
- */
120
- const SIGNED_REQUEST_ALGORITHM = 'HMAC-SHA256';
121
-
122
- /**
123
- * Default options for curl.
124
- */
125
- public static $CURL_OPTS = array(
126
- CURLOPT_CONNECTTIMEOUT => 10,
127
- CURLOPT_RETURNTRANSFER => true,
128
- CURLOPT_TIMEOUT => 60,
129
- CURLOPT_USERAGENT => 'facebook-php-3.2',
130
- );
131
-
132
-
133
- protected static $DROP_QUERY_PARAMS = array(
134
- 'code',
135
- 'state',
136
- 'signed_request',
137
- );
138
-
139
- /**
140
- * Maps aliases to Facebook domains.
141
- */
142
- public static $DOMAIN_MAP = array(
143
- 'api' => 'https://api.facebook.com/',
144
- 'api_video' => 'https://api-video.facebook.com/',
145
- 'api_read' => 'https://api-read.facebook.com/',
146
- 'graph' => 'https://graph.facebook.com/',
147
- 'graph_video' => 'https://graph-video.facebook.com/',
148
- 'www' => 'https://www.facebook.com/',
149
- );
150
-
151
- /**
152
- * The Application ID.
153
- *
154
- * @var string
155
- */
156
- protected $appId;
157
-
158
- /**
159
- * The Application App Secret.
160
- *
161
- * @var string
162
- */
163
- protected $appSecret;
164
-
165
- /**
166
- * The ID of the Facebook user, or 0 if the user is logged out.
167
- *
168
- * @var integer
169
- */
170
- protected $user;
171
-
172
- /**
173
- * The data from the signed_request token.
174
- */
175
- protected $signedRequest;
176
-
177
- /**
178
- * A CSRF state variable to assist in the defense against CSRF attacks.
179
- */
180
- protected $state;
181
-
182
- /**
183
- * The OAuth access token received in exchange for a valid authorization
184
- * code. null means the access token has yet to be determined.
185
- *
186
- * @var string
187
- */
188
- protected $accessToken = null;
189
-
190
- /**
191
- * Indicates if the CURL based @ syntax for file uploads is enabled.
192
- *
193
- * @var boolean
194
- */
195
- protected $fileUploadSupport = false;
196
-
197
- /**
198
- * Indicates if we trust HTTP_X_FORWARDED_* headers.
199
- *
200
- * @var boolean
201
- */
202
- protected $trustForwarded = false;
203
-
204
- /**
205
- * Initialize a Facebook Application.
206
- *
207
- * The configuration:
208
- * - appId: the application ID
209
- * - secret: the application secret
210
- * - fileUpload: (optional) boolean indicating if file uploads are enabled
211
- *
212
- * @param array $config The application configuration
213
- */
214
- public function __construct($config) {
215
- $this->setAppId($config['appId']);
216
- $this->setAppSecret($config['secret']);
217
- if (isset($config['fileUpload'])) {
218
- $this->setFileUploadSupport($config['fileUpload']);
219
- }
220
- if (isset($config['trustForwarded']) && $config['trustForwarded']) {
221
- $this->trustForwarded = true;
222
- }
223
- $state = $this->getPersistentData('state');
224
- if (!empty($state)) {
225
- $this->state = $state;
226
- }
227
- }
228
-
229
- /**
230
- * Set the Application ID.
231
- *
232
- * @param string $appId The Application ID
233
- * @return BaseFacebook
234
- */
235
- public function setAppId($appId) {
236
- $this->appId = $appId;
237
- return $this;
238
- }
239
-
240
- /**
241
- * Get the Application ID.
242
- *
243
- * @return string the Application ID
244
- */
245
- public function getAppId() {
246
- return $this->appId;
247
- }
248
-
249
- /**
250
- * Set the App Secret.
251
- *
252
- * @param string $apiSecret The App Secret
253
- * @return BaseFacebook
254
- * @deprecated
255
- */
256
- public function setApiSecret($apiSecret) {
257
- $this->setAppSecret($apiSecret);
258
- return $this;
259
- }
260
-
261
- /**
262
- * Set the App Secret.
263
- *
264
- * @param string $appSecret The App Secret
265
- * @return BaseFacebook
266
- */
267
- public function setAppSecret($appSecret) {
268
- $this->appSecret = $appSecret;
269
- return $this;
270
- }
271
-
272
- /**
273
- * Get the App Secret.
274
- *
275
- * @return string the App Secret
276
- * @deprecated
277
- */
278
- public function getApiSecret() {
279
- return $this->getAppSecret();
280
- }
281
-
282
- /**
283
- * Get the App Secret.
284
- *
285
- * @return string the App Secret
286
- */
287
- public function getAppSecret() {
288
- return $this->appSecret;
289
- }
290
-
291
-
292
- public function setFileUploadSupport($fileUploadSupport) {
293
- $this->fileUploadSupport = $fileUploadSupport;
294
- return $this;
295
- }
296
-
297
- /**
298
- * Get the file upload support status.
299
- *
300
- * @return boolean true if and only if the server supports file upload.
301
- */
302
- public function getFileUploadSupport() {
303
- return $this->fileUploadSupport;
304
- }
305
-
306
-
307
- public function useFileUploadSupport() {
308
- return $this->getFileUploadSupport();
309
- }
310
-
311
-
312
- public function setAccessToken($access_token) {
313
- $this->accessToken = $access_token;
314
- return $this;
315
- }
316
-
317
-
318
- public function setExtendedAccessToken() {
319
- try {
320
- // need to circumvent json_decode by calling _oauthRequest
321
- // directly, since response isn't JSON format.
322
- $access_token_response = $this->_oauthRequest(
323
- $this->getUrl('graph', '/oauth/access_token'),
324
- $params = array(
325
- 'client_id' => $this->getAppId(),
326
- 'client_secret' => $this->getAppSecret(),
327
- 'grant_type' => 'fb_exchange_token',
328
- 'fb_exchange_token' => $this->getAccessToken(),
329
- )
330
- );
331
- }
332
- catch (FacebookApiException $e) {
333
- // most likely that user very recently revoked authorization.
334
- // In any event, we don't have an access token, so say so.
335
- return false;
336
- }
337
-
338
- if (empty($access_token_response)) {
339
- return false;
340
- }
341
-
342
- $response_params = array();
343
- parse_str($access_token_response, $response_params);
344
-
345
- if (!isset($response_params['access_token'])) {
346
- return false;
347
- }
348
-
349
- $this->destroySession();
350
-
351
- $this->setPersistentData(
352
- 'access_token', $response_params['access_token']
353
- );
354
- }
355
-
356
- /**
357
- * Determines the access token that should be used for API calls.
358
- * The first time this is called, $this->accessToken is set equal
359
- * to either a valid user access token, or it's set to the application
360
- * access token if a valid user access token wasn't available. Subsequent
361
- * calls return whatever the first call returned.
362
- *
363
- * @return string The access token
364
- */
365
- public function getAccessToken() {
366
- if ($this->accessToken !== null) {
367
- // we've done this already and cached it. Just return.
368
- return $this->accessToken;
369
- }
370
-
371
- // first establish access token to be the application
372
- // access token, in case we navigate to the /oauth/access_token
373
- // endpoint, where SOME access token is required.
374
- $this->setAccessToken($this->getApplicationAccessToken());
375
- $user_access_token = $this->getUserAccessToken();
376
- if ($user_access_token) {
377
- $this->setAccessToken($user_access_token);
378
- }
379
-
380
- return $this->accessToken;
381
- }
382
-
383
- /**
384
- * Determines and returns the user access token, first using
385
- * the signed request if present, and then falling back on
386
- * the authorization code if present. The intent is to
387
- * return a valid user access token, or false if one is determined
388
- * to not be available.
389
- *
390
- * @return string A valid user access token, or false if one
391
- * could not be determined.
392
- */
393
- protected function getUserAccessToken() {
394
- // first, consider a signed request if it's supplied.
395
- // if there is a signed request, then it alone determines
396
- // the access token.
397
- $signed_request = $this->getSignedRequest();
398
- if ($signed_request) {
399
- // apps.facebook.com hands the access_token in the signed_request
400
- if (array_key_exists('oauth_token', $signed_request)) {
401
- $access_token = $signed_request['oauth_token'];
402
- $this->setPersistentData('access_token', $access_token);
403
- return $access_token;
404
- }
405
-
406
- // the JS SDK puts a code in with the redirect_uri of ''
407
- if (array_key_exists('code', $signed_request)) {
408
- $code = $signed_request['code'];
409
- if ($code && $code == $this->getPersistentData('code')) {
410
- // short-circuit if the code we have is the same as the one presented
411
- return $this->getPersistentData('access_token');
412
- }
413
-
414
- $access_token = $this->getAccessTokenFromCode($code, '');
415
- if ($access_token) {
416
- $this->setPersistentData('code', $code);
417
- $this->setPersistentData('access_token', $access_token);
418
- return $access_token;
419
- }
420
- }
421
-
422
- // signed request states there's no access token, so anything
423
- // stored should be cleared.
424
- $this->clearAllPersistentData();
425
- return false; // respect the signed request's data, even
426
- // if there's an authorization code or something else
427
- }
428
-
429
- $code = $this->getCode();
430
- if ($code && $code != $this->getPersistentData('code')) {
431
- $access_token = $this->getAccessTokenFromCode($code);
432
- if ($access_token) {
433
- $this->setPersistentData('code', $code);
434
- $this->setPersistentData('access_token', $access_token);
435
- return $access_token;
436
- }
437
-
438
- // code was bogus, so everything based on it should be invalidated.
439
- $this->clearAllPersistentData();
440
- return false;
441
- }
442
-
443
- // as a fallback, just return whatever is in the persistent
444
- // store, knowing nothing explicit (signed request, authorization
445
- // code, etc.) was present to shadow it (or we saw a code in $_REQUEST,
446
- // but it's the same as what's in the persistent store)
447
- return $this->getPersistentData('access_token');
448
- }
449
-
450
- /**
451
- * Retrieve the signed request, either from a request parameter or,
452
- * if not present, from a cookie.
453
- *
454
- * @return string the signed request, if available, or null otherwise.
455
- */
456
- public function getSignedRequest() {
457
- if (!$this->signedRequest) {
458
- if (!empty($_REQUEST['signed_request'])) {
459
- $this->signedRequest = $this->parseSignedRequest(
460
- $_REQUEST['signed_request']);
461
- } else if (!empty($_COOKIE[$this->getSignedRequestCookieName()])) {
462
- $this->signedRequest = $this->parseSignedRequest(
463
- $_COOKIE[$this->getSignedRequestCookieName()]);
464
- }
465
- }
466
- return $this->signedRequest;
467
- }
468
-
469
- /**
470
- * Get the UID of the connected user, or 0
471
- * if the Facebook user is not connected.
472
- *
473
- * @return string the UID if available.
474
- */
475
- public function getUser() {
476
- if ($this->user !== null) {
477
- // we've already determined this and cached the value.
478
- return $this->user;
479
- }
480
-
481
- return $this->user = $this->getUserFromAvailableData();
482
- }
483
-
484
- /**
485
- * Determines the connected user by first examining any signed
486
- * requests, then considering an authorization code, and then
487
- * falling back to any persistent store storing the user.
488
- *
489
- * @return integer The id of the connected Facebook user,
490
- * or 0 if no such user exists.
491
- */
492
- protected function getUserFromAvailableData() {
493
- // if a signed request is supplied, then it solely determines
494
- // who the user is.
495
- $signed_request = $this->getSignedRequest();
496
- if ($signed_request) {
497
- if (array_key_exists('user_id', $signed_request)) {
498
- $user = $signed_request['user_id'];
499
-
500
- if($user != $this->getPersistentData('user_id')){
501
- $this->clearAllPersistentData();
502
- }
503
-
504
- $this->setPersistentData('user_id', $signed_request['user_id']);
505
- return $user;
506
- }
507
-
508
- // if the signed request didn't present a user id, then invalidate
509
- // all entries in any persistent store.
510
- $this->clearAllPersistentData();
511
- return 0;
512
- }
513
-
514
- $user = $this->getPersistentData('user_id', $default = 0);
515
- $persisted_access_token = $this->getPersistentData('access_token');
516
-
517
- // use access_token to fetch user id if we have a user access_token, or if
518
- // the cached access token has changed.
519
- $access_token = $this->getAccessToken();
520
- if ($access_token &&
521
- $access_token != $this->getApplicationAccessToken() &&
522
- !($user && $persisted_access_token == $access_token)) {
523
- $user = $this->getUserFromAccessToken();
524
- if ($user) {
525
- $this->setPersistentData('user_id', $user);
526
- } else {
527
- $this->clearAllPersistentData();
528
- }
529
- }
530
-
531
- return $user;
532
- }
533
-
534
- /**
535
- * Get a Login URL for use with redirects. By default, full page redirect is
536
- * assumed. If you are using the generated URL with a window.open() call in
537
- * JavaScript, you can pass in display=popup as part of the $params.
538
- *
539
- * The parameters:
540
- * - redirect_uri: the url to go to after a successful login
541
- * - scope: comma separated list of requested extended perms
542
- *
543
- * @param array $params Provide custom parameters
544
- * @return string The URL for the login flow
545
- */
546
- public function getLoginUrl($params=array()) {
547
- $this->establishCSRFTokenState();
548
- $currentUrl = $this->getCurrentUrl();
549
-
550
- // if 'scope' is passed as an array, convert to comma separated list
551
- $scopeParams = isset($params['scope']) ? $params['scope'] : null;
552
- if ($scopeParams && is_array($scopeParams)) {
553
- $params['scope'] = implode(',', $scopeParams);
554
- }
555
-
556
- return $this->getUrl(
557
- 'www',
558
- 'dialog/oauth',
559
- array_merge(array(
560
- 'client_id' => $this->getAppId(),
561
- 'redirect_uri' => $currentUrl, // possibly overwritten
562
- 'state' => $this->state),
563
- $params));
564
- }
565
-
566
- /**
567
- * Get a Logout URL suitable for use with redirects.
568
- *
569
- * The parameters:
570
- * - next: the url to go to after a successful logout
571
- *
572
- * @param array $params Provide custom parameters
573
- * @return string The URL for the logout flow
574
- */
575
- public function getLogoutUrl($params=array()) {
576
- return $this->getUrl(
577
- 'www',
578
- 'logout.php',
579
- array_merge(array(
580
- 'next' => $this->getCurrentUrl(),
581
- 'access_token' => $this->getUserAccessToken(),
582
- ), $params)
583
- );
584
- }
585
-
586
- /**
587
- * Get a login status URL to fetch the status from Facebook.
588
- *
589
- * The parameters:
590
- * - ok_session: the URL to go to if a session is found
591
- * - no_session: the URL to go to if the user is not connected
592
- * - no_user: the URL to go to if the user is not signed into facebook
593
- *
594
- * @param array $params Provide custom parameters
595
- * @return string The URL for the logout flow
596
- */
597
- public function getLoginStatusUrl($params=array()) {
598
- return $this->getUrl(
599
- 'www',
600
- 'extern/login_status.php',
601
- array_merge(array(
602
- 'api_key' => $this->getAppId(),
603
- 'no_session' => $this->getCurrentUrl(),
604
- 'no_user' => $this->getCurrentUrl(),
605
- 'ok_session' => $this->getCurrentUrl(),
606
- 'session_version' => 3,
607
- ), $params)
608
- );
609
- }
610
-
611
- /**
612
- * Make an API call.
613
- *
614
- * @return mixed The decoded response
615
- */
616
- public function api(/* polymorphic */) {
617
- $args = func_get_args();
618
- if (is_array($args[0])) {
619
- return $this->_restserver($args[0]);
620
- } else {
621
- return call_user_func_array(array($this, '_graph'), $args);
622
- }
623
- }
624
-
625
- /**
626
- * Constructs and returns the name of the cookie that
627
- * potentially houses the signed request for the app user.
628
- * The cookie is not set by the BaseFacebook class, but
629
- * it may be set by the JavaScript SDK.
630
- *
631
- * @return string the name of the cookie that would house
632
- * the signed request value.
633
- */
634
- protected function getSignedRequestCookieName() {
635
- return 'fbsr_'.$this->getAppId();
636
- }
637
-
638
- /**
639
- * Constructs and returns the name of the coookie that potentially contain
640
- * metadata. The cookie is not set by the BaseFacebook class, but it may be
641
- * set by the JavaScript SDK.
642
- *
643
- * @return string the name of the cookie that would house metadata.
644
- */
645
- protected function getMetadataCookieName() {
646
- return 'fbm_'.$this->getAppId();
647
- }
648
-
649
- /**
650
- * Get the authorization code from the query parameters, if it exists,
651
- * and otherwise return false to signal no authorization code was
652
- * discoverable.
653
- *
654
- * @return mixed The authorization code, or false if the authorization
655
- * code could not be determined.
656
- */
657
- protected function getCode() {
658
- if (isset($_REQUEST['code'])) {
659
- if ($this->state !== null &&
660
- isset($_REQUEST['state']) &&
661
- $this->state === $_REQUEST['state']) {
662
-
663
- // CSRF state has done its job, so clear it
664
- $this->state = null;
665
- $this->clearPersistentData('state');
666
- return $_REQUEST['code'];
667
- } else {
668
- self::errorLog('CSRF state token does not match one provided.');
669
- return false;
670
- }
671
- }
672
-
673
- return false;
674
- }
675
-
676
- /**
677
- * Retrieves the UID with the understanding that
678
- * $this->accessToken has already been set and is
679
- * seemingly legitimate. It relies on Facebook's Graph API
680
- * to retrieve user information and then extract
681
- * the user ID.
682
- *
683
- * @return integer Returns the UID of the Facebook user, or 0
684
- * if the Facebook user could not be determined.
685
- */
686
- protected function getUserFromAccessToken() {
687
- try {
688
- $user_info = $this->api('/me');
689
- return $user_info['id'];
690
- } catch (FacebookApiException $e) {
691
- return 0;
692
- }
693
- }
694
-
695
- /**
696
- * Returns the access token that should be used for logged out
697
- * users when no authorization code is available.
698
- *
699
- * @return string The application access token, useful for gathering
700
- * public information about users and applications.
701
- */
702
- protected function getApplicationAccessToken() {
703
- return $this->appId.'|'.$this->appSecret;
704
- }
705
-
706
- /**
707
- * Lays down a CSRF state token for this process.
708
- *
709
- * @return void
710
- */
711
- protected function establishCSRFTokenState() {
712
- if ($this->state === null) {
713
- $this->state = md5(uniqid(mt_rand(), true));
714
- $this->setPersistentData('state', $this->state);
715
- }
716
- }
717
-
718
- /**
719
- * Retrieves an access token for the given authorization code
720
- * (previously generated from www.facebook.com on behalf of
721
- * a specific user). The authorization code is sent to graph.facebook.com
722
- * and a legitimate access token is generated provided the access token
723
- * and the user for which it was generated all match, and the user is
724
- * either logged in to Facebook or has granted an offline access permission.
725
- *
726
- * @param string $code An authorization code.
727
- * @return mixed An access token exchanged for the authorization code, or
728
- * false if an access token could not be generated.
729
- */
730
- protected function getAccessTokenFromCode($code, $redirect_uri = null) {
731
- if (empty($code)) {
732
- return false;
733
- }
734
-
735
- if ($redirect_uri === null) {
736
- $redirect_uri = $this->getCurrentUrl();
737
- }
738
-
739
- try {
740
- // need to circumvent json_decode by calling _oauthRequest
741
- // directly, since response isn't JSON format.
742
- $access_token_response =
743
- $this->_oauthRequest(
744
- $this->getUrl('graph', '/oauth/access_token'),
745
- $params = array('client_id' => $this->getAppId(),
746
- 'client_secret' => $this->getAppSecret(),
747
- 'redirect_uri' => $redirect_uri,
748
- 'code' => $code));
749
- } catch (FacebookApiException $e) {
750
- // most likely that user very recently revoked authorization.
751
- // In any event, we don't have an access token, so say so.
752
- return false;
753
- }
754
-
755
- if (empty($access_token_response)) {
756
- return false;
757
- }
758
-
759
- $response_params = array();
760
- parse_str($access_token_response, $response_params);
761
- if (!isset($response_params['access_token'])) {
762
- return false;
763
- }
764
-
765
- return $response_params['access_token'];
766
- }
767
-
768
- /**
769
- * Invoke the old restserver.php endpoint.
770
- *
771
- * @param array $params Method call object
772
- *
773
- * @return mixed The decoded response object
774
- * @throws FacebookApiException
775
- */
776
- protected function _restserver($params) {
777
- // generic application level parameters
778
- $params['api_key'] = $this->getAppId();
779
- $params['format'] = 'json-strings';
780
-
781
- $result = json_decode($this->_oauthRequest(
782
- $this->getApiUrl($params['method']),
783
- $params
784
- ), true);
785
-
786
- // results are returned, errors are thrown
787
- if (is_array($result) && isset($result['error_code'])) {
788
- $this->throwAPIException($result);
789
- // @codeCoverageIgnoreStart
790
- }
791
- // @codeCoverageIgnoreEnd
792
-
793
- $method = strtolower($params['method']);
794
- if ($method === 'auth.expiresession' ||
795
- $method === 'auth.revokeauthorization') {
796
- $this->destroySession();
797
- }
798
-
799
- return $result;
800
- }
801
-
802
- /**
803
- * Return true if this is video post.
804
- *
805
- * @param string $path The path
806
- * @param string $method The http method (default 'GET')
807
- *
808
- * @return boolean true if this is video post
809
- */
810
- protected function isVideoPost($path, $method = 'GET') {
811
- if ($method == 'POST' && preg_match("/^(\/)(.+)(\/)(videos)$/", $path)) {
812
- return true;
813
- }
814
- return false;
815
- }
816
-
817
- /**
818
- * Invoke the Graph API.
819
- *
820
- * @param string $path The path (required)
821
- * @param string $method The http method (default 'GET')
822
- * @param array $params The query/post data
823
- *
824
- * @return mixed The decoded response object
825
- * @throws FacebookApiException
826
- */
827
- protected function _graph($path, $method = 'GET', $params = array()) {
828
- if (is_array($method) && empty($params)) {
829
- $params = $method;
830
- $method = 'GET';
831
- }
832
- $params['method'] = $method; // method override as we always do a POST
833
-
834
- if ($this->isVideoPost($path, $method)) {
835
- $domainKey = 'graph_video';
836
- } else {
837
- $domainKey = 'graph';
838
- }
839
-
840
- $result = json_decode($this->_oauthRequest(
841
- $this->getUrl($domainKey, $path),
842
- $params
843
- ), true);
844
-
845
- // results are returned, errors are thrown
846
- if (is_array($result) && isset($result['error'])) {
847
- $this->throwAPIException($result);
848
- // @codeCoverageIgnoreStart
849
- }
850
- // @codeCoverageIgnoreEnd
851
-
852
- return $result;
853
- }
854
-
855
- /**
856
- * Make a OAuth Request.
857
- *
858
- * @param string $url The path (required)
859
- * @param array $params The query/post data
860
- *
861
- * @return string The decoded response object
862
- * @throws FacebookApiException
863
- */
864
- protected function _oauthRequest($url, $params) {
865
- if (!isset($params['access_token'])) {
866
- $params['access_token'] = $this->getAccessToken();
867
- }
868
-
869
- // json_encode all params values that are not strings
870
- foreach ($params as $key => $value) {
871
- if (!is_string($value)) {
872
- $params[$key] = json_encode($value);
873
- }
874
- }
875
-
876
- return $this->makeRequest($url, $params);
877
- }
878
-
879
- /**
880
- * Makes an HTTP request. This method can be overridden by subclasses if
881
- * developers want to do fancier things or use something other than curl to
882
- * make the request.
883
- *
884
- * @param string $url The URL to make the request to
885
- * @param array $params The parameters to use for the POST body
886
- * @param CurlHandler $ch Initialized curl handle
887
- *
888
- * @return string The response text
889
- */
890
- protected function makeRequest($url, $params, $ch=null) {
891
- if (!$ch) {
892
- $ch = curl_init();
893
- }
894
-
895
- $opts = self::$CURL_OPTS;
896
- if ($this->getFileUploadSupport()) {
897
- $opts[CURLOPT_POSTFIELDS] = $params;
898
- } else {
899
- $opts[CURLOPT_POSTFIELDS] = http_build_query($params, null, '&');
900
- }
901
- $opts[CURLOPT_URL] = $url;
902
-
903
- // disable the 'Expect: 100-continue' behaviour. This causes CURL to wait
904
- // for 2 seconds if the server does not support this header.
905
- if (isset($opts[CURLOPT_HTTPHEADER])) {
906
- $existing_headers = $opts[CURLOPT_HTTPHEADER];
907
- $existing_headers[] = 'Expect:';
908
- $opts[CURLOPT_HTTPHEADER] = $existing_headers;
909
- } else {
910
- $opts[CURLOPT_HTTPHEADER] = array('Expect:');
911
- }
912
-
913
- curl_setopt_array($ch, $opts);
914
- $result = curl_exec($ch);
915
-
916
- if (curl_errno($ch) == 60) { // CURLE_SSL_CACERT
917
- self::errorLog('Invalid or no certificate authority found, '.
918
- 'using bundled information');
919
- curl_setopt($ch, CURLOPT_CAINFO,
920
- dirname(__FILE__) . '/fb_ca_chain_bundle.crt');
921
- $result = curl_exec($ch);
922
- }
923
-
924
- // With dual stacked DNS responses, it's possible for a server to
925
- // have IPv6 enabled but not have IPv6 connectivity. If this is
926
- // the case, curl will try IPv4 first and if that fails, then it will
927
- // fall back to IPv6 and the error EHOSTUNREACH is returned by the
928
- // operating system.
929
- if ($result === false && empty($opts[CURLOPT_IPRESOLVE])) {
930
- $matches = array();
931
- $regex = '/Failed to connect to ([^:].*): Network is unreachable/';
932
- if (preg_match($regex, curl_error($ch), $matches)) {
933
- if (strlen(@inet_pton($matches[1])) === 16) {
934
- self::errorLog('Invalid IPv6 configuration on server, '.
935
- 'Please disable or get native IPv6 on your server.');
936
- self::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
937
- curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
938
- $result = curl_exec($ch);
939
- }
940
- }
941
- }
942
-
943
- if ($result === false) {
944
- $e = new FacebookApiException(array(
945
- 'error_code' => curl_errno($ch),
946
- 'error' => array(
947
- 'message' => curl_error($ch),
948
- 'type' => 'CurlException',
949
- ),
950
- ));
951
- curl_close($ch);
952
- throw $e;
953
- }
954
- curl_close($ch);
955
- return $result;
956
- }
957
-
958
- /**
959
- * Parses a signed_request and validates the signature.
960
- *
961
- * @param string $signed_request A signed token
962
- * @return array The payload inside it or null if the sig is wrong
963
- */
964
- protected function parseSignedRequest($signed_request) {
965
- list($encoded_sig, $payload) = explode('.', $signed_request, 2);
966
-
967
- // decode the data
968
- $sig = self::base64UrlDecode($encoded_sig);
969
- $data = json_decode(self::base64UrlDecode($payload), true);
970
-
971
- if (strtoupper($data['algorithm']) !== self::SIGNED_REQUEST_ALGORITHM) {
972
- self::errorLog(
973
- 'Unknown algorithm. Expected ' . self::SIGNED_REQUEST_ALGORITHM);
974
- return null;
975
- }
976
-
977
- // check sig
978
- $expected_sig = hash_hmac('sha256', $payload,
979
- $this->getAppSecret(), $raw = true);
980
- if ($sig !== $expected_sig) {
981
- self::errorLog('Bad Signed JSON signature!');
982
- return null;
983
- }
984
-
985
- return $data;
986
- }
987
-
988
- /**
989
- * Makes a signed_request blob using the given data.
990
- *
991
- * @param array The data array.
992
- * @return string The signed request.
993
- */
994
- protected function makeSignedRequest($data) {
995
- if (!is_array($data)) {
996
- throw new InvalidArgumentException(
997
- 'makeSignedRequest expects an array. Got: ' . print_r($data, true));
998
- }
999
- $data['algorithm'] = self::SIGNED_REQUEST_ALGORITHM;
1000
- $data['issued_at'] = time();
1001
- $json = json_encode($data);
1002
- $b64 = self::base64UrlEncode($json);
1003
- $raw_sig = hash_hmac('sha256', $b64, $this->getAppSecret(), $raw = true);
1004
- $sig = self::base64UrlEncode($raw_sig);
1005
- return $sig.'.'.$b64;
1006
- }
1007
-
1008
- /**
1009
- * Build the URL for api given parameters.
1010
- *
1011
- * @param $method String the method name.
1012
- * @return string The URL for the given parameters
1013
- */
1014
- protected function getApiUrl($method) {
1015
- static $READ_ONLY_CALLS =
1016
- array('admin.getallocation' => 1,
1017
- 'admin.getappproperties' => 1,
1018
- 'admin.getbannedusers' => 1,
1019
- 'admin.getlivestreamvialink' => 1,
1020
- 'admin.getmetrics' => 1,
1021
- 'admin.getrestrictioninfo' => 1,
1022
- 'application.getpublicinfo' => 1,
1023
- 'auth.getapppublickey' => 1,
1024
- 'auth.getsession' => 1,
1025
- 'auth.getsignedpublicsessiondata' => 1,
1026
- 'comments.get' => 1,
1027
- 'connect.getunconnectedfriendscount' => 1,
1028
- 'dashboard.getactivity' => 1,
1029
- 'dashboard.getcount' => 1,
1030
- 'dashboard.getglobalnews' => 1,
1031
- 'dashboard.getnews' => 1,
1032
- 'dashboard.multigetcount' => 1,
1033
- 'dashboard.multigetnews' => 1,
1034
- 'data.getcookies' => 1,
1035
- 'events.get' => 1,
1036
- 'events.getmembers' => 1,
1037
- 'fbml.getcustomtags' => 1,
1038
- 'feed.getappfriendstories' => 1,
1039
- 'feed.getregisteredtemplatebundlebyid' => 1,
1040
- 'feed.getregisteredtemplatebundles' => 1,
1041
- 'fql.multiquery' => 1,
1042
- 'fql.query' => 1,
1043
- 'friends.arefriends' => 1,
1044
- 'friends.get' => 1,
1045
- 'friends.getappusers' => 1,
1046
- 'friends.getlists' => 1,
1047
- 'friends.getmutualfriends' => 1,
1048
- 'gifts.get' => 1,
1049
- 'groups.get' => 1,
1050
- 'groups.getmembers' => 1,
1051
- 'intl.gettranslations' => 1,
1052
- 'links.get' => 1,
1053
- 'notes.get' => 1,
1054
- 'notifications.get' => 1,
1055
- 'pages.getinfo' => 1,
1056
- 'pages.isadmin' => 1,
1057
- 'pages.isappadded' => 1,
1058
- 'pages.isfan' => 1,
1059
- 'permissions.checkavailableapiaccess' => 1,
1060
- 'permissions.checkgrantedapiaccess' => 1,
1061
- 'photos.get' => 1,
1062
- 'photos.getalbums' => 1,
1063
- 'photos.gettags' => 1,
1064
- 'profile.getinfo' => 1,
1065
- 'profile.getinfooptions' => 1,
1066
- 'stream.get' => 1,
1067
- 'stream.getcomments' => 1,
1068
- 'stream.getfilters' => 1,
1069
- 'users.getinfo' => 1,
1070
- 'users.getloggedinuser' => 1,
1071
- 'users.getstandardinfo' => 1,
1072
- 'users.hasapppermission' => 1,
1073
- 'users.isappuser' => 1,
1074
- 'users.isverified' => 1,
1075
- 'video.getuploadlimits' => 1);
1076
- $name = 'api';
1077
- if (isset($READ_ONLY_CALLS[strtolower($method)])) {
1078
- $name = 'api_read';
1079
- } else if (strtolower($method) == 'video.upload') {
1080
- $name = 'api_video';
1081
- }
1082
- return self::getUrl($name, 'restserver.php');
1083
- }
1084
-
1085
- /**
1086
- * Build the URL for given domain alias, path and parameters.
1087
- *
1088
- * @param $name string The name of the domain
1089
- * @param $path string Optional path (without a leading slash)
1090
- * @param $params array Optional query parameters
1091
- *
1092
- * @return string The URL for the given parameters
1093
- */
1094
- protected function getUrl($name, $path='', $params=array()) {
1095
- $url = self::$DOMAIN_MAP[$name];
1096
- if ($path) {
1097
- if ($path[0] === '/') {
1098
- $path = substr($path, 1);
1099
- }
1100
- $url .= $path;
1101
- }
1102
- if ($params) {
1103
- $url .= '?' . http_build_query($params, null, '&');
1104
- }
1105
-
1106
- return $url;
1107
- }
1108
-
1109
- protected function getHttpHost() {
1110
- if ($this->trustForwarded && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
1111
- return $_SERVER['HTTP_X_FORWARDED_HOST'];
1112
- }
1113
- return $_SERVER['HTTP_HOST'];
1114
- }
1115
-
1116
- protected function getHttpProtocol() {
1117
- if ($this->trustForwarded && isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
1118
- if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
1119
- return 'https';
1120
- }
1121
- return 'http';
1122
- }
1123
- /*apache + variants specific way of checking for https*/
1124
- if (isset($_SERVER['HTTPS']) &&
1125
- ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] == 1)) {
1126
- return 'https';
1127
- }
1128
- /*nginx way of checking for https*/
1129
- if (isset($_SERVER['SERVER_PORT']) &&
1130
- ($_SERVER['SERVER_PORT'] === '443')) {
1131
- return 'https';
1132
- }
1133
- return 'http';
1134
- }
1135
-
1136
- /**
1137
- * Get the base domain used for the cookie.
1138
- */
1139
- protected function getBaseDomain() {
1140
- // The base domain is stored in the metadata cookie if not we fallback
1141
- // to the current hostname
1142
- $metadata = $this->getMetadataCookie();
1143
- if (array_key_exists('base_domain', $metadata) &&
1144
- !empty($metadata['base_domain'])) {
1145
- return trim($metadata['base_domain'], '.');
1146
- }
1147
- return $this->getHttpHost();
1148
- }
1149
-
1150
- /**
1151
-
1152
- /**
1153
- * Returns the Current URL, stripping it of known FB parameters that should
1154
- * not persist.
1155
- *
1156
- * @return string The current URL
1157
- */
1158
- protected function getCurrentUrl() {
1159
- $protocol = $this->getHttpProtocol() . '://';
1160
- $host = $this->getHttpHost();
1161
- $currentUrl = $protocol.$host.$_SERVER['REQUEST_URI'];
1162
- $parts = parse_url($currentUrl);
1163
-
1164
- $query = '';
1165
- if (!empty($parts['query'])) {
1166
- // drop known fb params
1167
- $params = explode('&', $parts['query']);
1168
- $retained_params = array();
1169
- foreach ($params as $param) {
1170
- if ($this->shouldRetainParam($param)) {
1171
- $retained_params[] = $param;
1172
- }
1173
- }
1174
-
1175
- if (!empty($retained_params)) {
1176
- $query = '?'.implode($retained_params, '&');
1177
- }
1178
- }
1179
-
1180
- // use port if non default
1181
- $port =
1182
- isset($parts['port']) &&
1183
- (($protocol === 'http://' && $parts['port'] !== 80) ||
1184
- ($protocol === 'https://' && $parts['port'] !== 443))
1185
- ? ':' . $parts['port'] : '';
1186
-
1187
- // rebuild
1188
- return $protocol . $parts['host'] . $port . $parts['path'] . $query;
1189
- }
1190
-
1191
- /**
1192
- * Returns true if and only if the key or key/value pair should
1193
- * be retained as part of the query string. This amounts to
1194
- * a brute-force search of the very small list of Facebook-specific
1195
- * params that should be stripped out.
1196
- *
1197
- * @param string $param A key or key/value pair within a URL's query (e.g.
1198
- * 'foo=a', 'foo=', or 'foo'.
1199
- *
1200
- * @return boolean
1201
- */
1202
- protected function shouldRetainParam($param) {
1203
- foreach (self::$DROP_QUERY_PARAMS as $drop_query_param) {
1204
- if (strpos($param, $drop_query_param.'=') === 0) {
1205
- return false;
1206
- }
1207
- }
1208
-
1209
- return true;
1210
- }
1211
-
1212
- /**
1213
- * Analyzes the supplied result to see if it was thrown
1214
- * because the access token is no longer valid. If that is
1215
- * the case, then we destroy the session.
1216
- *
1217
- * @param $result array A record storing the error message returned
1218
- * by a failed API call.
1219
- */
1220
- protected function throwAPIException($result) {
1221
- $e = new FacebookApiException($result);
1222
- switch ($e->getType()) {
1223
- // OAuth 2.0 Draft 00 style
1224
- case 'OAuthException':
1225
- // OAuth 2.0 Draft 10 style
1226
- case 'invalid_token':
1227
- // REST server errors are just Exceptions
1228
- case 'Exception':
1229
- $message = $e->getMessage();
1230
- if ((strpos($message, 'Error validating access token') !== false) ||
1231
- (strpos($message, 'Invalid OAuth access token') !== false) ||
1232
- (strpos($message, 'An active access token must be used') !== false)
1233
- ) {
1234
- $this->destroySession();
1235
- }
1236
- break;
1237
- }
1238
-
1239
- throw $e;
1240
- }
1241
-
1242
-
1243
- /**
1244
- * Prints to the error log if you aren't in command line mode.
1245
- *
1246
- * @param string $msg Log message
1247
- */
1248
- protected static function errorLog($msg) {
1249
- // disable error log if we are running in a CLI environment
1250
- // @codeCoverageIgnoreStart
1251
- if (php_sapi_name() != 'cli') {
1252
- error_log($msg);
1253
- }
1254
- // uncomment this if you want to see the errors on the page
1255
- // print 'error_log: '.$msg."\n";
1256
- // @codeCoverageIgnoreEnd
1257
- }
1258
-
1259
- /**
1260
- * Base64 encoding that doesn't need to be urlencode()ed.
1261
- * Exactly the same as base64_encode except it uses
1262
- * - instead of +
1263
- * _ instead of /
1264
- * No padded =
1265
- *
1266
- * @param string $input base64UrlEncoded string
1267
- * @return string
1268
- */
1269
- protected static function base64UrlDecode($input) {
1270
- return base64_decode(strtr($input, '-_', '+/'));
1271
- }
1272
-
1273
- /**
1274
- * Base64 encoding that doesn't need to be urlencode()ed.
1275
- * Exactly the same as base64_encode except it uses
1276
- * - instead of +
1277
- * _ instead of /
1278
- *
1279
- * @param string $input string
1280
- * @return string base64Url encoded string
1281
- */
1282
- protected static function base64UrlEncode($input) {
1283
- $str = strtr(base64_encode($input), '+/', '-_');
1284
- $str = str_replace('=', '', $str);
1285
- return $str;
1286
- }
1287
-
1288
- /**
1289
- * Destroy the current session
1290
- */
1291
- public function destroySession() {
1292
- $this->accessToken = null;
1293
- $this->signedRequest = null;
1294
- $this->user = null;
1295
- $this->clearAllPersistentData();
1296
-
1297
- // Javascript sets a cookie that will be used in getSignedRequest that we
1298
- // need to clear if we can
1299
- $cookie_name = $this->getSignedRequestCookieName();
1300
- if (array_key_exists($cookie_name, $_COOKIE)) {
1301
- unset($_COOKIE[$cookie_name]);
1302
- if (!headers_sent()) {
1303
- $base_domain = $this->getBaseDomain();
1304
- setcookie($cookie_name, '', 1, '/', '.'.$base_domain);
1305
- } else {
1306
- // @codeCoverageIgnoreStart
1307
- self::errorLog(
1308
- 'There exists a cookie that we wanted to clear that we couldn\'t '.
1309
- 'clear because headers was already sent. Make sure to do the first '.
1310
- 'API call before outputing anything.'
1311
- );
1312
- // @codeCoverageIgnoreEnd
1313
- }
1314
- }
1315
- }
1316
-
1317
- /**
1318
- * Parses the metadata cookie that our Javascript API set
1319
- *
1320
- * @return an array mapping key to value
1321
- */
1322
- protected function getMetadataCookie() {
1323
- $cookie_name = $this->getMetadataCookieName();
1324
- if (!array_key_exists($cookie_name, $_COOKIE)) {
1325
- return array();
1326
- }
1327
-
1328
- // The cookie value can be wrapped in "-characters so remove them
1329
- $cookie_value = trim($_COOKIE[$cookie_name], '"');
1330
-
1331
- if (empty($cookie_value)) {
1332
- return array();
1333
- }
1334
-
1335
- $parts = explode('&', $cookie_value);
1336
- $metadata = array();
1337
- foreach ($parts as $part) {
1338
- $pair = explode('=', $part, 2);
1339
- if (!empty($pair[0])) {
1340
- $metadata[urldecode($pair[0])] =
1341
- (count($pair) > 1) ? urldecode($pair[1]) : '';
1342
- }
1343
- }
1344
-
1345
- return $metadata;
1346
- }
1347
-
1348
- protected static function isAllowedDomain($big, $small) {
1349
- if ($big === $small) {
1350
- return true;
1351
- }
1352
- return self::endsWith($big, '.'.$small);
1353
- }
1354
-
1355
- protected static function endsWith($big, $small) {
1356
- $len = strlen($small);
1357
- if ($len === 0) {
1358
- return true;
1359
- }
1360
- return substr($big, -$len) === $small;
1361
- }
1362
-
1363
- /**
1364
- * Each of the following four methods should be overridden in
1365
- * a concrete subclass, as they are in the provided Facebook class.
1366
- * The Facebook class uses PHP sessions to provide a primitive
1367
- * persistent store, but another subclass--one that you implement--
1368
- * might use a database, memcache, or an in-memory cache.
1369
- *
1370
- * @see Facebook
1371
- */
1372
-
1373
- /**
1374
- * Stores the given ($key, $value) pair, so that future calls to
1375
- * getPersistentData($key) return $value. This call may be in another request.
1376
- *
1377
- * @param string $key
1378
- * @param array $value
1379
- *
1380
- * @return void
1381
- */
1382
- abstract protected function setPersistentData($key, $value);
1383
-
1384
- /**
1385
- * Get the data for $key, persisted by BaseFacebook::setPersistentData()
1386
- *
1387
- * @param string $key The key of the data to retrieve
1388
- * @param boolean $default The default value to return if $key is not found
1389
- *
1390
- * @return mixed
1391
- */
1392
- abstract protected function getPersistentData($key, $default = false);
1393
-
1394
- /**
1395
- * Clear the data with $key from the persistent storage
1396
- *
1397
- * @param string $key
1398
- * @return void
1399
- */
1400
- abstract protected function clearPersistentData($key);
1401
-
1402
- /**
1403
- * Clear all data from the persistent storage
1404
- *
1405
- * @return void
1406
- */
1407
- abstract protected function clearAllPersistentData();
1408
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright 2011 Facebook, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may
6
+ * not use this file except in compliance with the License. You may obtain
7
+ * a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations
15
+ * under the License.
16
+ */
17
+
18
+ if (!function_exists('curl_init')) {
19
+ throw new Exception('Facebook needs the CURL PHP extension.');
20
+ }
21
+ if (!function_exists('json_decode')) {
22
+ throw new Exception('Facebook needs the JSON PHP extension.');
23
+ }
24
+
25
+ /**
26
+ * Thrown when an API call returns an exception.
27
+ *
28
+ * @author Naitik Shah <naitik@facebook.com>
29
+ */
30
+ class FacebookApiException extends Exception
31
+ {
32
+ /**
33
+ * The result from the API server that represents the exception information.
34
+ */
35
+ protected $result;
36
+
37
+ /**
38
+ * Make a new API Exception with the given result.
39
+ *
40
+ * @param array $result The result from the API server
41
+ */
42
+ public function __construct($result) {
43
+ $this->result = $result;
44
+
45
+ $code = isset($result['error_code']) ? $result['error_code'] : 0;
46
+
47
+ if (isset($result['error_description'])) {
48
+ // OAuth 2.0 Draft 10 style
49
+ $msg = $result['error_description'];
50
+ } else if (isset($result['error']) && is_array($result['error'])) {
51
+ // OAuth 2.0 Draft 00 style
52
+ $msg = $result['error']['message'];
53
+ } else if (isset($result['error_msg'])) {
54
+ // Rest server style
55
+ $msg = $result['error_msg'];
56
+ } else {
57
+ $msg = 'Unknown Error. Check getResult()';
58
+ }
59
+
60
+ parent::__construct($msg, $code);
61
+ }
62
+
63
+ /**
64
+ * Return the associated result object returned by the API server.
65
+ *
66
+ * @return array The result from the API server
67
+ */
68
+ public function getResult() {
69
+ return $this->result;
70
+ }
71
+
72
+ /**
73
+ * Returns the associated type for the error. This will default to
74
+ * 'Exception' when a type is not available.
75
+ *
76
+ * @return string
77
+ */
78
+ public function getType() {
79
+ if (isset($this->result['error'])) {
80
+ $error = $this->result['error'];
81
+ if (is_string($error)) {
82
+ // OAuth 2.0 Draft 10 style
83
+ return $error;
84
+ } else if (is_array($error)) {
85
+ // OAuth 2.0 Draft 00 style
86
+ if (isset($error['type'])) {
87
+ return $error['type'];
88
+ }
89
+ }
90
+ }
91
+
92
+ return 'Exception';
93
+ }
94
+
95
+ /**
96
+ * To make debugging easier.
97
+ *
98
+ * @return string The string representation of the error
99
+ */
100
+ public function __toString() {
101
+ $str = $this->getType() . ': ';
102
+ if ($this->code != 0) {
103
+ $str .= $this->code . ': ';
104
+ }
105
+ return $str . $this->message;
106
+ }
107
+ }
108
+
109
+ /**
110
+ * Provides access to the Facebook Platform. This class provides
111
+ * a majority of the functionality needed, but the class is abstract
112
+ * because it is designed to be sub-classed. The subclass must
113
+ * implement the four abstract methods listed at the bottom of
114
+ * the file.
115
+ *
116
+ * @author Naitik Shah <naitik@facebook.com>
117
+ */
118
+ abstract class BaseFacebook
119
+ {
120
+ /**
121
+ * Version.
122
+ */
123
+ const VERSION = '3.2.2';
124
+
125
+ /**
126
+ * Signed Request Algorithm.
127
+ */
128
+ const SIGNED_REQUEST_ALGORITHM = 'HMAC-SHA256';
129
+
130
+ /**
131
+ * Default options for curl.
132
+ */
133
+ public static $CURL_OPTS = array(
134
+ CURLOPT_CONNECTTIMEOUT => 10,
135
+ CURLOPT_RETURNTRANSFER => true,
136
+ CURLOPT_TIMEOUT => 60,
137
+ CURLOPT_USERAGENT => 'facebook-php-3.2',
138
+ );
139
+
140
+ /**
141
+ * List of query parameters that get automatically dropped when rebuilding
142
+ * the current URL.
143
+ */
144
+ protected static $DROP_QUERY_PARAMS = array(
145
+ 'code',
146
+ 'state',
147
+ 'signed_request',
148
+ );
149
+
150
+ /**
151
+ * Maps aliases to Facebook domains.
152
+ */
153
+ public static $DOMAIN_MAP = array(
154
+ 'api' => 'https://api.facebook.com/',
155
+ 'api_video' => 'https://api-video.facebook.com/',
156
+ 'api_read' => 'https://api-read.facebook.com/',
157
+ 'graph' => 'https://graph.facebook.com/',
158
+ 'graph_video' => 'https://graph-video.facebook.com/',
159
+ 'www' => 'https://www.facebook.com/',
160
+ );
161
+
162
+ /**
163
+ * The Application ID.
164
+ *
165
+ * @var string
166
+ */
167
+ protected $appId;
168
+
169
+ /**
170
+ * The Application App Secret.
171
+ *
172
+ * @var string
173
+ */
174
+ protected $appSecret;
175
+
176
+ /**
177
+ * The ID of the Facebook user, or 0 if the user is logged out.
178
+ *
179
+ * @var integer
180
+ */
181
+ protected $user;
182
+
183
+ /**
184
+ * The data from the signed_request token.
185
+ */
186
+ protected $signedRequest;
187
+
188
+ /**
189
+ * A CSRF state variable to assist in the defense against CSRF attacks.
190
+ */
191
+ protected $state;
192
+
193
+ /**
194
+ * The OAuth access token received in exchange for a valid authorization
195
+ * code. null means the access token has yet to be determined.
196
+ *
197
+ * @var string
198
+ */
199
+ protected $accessToken = null;
200
+
201
+ /**
202
+ * Indicates if the CURL based @ syntax for file uploads is enabled.
203
+ *
204
+ * @var boolean
205
+ */
206
+ protected $fileUploadSupport = false;
207
+
208
+ /**
209
+ * Indicates if we trust HTTP_X_FORWARDED_* headers.
210
+ *
211
+ * @var boolean
212
+ */
213
+ protected $trustForwarded = false;
214
+
215
+ /**
216
+ * Initialize a Facebook Application.
217
+ *
218
+ * The configuration:
219
+ * - appId: the application ID
220
+ * - secret: the application secret
221
+ * - fileUpload: (optional) boolean indicating if file uploads are enabled
222
+ *
223
+ * @param array $config The application configuration
224
+ */
225
+ public function __construct($config) {
226
+ $this->setAppId($config['appId']);
227
+ $this->setAppSecret($config['secret']);
228
+ if (isset($config['fileUpload'])) {
229
+ $this->setFileUploadSupport($config['fileUpload']);
230
+ }
231
+ if (isset($config['trustForwarded']) && $config['trustForwarded']) {
232
+ $this->trustForwarded = true;
233
+ }
234
+ $state = $this->getPersistentData('state');
235
+ if (!empty($state)) {
236
+ $this->state = $state;
237
+ }
238
+ }
239
+
240
+ /**
241
+ * Set the Application ID.
242
+ *
243
+ * @param string $appId The Application ID
244
+ * @return BaseFacebook
245
+ */
246
+ public function setAppId($appId) {
247
+ $this->appId = $appId;
248
+ return $this;
249
+ }
250
+
251
+ /**
252
+ * Get the Application ID.
253
+ *
254
+ * @return string the Application ID
255
+ */
256
+ public function getAppId() {
257
+ return $this->appId;
258
+ }
259
+
260
+ /**
261
+ * Set the App Secret.
262
+ *
263
+ * @param string $apiSecret The App Secret
264
+ * @return BaseFacebook
265
+ * @deprecated
266
+ */
267
+ public function setApiSecret($apiSecret) {
268
+ $this->setAppSecret($apiSecret);
269
+ return $this;
270
+ }
271
+
272
+ /**
273
+ * Set the App Secret.
274
+ *
275
+ * @param string $appSecret The App Secret
276
+ * @return BaseFacebook
277
+ */
278
+ public function setAppSecret($appSecret) {
279
+ $this->appSecret = $appSecret;
280
+ return $this;
281
+ }
282
+
283
+ /**
284
+ * Get the App Secret.
285
+ *
286
+ * @return string the App Secret
287
+ * @deprecated
288
+ */
289
+ public function getApiSecret() {
290
+ return $this->getAppSecret();
291
+ }
292
+
293
+ /**
294
+ * Get the App Secret.
295
+ *
296
+ * @return string the App Secret
297
+ */
298
+ public function getAppSecret() {
299
+ return $this->appSecret;
300
+ }
301
+
302
+ /**
303
+ * Set the file upload support status.
304
+ *
305
+ * @param boolean $fileUploadSupport The file upload support status.
306
+ * @return BaseFacebook
307
+ */
308
+ public function setFileUploadSupport($fileUploadSupport) {
309
+ $this->fileUploadSupport = $fileUploadSupport;
310
+ return $this;
311
+ }
312
+
313
+ /**
314
+ * Get the file upload support status.
315
+ *
316
+ * @return boolean true if and only if the server supports file upload.
317
+ */
318
+ public function getFileUploadSupport() {
319
+ return $this->fileUploadSupport;
320
+ }
321
+
322
+ /**
323
+ * DEPRECATED! Please use getFileUploadSupport instead.
324
+ *
325
+ * Get the file upload support status.
326
+ *
327
+ * @return boolean true if and only if the server supports file upload.
328
+ */
329
+ public function useFileUploadSupport() {
330
+ return $this->getFileUploadSupport();
331
+ }
332
+
333
+ /**
334
+ * Sets the access token for api calls. Use this if you get
335
+ * your access token by other means and just want the SDK
336
+ * to use it.
337
+ *
338
+ * @param string $access_token an access token.
339
+ * @return BaseFacebook
340
+ */
341
+ public function setAccessToken($access_token) {
342
+ $this->accessToken = $access_token;
343
+ return $this;
344
+ }
345
+
346
+ /**
347
+ * Extend an access token, while removing the short-lived token that might
348
+ * have been generated via client-side flow. Thanks to http://bit.ly/b0Pt0H
349
+ * for the workaround.
350
+ */
351
+ public function setExtendedAccessToken() {
352
+ try {
353
+ // need to circumvent json_decode by calling _oauthRequest
354
+ // directly, since response isn't JSON format.
355
+ $access_token_response = $this->_oauthRequest(
356
+ $this->getUrl('graph', '/oauth/access_token'),
357
+ $params = array(
358
+ 'client_id' => $this->getAppId(),
359
+ 'client_secret' => $this->getAppSecret(),
360
+ 'grant_type' => 'fb_exchange_token',
361
+ 'fb_exchange_token' => $this->getAccessToken(),
362
+ )
363
+ );
364
+ }
365
+ catch (FacebookApiException $e) {
366
+ // most likely that user very recently revoked authorization.
367
+ // In any event, we don't have an access token, so say so.
368
+ return false;
369
+ }
370
+
371
+ if (empty($access_token_response)) {
372
+ return false;
373
+ }
374
+
375
+ $response_params = array();
376
+ parse_str($access_token_response, $response_params);
377
+
378
+ if (!isset($response_params['access_token'])) {
379
+ return false;
380
+ }
381
+
382
+ $this->destroySession();
383
+
384
+ $this->setPersistentData(
385
+ 'access_token', $response_params['access_token']
386
+ );
387
+ }
388
+
389
+ /**
390
+ * Determines the access token that should be used for API calls.
391
+ * The first time this is called, $this->accessToken is set equal
392
+ * to either a valid user access token, or it's set to the application
393
+ * access token if a valid user access token wasn't available. Subsequent
394
+ * calls return whatever the first call returned.
395
+ *
396
+ * @return string The access token
397
+ */
398
+ public function getAccessToken() {
399
+ if ($this->accessToken !== null) {
400
+ // we've done this already and cached it. Just return.
401
+ return $this->accessToken;
402
+ }
403
+
404
+ // first establish access token to be the application
405
+ // access token, in case we navigate to the /oauth/access_token
406
+ // endpoint, where SOME access token is required.
407
+ $this->setAccessToken($this->getApplicationAccessToken());
408
+ $user_access_token = $this->getUserAccessToken();
409
+ if ($user_access_token) {
410
+ $this->setAccessToken($user_access_token);
411
+ }
412
+
413
+ return $this->accessToken;
414
+ }
415
+
416
+ /**
417
+ * Determines and returns the user access token, first using
418
+ * the signed request if present, and then falling back on
419
+ * the authorization code if present. The intent is to
420
+ * return a valid user access token, or false if one is determined
421
+ * to not be available.
422
+ *
423
+ * @return string A valid user access token, or false if one
424
+ * could not be determined.
425
+ */
426
+ protected function getUserAccessToken() {
427
+ // first, consider a signed request if it's supplied.
428
+ // if there is a signed request, then it alone determines
429
+ // the access token.
430
+ $signed_request = $this->getSignedRequest();
431
+ if ($signed_request) {
432
+ // apps.facebook.com hands the access_token in the signed_request
433
+ if (array_key_exists('oauth_token', $signed_request)) {
434
+ $access_token = $signed_request['oauth_token'];
435
+ $this->setPersistentData('access_token', $access_token);
436
+ return $access_token;
437
+ }
438
+
439
+ // the JS SDK puts a code in with the redirect_uri of ''
440
+ if (array_key_exists('code', $signed_request)) {
441
+ $code = $signed_request['code'];
442
+ if ($code && $code == $this->getPersistentData('code')) {
443
+ // short-circuit if the code we have is the same as the one presented
444
+ return $this->getPersistentData('access_token');
445
+ }
446
+
447
+ $access_token = $this->getAccessTokenFromCode($code, '');
448
+ if ($access_token) {
449
+ $this->setPersistentData('code', $code);
450
+ $this->setPersistentData('access_token', $access_token);
451
+ return $access_token;
452
+ }
453
+ }
454
+
455
+ // signed request states there's no access token, so anything
456
+ // stored should be cleared.
457
+ $this->clearAllPersistentData();
458
+ return false; // respect the signed request's data, even
459
+ // if there's an authorization code or something else
460
+ }
461
+
462
+ $code = $this->getCode();
463
+ if ($code && $code != $this->getPersistentData('code')) {
464
+ $access_token = $this->getAccessTokenFromCode($code);
465
+ if ($access_token) {
466
+ $this->setPersistentData('code', $code);
467
+ $this->setPersistentData('access_token', $access_token);
468
+ return $access_token;
469
+ }
470
+
471
+ // code was bogus, so everything based on it should be invalidated.
472
+ $this->clearAllPersistentData();
473
+ return false;
474
+ }
475
+
476
+ // as a fallback, just return whatever is in the persistent
477
+ // store, knowing nothing explicit (signed request, authorization
478
+ // code, etc.) was present to shadow it (or we saw a code in $_REQUEST,
479
+ // but it's the same as what's in the persistent store)
480
+ return $this->getPersistentData('access_token');
481
+ }
482
+
483
+ /**
484
+ * Retrieve the signed request, either from a request parameter or,
485
+ * if not present, from a cookie.
486
+ *
487
+ * @return string the signed request, if available, or null otherwise.
488
+ */
489
+ public function getSignedRequest() {
490
+ if (!$this->signedRequest) {
491
+ if (!empty($_REQUEST['signed_request'])) {
492
+ $this->signedRequest = $this->parseSignedRequest(
493
+ $_REQUEST['signed_request']);
494
+ } else if (!empty($_COOKIE[$this->getSignedRequestCookieName()])) {
495
+ $this->signedRequest = $this->parseSignedRequest(
496
+ $_COOKIE[$this->getSignedRequestCookieName()]);
497
+ }
498
+ }
499
+ return $this->signedRequest;
500
+ }
501
+
502
+ /**
503
+ * Get the UID of the connected user, or 0
504
+ * if the Facebook user is not connected.
505
+ *
506
+ * @return string the UID if available.
507
+ */
508
+ public function getUser() {
509
+ if ($this->user !== null) {
510
+ // we've already determined this and cached the value.
511
+ return $this->user;
512
+ }
513
+
514
+ return $this->user = $this->getUserFromAvailableData();
515
+ }
516
+
517
+ /**
518
+ * Determines the connected user by first examining any signed
519
+ * requests, then considering an authorization code, and then
520
+ * falling back to any persistent store storing the user.
521
+ *
522
+ * @return integer The id of the connected Facebook user,
523
+ * or 0 if no such user exists.
524
+ */
525
+ protected function getUserFromAvailableData() {
526
+ // if a signed request is supplied, then it solely determines
527
+ // who the user is.
528
+ $signed_request = $this->getSignedRequest();
529
+ if ($signed_request) {
530
+ if (array_key_exists('user_id', $signed_request)) {
531
+ $user = $signed_request['user_id'];
532
+
533
+ if($user != $this->getPersistentData('user_id')){
534
+ $this->clearAllPersistentData();
535
+ }
536
+
537
+ $this->setPersistentData('user_id', $signed_request['user_id']);
538
+ return $user;
539
+ }
540
+
541
+ // if the signed request didn't present a user id, then invalidate
542
+ // all entries in any persistent store.
543
+ $this->clearAllPersistentData();
544
+ return 0;
545
+ }
546
+
547
+ $user = $this->getPersistentData('user_id', $default = 0);
548
+ $persisted_access_token = $this->getPersistentData('access_token');
549
+
550
+ // use access_token to fetch user id if we have a user access_token, or if
551
+ // the cached access token has changed.
552
+ $access_token = $this->getAccessToken();
553
+ if ($access_token &&
554
+ $access_token != $this->getApplicationAccessToken() &&
555
+ !($user && $persisted_access_token == $access_token)) {
556
+ $user = $this->getUserFromAccessToken();
557
+ if ($user) {
558
+ $this->setPersistentData('user_id', $user);
559
+ } else {
560
+ $this->clearAllPersistentData();
561
+ }
562
+ }
563
+
564
+ return $user;
565
+ }
566
+
567
+ /**
568
+ * Get a Login URL for use with redirects. By default, full page redirect is
569
+ * assumed. If you are using the generated URL with a window.open() call in
570
+ * JavaScript, you can pass in display=popup as part of the $params.
571
+ *
572
+ * The parameters:
573
+ * - redirect_uri: the url to go to after a successful login
574
+ * - scope: comma separated list of requested extended perms
575
+ *
576
+ * @param array $params Provide custom parameters
577
+ * @return string The URL for the login flow
578
+ */
579
+ public function getLoginUrl($params=array()) {
580
+ $this->establishCSRFTokenState();
581
+ $currentUrl = $this->getCurrentUrl();
582
+
583
+ // if 'scope' is passed as an array, convert to comma separated list
584
+ $scopeParams = isset($params['scope']) ? $params['scope'] : null;
585
+ if ($scopeParams && is_array($scopeParams)) {
586
+ $params['scope'] = implode(',', $scopeParams);
587
+ }
588
+
589
+ return $this->getUrl(
590
+ 'www',
591
+ 'dialog/oauth',
592
+ array_merge(array(
593
+ 'client_id' => $this->getAppId(),
594
+ 'redirect_uri' => $currentUrl, // possibly overwritten
595
+ 'state' => $this->state),
596
+ $params));
597
+ }
598
+
599
+ /**
600
+ * Get a Logout URL suitable for use with redirects.
601
+ *
602
+ * The parameters:
603
+ * - next: the url to go to after a successful logout
604
+ *
605
+ * @param array $params Provide custom parameters
606
+ * @return string The URL for the logout flow
607
+ */
608
+ public function getLogoutUrl($params=array()) {
609
+ return $this->getUrl(
610
+ 'www',
611
+ 'logout.php',
612
+ array_merge(array(
613
+ 'next' => $this->getCurrentUrl(),
614
+ 'access_token' => $this->getUserAccessToken(),
615
+ ), $params)
616
+ );
617
+ }
618
+
619
+ /**
620
+ * Get a login status URL to fetch the status from Facebook.
621
+ *
622
+ * The parameters:
623
+ * - ok_session: the URL to go to if a session is found
624
+ * - no_session: the URL to go to if the user is not connected
625
+ * - no_user: the URL to go to if the user is not signed into facebook
626
+ *
627
+ * @param array $params Provide custom parameters
628
+ * @return string The URL for the logout flow
629
+ */
630
+ public function getLoginStatusUrl($params=array()) {
631
+ return $this->getUrl(
632
+ 'www',
633
+ 'extern/login_status.php',
634
+ array_merge(array(
635
+ 'api_key' => $this->getAppId(),
636
+ 'no_session' => $this->getCurrentUrl(),
637
+ 'no_user' => $this->getCurrentUrl(),
638
+ 'ok_session' => $this->getCurrentUrl(),
639
+ 'session_version' => 3,
640
+ ), $params)
641
+ );
642
+ }
643
+
644
+ /**
645
+ * Make an API call.
646
+ *
647
+ * @return mixed The decoded response
648
+ */
649
+ public function api(/* polymorphic */) {
650
+ $args = func_get_args();
651
+ if (is_array($args[0])) {
652
+ return $this->_restserver($args[0]);
653
+ } else {
654
+ return call_user_func_array(array($this, '_graph'), $args);
655
+ }
656
+ }
657
+
658
+ /**
659
+ * Constructs and returns the name of the cookie that
660
+ * potentially houses the signed request for the app user.
661
+ * The cookie is not set by the BaseFacebook class, but
662
+ * it may be set by the JavaScript SDK.
663
+ *
664
+ * @return string the name of the cookie that would house
665
+ * the signed request value.
666
+ */
667
+ protected function getSignedRequestCookieName() {
668
+ return 'fbsr_'.$this->getAppId();
669
+ }
670
+
671
+ /**
672
+ * Constructs and returns the name of the coookie that potentially contain
673
+ * metadata. The cookie is not set by the BaseFacebook class, but it may be
674
+ * set by the JavaScript SDK.
675
+ *
676
+ * @return string the name of the cookie that would house metadata.
677
+ */
678
+ protected function getMetadataCookieName() {
679
+ return 'fbm_'.$this->getAppId();
680
+ }
681
+
682
+ /**
683
+ * Get the authorization code from the query parameters, if it exists,
684
+ * and otherwise return false to signal no authorization code was
685
+ * discoverable.
686
+ *
687
+ * @return mixed The authorization code, or false if the authorization
688
+ * code could not be determined.
689
+ */
690
+ protected function getCode() {
691
+ if (isset($_REQUEST['code'])) {
692
+ if ($this->state !== null &&
693
+ isset($_REQUEST['state']) &&
694
+ $this->state === $_REQUEST['state']) {
695
+
696
+ // CSRF state has done its job, so clear it
697
+ $this->state = null;
698
+ $this->clearPersistentData('state');
699
+ return $_REQUEST['code'];
700
+ } else {
701
+ self::errorLog('CSRF state token does not match one provided.');
702
+ return false;
703
+ }
704
+ }
705
+
706
+ return false;
707
+ }
708
+
709
+ /**
710
+ * Retrieves the UID with the understanding that
711
+ * $this->accessToken has already been set and is
712
+ * seemingly legitimate. It relies on Facebook's Graph API
713
+ * to retrieve user information and then extract
714
+ * the user ID.
715
+ *
716
+ * @return integer Returns the UID of the Facebook user, or 0
717
+ * if the Facebook user could not be determined.
718
+ */
719
+ protected function getUserFromAccessToken() {
720
+ try {
721
+ $user_info = $this->api('/me');
722
+ return $user_info['id'];
723
+ } catch (FacebookApiException $e) {
724
+ return 0;
725
+ }
726
+ }
727
+
728
+ /**
729
+ * Returns the access token that should be used for logged out
730
+ * users when no authorization code is available.
731
+ *
732
+ * @return string The application access token, useful for gathering
733
+ * public information about users and applications.
734
+ */
735
+ protected function getApplicationAccessToken() {
736
+ return $this->appId.'|'.$this->appSecret;
737
+ }
738
+
739
+ /**
740
+ * Lays down a CSRF state token for this process.
741
+ *
742
+ * @return void
743
+ */
744
+ protected function establishCSRFTokenState() {
745
+ if ($this->state === null) {
746
+ $this->state = md5(uniqid(mt_rand(), true));
747
+ $this->setPersistentData('state', $this->state);
748
+ }
749
+ }
750
+
751
+ /**
752
+ * Retrieves an access token for the given authorization code
753
+ * (previously generated from www.facebook.com on behalf of
754
+ * a specific user). The authorization code is sent to graph.facebook.com
755
+ * and a legitimate access token is generated provided the access token
756
+ * and the user for which it was generated all match, and the user is
757
+ * either logged in to Facebook or has granted an offline access permission.
758
+ *
759
+ * @param string $code An authorization code.
760
+ * @return mixed An access token exchanged for the authorization code, or
761
+ * false if an access token could not be generated.
762
+ */
763
+ protected function getAccessTokenFromCode($code, $redirect_uri = null) {
764
+ if (empty($code)) {
765
+ return false;
766
+ }
767
+
768
+ if ($redirect_uri === null) {
769
+ $redirect_uri = $this->getCurrentUrl();
770
+ }
771
+
772
+ try {
773
+ // need to circumvent json_decode by calling _oauthRequest
774
+ // directly, since response isn't JSON format.
775
+ $access_token_response =
776
+ $this->_oauthRequest(
777
+ $this->getUrl('graph', '/oauth/access_token'),
778
+ $params = array('client_id' => $this->getAppId(),
779
+ 'client_secret' => $this->getAppSecret(),
780
+ 'redirect_uri' => $redirect_uri,
781
+ 'code' => $code));
782
+ } catch (FacebookApiException $e) {
783
+ // most likely that user very recently revoked authorization.
784
+ // In any event, we don't have an access token, so say so.
785
+ return false;
786
+ }
787
+
788
+ if (empty($access_token_response)) {
789
+ return false;
790
+ }
791
+
792
+ $response_params = array();
793
+ parse_str($access_token_response, $response_params);
794
+ if (!isset($response_params['access_token'])) {
795
+ return false;
796
+ }
797
+
798
+ return $response_params['access_token'];
799
+ }
800
+
801
+ /**
802
+ * Invoke the old restserver.php endpoint.
803
+ *
804
+ * @param array $params Method call object
805
+ *
806
+ * @return mixed The decoded response object
807
+ * @throws FacebookApiException
808
+ */
809
+ protected function _restserver($params) {
810
+ // generic application level parameters
811
+ $params['api_key'] = $this->getAppId();
812
+ $params['format'] = 'json-strings';
813
+
814
+ $result = json_decode($this->_oauthRequest(
815
+ $this->getApiUrl($params['method']),
816
+ $params
817
+ ), true);
818
+
819
+ // results are returned, errors are thrown
820
+ if (is_array($result) && isset($result['error_code'])) {
821
+ $this->throwAPIException($result);
822
+ // @codeCoverageIgnoreStart
823
+ }
824
+ // @codeCoverageIgnoreEnd
825
+
826
+ $method = strtolower($params['method']);
827
+ if ($method === 'auth.expiresession' ||
828
+ $method === 'auth.revokeauthorization') {
829
+ $this->destroySession();
830
+ }
831
+
832
+ return $result;
833
+ }
834
+
835
+ /**
836
+ * Return true if this is video post.
837
+ *
838
+ * @param string $path The path
839
+ * @param string $method The http method (default 'GET')
840
+ *
841
+ * @return boolean true if this is video post
842
+ */
843
+ protected function isVideoPost($path, $method = 'GET') {
844
+ if ($method == 'POST' && preg_match("/^(\/)(.+)(\/)(videos)$/", $path)) {
845
+ return true;
846
+ }
847
+ return false;
848
+ }
849
+
850
+ /**
851
+ * Invoke the Graph API.
852
+ *
853
+ * @param string $path The path (required)
854
+ * @param string $method The http method (default 'GET')
855
+ * @param array $params The query/post data
856
+ *
857
+ * @return mixed The decoded response object
858
+ * @throws FacebookApiException
859
+ */
860
+ protected function _graph($path, $method = 'GET', $params = array()) {
861
+ if (is_array($method) && empty($params)) {
862
+ $params = $method;
863
+ $method = 'GET';
864
+ }
865
+ $params['method'] = $method; // method override as we always do a POST
866
+
867
+ if ($this->isVideoPost($path, $method)) {
868
+ $domainKey = 'graph_video';
869
+ } else {
870
+ $domainKey = 'graph';
871
+ }
872
+
873
+ $result = json_decode($this->_oauthRequest(
874
+ $this->getUrl($domainKey, $path),
875
+ $params
876
+ ), true);
877
+
878
+ // results are returned, errors are thrown
879
+ if (is_array($result) && isset($result['error'])) {
880
+ $this->throwAPIException($result);
881
+ // @codeCoverageIgnoreStart
882
+ }
883
+ // @codeCoverageIgnoreEnd
884
+
885
+ return $result;
886
+ }
887
+
888
+ /**
889
+ * Make a OAuth Request.
890
+ *
891
+ * @param string $url The path (required)
892
+ * @param array $params The query/post data
893
+ *
894
+ * @return string The decoded response object
895
+ * @throws FacebookApiException
896
+ */
897
+ protected function _oauthRequest($url, $params) {
898
+ if (!isset($params['access_token'])) {
899
+ $params['access_token'] = $this->getAccessToken();
900
+ }
901
+
902
+ // json_encode all params values that are not strings
903
+ foreach ($params as $key => $value) {
904
+ if (!is_string($value)) {
905
+ $params[$key] = json_encode($value);
906
+ }
907
+ }
908
+
909
+ return $this->makeRequest($url, $params);
910
+ }
911
+
912
+ /**
913
+ * Makes an HTTP request. This method can be overridden by subclasses if
914
+ * developers want to do fancier things or use something other than curl to
915
+ * make the request.
916
+ *
917
+ * @param string $url The URL to make the request to
918
+ * @param array $params The parameters to use for the POST body
919
+ * @param CurlHandler $ch Initialized curl handle
920
+ *
921
+ * @return string The response text
922
+ */
923
+ protected function makeRequest($url, $params, $ch=null) {
924
+ if (!$ch) {
925
+ $ch = curl_init();
926
+ }
927
+
928
+ $opts = self::$CURL_OPTS;
929
+ if ($this->getFileUploadSupport()) {
930
+ $opts[CURLOPT_POSTFIELDS] = $params;
931
+ } else {
932
+ $opts[CURLOPT_POSTFIELDS] = http_build_query($params, null, '&');
933
+ }
934
+ $opts[CURLOPT_URL] = $url;
935
+
936
+ // disable the 'Expect: 100-continue' behaviour. This causes CURL to wait
937
+ // for 2 seconds if the server does not support this header.
938
+ if (isset($opts[CURLOPT_HTTPHEADER])) {
939
+ $existing_headers = $opts[CURLOPT_HTTPHEADER];
940
+ $existing_headers[] = 'Expect:';
941
+ $opts[CURLOPT_HTTPHEADER] = $existing_headers;
942
+ } else {
943
+ $opts[CURLOPT_HTTPHEADER] = array('Expect:');
944
+ }
945
+
946
+ curl_setopt_array($ch, $opts);
947
+ $result = curl_exec($ch);
948
+
949
+ if (curl_errno($ch) == 60) { // CURLE_SSL_CACERT
950
+ self::errorLog('Invalid or no certificate authority found, '.
951
+ 'using bundled information');
952
+ curl_setopt($ch, CURLOPT_CAINFO,
953
+ dirname(__FILE__) . '/fb_ca_chain_bundle.crt');
954
+ $result = curl_exec($ch);
955
+ }
956
+
957
+ // With dual stacked DNS responses, it's possible for a server to
958
+ // have IPv6 enabled but not have IPv6 connectivity. If this is
959
+ // the case, curl will try IPv4 first and if that fails, then it will
960
+ // fall back to IPv6 and the error EHOSTUNREACH is returned by the
961
+ // operating system.
962
+ if ($result === false && empty($opts[CURLOPT_IPRESOLVE])) {
963
+ $matches = array();
964
+ $regex = '/Failed to connect to ([^:].*): Network is unreachable/';
965
+ if (preg_match($regex, curl_error($ch), $matches)) {
966
+ if (strlen(@inet_pton($matches[1])) === 16) {
967
+ self::errorLog('Invalid IPv6 configuration on server, '.
968
+ 'Please disable or get native IPv6 on your server.');
969
+ self::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
970
+ curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
971
+ $result = curl_exec($ch);
972
+ }
973
+ }
974
+ }
975
+
976
+ if ($result === false) {
977
+ $e = new FacebookApiException(array(
978
+ 'error_code' => curl_errno($ch),
979
+ 'error' => array(
980
+ 'message' => curl_error($ch),
981
+ 'type' => 'CurlException',
982
+ ),
983
+ ));
984
+ curl_close($ch);
985
+ throw $e;
986
+ }
987
+ curl_close($ch);
988
+ return $result;
989
+ }
990
+
991
+ /**
992
+ * Parses a signed_request and validates the signature.
993
+ *
994
+ * @param string $signed_request A signed token
995
+ * @return array The payload inside it or null if the sig is wrong
996
+ */
997
+ protected function parseSignedRequest($signed_request) {
998
+ list($encoded_sig, $payload) = explode('.', $signed_request, 2);
999
+
1000
+ // decode the data
1001
+ $sig = self::base64UrlDecode($encoded_sig);
1002
+ $data = json_decode(self::base64UrlDecode($payload), true);
1003
+
1004
+ if (strtoupper($data['algorithm']) !== self::SIGNED_REQUEST_ALGORITHM) {
1005
+ self::errorLog(
1006
+ 'Unknown algorithm. Expected ' . self::SIGNED_REQUEST_ALGORITHM);
1007
+ return null;
1008
+ }
1009
+
1010
+ // check sig
1011
+ $expected_sig = hash_hmac('sha256', $payload,
1012
+ $this->getAppSecret(), $raw = true);
1013
+ if ($sig !== $expected_sig) {
1014
+ self::errorLog('Bad Signed JSON signature!');
1015
+ return null;
1016
+ }
1017
+
1018
+ return $data;
1019
+ }
1020
+
1021
+ /**
1022
+ * Makes a signed_request blob using the given data.
1023
+ *
1024
+ * @param array The data array.
1025
+ * @return string The signed request.
1026
+ */
1027
+ protected function makeSignedRequest($data) {
1028
+ if (!is_array($data)) {
1029
+ throw new InvalidArgumentException(
1030
+ 'makeSignedRequest expects an array. Got: ' . print_r($data, true));
1031
+ }
1032
+ $data['algorithm'] = self::SIGNED_REQUEST_ALGORITHM;
1033
+ $data['issued_at'] = time();
1034
+ $json = json_encode($data);
1035
+ $b64 = self::base64UrlEncode($json);
1036
+ $raw_sig = hash_hmac('sha256', $b64, $this->getAppSecret(), $raw = true);
1037
+ $sig = self::base64UrlEncode($raw_sig);
1038
+ return $sig.'.'.$b64;
1039
+ }
1040
+
1041
+ /**
1042
+ * Build the URL for api given parameters.
1043
+ *
1044
+ * @param $method String the method name.
1045
+ * @return string The URL for the given parameters
1046
+ */
1047
+ protected function getApiUrl($method) {
1048
+ static $READ_ONLY_CALLS =
1049
+ array('admin.getallocation' => 1,
1050
+ 'admin.getappproperties' => 1,
1051
+ 'admin.getbannedusers' => 1,
1052
+ 'admin.getlivestreamvialink' => 1,
1053
+ 'admin.getmetrics' => 1,
1054
+ 'admin.getrestrictioninfo' => 1,
1055
+ 'application.getpublicinfo' => 1,
1056
+ 'auth.getapppublickey' => 1,
1057
+ 'auth.getsession' => 1,
1058
+ 'auth.getsignedpublicsessiondata' => 1,
1059
+ 'comments.get' => 1,
1060
+ 'connect.getunconnectedfriendscount' => 1,
1061
+ 'dashboard.getactivity' => 1,
1062
+ 'dashboard.getcount' => 1,
1063
+ 'dashboard.getglobalnews' => 1,
1064
+ 'dashboard.getnews' => 1,
1065
+ 'dashboard.multigetcount' => 1,
1066
+ 'dashboard.multigetnews' => 1,
1067
+ 'data.getcookies' => 1,
1068
+ 'events.get' => 1,
1069
+ 'events.getmembers' => 1,
1070
+ 'fbml.getcustomtags' => 1,
1071
+ 'feed.getappfriendstories' => 1,
1072
+ 'feed.getregisteredtemplatebundlebyid' => 1,
1073
+ 'feed.getregisteredtemplatebundles' => 1,
1074
+ 'fql.multiquery' => 1,
1075
+ 'fql.query' => 1,
1076
+ 'friends.arefriends' => 1,
1077
+ 'friends.get' => 1,
1078
+ 'friends.getappusers' => 1,
1079
+ 'friends.getlists' => 1,
1080
+ 'friends.getmutualfriends' => 1,
1081
+ 'gifts.get' => 1,
1082
+ 'groups.get' => 1,
1083
+ 'groups.getmembers' => 1,
1084
+ 'intl.gettranslations' => 1,
1085
+ 'links.get' => 1,
1086
+ 'notes.get' => 1,
1087
+ 'notifications.get' => 1,
1088
+ 'pages.getinfo' => 1,
1089
+ 'pages.isadmin' => 1,
1090
+ 'pages.isappadded' => 1,
1091
+ 'pages.isfan' => 1,
1092
+ 'permissions.checkavailableapiaccess' => 1,
1093
+ 'permissions.checkgrantedapiaccess' => 1,
1094
+ 'photos.get' => 1,
1095
+ 'photos.getalbums' => 1,
1096
+ 'photos.gettags' => 1,
1097
+ 'profile.getinfo' => 1,
1098
+ 'profile.getinfooptions' => 1,
1099
+ 'stream.get' => 1,
1100
+ 'stream.getcomments' => 1,
1101
+ 'stream.getfilters' => 1,
1102
+ 'users.getinfo' => 1,
1103
+ 'users.getloggedinuser' => 1,
1104
+ 'users.getstandardinfo' => 1,
1105
+ 'users.hasapppermission' => 1,
1106
+ 'users.isappuser' => 1,
1107
+ 'users.isverified' => 1,
1108
+ 'video.getuploadlimits' => 1);
1109
+ $name = 'api';
1110
+ if (isset($READ_ONLY_CALLS[strtolower($method)])) {
1111
+ $name = 'api_read';
1112
+ } else if (strtolower($method) == 'video.upload') {
1113
+ $name = 'api_video';
1114
+ }
1115
+ return self::getUrl($name, 'restserver.php');
1116
+ }
1117
+
1118
+ /**
1119
+ * Build the URL for given domain alias, path and parameters.
1120
+ *
1121
+ * @param $name string The name of the domain
1122
+ * @param $path string Optional path (without a leading slash)
1123
+ * @param $params array Optional query parameters
1124
+ *
1125
+ * @return string The URL for the given parameters
1126
+ */
1127
+ protected function getUrl($name, $path='', $params=array()) {
1128
+ $url = self::$DOMAIN_MAP[$name];
1129
+ if ($path) {
1130
+ if ($path[0] === '/') {
1131
+ $path = substr($path, 1);
1132
+ }
1133
+ $url .= $path;
1134
+ }
1135
+ if ($params) {
1136
+ $url .= '?' . http_build_query($params, null, '&');
1137
+ }
1138
+
1139
+ return $url;
1140
+ }
1141
+
1142
+ protected function getHttpHost() {
1143
+ if ($this->trustForwarded && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
1144
+ return $_SERVER['HTTP_X_FORWARDED_HOST'];
1145
+ }
1146
+ return $_SERVER['HTTP_HOST'];
1147
+ }
1148
+
1149
+ protected function getHttpProtocol() {
1150
+ if ($this->trustForwarded && isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
1151
+ if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
1152
+ return 'https';
1153
+ }
1154
+ return 'http';
1155
+ }
1156
+ /*apache + variants specific way of checking for https*/
1157
+ if (isset($_SERVER['HTTPS']) &&
1158
+ ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] == 1)) {
1159
+ return 'https';
1160
+ }
1161
+ /*nginx way of checking for https*/
1162
+ if (isset($_SERVER['SERVER_PORT']) &&
1163
+ ($_SERVER['SERVER_PORT'] === '443')) {
1164
+ return 'https';
1165
+ }
1166
+ return 'http';
1167
+ }
1168
+
1169
+ /**
1170
+ * Get the base domain used for the cookie.
1171
+ */
1172
+ protected function getBaseDomain() {
1173
+ // The base domain is stored in the metadata cookie if not we fallback
1174
+ // to the current hostname
1175
+ $metadata = $this->getMetadataCookie();
1176
+ if (array_key_exists('base_domain', $metadata) &&
1177
+ !empty($metadata['base_domain'])) {
1178
+ return trim($metadata['base_domain'], '.');
1179
+ }
1180
+ return $this->getHttpHost();
1181
+ }
1182
+
1183
+ /**
1184
+
1185
+ /**
1186
+ * Returns the Current URL, stripping it of known FB parameters that should
1187
+ * not persist.
1188
+ *
1189
+ * @return string The current URL
1190
+ */
1191
+ protected function getCurrentUrl() {
1192
+ $protocol = $this->getHttpProtocol() . '://';
1193
+ $host = $this->getHttpHost();
1194
+ $currentUrl = $protocol.$host.$_SERVER['REQUEST_URI'];
1195
+ $parts = parse_url($currentUrl);
1196
+
1197
+ $query = '';
1198
+ if (!empty($parts['query'])) {
1199
+ // drop known fb params
1200
+ $params = explode('&', $parts['query']);
1201
+ $retained_params = array();
1202
+ foreach ($params as $param) {
1203
+ if ($this->shouldRetainParam($param)) {
1204
+ $retained_params[] = $param;
1205
+ }
1206
+ }
1207
+
1208
+ if (!empty($retained_params)) {
1209
+ $query = '?'.implode($retained_params, '&');
1210
+ }
1211
+ }
1212
+
1213
+ // use port if non default
1214
+ $port =
1215
+ isset($parts['port']) &&
1216
+ (($protocol === 'http://' && $parts['port'] !== 80) ||
1217
+ ($protocol === 'https://' && $parts['port'] !== 443))
1218
+ ? ':' . $parts['port'] : '';
1219
+
1220
+ // rebuild
1221
+ return $protocol . $parts['host'] . $port . $parts['path'] . $query;
1222
+ }
1223
+
1224
+ /**
1225
+ * Returns true if and only if the key or key/value pair should
1226
+ * be retained as part of the query string. This amounts to
1227
+ * a brute-force search of the very small list of Facebook-specific
1228
+ * params that should be stripped out.
1229
+ *
1230
+ * @param string $param A key or key/value pair within a URL's query (e.g.
1231
+ * 'foo=a', 'foo=', or 'foo'.
1232
+ *
1233
+ * @return boolean
1234
+ */
1235
+ protected function shouldRetainParam($param) {
1236
+ foreach (self::$DROP_QUERY_PARAMS as $drop_query_param) {
1237
+ if (strpos($param, $drop_query_param.'=') === 0) {
1238
+ return false;
1239
+ }
1240
+ }
1241
+
1242
+ return true;
1243
+ }
1244
+
1245
+ /**
1246
+ * Analyzes the supplied result to see if it was thrown
1247
+ * because the access token is no longer valid. If that is
1248
+ * the case, then we destroy the session.
1249
+ *
1250
+ * @param $result array A record storing the error message returned
1251
+ * by a failed API call.
1252
+ */
1253
+ protected function throwAPIException($result) {
1254
+ $e = new FacebookApiException($result);
1255
+ switch ($e->getType()) {
1256
+ // OAuth 2.0 Draft 00 style
1257
+ case 'OAuthException':
1258
+ // OAuth 2.0 Draft 10 style
1259
+ case 'invalid_token':
1260
+ // REST server errors are just Exceptions
1261
+ case 'Exception':
1262
+ $message = $e->getMessage();
1263
+ if ((strpos($message, 'Error validating access token') !== false) ||
1264
+ (strpos($message, 'Invalid OAuth access token') !== false) ||
1265
+ (strpos($message, 'An active access token must be used') !== false)
1266
+ ) {
1267
+ $this->destroySession();
1268
+ }
1269
+ break;
1270
+ }
1271
+
1272
+ throw $e;
1273
+ }
1274
+
1275
+
1276
+ /**
1277
+ * Prints to the error log if you aren't in command line mode.
1278
+ *
1279
+ * @param string $msg Log message
1280
+ */
1281
+ protected static function errorLog($msg) {
1282
+ // disable error log if we are running in a CLI environment
1283
+ // @codeCoverageIgnoreStart
1284
+ if (php_sapi_name() != 'cli') {
1285
+ error_log($msg);
1286
+ }
1287
+ // uncomment this if you want to see the errors on the page
1288
+ // print 'error_log: '.$msg."\n";
1289
+ // @codeCoverageIgnoreEnd
1290
+ }
1291
+
1292
+ /**
1293
+ * Base64 encoding that doesn't need to be urlencode()ed.
1294
+ * Exactly the same as base64_encode except it uses
1295
+ * - instead of +
1296
+ * _ instead of /
1297
+ * No padded =
1298
+ *
1299
+ * @param string $input base64UrlEncoded string
1300
+ * @return string
1301
+ */
1302
+ protected static function base64UrlDecode($input) {
1303
+ return base64_decode(strtr($input, '-_', '+/'));
1304
+ }
1305
+
1306
+ /**
1307
+ * Base64 encoding that doesn't need to be urlencode()ed.
1308
+ * Exactly the same as base64_encode except it uses
1309
+ * - instead of +
1310
+ * _ instead of /
1311
+ *
1312
+ * @param string $input string
1313
+ * @return string base64Url encoded string
1314
+ */
1315
+ protected static function base64UrlEncode($input) {
1316
+ $str = strtr(base64_encode($input), '+/', '-_');
1317
+ $str = str_replace('=', '', $str);
1318
+ return $str;
1319
+ }
1320
+
1321
+ /**
1322
+ * Destroy the current session
1323
+ */
1324
+ public function destroySession() {
1325
+ $this->accessToken = null;
1326
+ $this->signedRequest = null;
1327
+ $this->user = null;
1328
+ $this->clearAllPersistentData();
1329
+
1330
+ // Javascript sets a cookie that will be used in getSignedRequest that we
1331
+ // need to clear if we can
1332
+ $cookie_name = $this->getSignedRequestCookieName();
1333
+ if (array_key_exists($cookie_name, $_COOKIE)) {
1334
+ unset($_COOKIE[$cookie_name]);
1335
+ if (!headers_sent()) {
1336
+ $base_domain = $this->getBaseDomain();
1337
+ setcookie($cookie_name, '', 1, '/', '.'.$base_domain);
1338
+ } else {
1339
+ // @codeCoverageIgnoreStart
1340
+ self::errorLog(
1341
+ 'There exists a cookie that we wanted to clear that we couldn\'t '.
1342
+ 'clear because headers was already sent. Make sure to do the first '.
1343
+ 'API call before outputing anything.'
1344
+ );
1345
+ // @codeCoverageIgnoreEnd
1346
+ }
1347
+ }
1348
+ }
1349
+
1350
+ /**
1351
+ * Parses the metadata cookie that our Javascript API set
1352
+ *
1353
+ * @return an array mapping key to value
1354
+ */
1355
+ protected function getMetadataCookie() {
1356
+ $cookie_name = $this->getMetadataCookieName();
1357
+ if (!array_key_exists($cookie_name, $_COOKIE)) {
1358
+ return array();
1359
+ }
1360
+
1361
+ // The cookie value can be wrapped in "-characters so remove them
1362
+ $cookie_value = trim($_COOKIE[$cookie_name], '"');
1363
+
1364
+ if (empty($cookie_value)) {
1365
+ return array();
1366
+ }
1367
+
1368
+ $parts = explode('&', $cookie_value);
1369
+ $metadata = array();
1370
+ foreach ($parts as $part) {
1371
+ $pair = explode('=', $part, 2);
1372
+ if (!empty($pair[0])) {
1373
+ $metadata[urldecode($pair[0])] =
1374
+ (count($pair) > 1) ? urldecode($pair[1]) : '';
1375
+ }
1376
+ }
1377
+
1378
+ return $metadata;
1379
+ }
1380
+
1381
+ protected static function isAllowedDomain($big, $small) {
1382
+ if ($big === $small) {
1383
+ return true;
1384
+ }
1385
+ return self::endsWith($big, '.'.$small);
1386
+ }
1387
+
1388
+ protected static function endsWith($big, $small) {
1389
+ $len = strlen($small);
1390
+ if ($len === 0) {
1391
+ return true;
1392
+ }
1393
+ return substr($big, -$len) === $small;
1394
+ }
1395
+
1396
+ /**
1397
+ * Each of the following four methods should be overridden in
1398
+ * a concrete subclass, as they are in the provided Facebook class.
1399
+ * The Facebook class uses PHP sessions to provide a primitive
1400
+ * persistent store, but another subclass--one that you implement--
1401
+ * might use a database, memcache, or an in-memory cache.
1402
+ *
1403
+ * @see Facebook
1404
+ */
1405
+
1406
+ /**
1407
+ * Stores the given ($key, $value) pair, so that future calls to
1408
+ * getPersistentData($key) return $value. This call may be in another request.
1409
+ *
1410
+ * @param string $key
1411
+ * @param array $value
1412
+ *
1413
+ * @return void
1414
+ */
1415
+ abstract protected function setPersistentData($key, $value);
1416
+
1417
+ /**
1418
+ * Get the data for $key, persisted by BaseFacebook::setPersistentData()
1419
+ *
1420
+ * @param string $key The key of the data to retrieve
1421
+ * @param boolean $default The default value to return if $key is not found
1422
+ *
1423
+ * @return mixed
1424
+ */
1425
+ abstract protected function getPersistentData($key, $default = false);
1426
+
1427
+ /**
1428
+ * Clear the data with $key from the persistent storage
1429
+ *
1430
+ * @param string $key
1431
+ * @return void
1432
+ */
1433
+ abstract protected function clearPersistentData($key);
1434
+
1435
+ /**
1436
+ * Clear all data from the persistent storage
1437
+ *
1438
+ * @return void
1439
+ */
1440
+ abstract protected function clearAllPersistentData();
1441
+ }
lib/Socialfeeds/fb/facebook.php CHANGED
@@ -1,101 +1,117 @@
1
- <?php
2
- require_once "base_facebook.php";
3
-
4
- class Facebook extends BaseFacebook{
5
-
6
- const FBSS_COOKIE_NAME = 'fbss';
7
- const FBSS_COOKIE_EXPIRE = 31556926;
8
- protected $sharedSessionID;
9
- protected static $kSupportedKeys = array('state', 'code', 'access_token', 'user_id');
10
-
11
-
12
- public function __construct($config) {
13
- if (!session_id()) {
14
- @session_start();
15
- }
16
- parent::__construct($config);
17
- if (!empty($config['sharedSession'])) {
18
- $this->initSharedSession();
19
- }
20
- }
21
- protected function initSharedSession() {
22
- $cookie_name = $this->getSharedSessionCookieName();
23
-
24
- if (isset($_COOKIE[$cookie_name])) {
25
- $data = $this->parseSignedRequest($_COOKIE[$cookie_name]);
26
-
27
- if ($data && !empty($data['domain']) &&
28
- self::isAllowedDomain($this->getHttpHost(), $data['domain'])) {
29
- $this->sharedSessionID = $data['id'];
30
- return;
31
- }
32
- }
33
- $base_domain = $this->getBaseDomain();
34
- $this->sharedSessionID = md5(uniqid(mt_rand(), true));
35
- $cookie_value = $this->makeSignedRequest(array('domain' => $base_domain,'id' => $this->sharedSessionID,));
36
- $_COOKIE[$cookie_name] = $cookie_value;
37
-
38
- if (!headers_sent()) {
39
- $expire = time() + self::FBSS_COOKIE_EXPIRE;
40
- setcookie($cookie_name, $cookie_value, $expire, '/', '.'.$base_domain);
41
- }else{
42
- self::errorLog(
43
- 'Shared session ID cookie could not be set! You must ensure you '.
44
- 'create the Facebook instance before headers have been sent. This '.
45
- 'will cause authentication issues after the first request.'
46
- );
47
- }
48
- }
49
-
50
- protected function setPersistentData($key, $value) {
51
- if (!in_array($key, self::$kSupportedKeys)) {
52
- self::errorLog('Unsupported key passed to setPersistentData.');
53
- return;
54
- }
55
- $session_var_name = $this->constructSessionVariableName($key);
56
- $_SESSION[$session_var_name] = $value;
57
- }
58
- protected function getPersistentData($key, $default = false) {
59
- if (!in_array($key, self::$kSupportedKeys)) {
60
- self::errorLog('Unsupported key passed to getPersistentData.');
61
- return $default;
62
- }
63
- $session_var_name = $this->constructSessionVariableName($key);
64
- return isset($_SESSION[$session_var_name]) ? $_SESSION[$session_var_name] : $default;
65
- }
66
- protected function clearPersistentData($key) {
67
- if (!in_array($key, self::$kSupportedKeys)) {
68
- self::errorLog('Unsupported key passed to clearPersistentData.');
69
- return;
70
- }
71
- $session_var_name = $this->constructSessionVariableName($key);
72
- unset($_SESSION[$session_var_name]);
73
- }
74
- protected function clearAllPersistentData() {
75
- foreach (self::$kSupportedKeys as $key) {
76
- $this->clearPersistentData($key);
77
- }
78
- if ($this->sharedSessionID) {
79
- $this->deleteSharedSessionCookie();
80
- }
81
- }
82
- protected function deleteSharedSessionCookie() {
83
- $cookie_name = $this->getSharedSessionCookieName();
84
- unset($_COOKIE[$cookie_name]);
85
- $base_domain = $this->getBaseDomain();
86
- setcookie($cookie_name, '', 1, '/', '.'.$base_domain);
87
- }
88
- protected function getSharedSessionCookieName() {
89
- return self::FBSS_COOKIE_NAME . '_' . $this->getAppId();
90
- }
91
- protected function constructSessionVariableName($key) {
92
- $parts = array('fb', $this->getAppId(), $key);
93
- if ($this->sharedSessionID) {
94
- array_unshift($parts, $this->sharedSessionID);
95
- }
96
- return implode('_', $parts);
97
- }
98
- }
99
-
100
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
1
+ <?php
2
+ require_once "base_facebook.php";
3
+ /**
4
+ * Extends the BaseFacebook class with the intent of using
5
+ * PHP sessions to store user ids and access tokens.
6
+ */
7
+ class Facebook extends BaseFacebook{
8
+
9
+ const FBSS_COOKIE_NAME = 'fbss';
10
+ const FBSS_COOKIE_EXPIRE = 31556926;
11
+ protected $sharedSessionID;
12
+ protected static $kSupportedKeys = array('state', 'code', 'access_token', 'user_id');
13
+
14
+ /**
15
+ * Identical to the parent constructor, except that
16
+ * we start a PHP session to store the user ID and
17
+ * access token if during the course of execution
18
+ * we discover them.
19
+ */
20
+ public function __construct($config) {
21
+ if (!session_id()) {
22
+ @session_start();
23
+ }
24
+ parent::__construct($config);
25
+ if (!empty($config['sharedSession'])) {
26
+ $this->initSharedSession();
27
+ }
28
+ }
29
+ protected function initSharedSession() {
30
+ $cookie_name = $this->getSharedSessionCookieName();
31
+
32
+ if (isset($_COOKIE[$cookie_name])) {
33
+ $data = $this->parseSignedRequest($_COOKIE[$cookie_name]);
34
+
35
+ if ($data && !empty($data['domain']) &&
36
+ self::isAllowedDomain($this->getHttpHost(), $data['domain'])) {
37
+ $this->sharedSessionID = $data['id'];
38
+ return;
39
+ }
40
+ }
41
+ $base_domain = $this->getBaseDomain();
42
+ $this->sharedSessionID = md5(uniqid(mt_rand(), true));
43
+ $cookie_value = $this->makeSignedRequest(array('domain' => $base_domain,'id' => $this->sharedSessionID,));
44
+ $_COOKIE[$cookie_name] = $cookie_value;
45
+
46
+ if (!headers_sent()) {
47
+ $expire = time() + self::FBSS_COOKIE_EXPIRE;
48
+ setcookie($cookie_name, $cookie_value, $expire, '/', '.'.$base_domain);
49
+ }else{
50
+ self::errorLog(
51
+ 'Shared session ID cookie could not be set! You must ensure you '.
52
+ 'create the Facebook instance before headers have been sent. This '.
53
+ 'will cause authentication issues after the first request.'
54
+ );
55
+ }
56
+ }
57
+ /**
58
+ * Provides the implementations of the inherited abstract
59
+ * methods. The implementation uses PHP sessions to maintain
60
+ * a store for authorization codes, user ids, CSRF states, and
61
+ * access tokens.
62
+ */
63
+ protected function setPersistentData($key, $value) {
64
+ if (!in_array($key, self::$kSupportedKeys)) {
65
+ self::errorLog('Unsupported key passed to setPersistentData.');
66
+ return;
67
+ }
68
+ $session_var_name = $this->constructSessionVariableName($key);
69
+ $_SESSION[$session_var_name] = $value;
70
+ }
71
+ protected function getPersistentData($key, $default = false) {
72
+ if (!in_array($key, self::$kSupportedKeys)) {
73
+ self::errorLog('Unsupported key passed to getPersistentData.');
74
+ return $default;
75
+ }
76
+ $session_var_name = $this->constructSessionVariableName($key);
77
+ return isset($_SESSION[$session_var_name]) ? $_SESSION[$session_var_name] : $default;
78
+ }
79
+ protected function clearPersistentData($key) {
80
+ if (!in_array($key, self::$kSupportedKeys)) {
81
+ self::errorLog('Unsupported key passed to clearPersistentData.');
82
+ return;
83
+ }
84
+ $session_var_name = $this->constructSessionVariableName($key);
85
+ unset($_SESSION[$session_var_name]);
86
+ }
87
+ protected function clearAllPersistentData() {
88
+ foreach (self::$kSupportedKeys as $key) {
89
+ $this->clearPersistentData($key);
90
+ }
91
+ if ($this->sharedSessionID) {
92
+ $this->deleteSharedSessionCookie();
93
+ }
94
+ }
95
+ protected function deleteSharedSessionCookie() {
96
+ $cookie_name = $this->getSharedSessionCookieName();
97
+ unset($_COOKIE[$cookie_name]);
98
+ $base_domain = $this->getBaseDomain();
99
+ setcookie($cookie_name, '', 1, '/', '.'.$base_domain);
100
+ }
101
+ protected function getSharedSessionCookieName() {
102
+ return self::FBSS_COOKIE_NAME . '_' . $this->getAppId();
103
+ }
104
+ protected function constructSessionVariableName($key) {
105
+ $parts = array('fb', $this->getAppId(), $key);
106
+ if ($this->sharedSessionID) {
107
+ array_unshift($parts, $this->sharedSessionID);
108
+ }
109
+ return implode('_', $parts);
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Set the user credentials
115
+ */
116
+
117
 
lib/Socialfeeds/in/instagram.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
- function fetchData($url){
3
- $ch = curl_init();
4
- curl_setopt($ch, CURLOPT_URL, $url);
5
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
6
- curl_setopt($ch, CURLOPT_TIMEOUT, 20);
7
- $result = curl_exec($ch);
8
- curl_close($ch);
9
- return $result;
10
- }
11
-
1
+ <?php
2
+ function fetchData($url){
3
+ $ch = curl_init();
4
+ curl_setopt($ch, CURLOPT_URL, $url);
5
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
6
+ curl_setopt($ch, CURLOPT_TIMEOUT, 20);
7
+ $result = curl_exec($ch);
8
+ curl_close($ch);
9
+ return $result;
10
+ }
11
+
lib/Socialfeeds/pi/pinterest.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
- function getPinterest($uname){
3
- try {
4
- $rss4 = new DOMDocument();
5
- @$rss4->load('http://pinterest.com/'.$uname.'/feed.rss'); //Enter your pinterest username
6
- } catch (Exception $e) {
7
- echo 'Caught exception: ', $e->getMessage(), "\n";
8
- }
9
- $feed4 = array();
10
- $pins = $rss4->getElementsByTagName('item');
11
- if(count($pins) > 0){
12
- foreach ($pins as $pin) {
13
- $item = array (
14
- 'title' => $pin->getElementsByTagName('title')->item(0)->nodeValue,
15
- 'image' => $pin->getElementsByTagName('image')->item(0)->nodeValue,
16
- 'link' => $pin->getElementsByTagName('link')->item(0)->nodeValue,
17
- 'date' => $pin->getElementsByTagName('pubDate')->item(0)->nodeValue,
18
- 'description' => $pin->getElementsByTagName('description')->item(0)->nodeValue,
19
- );
20
- array_push($feed4, $item);
21
- }
22
- }
23
- return $feed4;
24
- }
25
  ?>
1
+ <?php
2
+ function getPinterest($uname){
3
+ try {
4
+ $rss4 = new DOMDocument();
5
+ @$rss4->load('http://pinterest.com/'.$uname.'/feed.rss'); //Enter your pinterest username
6
+ } catch (Exception $e) {
7
+ echo 'Caught exception: ', $e->getMessage(), "\n";
8
+ }
9
+ $feed4 = array();
10
+ $pins = $rss4->getElementsByTagName('item');
11
+ if(count($pins) > 0){
12
+ foreach ($pins as $pin) {
13
+ $item = array (
14
+ 'title' => $pin->getElementsByTagName('title')->item(0)->nodeValue,
15
+ 'image' => $pin->getElementsByTagName('image')->item(0)->nodeValue,
16
+ 'link' => $pin->getElementsByTagName('link')->item(0)->nodeValue,
17
+ 'date' => $pin->getElementsByTagName('pubDate')->item(0)->nodeValue,
18
+ 'description' => $pin->getElementsByTagName('description')->item(0)->nodeValue,
19
+ );
20
+ array_push($feed4, $item);
21
+ }
22
+ }
23
+ return $feed4;
24
+ }
25
  ?>
lib/Socialfeeds/tw/twitter.php CHANGED
@@ -1,153 +1,178 @@
1
- <?php
2
- class TwitterAPIExchange
3
- {
4
- private $oauth_access_token;
5
- private $oauth_access_token_secret;
6
- private $consumer_key;
7
- private $consumer_secret;
8
- private $postfields;
9
- private $getfield;
10
- protected $oauth;
11
- public $url;
12
-
13
- /**
14
- * @param array $settings
15
- */
16
- public function __construct(array $settings)
17
- {
18
- if (!in_array('curl', get_loaded_extensions())){
19
- throw new Exception('You need to install cURL, see: http://curl.haxx.se/docs/install.html');
20
- }
21
- if (!isset($settings['oauth_access_token'])
22
- || !isset($settings['oauth_access_token_secret'])
23
- || !isset($settings['consumer_key'])
24
- || !isset($settings['consumer_secret'])){
25
- throw new Exception('Make sure you are passing in the correct parameters');
26
- }
27
- $this->oauth_access_token = $settings['oauth_access_token'];
28
- $this->oauth_access_token_secret = $settings['oauth_access_token_secret'];
29
- $this->consumer_key = $settings['consumer_key'];
30
- $this->consumer_secret = $settings['consumer_secret'];
31
- }
32
-
33
- public function setPostfields(array $array){
34
-
35
- if (!is_null($this->getGetfield())){
36
- throw new Exception('You can only choose get OR post fields.');
37
- }
38
- if (isset($array['status']) && substr($array['status'], 0, 1) === '@'){
39
- $array['status'] = sprintf("\0%s", $array['status']);
40
- }
41
- $this->postfields = $array;
42
- return $this;
43
- }
44
-
45
- public function setGetfield($string){
46
-
47
- if (!is_null($this->getPostfields())){
48
- throw new Exception('You can only choose get OR post fields.');
49
- }
50
- $search = array('#', ',', '+', ':');
51
- $replace = array('%23', '%2C', '%2B', '%3A');
52
- $string = str_replace($search, $replace, $string);
53
- $this->getfield = $string;
54
- return $this;
55
- }
56
-
57
- public function getGetfield(){
58
- return $this->getfield;
59
- }
60
-
61
- public function getPostfields(){
62
- return $this->postfields;
63
- }
64
-
65
- public function buildOauth($url, $requestMethod){
66
- if (!in_array(strtolower($requestMethod), array('post', 'get'))){
67
- throw new Exception('Request method must be either POST or GET');
68
- }
69
- $consumer_key = $this->consumer_key;
70
- $consumer_secret = $this->consumer_secret;
71
- $oauth_access_token = $this->oauth_access_token;
72
- $oauth_access_token_secret = $this->oauth_access_token_secret;
73
-
74
- $oauth = array(
75
- 'oauth_consumer_key' => $consumer_key,
76
- 'oauth_nonce' => time(),
77
- 'oauth_signature_method' => 'HMAC-SHA1',
78
- 'oauth_token' => $oauth_access_token,
79
- 'oauth_timestamp' => time(),
80
- 'oauth_version' => '1.0'
81
- );
82
- $getfield = $this->getGetfield();
83
- if (!is_null($getfield)){
84
- $getfields = str_replace('?', '', explode('&', $getfield));
85
- foreach ($getfields as $g){
86
- $split = explode('=', $g);
87
- $oauth[$split[0]] = $split[1];
88
- }
89
- }
90
- $base_info = $this->buildBaseString($url, $requestMethod, $oauth);
91
- $composite_key = rawurlencode($consumer_secret) . '&' . rawurlencode($oauth_access_token_secret);
92
- $oauth_signature = base64_encode(hash_hmac('sha1', $base_info, $composite_key, true));
93
- $oauth['oauth_signature'] = $oauth_signature;
94
-
95
- $this->url = $url;
96
- $this->oauth = $oauth;
97
-
98
- return $this;
99
- }
100
-
101
-
102
- public function performRequest($return = true){
103
-
104
- if (!is_bool($return)){
105
- throw new Exception('performRequest parameter must be true or false');
106
- }
107
- $header = array($this->buildAuthorizationHeader($this->oauth), 'Expect:');
108
- $getfield = $this->getGetfield();
109
- $postfields = $this->getPostfields();
110
- $options = array(
111
- CURLOPT_HTTPHEADER => $header,
112
- CURLOPT_HEADER => false,
113
- CURLOPT_URL => $this->url,
114
- CURLOPT_RETURNTRANSFER => true
115
- );
116
- if (!is_null($postfields)){
117
- $options[CURLOPT_POSTFIELDS] = $postfields;
118
- }else{
119
- if ($getfield !== ''){
120
- $options[CURLOPT_URL] .= $getfield;
121
- }
122
- }
123
- $feed = curl_init();
124
- curl_setopt_array($feed, $options);
125
- $json = curl_exec($feed);
126
- curl_close($feed);
127
- if ($return) {
128
- return $json;
129
- }
130
- }
131
-
132
-
133
- private function buildBaseString($baseURI, $method, $params){
134
- $return = array();
135
- ksort($params);
136
- foreach($params as $key=>$value){
137
- $return[] = "$key=" . $value;
138
- }
139
- return $method . "&" . rawurlencode($baseURI) . '&' . rawurlencode(implode('&', $return));
140
- }
141
-
142
-
143
- private function buildAuthorizationHeader($oauth){
144
- $return = 'Authorization: OAuth ';
145
- $values = array();
146
- foreach($oauth as $key => $value){
147
- $values[] = "$key=\"" . rawurlencode($value) . "\"";
148
- }
149
- $return .= implode(', ', $values);
150
- return $return;
151
- }
152
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  ?>
1
+ <?php
2
+ class TwitterAPIExchange
3
+ {
4
+ private $oauth_access_token;
5
+ private $oauth_access_token_secret;
6
+ private $consumer_key;
7
+ private $consumer_secret;
8
+ private $postfields;
9
+ private $getfield;
10
+ protected $oauth;
11
+ public $url;
12
+
13
+ /**
14
+ * @param array $settings
15
+ */
16
+ public function __construct(array $settings)
17
+ {
18
+ if (!in_array('curl', get_loaded_extensions())){
19
+ throw new Exception('You need to install cURL, see: http://curl.haxx.se/docs/install.html');
20
+ }
21
+ if (!isset($settings['oauth_access_token'])
22
+ || !isset($settings['oauth_access_token_secret'])
23
+ || !isset($settings['consumer_key'])
24
+ || !isset($settings['consumer_secret'])){
25
+ throw new Exception('Make sure you are passing in the correct parameters');
26
+ }
27
+ $this->oauth_access_token = $settings['oauth_access_token'];
28
+ $this->oauth_access_token_secret = $settings['oauth_access_token_secret'];
29
+ $this->consumer_key = $settings['consumer_key'];
30
+ $this->consumer_secret = $settings['consumer_secret'];
31
+ }
32
+ /**
33
+ * Set postfields array, example: array('screen_name' => 'J7mbo')
34
+ * @param array $array Array of parameters to send to API
35
+ * @return TwitterAPIExchange Instance of self for method chaining
36
+ */
37
+ public function setPostfields(array $array){
38
+
39
+ if (!is_null($this->getGetfield())){
40
+ throw new Exception('You can only choose get OR post fields.');
41
+ }
42
+ if (isset($array['status']) && substr($array['status'], 0, 1) === '@'){
43
+ $array['status'] = sprintf("\0%s", $array['status']);
44
+ }
45
+ $this->postfields = $array;
46
+ return $this;
47
+ }
48
+ /**
49
+ * Set getfield string, example: '?screen_name=J7mbo'
50
+ * @param string $string Get key and value pairs as string
51
+ * @return \TwitterAPIExchange Instance of self for method chaining
52
+ */
53
+ public function setGetfield($string){
54
+
55
+ if (!is_null($this->getPostfields())){
56
+ throw new Exception('You can only choose get OR post fields.');
57
+ }
58
+ $search = array('#', ',', '+', ':');
59
+ $replace = array('%23', '%2C', '%2B', '%3A');
60
+ $string = str_replace($search, $replace, $string);
61
+ $this->getfield = $string;
62
+ return $this;
63
+ }
64
+ /**
65
+ * Get getfield string (simple getter)
66
+ * @return string $this->getfields
67
+ */
68
+ public function getGetfield(){
69
+ return $this->getfield;
70
+ }
71
+ /**
72
+ * Get postfields array (simple getter)
73
+ * @return array $this->postfields
74
+ */
75
+ public function getPostfields(){
76
+ return $this->postfields;
77
+ }
78
+ /**
79
+ * @param string $url The API url to use. Example: https://api.twitter.com/1.1/search/tweets.json
80
+ * @param string $requestMethod Either POST or GET
81
+ * @return \TwitterAPIExchange Instance of self for method chaining
82
+ */
83
+ public function buildOauth($url, $requestMethod){
84
+ if (!in_array(strtolower($requestMethod), array('post', 'get'))){
85
+ throw new Exception('Request method must be either POST or GET');
86
+ }
87
+ $consumer_key = $this->consumer_key;
88
+ $consumer_secret = $this->consumer_secret;
89
+ $oauth_access_token = $this->oauth_access_token;
90
+ $oauth_access_token_secret = $this->oauth_access_token_secret;
91
+
92
+ $oauth = array(
93
+ 'oauth_consumer_key' => $consumer_key,
94
+ 'oauth_nonce' => time(),
95
+ 'oauth_signature_method' => 'HMAC-SHA1',
96
+ 'oauth_token' => $oauth_access_token,
97
+ 'oauth_timestamp' => time(),
98
+ 'oauth_version' => '1.0'
99
+ );
100
+ $getfield = $this->getGetfield();
101
+ if (!is_null($getfield)){
102
+ $getfields = str_replace('?', '', explode('&', $getfield));
103
+ foreach ($getfields as $g){
104
+ $split = explode('=', $g);
105
+ $oauth[$split[0]] = $split[1];
106
+ }
107
+ }
108
+ $base_info = $this->buildBaseString($url, $requestMethod, $oauth);
109
+ $composite_key = rawurlencode($consumer_secret) . '&' . rawurlencode($oauth_access_token_secret);
110
+ $oauth_signature = base64_encode(hash_hmac('sha1', $base_info, $composite_key, true));
111
+ $oauth['oauth_signature'] = $oauth_signature;
112
+
113
+ $this->url = $url;
114
+ $this->oauth = $oauth;
115
+
116
+ return $this;
117
+ }
118
+
119
+ /**
120
+ * Perform the acual data retrieval from the API
121
+ */
122
+ public function performRequest($return = true){
123
+
124
+ if (!is_bool($return)){
125
+ throw new Exception('performRequest parameter must be true or false');
126
+ }
127
+ $header = array($this->buildAuthorizationHeader($this->oauth), 'Expect:');
128
+ $getfield = $this->getGetfield();
129
+ $postfields = $this->getPostfields();
130
+ $options = array(
131
+ CURLOPT_HTTPHEADER => $header,
132
+ CURLOPT_HEADER => false,
133
+ CURLOPT_URL => $this->url,
134
+ CURLOPT_RETURNTRANSFER => true
135
+ );
136
+ if (!is_null($postfields)){
137
+ $options[CURLOPT_POSTFIELDS] = $postfields;
138
+ }else{
139
+ if ($getfield !== ''){
140
+ $options[CURLOPT_URL] .= $getfield;
141
+ }
142
+ }
143
+ $feed = curl_init();
144
+ curl_setopt_array($feed, $options);
145
+ $json = curl_exec($feed);
146
+ curl_close($feed);
147
+ if ($return) {
148
+ return $json;
149
+ }
150
+ }
151
+
152
+ /**
153
+ * Private method to generate the base string used by cURL
154
+ * @return string Built base string
155
+ */
156
+ private function buildBaseString($baseURI, $method, $params){
157
+ $return = array();
158
+ ksort($params);
159
+ foreach($params as $key=>$value){
160
+ $return[] = "$key=" . $value;
161
+ }
162
+ return $method . "&" . rawurlencode($baseURI) . '&' . rawurlencode(implode('&', $return));
163
+ }
164
+
165
+ /**
166
+ * Private method to generate authorization header used by cURL
167
+ */
168
+ private function buildAuthorizationHeader($oauth){
169
+ $return = 'Authorization: OAuth ';
170
+ $values = array();
171
+ foreach($oauth as $key => $value){
172
+ $values[] = "$key=\"" . rawurlencode($value) . "\"";
173
+ }
174
+ $return .= implode(', ', $values);
175
+ return $return;
176
+ }
177
+ }
178
  ?>
lib/Socialfeeds/yt/youtube.php CHANGED
@@ -1,6 +1,6 @@
1
- <?php
2
- function getVideo($url){
3
- preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $matches);
4
- $youtube_url = $matches[1];
5
- return $youtube_url;
6
  }
1
+ <?php
2
+ function getVideo($url){
3
+ preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $matches);
4
+ $youtube_url = $matches[1];
5
+ return $youtube_url;
6
  }
package.xml CHANGED
@@ -1,29 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Netgo_Socialfeeds</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>This extension helps to display latest feeds from Facebook, twitter,Instagram, Pinterest and YouTube with tabs using a widget.</summary>
10
- <description>This extension helps to display latest feeds from Facebook, twitter,Instagram, Pinterest and YouTube with tabs using a widget. You can also display the feeds of your social media page either in left side or right side of page. This extension is All-in-one social media feeds gatherer. Thus making website interactive and with exclusive functionality. &#xD;
11
- &#xD;
12
- Features&#xD;
13
- &#xD;
14
- 1. Widgets based&#xD;
15
- 2. Facebook feed&#xD;
16
- 3. Twitter feed&#xD;
17
- 4. Instagram feed&#xD;
18
- 5. Pinterest feed&#xD;
19
- 6. Youtube feed&#xD;
20
- 7. Tab View&#xD;
21
- 8. Easy to customize</description>
22
- <notes>First Preview Release</notes>
23
  <authors><author><name>NetGo</name><user>NetGo</user><email>netattingomails@gmail.com</email></author></authors>
24
- <date>2015-09-03</date>
25
- <time>04:55:17</time>
26
- <contents><target name="magecommunity"><dir name="Netgo"><dir name="Socialfeeds"><dir name="Block"><dir name="Socialfeed"><file name="List.php" hash="3774295f2b10bcb27c5195518dcc096b"/><file name="Socialfeeds.php" hash="53b0ccdd463eccd4fe42bd94a9d28c0d"/><file name="View.php" hash="5b851b33470d34db14ea74cffef255f1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4820582dd23d3a10ae7039429402c2d4"/><file name="Socialfeed.php" hash="2e1ce6f9e0601237e158509b46617b66"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="91cb94ff95a40f25e84f426a9c69e64c"/><dir name="Socialfeed"><file name="Collection.php" hash="ec8baa9b8247e57e065fd74f7b71de99"/></dir><file name="Socialfeed.php" hash="074842d1496e9238e04620786e74ee07"/></dir><file name="Socialfeed.php" hash="4de0971867a92659f6d2c89ee97bd73a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0f70a13ceee559e7b86a413ede0c405d"/><file name="config.xml" hash="a1bb36279fa40886c04a63a4d266f049"/><file name="system.xml" hash="ed2cca0ba7adca1124bdc539b527addd"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="netgo_socialfeeds.xml" hash="187091009adf55c0f13f8a82b1f4e263"/></dir><dir name="template"><dir name="netgo_socialfeeds"><dir name="socialfeed"><file name="list.phtml" hash="88d7bd71fc70a95b77234d132066cbea"/><file name="socialfeeds.phtml" hash="ec18c42549fac0f7af17b1afef8d4caa"/><file name="view.phtml" hash="2867b6118fe5f9a19b82f29ea5145f64"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Socialfeeds"><dir name="fb"><file name="base_facebook.php" hash="9e3f9b2f9b6721fb0ca7d5c2b0213438"/><file name="facebook.php" hash="75284cc789f9eaa57dabfa783da4d656"/><file name="fb_ca_chain_bundle.crt" hash="c4290b9deb70d0bef2f88b67fc68c8ec"/></dir><dir name="in"><file name="instagram.php" hash="ba936ea77a297e734c9d58fd6094ea52"/></dir><dir name="pi"><file name="pinterest.php" hash="f363dcbf6aa76757bd2b7e084f11a147"/></dir><dir name="tw"><file name="twitter.php" hash="826f90e472451d46928bb713f8125c89"/></dir><dir name="yt"><file name="youtube.php" hash="ebfefaedb34fe47fb1085f596145e8a5"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="socialfeeds"><dir name="css"><file name="front-style.css" hash="b3cfdf01b8f5d885a0cf55b2e989a26a"/><dir name="img"><file name="Thumbs.db" hash="79466f0b472d36f0b134969416da0f1d"/><file name="boxBottom.png" hash="40dc8e07911e7a47dc4485cab5a0c749"/><file name="boxLeft.png" hash="7d4d28fa69f1f3f711a16c8a3b025450"/><file name="boxRight.png" hash="ad457a38e2794fd316aaf0d5befb53d2"/><file name="boxTop.png" hash="a7a98102bcf673f9a3f4778146bd08dc"/><file name="closeBtn.jpg" hash="cd06a47f721351ee07f5389e2c101294"/><file name="closeBut.jpg" hash="036ace3cfa1335ac0785c6d6d2b70014"/><file name="closeBut.png" hash="ffc8c456f24e40d48d7e539eae2173bf"/><file name="corners.png" hash="e296c325c222b6d7b9d44794ec08511d"/><file name="popupBL.png" hash="adc0cbd386258bfaf8abddd6d6b6ab8c"/><file name="popupBR.png" hash="b80416c3ddb2f4c66e43f7f3fb36923c"/><file name="popupGB.png" hash="965a1765cbc817eb37a91cbb2426fa46"/><file name="popupGL.png" hash="1ffd4a58e57eb3c31fa160732c635b7e"/><file name="popupGR.png" hash="dac9ed11174dc6fb4c4151ed0a28382d"/><file name="popupGt.png" hash="6c554ccca413437cf57ab55ffa15d835"/><file name="popupTL.png" hash="9b11b7b7a9b655c74e8ffe2cf55ff63f"/><file name="popupTR.png" hash="e3fe0f3dabc1fea7e0a8ff863ed9262d"/><file name="transparency.png" hash="f2bc3e153639f5254ad472153019e4fe"/></dir></dir><dir name="images"><file name="arrow-im.png" hash="482eeea1723930385854338e320fd0b3"/><file name="border-img-shadow.png" hash="d387740f2d8cfe56837475859d68cd2f"/><file name="border-img-shadow1.png" hash="808912df0b52f9eb42186bf13bc99083"/><file name="border-right.jpg" hash="d539a495c3046a1fd38b717978937624"/><file name="date-celender.png" hash="50ced2b8c18212ef256e6ebdd64513cb"/><file name="facebook.png" hash="b47a8d3d8997dda990fca7e4296f7bb0"/><file name="instra.png" hash="5fd0f0f9d4ee2875c4ace157fddbac72"/><file name="list-style-fb.png" hash="c172b3536f6021f42b0c9ce4a7e82ea2"/><file name="list-style-tw.png" hash="5e989efe1fa4ac5aecc30fd945e0f177"/><file name="pin.png" hash="09c3ce5f88e15af6a8afb55d609bed3a"/><file name="twitter.png" hash="928b1f517d03dac05b202ea332addadf"/><file name="youtube.png" hash="5a83fd12fc48ca5ea294d1160c331a66"/></dir><dir name="js"><file name="init.js" hash="80679686b90161a16de3b454ec92cc25"/><file name="popup2.2.js" hash="2f32c18534992c80d80d69fb78c4d862"/><dir name="scroller"><file name="jquery.mCustomScrollbar.concat.min.js" hash="67edb119202fee369943ea8100ed0cd1"/><file name="jquery.mCustomScrollbar.css" hash="852dd38c1c62c6870ed5c49aaee1121b"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="User_Manual.pdf" hash="62021db875eed88ddd216d08e857a434"/></dir></target><target name="mageetc"><dir name="modules"><file name="Netgo_Socialfeeds.xml" hash="5a64a9f910e6389f8bf9bba59af4a9be"/></dir></target></contents>
27
  <compatible/>
28
- <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
29
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Netgo_Socialfeeds</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>his extension helps to display latest feeds from Facebook, Twitter, Instagram, Pinterest and YouTube</summary>
10
+ <description>This extension helps to display latest feeds from Facebook, twitter,Instagram, Pinterest and YouTube with tabs using a widget. You can also display the feeds of your social media page either in left side or right side of page. This extension is All-in-one social media feeds gatherer. Thus making website interactive and with exclusive functionality.</description>
11
+ <notes>Second Preview Release</notes>
 
 
 
 
 
 
 
 
 
 
 
12
  <authors><author><name>NetGo</name><user>NetGo</user><email>netattingomails@gmail.com</email></author></authors>
13
+ <date>2016-03-22</date>
14
+ <time>04:58:18</time>
15
+ <contents><target name="magecommunity"><dir name="Netgo"><dir name="Socialfeeds"><dir name="Block"><dir name="Adminhtml"><dir name="Socialfeed"><dir name="Edit"><file name="Form.php" hash="87e845b2def27894c1d2f16b3c9028ce"/><dir name="Tab"><file name="Form.php" hash="87e68ae3969418cd71a9ca15723a5c4d"/></dir><file name="Tabs.php" hash="db412b6b792e1094decd94c1bd8ba710"/></dir><file name="Edit.php" hash="bcc7663fc2c8ad40c6dc993ae46657c4"/><file name="Grid.php" hash="95a7876dee05c39a48f179117e3927ec"/></dir><file name="Socialfeed.php" hash="bcbd6967229fe7c788718977c28aea8e"/></dir><dir name="Socialfeed"><file name="List.php" hash="b3594fc0eef809ae588e3857099ba7bf"/><file name="Socialfeeds.php" hash="cbe240513c79307286f17cf63fafbf94"/><file name="View.php" hash="3b68f9d4eba6bf53940bd33d57bb2782"/></dir></dir><dir name="Controller"><dir name="Adminhtml"><file name="Socialfeeds.php" hash="a67f7a4c2ededd536450793e669c526b"/></dir><file name="Router.php" hash="451d1147ef277ed435aab345407324e1"/></dir><dir name="Helper"><file name="Data.php" hash="d4ff43cc84b8cbbe872cc1c06e132ac7"/><file name="Socialfeed.php" hash="9b35f8b8d023ee47a7f11b759eb83f0e"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="852ba824c221861cbcd59051eacae507"/><dir name="Socialfeed"><file name="Collection.php" hash="90dbaabe073e31e2c5b8876ea765f7f4"/></dir><file name="Socialfeed.php" hash="3cc219bd64b3c94eebf8979bb765ab73"/></dir><file name="Socialfeed.php" hash="ff2789ee57533d32451bc3eb4e2931a5"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Socialfeeds"><file name="SocialfeedController.php" hash="1d32da17a2f254779603643d3f6ce2d9"/></dir></dir><file name="SocialfeedController.php" hash="bbf0a99e6874f7f5b61b61e592699f84"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6663f5258bbcdd1a7aec95594858cbc0"/><file name="config.xml" hash="88101c2a22866d682aa3d8dd30867601"/><file name="system.xml" hash="c9d472ba91dee0da4f89d291eb84358f"/></dir><dir name="sql"><dir name="netgo_socialfeeds_setup"><file name="install-1.0.0.php" hash="1b7920c194ce9c92f6a5409aec57e996"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="netgo_socialfeeds.xml" hash="b35fc12374e1a51de1ed9ada1d09bc05"/></dir><dir name="template"><dir name="netgo_socialfeeds"><dir name="socialfeed"><file name="list.phtml" hash="91fc551d730bf6b207614a3ac3bf5101"/><file name="socialfeeds.phtml" hash="a4215a7e795a9c74bb71842797843103"/><file name="view.phtml" hash="74d8ab3b61ff33366e63eedbedc905aa"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Socialfeeds"><dir name="fb"><file name="base_facebook.php" hash="f2a629c25efa36fc02f699f7e52dc61e"/><file name="facebook.php" hash="fcc5993f7fc4b99bd1d37ffbbb111e92"/><file name="fb_ca_chain_bundle.crt" hash="c4290b9deb70d0bef2f88b67fc68c8ec"/></dir><dir name="in"><file name="instagram.php" hash="e7033ab627e9a1c991e9371a5ca6db93"/></dir><dir name="pi"><file name="pinterest.php" hash="7daf361b88d2c53dce1eb8d6a6c7d12b"/></dir><dir name="tw"><file name="twitter.php" hash="727a2252077b9de8e74f5591ceda8f59"/></dir><dir name="yt"><file name="youtube.php" hash="b6692bd162fab47669e75820e0b7baeb"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="socialfeeds"><dir name="css"><file name="front-style.css" hash="f00ead0415af46ed7a6afc90af2425ad"/><dir name="img"><file name="Thumbs.db" hash="79466f0b472d36f0b134969416da0f1d"/><file name="boxBottom.png" hash="40dc8e07911e7a47dc4485cab5a0c749"/><file name="boxLeft.png" hash="7d4d28fa69f1f3f711a16c8a3b025450"/><file name="boxRight.png" hash="ad457a38e2794fd316aaf0d5befb53d2"/><file name="boxTop.png" hash="a7a98102bcf673f9a3f4778146bd08dc"/><file name="closeBtn.jpg" hash="cd06a47f721351ee07f5389e2c101294"/><file name="closeBut.jpg" hash="036ace3cfa1335ac0785c6d6d2b70014"/><file name="closeBut.png" hash="ffc8c456f24e40d48d7e539eae2173bf"/><file name="corners.png" hash="e296c325c222b6d7b9d44794ec08511d"/><file name="popupBL.png" hash="adc0cbd386258bfaf8abddd6d6b6ab8c"/><file name="popupBR.png" hash="b80416c3ddb2f4c66e43f7f3fb36923c"/><file name="popupGB.png" hash="965a1765cbc817eb37a91cbb2426fa46"/><file name="popupGL.png" hash="1ffd4a58e57eb3c31fa160732c635b7e"/><file name="popupGR.png" hash="dac9ed11174dc6fb4c4151ed0a28382d"/><file name="popupGt.png" hash="6c554ccca413437cf57ab55ffa15d835"/><file name="popupTL.png" hash="9b11b7b7a9b655c74e8ffe2cf55ff63f"/><file name="popupTR.png" hash="e3fe0f3dabc1fea7e0a8ff863ed9262d"/><file name="transparency.png" hash="f2bc3e153639f5254ad472153019e4fe"/></dir></dir><dir name="images"><file name="arrow-im.png" hash="482eeea1723930385854338e320fd0b3"/><file name="border-img-shadow.png" hash="d387740f2d8cfe56837475859d68cd2f"/><file name="border-img-shadow1.png" hash="808912df0b52f9eb42186bf13bc99083"/><file name="border-right.jpg" hash="d539a495c3046a1fd38b717978937624"/><file name="date-celender.png" hash="50ced2b8c18212ef256e6ebdd64513cb"/><file name="facebook.png" hash="b47a8d3d8997dda990fca7e4296f7bb0"/><file name="instra.png" hash="5fd0f0f9d4ee2875c4ace157fddbac72"/><file name="list-style-fb.png" hash="c172b3536f6021f42b0c9ce4a7e82ea2"/><file name="list-style-tw.png" hash="5e989efe1fa4ac5aecc30fd945e0f177"/><file name="pin.png" hash="09c3ce5f88e15af6a8afb55d609bed3a"/><file name="twitter.png" hash="928b1f517d03dac05b202ea332addadf"/><file name="youtube.png" hash="5a83fd12fc48ca5ea294d1160c331a66"/></dir><dir name="js"><file name="init.js" hash="16722f33912c27d8396afb75051bdc20"/><file name="popup2.2.js" hash="9b3b1e0e30c98cc8ffb5955bbd4d631e"/><dir name="scroller"><file name="jquery.mCustomScrollbar.concat.min.js" hash="71951b246c4726520dce912a5ac7f03c"/><file name="jquery.mCustomScrollbar.css" hash="6abeac0344cc14f58708c3ecc9cf7797"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Netgo_Socialfeeds.xml" hash="c597f67931be5f4459f6e7d5724fb435"/></dir></target><target name="mage"><dir name="."><file name="User_Manual.pdf" hash="62021db875eed88ddd216d08e857a434"/></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/frontend/base/default/socialfeeds/css/front-style.css CHANGED
@@ -1,708 +1,728 @@
1
- /*=======================front style start======================*/
2
-
3
- /*=======================LIST MODE CSS START======================*/
4
- .fb-feed-list-view li {
5
- /*border-bottom: 1px dotted #ccc;*/
6
- box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
7
- display: inline-block;
8
- margin: 0 0 14px !important;
9
- padding: 14px 0;
10
- width: 100%;
11
- }
12
-
13
- .fb-feed-list-view li .img_box {
14
- float: right;
15
- height: 210px;
16
- width: 30%;
17
- }
18
-
19
- .fb-feed-list-view li .img_box img {
20
- height: 100%;
21
- width: 100%;
22
- }
23
-
24
- .fb-feed-list-view li .product_box {
25
- padding: 0 15px;
26
- }
27
-
28
- .product_box .img_box a img{
29
- box-shadow:none;
30
- }
31
-
32
-
33
- .fb-feed-list-view li .product_box .content {
34
- float: left;
35
- width: 65%;
36
- }
37
-
38
- .fb-feed-list-view li .product_box .contant_box1 {
39
- font-size: 13px;
40
- }
41
-
42
- /*=======================LIST MODE CSS END======================*/
43
-
44
- /*=======================GRID CSS START======================*/
45
- .col-main > ul#gridfbfeed {
46
- margin:25px auto 0;
47
- max-width: 1167px;
48
- min-height: 960px;
49
- position:relative;
50
-
51
- overflow-y: auto;
52
- }
53
- .col-main > ul#fbfeed {
54
- clear: both;
55
- float: left;
56
- width: 100%;
57
- }
58
- #gridfbfeed .product_box {
59
- /*border: 1px solid #ccc;*/
60
- display: inline-block;
61
- padding: 15px;
62
- }
63
-
64
- #gridfbfeed li {
65
- border: 1px solid #ccc;
66
- display: inline-block;
67
- margin: 0;
68
- max-width: 220px;
69
- vertical-align: top;
70
- width: 220px;
71
- }
72
- #gridfbfeed li:nth-child(4){margin-right:0;}
73
- .product_box {
74
- /*border: 1px solid #ccc;*/
75
- }
76
- #gridfbfeed li .img_box img {
77
- width: 100%;
78
- }
79
-
80
- #gridfbfeed .content .contant_box1 {
81
- font-size: 13px;
82
- }
83
- #gridfbfeed .product_box .img_box a {
84
- display: inline-block;
85
- margin-bottom: 5px;
86
- }
87
-
88
- .fb-feed-grid-view {
89
- position: relative;
90
- }
91
-
92
- .fb-feed-grid-view {
93
- display: block;
94
- height: 850px;
95
- min-height: 100%;
96
- position: relative;
97
- }
98
-
99
-
100
- .tab_container {
101
- position: relative;
102
- overflow: auto;
103
- /*height: 400px;*/
104
- height:327px;
105
- }
106
-
107
- /*=======================GRID CSS END======================*/
108
- /*=======================front style end======================*/
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
- /*=======================13-August-2015 Start======================*/
117
-
118
- .all-in-one::after, .all-in-one::before {
119
- clear: both;
120
- content: "";
121
- display: block;
122
- overflow: hidden;
123
- }
124
- .all-in-one {
125
- overflow: hidden;
126
- }
127
-
128
- .all-in-one ul.tabs li a{
129
- text-indent:-999999px;
130
- line-height:41px;
131
- border-bottom:1px solid #999;
132
- }
133
-
134
- .all-in-one ul.tabs li {
135
- background: rgba(0, 0, 0, 0) linear-gradient(#f2f2f2, #f2f2f2, #d3d3d3) repeat scroll 0 0;
136
- width: 14%;
137
- }
138
-
139
- .all-in-one ul.tabs li.aiosf-facebook a {
140
- background: rgba(0, 0, 0, 0) url("../images/facebook.png") no-repeat scroll center center !important;
141
- }
142
-
143
- .all-in-one ul.tabs li.aiosf-twitter a {
144
- background: rgba(0, 0, 0, 0) url("../images/twitter.png") no-repeat scroll center center !important ;
145
- }
146
-
147
- .all-in-one ul.tabs li.aiosf-instagram a {
148
- background: rgba(0, 0, 0, 0) url("../images/instra.png") no-repeat scroll center center !important;
149
- }
150
-
151
- .all-in-one ul.tabs li.aiosf-pintrest a {
152
- background: rgba(0, 0, 0, 0) url("../images/pin.png") no-repeat scroll center center !important;
153
- }
154
-
155
- .all-in-one ul.tabs li.aiosf-youtube a {
156
- background: rgba(0, 0, 0, 0) url("../images/youtube.png") no-repeat scroll center center !important;
157
- }
158
-
159
-
160
- /*===============LI-HOVER-IMG======================*/
161
-
162
- /*
163
- .all-in-one ul.tabs li:nth-child(1) a:hover {
164
- background: rgba(0, 0, 0, 0) url("../images/facebook-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
165
- }
166
-
167
- .all-in-one ul.tabs li:nth-child(2) a:hover {
168
- background: rgba(0, 0, 0, 0) url("../images/twitter-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
169
- }
170
-
171
- .all-in-one ul.tabs li:nth-child(3) a:hover {
172
- background: rgba(0, 0, 0, 0) url("../images/instagram-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
173
- }
174
-
175
- .all-in-one ul.tabs li:nth-child(4) a:hover {
176
- background: rgba(0, 0, 0, 0) url("../images/pinstrest-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
177
- }
178
-
179
- .all-in-one ul.tabs li:nth-child(5) a:hover {
180
- background: rgba(0, 0, 0, 0) url("../images/youtube-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
181
- }
182
-
183
- */
184
-
185
-
186
-
187
-
188
- /*===============LI-HOVER-IMG======================*/
189
-
190
- .all-in-one ul.tabs li{
191
- height:42px;
192
- }
193
-
194
- .all-in-one ul.tabs li.active {
195
- border-bottom: 1px solid #999 !important;
196
- border-top: 3px solid;
197
- }
198
-
199
- .all-in-one ul.tabs{
200
- border-bottom:none;
201
- height:auto;
202
- }
203
-
204
-
205
- .all-in-one .tab_container {
206
- width: 71.7%;
207
- }
208
-
209
- .all-in-one .tab_content h4 {
210
- padding-left: 10px;
211
- }
212
-
213
-
214
- .ins-feeds::after, .ins-feeds::before {
215
- clear: both;
216
- content: "";
217
- display: block;
218
- overflow: hidden;
219
- }
220
-
221
- .all-in-one .tab_container .ins-feeds {
222
- padding: 0 10px;
223
- }
224
-
225
- .all-in-one .tab_container ul {
226
- padding: 0 22px;
227
- }
228
-
229
- .container::after, .container::before {
230
- clear: both;
231
- content: "";
232
- display: block;
233
- overflow: hidden;
234
- }
235
-
236
- .all-in-one .tab_container .ins-feeds a img {
237
- margin: 0;
238
- width: 100%;
239
- }
240
-
241
- .all-in-one .tab_container .ins-feeds a {
242
- display: inline-block;
243
- height: 62px;
244
- margin: 0 4px 0 0;
245
- width: 62px;
246
- }
247
-
248
-
249
- .all-in-one .tab_container .ins-feeds a:nth-child(4n) {
250
- margin: 0;
251
- }
252
-
253
-
254
-
255
-
256
-
257
-
258
- /***popup css***/
259
-
260
- .box {
261
- height: 50px;
262
- width: 50px;
263
- float: left;
264
- margin: 20px;
265
- border: 1px solid green;
266
- cursor: pointer
267
- }
268
-
269
- img { cursor: pointer }
270
-
271
- .pop2 { display: none }
272
-
273
- /* popup box */
274
-
275
- #popupBox {
276
- background: #fff;
277
- display: none;
278
- border: 3px solid #ccc
279
- }
280
-
281
- #popupBox2,
282
- #popupBox3 {
283
- background: #fff;
284
- display: none;
285
- }
286
-
287
- #popupBox2 td,
288
- #popupBox3 td {
289
- background: #fff;
290
- padding: 0
291
- }
292
-
293
- #popupBox2 .popupContent { }
294
-
295
- .contentBox {
296
- overflow-y: scroll;
297
- height: 270px
298
- }
299
-
300
- .popupContent { background: #fff; }
301
-
302
- .popupContent .popClose {
303
- float: right;
304
- display: block;
305
- height: 16px;
306
- width: 16px;
307
- background: url(img/closeBut.jpg) no-repeat;
308
- text-indent: -9000px
309
- }
310
-
311
- .popupClose {
312
- display: block;
313
- position: absolute;
314
- top: 5px;
315
- right: 0px;
316
- height: 30px;
317
- width: 30px;
318
- text-indent: -9000px;
319
- background: url(img/closeBut.png) no-repeat
320
- }
321
-
322
- .galleryTitle {
323
- font-size: 1.3em;
324
- text-align: center;
325
- }
326
-
327
- .popupContent .pop2 {
328
- font-size: 1.2em;
329
- text-align: center;
330
- padding: 30px
331
- }
332
-
333
- .popupContent .galleryTitle {
334
- margin-bottom: 30px;
335
- position: relative;
336
- }
337
-
338
- .galleryControls {
339
- overflow: hidden;
340
- line-height: 40px
341
- }
342
-
343
- .galleryControls a {
344
- font-size: 1.2em;
345
- font-weight: bold;
346
- text-decoration: none;
347
- color: #333;
348
- text-transform: uppercase
349
- }
350
-
351
- .galleryControls .prev {
352
- float: left;
353
- margin-left: 20px
354
- }
355
-
356
- .galleryControls .next {
357
- float: right;
358
- margin-right: 20px
359
- }
360
-
361
- .galleryControls p { text-align: center; }
362
-
363
- .imageDesc {
364
- color: #fff;
365
- line-height: 15px;
366
- min-height: 50px;
367
- padding: 8px 15px 0;
368
- text-align: left;
369
- display:none;
370
- }
371
-
372
- .imageDesc p {
373
- padding: 5px 10px;
374
- color: #fff;
375
- font-size: 12px
376
- }
377
-
378
- .popupBtns { padding: 20px }
379
-
380
- .popupBtns input {
381
- margin-right: 20px;
382
- font-size: 14px;
383
- }
384
-
385
- #fixedGallery .popupContent { background: #f3f3f3 }
386
-
387
- #fixedGallery .popupTL {
388
- background: url(img/popupTL.png) no-repeat;
389
- _background: none
390
- }
391
-
392
- #fixedGallery .popupTR {
393
- background: url(img/popupTR.png) no-repeat;
394
- _background: none
395
- }
396
-
397
- #fixedGallery .popupBL {
398
- background: url(img/popupBL.png) no-repeat;
399
- _background: none
400
- }
401
-
402
- #fixedGallery .popupBR {
403
- background: url(img/popupBR.png) no-repeat;
404
- _background: none
405
- }
406
-
407
- #fixedGallery .popupTM {
408
- background: url(img/popupGT.png) repeat-x;
409
- _background: none
410
- }
411
-
412
- #fixedGallery .popupBM {
413
- background: url(img/popupGB.png) repeat-x;
414
- _background: none
415
- }
416
-
417
- #fixedGallery .popupML {
418
- background: url(img/popupGL.png) repeat-y;
419
- _background: none
420
- }
421
-
422
- #fixedGallery .popupMR {
423
- background: url(img/popupGR.png) repeat-y;
424
- _background: none
425
- }
426
-
427
- #fixedGallery .popupTL div {
428
- _background: url(img/popupTL.png) no-repeat;
429
- width: 100%;
430
- height: 100%
431
- }
432
-
433
- #fixedGallery .popupTR div {
434
- _background: url(img/popupTR.png) no-repeat;
435
- width: 100%;
436
- height: 100%
437
- }
438
-
439
- #fixedGallery .popupBL div {
440
- _background: url(img/popupBL.png) no-repeat;
441
- width: 100%;
442
- height: 100%
443
- }
444
-
445
- #fixedGallery .popupBR div {
446
- _background: url(img/popupBR.png) no-repeat;
447
- width: 100%;
448
- height: 100%
449
- }
450
-
451
- #fixedGallery .popupTM div {
452
- _background: url(img/popupGT.png) repeat-x;
453
- width: 100%;
454
- height: 100%
455
- }
456
-
457
- #fixedGallery .popupBM div {
458
- _background: url(img/popupGB.png) repeat-x;
459
- width: 100%;
460
- height: 100%
461
- }
462
-
463
- #fixedGallery .popupML div {
464
- _background: url(img/popupGL.png) repeat-y;
465
- width: 100%;
466
- height: 100%
467
- }
468
-
469
- #fixedGallery .popupMR div {
470
- _background: url(img/popupGR.png) repeat-y;
471
- width: 100%;
472
- height: 100%
473
- }
474
-
475
-
476
- /****frontend tabs ***/
477
- .container { margin: 10px auto;}
478
- ul.tabs {
479
- margin: 0;
480
- padding: 0;
481
- float: left;
482
- list-style: none;
483
- height: 32px;
484
- border-bottom: 1px solid #999;
485
- border-left: 1px solid #999;
486
- width: 102.4%;
487
- }
488
- ul.tabs li {
489
-
490
- float: left;
491
- margin: 0;
492
- padding: 0;
493
- height: 31px;
494
- line-height: 31px;
495
- border: 1px solid #999;
496
- border-left: none;
497
- margin-bottom: -1px;
498
- background: #F0F0F0;
499
- overflow: hidden;
500
- position: relative;
501
- }
502
- ul.tabs li a {
503
- text-decoration: none;
504
- color: #000;
505
- display: block;
506
- font-size: 1.2em;
507
- padding: 0 18px;
508
- border: 1px solid #fff;
509
- outline: none;
510
- }
511
- ul.tabs li a:hover {
512
- background: #ccc;
513
- }
514
- html ul.tabs li.active, html ul.tabs li.active a:hover {
515
- background: #fff;
516
- border-bottom: 1px solid #fff;
517
- }
518
- .tab_container {
519
- width: 99%;
520
- border: 1px solid #999;
521
- border-top: none;
522
- clear: both;
523
- float: left;
524
- background: #fff;
525
- -moz-border-radius-bottomright: 5px;
526
- -khtml-border-radius-bottomright: 5px;
527
- -webkit-border-bottom-right-radius: 5px;
528
- -moz-border-radius-bottomleft: 5px;
529
- -khtml-border-radius-bottomleft: 5px;
530
- -webkit-border-bottom-left-radius: 5px;
531
- }
532
- .tab_content {
533
- padding: 2px;
534
- font-size: 12px;
535
- }
536
- .tab_content h2 {
537
- font-weight: normal;
538
- padding-bottom: 10px;
539
- border-bottom: 1px dashed #ddd;
540
- font-size: 1.8em;
541
- }
542
- .tab_content h3 a{
543
- color: #254588;
544
- }
545
- .tab_content img {
546
- border: 1px solid #ddd;
547
- float: left;
548
- margin: 0 7px 10px 0;
549
- padding: 5px;
550
- width: 62px;
551
- height:62px;
552
- }
553
-
554
-
555
- .tab_content img:nth-child(4n) {
556
- margin: 0;
557
- }
558
-
559
- /*===================17-August======================*/
560
-
561
- .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
562
- background: #b6b2b0 none repeat scroll 0 0 !important;
563
- border-radius: 16px;
564
- height: 100%;
565
- margin: 0 auto;
566
- position: relative;
567
- text-align: center;
568
- width: 4px;
569
- }
570
-
571
-
572
- .mCS-minimal.mCSB_scrollTools .mCSB_draggerRail, .mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail {
573
- background-color: #999 !important;
574
- }
575
-
576
-
577
-
578
-
579
- /*==================================FB-WALL-POST-ABOUT================================*/
580
-
581
-
582
-
583
- .netgo-facebook-post-about .form-table td:first-child {
584
- position: relative;
585
- width: auto !important;
586
- }
587
-
588
-
589
- .popupContent {
590
- background: #fff none repeat scroll 0 0;
591
- border-top: medium none;
592
- padding: 0;
593
- }
594
-
595
- #popupBox{
596
- width:668px !important;
597
- height:auto !important;
598
- }
599
-
600
-
601
- #popupBox .popupBot {
602
- display: none;
603
- }
604
-
605
- .popupMid .popupContent .galleryControls, .popupContent .imgPane{
606
- height:auto !important;
607
- }
608
-
609
-
610
-
611
- /*===================17-August======================*/
612
-
613
-
614
-
615
- /*===================18-August======================*/
616
-
617
- .mCSB_container li {
618
- background: rgba(0, 0, 0, 0) url("../images/border-img-shadow1.png") no-repeat scroll center bottom;
619
- margin-bottom: 7px;
620
- padding: 0 0 7px;
621
- }
622
-
623
-
624
-
625
- .mCSB_container li::after {
626
- clear: both;
627
- content: "";
628
- display: block;
629
- overflow: hidden;
630
- }
631
-
632
-
633
- .mCustomScrollbar .fb-feed-grid-view li .date_box, .mCSB_container li .tw-date {
634
- float: right;
635
- background: rgba(0, 0, 0, 0) url("../images/date-celender.png") no-repeat scroll 0 center;
636
- padding-left:20px;
637
- }
638
-
639
- .mCSB_container li .tw-date{
640
- margin:3px 0 0;
641
- }
642
-
643
- .mCustomScrollbar .tab_content {
644
- box-shadow: -12px 0px 13px 0 #e9e7e7 inset;
645
- }
646
-
647
-
648
- .mCSB_container .tab_content h4 {
649
- text-indent: -1e+10px;
650
- margin:0px;
651
- }
652
-
653
-
654
- .mCSB_container ul#fbfeed li {
655
- background: url("../images/list-style-fb.png") no-repeat scroll 0 4px, url("../images/border-img-shadow1.png") no-repeat scroll center bottom;
656
- padding-left: 16px;
657
- }
658
-
659
- .mCSB_container ul{
660
- list-style:none;
661
- }
662
-
663
- .mCSB_container .tw-feeds li{
664
- background: url("../images/list-style-tw.png") no-repeat scroll 0 4px, url("../images/border-img-shadow1.png") no-repeat scroll center bottom;
665
- padding-left: 16px;
666
- }
667
-
668
- .mCSB_container .tab_content {
669
- min-height: 330px;
670
- overflow:hidden;
671
- }
672
-
673
- .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden {
674
- overflow: hidden;
675
- }
676
-
677
- .imgPane span {
678
- display: inherit !important;
679
- height: auto !important;
680
- line-height: normal !important;
681
- }
682
-
683
- .pin-feeds table tr td em, .pin-feeds table tr td h2 {
684
- display: none !important;
685
- }
686
-
687
- .pin-feeds::after {
688
- clear: both;
689
- content: "";
690
- display: block;
691
- overflow: hidden;
692
- }
693
- .pin-feeds {
694
- padding: 0 0 0 10px;
695
- }
696
-
697
- .all-in-one .container {
698
- width: 300px;
699
- }
700
-
701
- .mCSB_container ul{
702
- padding:0 10px !important;
703
- }
704
-
705
-
706
-
707
-
708
- /*===================18-August======================*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*=======================front style start======================*/
2
+
3
+ /*=======================LIST MODE CSS START======================*/
4
+ .fb-feed-list-view li {
5
+ /*border-bottom: 1px dotted #ccc;*/
6
+ box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
7
+ display: inline-block;
8
+ margin: 0 0 14px !important;
9
+ padding: 14px 0;
10
+ width: 100%;
11
+ }
12
+
13
+ .fb-feed-list-view li .img_box {
14
+ float: right;
15
+ height: 210px;
16
+ width: 30%;
17
+ }
18
+
19
+ .fb-feed-list-view li .img_box img {
20
+ height: 100%;
21
+ width: 100%;
22
+ }
23
+
24
+ .fb-feed-list-view li .product_box {
25
+ padding: 0 15px;
26
+ }
27
+
28
+ .product_box .img_box a img{
29
+ box-shadow:none;
30
+ }
31
+
32
+
33
+ .fb-feed-list-view li .product_box .content {
34
+ float: left;
35
+ width: 65%;
36
+ }
37
+
38
+ .fb-feed-list-view li .product_box .contant_box1 {
39
+ font-size: 13px;
40
+ }
41
+
42
+ /*=======================LIST MODE CSS END======================*/
43
+
44
+ /*=======================GRID CSS START======================*/
45
+ .col-main > ul#gridfbfeed {
46
+ margin:25px auto 0;
47
+ max-width: 1167px;
48
+ min-height: 960px;
49
+ position:relative;
50
+
51
+ overflow-y: auto;
52
+ }
53
+ .col-main > ul#fbfeed {
54
+ clear: both;
55
+ float: left;
56
+ width: 100%;
57
+ }
58
+ #gridfbfeed .product_box {
59
+ /*border: 1px solid #ccc;*/
60
+ display: inline-block;
61
+ padding: 15px;
62
+ }
63
+
64
+ #gridfbfeed li {
65
+ border: 1px solid #ccc;
66
+ display: inline-block;
67
+ margin: 0;
68
+ max-width: 220px;
69
+ vertical-align: top;
70
+ width: 220px;
71
+ }
72
+ #gridfbfeed li:nth-child(4){margin-right:0;}
73
+ .product_box {
74
+ /*border: 1px solid #ccc;*/
75
+ }
76
+ #gridfbfeed li .img_box img {
77
+ width: 100%;
78
+ }
79
+
80
+ #gridfbfeed .content .contant_box1 {
81
+ font-size: 13px;
82
+ }
83
+ #gridfbfeed .product_box .img_box a {
84
+ display: inline-block;
85
+ margin-bottom: 5px;
86
+ }
87
+
88
+ .fb-feed-grid-view {
89
+ position: relative;
90
+ }
91
+
92
+ .fb-feed-grid-view {
93
+ display: block;
94
+ height: 850px;
95
+ min-height: 100%;
96
+ position: relative;
97
+ }
98
+
99
+
100
+ .tab_container {
101
+ position: relative;
102
+ overflow: auto;
103
+ /*height: 400px;*/
104
+ height:327px;
105
+ }
106
+
107
+ /*=======================GRID CSS END======================*/
108
+ /*=======================front style end======================*/
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ /*=======================13-August-2015 Start======================*/
117
+
118
+ .all-in-one::after, .all-in-one::before {
119
+ clear: both;
120
+ content: "";
121
+ display: block;
122
+ overflow: hidden;
123
+ }
124
+
125
+ .all-in-one ul.tabs li a{
126
+ text-indent:-999999px;
127
+ line-height:41px;
128
+ border-bottom:1px solid #999;
129
+ }
130
+
131
+ .all-in-one ul.tabs li {
132
+ background: rgba(0, 0, 0, 0) linear-gradient(#f2f2f2, #f2f2f2, #d3d3d3) repeat scroll 0 0;
133
+ width: 14%;
134
+ }
135
+
136
+ .all-in-one ul.tabs li.aiosf-facebook a {
137
+ background: rgba(0, 0, 0, 0) url("../images/facebook.png") no-repeat scroll center center !important;
138
+ }
139
+
140
+ .all-in-one ul.tabs li.aiosf-twitter a {
141
+ background: rgba(0, 0, 0, 0) url("../images/twitter.png") no-repeat scroll center center !important ;
142
+ }
143
+
144
+ .all-in-one ul.tabs li.aiosf-instagram a {
145
+ background: rgba(0, 0, 0, 0) url("../images/instra.png") no-repeat scroll center center !important;
146
+ }
147
+
148
+ .all-in-one ul.tabs li.aiosf-pintrest a {
149
+ background: rgba(0, 0, 0, 0) url("../images/pin.png") no-repeat scroll center center !important;
150
+ }
151
+
152
+ .all-in-one ul.tabs li.aiosf-youtube a {
153
+ background: rgba(0, 0, 0, 0) url("../images/youtube.png") no-repeat scroll center center !important;
154
+ }
155
+
156
+
157
+ /*===============LI-HOVER-IMG======================*/
158
+
159
+ /*
160
+ .all-in-one ul.tabs li:nth-child(1) a:hover {
161
+ background: rgba(0, 0, 0, 0) url("../images/facebook-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
162
+ }
163
+
164
+ .all-in-one ul.tabs li:nth-child(2) a:hover {
165
+ background: rgba(0, 0, 0, 0) url("../images/twitter-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
166
+ }
167
+
168
+ .all-in-one ul.tabs li:nth-child(3) a:hover {
169
+ background: rgba(0, 0, 0, 0) url("../images/instagram-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
170
+ }
171
+
172
+ .all-in-one ul.tabs li:nth-child(4) a:hover {
173
+ background: rgba(0, 0, 0, 0) url("../images/pinstrest-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
174
+ }
175
+
176
+ .all-in-one ul.tabs li:nth-child(5) a:hover {
177
+ background: rgba(0, 0, 0, 0) url("../images/youtube-icon-hover.png") no-repeat scroll 0 0 / 100% auto;
178
+ }
179
+
180
+ */
181
+
182
+
183
+
184
+
185
+ /*===============LI-HOVER-IMG======================*/
186
+
187
+ .all-in-one ul.tabs li{
188
+ height:42px;
189
+ }
190
+
191
+ .all-in-one ul.tabs li.active {
192
+ border-bottom: 1px solid #999 !important;
193
+ border-top: 3px solid;
194
+ }
195
+
196
+ .all-in-one ul.tabs{
197
+ border-bottom:none;
198
+ height:auto;
199
+ }
200
+
201
+
202
+ .all-in-one .tab_container {
203
+ width: 71.7%;
204
+ }
205
+
206
+ .all-in-one .tab_content h4 {
207
+ padding-left: 10px;
208
+ }
209
+
210
+
211
+ .ins-feeds::after, .ins-feeds::before {
212
+ clear: both;
213
+ content: "";
214
+ display: block;
215
+ overflow: hidden;
216
+ }
217
+
218
+ .all-in-one .tab_container .ins-feeds {
219
+ padding: 0 10px;
220
+ }
221
+
222
+ .all-in-one .tab_container ul {
223
+ padding: 0 22px;
224
+ }
225
+
226
+ .container::after, .container::before {
227
+ clear: both;
228
+ content: "";
229
+ display: block;
230
+ overflow: hidden;
231
+ }
232
+
233
+ .all-in-one .tab_container .ins-feeds a img {
234
+ margin: 0;
235
+ width: 100%;
236
+ }
237
+
238
+ .all-in-one .tab_container .ins-feeds a {
239
+ display: inline-block;
240
+ height: 62px;
241
+ margin: 0 4px 0 0;
242
+ width: 62px;
243
+ }
244
+
245
+
246
+ .all-in-one .tab_container .ins-feeds a:nth-child(4n) {
247
+ margin: 0;
248
+ }
249
+
250
+
251
+
252
+ /*=======================13-August-2015 Close======================*/
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+ /*========================================================FA-FONT==============================================================*/
265
+
266
+
267
+
268
+ /*!
269
+ * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
270
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
271
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont78ce.eot?v=4.2.0');src:url('../fonts/fontawesome-webfontd41d.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont78ce.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont78ce.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont78ce.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}
272
+
273
+
274
+ /*========================================================FA-FONT==============================================================*/
275
+
276
+
277
+
278
+ /***popup css***/
279
+
280
+ .box {
281
+ height: 50px;
282
+ width: 50px;
283
+ float: left;
284
+ margin: 20px;
285
+ border: 1px solid green;
286
+ cursor: pointer
287
+ }
288
+
289
+ img { cursor: pointer }
290
+
291
+ .pop2 { display: none }
292
+
293
+ /* popup box */
294
+
295
+ #popupBox {
296
+ background: #fff;
297
+ display: none;
298
+ border: 3px solid #ccc
299
+ }
300
+
301
+ #popupBox2,
302
+ #popupBox3 {
303
+ background: #fff;
304
+ display: none;
305
+ }
306
+
307
+ #popupBox2 td,
308
+ #popupBox3 td {
309
+ background: #fff;
310
+ padding: 0
311
+ }
312
+
313
+ #popupBox2 .popupContent { }
314
+
315
+ .contentBox {
316
+ overflow-y: scroll;
317
+ height: 270px
318
+ }
319
+
320
+ .popupContent { background: #fff; }
321
+
322
+ .popupContent .popClose {
323
+ float: right;
324
+ display: block;
325
+ height: 16px;
326
+ width: 16px;
327
+ background: url(img/closeBut.jpg) no-repeat;
328
+ text-indent: -9000px
329
+ }
330
+
331
+ .popupClose {
332
+ display: block;
333
+ position: absolute;
334
+ top: 5px;
335
+ right: 0px;
336
+ height: 30px;
337
+ width: 30px;
338
+ text-indent: -9000px;
339
+ background: url(img/closeBut.png) no-repeat
340
+ }
341
+
342
+ .galleryTitle {
343
+ font-size: 1.3em;
344
+ text-align: center;
345
+ }
346
+
347
+ .popupContent .pop2 {
348
+ font-size: 1.2em;
349
+ text-align: center;
350
+ padding: 30px
351
+ }
352
+
353
+ .popupContent .galleryTitle {
354
+ margin-bottom: 30px;
355
+ position: relative;
356
+ }
357
+
358
+ .galleryControls {
359
+ overflow: hidden;
360
+ line-height: 40px
361
+ }
362
+
363
+ .galleryControls a {
364
+ font-size: 1.2em;
365
+ font-weight: bold;
366
+ text-decoration: none;
367
+ color: #333;
368
+ text-transform: uppercase
369
+ }
370
+
371
+ .galleryControls .prev {
372
+ float: left;
373
+ margin-left: 20px
374
+ }
375
+
376
+ .galleryControls .next {
377
+ float: right;
378
+ margin-right: 20px
379
+ }
380
+
381
+ .galleryControls p { text-align: center; }
382
+
383
+ .imageDesc {
384
+ color: #fff;
385
+ line-height: 15px;
386
+ min-height: 50px;
387
+ padding: 8px 15px 0;
388
+ text-align: left;
389
+ display:none;
390
+ }
391
+
392
+ .imageDesc p {
393
+ padding: 5px 10px;
394
+ color: #fff;
395
+ font-size: 12px
396
+ }
397
+
398
+ .popupBtns { padding: 20px }
399
+
400
+ .popupBtns input {
401
+ margin-right: 20px;
402
+ font-size: 14px;
403
+ }
404
+
405
+ #fixedGallery .popupContent { background: #f3f3f3 }
406
+
407
+ #fixedGallery .popupTL {
408
+ background: url(img/popupTL.png) no-repeat;
409
+ _background: none
410
+ }
411
+
412
+ #fixedGallery .popupTR {
413
+ background: url(img/popupTR.png) no-repeat;
414
+ _background: none
415
+ }
416
+
417
+ #fixedGallery .popupBL {
418
+ background: url(img/popupBL.png) no-repeat;
419
+ _background: none
420
+ }
421
+
422
+ #fixedGallery .popupBR {
423
+ background: url(img/popupBR.png) no-repeat;
424
+ _background: none
425
+ }
426
+
427
+ #fixedGallery .popupTM {
428
+ background: url(img/popupGT.png) repeat-x;
429
+ _background: none
430
+ }
431
+
432
+ #fixedGallery .popupBM {
433
+ background: url(img/popupGB.png) repeat-x;
434
+ _background: none
435
+ }
436
+
437
+ #fixedGallery .popupML {
438
+ background: url(img/popupGL.png) repeat-y;
439
+ _background: none
440
+ }
441
+
442
+ #fixedGallery .popupMR {
443
+ background: url(img/popupGR.png) repeat-y;
444
+ _background: none
445
+ }
446
+
447
+ #fixedGallery .popupTL div {
448
+ _background: url(img/popupTL.png) no-repeat;
449
+ width: 100%;
450
+ height: 100%
451
+ }
452
+
453
+ #fixedGallery .popupTR div {
454
+ _background: url(img/popupTR.png) no-repeat;
455
+ width: 100%;
456
+ height: 100%
457
+ }
458
+
459
+ #fixedGallery .popupBL div {
460
+ _background: url(img/popupBL.png) no-repeat;
461
+ width: 100%;
462
+ height: 100%
463
+ }
464
+
465
+ #fixedGallery .popupBR div {
466
+ _background: url(img/popupBR.png) no-repeat;
467
+ width: 100%;
468
+ height: 100%
469
+ }
470
+
471
+ #fixedGallery .popupTM div {
472
+ _background: url(img/popupGT.png) repeat-x;
473
+ width: 100%;
474
+ height: 100%
475
+ }
476
+
477
+ #fixedGallery .popupBM div {
478
+ _background: url(img/popupGB.png) repeat-x;
479
+ width: 100%;
480
+ height: 100%
481
+ }
482
+
483
+ #fixedGallery .popupML div {
484
+ _background: url(img/popupGL.png) repeat-y;
485
+ width: 100%;
486
+ height: 100%
487
+ }
488
+
489
+ #fixedGallery .popupMR div {
490
+ _background: url(img/popupGR.png) repeat-y;
491
+ width: 100%;
492
+ height: 100%
493
+ }
494
+
495
+
496
+ /****frontend tabs ***/
497
+ .container { margin: 10px auto;}
498
+ ul.tabs {
499
+ margin: 0;
500
+ padding: 0;
501
+ float: left;
502
+ list-style: none;
503
+ height: 32px;
504
+ border-bottom: 1px solid #999;
505
+ border-left: 1px solid #999;
506
+ width: 100%;
507
+ }
508
+ ul.tabs li {
509
+
510
+ float: left;
511
+ margin: 0;
512
+ padding: 0;
513
+ height: 31px;
514
+ line-height: 31px;
515
+ border: 1px solid #999;
516
+ border-left: none;
517
+ margin-bottom: -1px;
518
+ background: #F0F0F0;
519
+ overflow: hidden;
520
+ position: relative;
521
+ }
522
+ ul.tabs li a {
523
+ text-decoration: none;
524
+ color: #000;
525
+ display: block;
526
+ font-size: 1.2em;
527
+ padding: 0 18px;
528
+ border: 1px solid #fff;
529
+ outline: none;
530
+ }
531
+ ul.tabs li a:hover {
532
+ background: #ccc;
533
+ }
534
+ html ul.tabs li.active, html ul.tabs li.active a:hover {
535
+ background: #fff;
536
+ border-bottom: 1px solid #fff;
537
+ }
538
+ .tab_container {
539
+ width: 99%;
540
+ border: 1px solid #999;
541
+ border-top: none;
542
+ clear: both;
543
+ float: left;
544
+ background: #fff;
545
+ -moz-border-radius-bottomright: 5px;
546
+ -khtml-border-radius-bottomright: 5px;
547
+ -webkit-border-bottom-right-radius: 5px;
548
+ -moz-border-radius-bottomleft: 5px;
549
+ -khtml-border-radius-bottomleft: 5px;
550
+ -webkit-border-bottom-left-radius: 5px;
551
+ }
552
+ .tab_content {
553
+ padding: 2px;
554
+ font-size: 12px;
555
+ }
556
+ .tab_content h2 {
557
+ font-weight: normal;
558
+ padding-bottom: 10px;
559
+ border-bottom: 1px dashed #ddd;
560
+ font-size: 1.8em;
561
+ }
562
+ .tab_content h3 a{
563
+ color: #254588;
564
+ }
565
+ .tab_content img {
566
+ border: 1px solid #ddd;
567
+ float: left;
568
+ margin: 0 7px 10px 0;
569
+ padding: 5px;
570
+ width: 62px;
571
+ height:62px;
572
+ }
573
+
574
+
575
+ .tab_content img:nth-child(4n) {
576
+ margin: 0;
577
+ }
578
+
579
+ /*===================17-August======================*/
580
+
581
+ .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
582
+ background: #b6b2b0 none repeat scroll 0 0 !important;
583
+ border-radius: 16px;
584
+ height: 100%;
585
+ margin: 0 auto;
586
+ position: relative;
587
+ text-align: center;
588
+ width: 4px;
589
+ }
590
+
591
+
592
+ .mCS-minimal.mCSB_scrollTools .mCSB_draggerRail, .mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail {
593
+ background-color: #999 !important;
594
+ }
595
+
596
+
597
+
598
+
599
+ /*==================================FB-WALL-POST-ABOUT================================*/
600
+
601
+
602
+
603
+ .netgo-facebook-post-about .form-table td:first-child {
604
+ position: relative;
605
+ width: auto !important;
606
+ }
607
+
608
+
609
+ .popupContent {
610
+ background: #fff none repeat scroll 0 0;
611
+ border-top: medium none;
612
+ padding: 0;
613
+ }
614
+
615
+ #popupBox{
616
+ width:668px !important;
617
+ height:auto !important;
618
+ }
619
+
620
+
621
+ #popupBox .popupBot {
622
+ display: none;
623
+ }
624
+
625
+ .popupMid .popupContent .galleryControls, .popupContent .imgPane{
626
+ height:auto !important;
627
+ }
628
+
629
+
630
+
631
+ /*===================17-August======================*/
632
+
633
+
634
+
635
+ /*===================18-August======================*/
636
+
637
+ .mCSB_container li {
638
+ background: rgba(0, 0, 0, 0) url("../images/border-img-shadow1.png") no-repeat scroll center bottom;
639
+ margin-bottom: 7px;
640
+ padding: 0 0 7px;
641
+ }
642
+
643
+
644
+
645
+ .mCSB_container li::after {
646
+ clear: both;
647
+ content: "";
648
+ display: block;
649
+ overflow: hidden;
650
+ }
651
+
652
+
653
+ .mCustomScrollbar .fb-feed-grid-view li .date_box, .mCSB_container li .tw-date {
654
+ float: right;
655
+ background: rgba(0, 0, 0, 0) url("../images/date-celender.png") no-repeat scroll 0 center;
656
+ padding-left:20px;
657
+ }
658
+
659
+ .mCSB_container li .tw-date{
660
+ margin:3px 0 0;
661
+ }
662
+
663
+ .mCustomScrollbar .tab_content {
664
+ box-shadow: -12px 0px 13px 0 #e9e7e7 inset;
665
+ }
666
+
667
+
668
+ .mCSB_container .tab_content h4 {
669
+ text-indent: -1e+10px;
670
+ margin:0px;
671
+ }
672
+
673
+
674
+ .mCSB_container ul#fbfeed li {
675
+ background: url("../images/list-style-fb.png") no-repeat scroll 0 4px, url("../images/border-img-shadow1.png") no-repeat scroll center bottom;
676
+ padding-left: 16px;
677
+ }
678
+
679
+ .mCSB_container ul{
680
+ list-style:none;
681
+ }
682
+
683
+ .mCSB_container .tw-feeds li{
684
+ background: url("../images/list-style-tw.png") no-repeat scroll 0 4px, url("../images/border-img-shadow1.png") no-repeat scroll center bottom;
685
+ padding-left: 16px;
686
+ }
687
+
688
+ .mCSB_container .tab_content {
689
+ min-height: 330px;
690
+ overflow:hidden;
691
+ }
692
+
693
+ .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden {
694
+ overflow: hidden;
695
+ }
696
+
697
+ .imgPane span {
698
+ display: inherit !important;
699
+ height: auto !important;
700
+ line-height: normal !important;
701
+ }
702
+
703
+ .pin-feeds table tr td em, .pin-feeds table tr td h2 {
704
+ display: none !important;
705
+ }
706
+
707
+ .pin-feeds::after {
708
+ clear: both;
709
+ content: "";
710
+ display: block;
711
+ overflow: hidden;
712
+ }
713
+ .pin-feeds {
714
+ padding: 0 0 0 10px;
715
+ }
716
+
717
+ .all-in-one .container {
718
+ width: 300px;
719
+ }
720
+
721
+ .mCSB_container ul{
722
+ padding:0 10px !important;
723
+ }
724
+
725
+
726
+
727
+
728
+ /*===================18-August======================*/
skin/frontend/base/default/socialfeeds/js/init.js CHANGED
@@ -1,58 +1,48 @@
1
- /***************************************
2
- *** Social Feeds ***
3
- ***************************************
4
- *
5
- * @copyright Copyright (c) 2015
6
- * @company NetAttingo Technologies
7
- * @package Netgo_Socialfeeds
8
- * @author NetGo
9
- * @dev netattingomails@gmail.com
10
- *
11
- */
12
- //Init the popup for instagram images only
13
- jQuery(document).ready(function(){
14
- jQuery(".popup").popup({
15
- transparentLayer : true,
16
- gallery : true,
17
- galleryTitle : "Instagram",
18
- imgaeDesc : true,
19
- galleryCounter : true,
20
- imageDesc : true,
21
- autoSize : false,
22
- boxHeight : 600,
23
- boxWidth : 500,
24
- shadowLength : 0,
25
- transition : 0,
26
- onOpen : function() {
27
- console.log("opened the box .popup");
28
- },
29
- onClose : function() {
30
- console.log("closed the box .popup");
31
- }
32
- });
33
- });
34
-
35
- //Frontend Scroller
36
- jQuery(document).ready(function(){
37
- jQuery(".tab_container").mCustomScrollbar({
38
- theme:"minimal"
39
- });
40
- });
41
-
42
- //Frontend Tabs
43
- jQuery(document).ready(function(){
44
- //Default Action
45
- jQuery(".tab_content").hide(); //Hide all content
46
- jQuery("ul.tabs li:first").addClass("active").show();//Activate first tab
47
- jQuery(".tab_content:first").show();//Show first tab content
48
- //On Click Event
49
- jQuery("ul.tabs li").click(function(){
50
- jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
51
- jQuery(this).addClass("active"); //Add "active" class to selected tab
52
- jQuery(".tab_content").hide(); //Hide all tab content
53
- var activeTab = jQuery(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
54
- jQuery(activeTab).fadeIn(); //Fade in the active content
55
- return false;
56
- });
57
- });
58
 
1
+
2
+ //Init the popup for instagram images only
3
+ jQuery(document).ready(function(){
4
+ jQuery(".popup").popup({
5
+ transparentLayer : true,
6
+ gallery : true,
7
+ galleryTitle : "Instagram",
8
+ imgaeDesc : true,
9
+ galleryCounter : true,
10
+ imageDesc : true,
11
+ autoSize : false,
12
+ boxHeight : 600,
13
+ boxWidth : 500,
14
+ shadowLength : 0,
15
+ transition : 0,
16
+ onOpen : function() {
17
+ console.log("opened the box .popup");
18
+ },
19
+ onClose : function() {
20
+ console.log("closed the box .popup");
21
+ }
22
+ });
23
+ });
24
+
25
+ //Frontend Scroller
26
+ jQuery(document).ready(function(){
27
+ jQuery(".tab_container").mCustomScrollbar({
28
+ theme:"minimal"
29
+ });
30
+ });
31
+
32
+ //Frontend Tabs
33
+ jQuery(document).ready(function(){
34
+ //Default Action
35
+ jQuery(".tab_content").hide(); //Hide all content
36
+ jQuery("ul.tabs li:first").addClass("active").show();//Activate first tab
37
+ jQuery(".tab_content:first").show();//Show first tab content
38
+ //On Click Event
39
+ jQuery("ul.tabs li").click(function(){
40
+ jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
41
+ jQuery(this).addClass("active"); //Add "active" class to selected tab
42
+ jQuery(".tab_content").hide(); //Hide all tab content
43
+ var activeTab = jQuery(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
44
+ jQuery(activeTab).fadeIn(); //Fade in the active content
45
+ return false;
46
+ });
47
+ });
 
 
 
 
 
 
 
 
 
 
48
 
skin/frontend/base/default/socialfeeds/js/popup2.2.js CHANGED
@@ -1,559 +1,604 @@
1
- /***************************************
2
- *** Social Feeds ***
3
- ***************************************
4
- *
5
- * @copyright Copyright (c) 2015
6
- * @company NetAttingo Technologies
7
- * @package Netgo_Socialfeeds
8
- * @author NetGo
9
- * @dev netattingomails@gmail.com
10
- *
11
- */
12
-
13
-
14
-
15
- (function ($) {
16
- // this ones for you 'uncle' Doug!
17
- 'use strict';
18
-
19
- // Plugin namespace definition
20
- $.Popup = function (options, element, callback) {
21
- // wrap the element in the jQuery object
22
- this.el = $(element);
23
- // this is the namespace for all bound event handlers in the plugin
24
- this.namespace = "popup";
25
- // extend the settings object with the options, make a 'deep' copy of the object using an empty 'holding' object
26
- this.opts = $.extend(true, {}, $.Popup.settings, options);
27
- this.init();
28
- // run the callback function if it is defined
29
- if (typeof callback === "function") {
30
- callback.call();
31
- }
32
- };
33
-
34
- // these are the plugin default settings that will be over-written by user settings
35
- $.Popup.settings = {
36
- 'transparentLayer' : true, // would you like a transparent layer underneath the popup?
37
- 'transparentOpacity' : 70, // set the opacity percentage of the transparent layer
38
- 'gallery' : false, // set true for navigation options between popups of the same title attribute
39
- 'galleryCounter' : false, // add a counter for gallery
40
- 'titleHeight' : 30, // height in pixels of the gallery title box
41
- 'controlHeight' : 40, // height in pixels of the gallery navigation box
42
- 'imageDesc' : false, // add a description box underneath the gallery image
43
- 'autoSize' : true, // set whether the box with image in it will resize to the image size
44
- 'boxWidth' : 400, // when autoSize is set to false, or no image then set the dimensions of the box in pixels
45
- 'boxHeight' : 300, // when autoSize is set to false, or no image then set the dimensions of the box in pixels
46
- 'centerImage' : true, // centers the image in a fixed size box
47
- 'shadowLength' : 42, // set the width of the padding around the box for your drop shadows
48
- 'transition' : 500, // transition speed from one box to the next
49
- 'popupID' : 'popupBox', // custom class for the popup box
50
- 'contentClass' : 'popupContent', // custom class for the popup content
51
- 'closeBox' : 'popupClose', // class the close button has
52
- 'hasCloseButton' : true, // set whether you want to be able to close the box or not
53
- 'centerOnResize' : true, // set whether the box centers itself when the browser resizes
54
- 'loaderPath' : 'loader.gif', // file path to the loading image
55
- 'overflow' : 'visible', // "hidden" or "visible", can set the css overflow attribute on or off
56
- 'ajax' : false, // allows user to specify an ajax call to a resource
57
- 'ajaxType' : "text", // jQuery needs the data type to be specified - http://api.jquery.com/jQuery.ajax/
58
- 'fixedTop' : false, // false/integer : allow for the user to specify the top position of the popup
59
- 'fixedLeft' : false, // false/integer : allow for the user to specify the left position of the popup
60
- 'onOpen' : function() {}, // call back function when the box opens
61
- 'onClose' : function() {}
62
- };
63
-
64
- // plugin functions go here
65
- $.Popup.prototype = {
66
- init : function() {
67
- var popup = this;
68
-
69
- // this seems a bit hacky, but for now I will unbind the namespace first before binding
70
- this.destroy();
71
-
72
- // this is a flag to test if the popup is open. I will only call the close box function on those popup's that are currently open so that only one callback function is called at one time
73
- this.el.isOpen = false;
74
-
75
- // *** set content source and gallery title variables ***
76
- this.el.boxSrc = this.el.attr('name');
77
-
78
- // store DOM fragment as a variable
79
- if (!this.opts.gallery) {
80
- this.fragment = $(this.el.boxSrc);
81
- }
82
-
83
- if (this.opts.hasCloseButton) {
84
- this.el.closeBtn = '<a href="" class="' + this.opts.closeBox + '">close</a>';
85
- } else {
86
- this.el.closeBtn = '';
87
- }
88
-
89
- $(this.el).on('click.' + this.namespace, function(e) {
90
- e.preventDefault();
91
- //if (popup.el.isOpen === false)
92
- popup.openBox();
93
- });
94
-
95
- },
96
- findScreenPos : function() {
97
- var dimensions = {},
98
- win = $(window);
99
-
100
- dimensions.winY = win.height();
101
- dimensions.winX = win.width();
102
- dimensions.scrY = win.scrollTop();
103
- dimensions.scrX = win.scrollLeft();
104
- return dimensions;
105
- },
106
- createBox : function() {
107
- var popup = this,
108
- popupBox,
109
- dimensions;
110
-
111
- if ($("#" + this.opts.popupID).length === 0) {
112
- popupBox = '<div id="' + this.opts.popupID + '"><table cellpadding="0" cellspacing="0"><tbody><tr class="popupTop"><td class="popupTL corner pngbg"></td><td class="popupTM pngbg"></td><td class="popupTR corner pngbg"></td></tr><tr class="popupMid"><td class="popupML pngbg"></td><td class="' + this.opts.contentClass + '"></td><td class="popupMR pngbg"></td></tr><tr class="popupBot"><td class="popupBL corner pngbg"></td><td class="popupBM pngbg"></td><td class="popupBR corner pngbg"></td></tr></tbody></table></div>';
113
- // oops :( I forgot why I made a different box for IE6, was it to put the png class on the corners?
114
- $("body").append(popupBox);
115
- $("#" + this.opts.popupID).css("display","none");
116
- }
117
-
118
- // add transparency layer if transparency is true.
119
- if (this.opts.transparentLayer === true && $(".transparency").length === 0) {
120
- var transparentLayer = '<div class="transparency" style="z-index:99;background:#000;opacity:' + (this.opts.transparentOpacity / 100) + ';filter:alpha(opacity = ' + this.opts.transparentOpacity + ');top:0;left:0;position:absolute"></div>';
121
- $("body").append(transparentLayer);
122
- // add event listeners for browser resizing and scrolling to adjust the transparent layer size
123
- $(window).on('scroll.' + this.namespace, function(){
124
- // find height and width of transparent layer
125
- dimensions = popup.findScreenPos();
126
- $(".transparency").css({height: dimensions.winY + dimensions.scrY, width: dimensions.winX + dimensions.scrX});
127
- });
128
- $(window).on('resize.' + this.namespace, function(){
129
- // find height and width of transparent layer
130
- dimensions = popup.findScreenPos();
131
- $(".transparency").css({height: dimensions.winY + dimensions.scrY + "px", width:dimensions.winX + dimensions.scrX + "px"});
132
- });
133
- }
134
-
135
- // get rid of transparency if 'false' and it already exists and don't need it
136
- if (this.opts.transparentLayer === false && $(".transparency").length > 0) {
137
- $(".transparency").remove();
138
- }
139
-
140
- // add event handling for closing box
141
- $(document).on('keydown.' + this.namespace, function(e) {
142
- if (e.keyCode == 27 && popup.el.isOpen === true) {
143
- popup.closeBox();
144
- }
145
- });
146
-
147
-
148
- $(".transparency").on('click.' + this.namespace, function(){
149
- if (popup.el.isOpen === true) {
150
- popup.closeBox();
151
- }
152
- });
153
-
154
- // clear box of any content
155
- $("#" + this.opts.popupID + " ." + this.opts.contentClass).children().remove();
156
- // style transparent layer
157
- dimensions = this.findScreenPos();
158
- $(".transparency").css({
159
- "display" : "block",
160
- "filter" : "alpha(opacity = " + this.opts.transparentOpacity + ")",
161
- "opacity" : this.opts.transparentOpacity / 100,
162
- "height" : dimensions.winY + dimensions.scrY + "px",
163
- "width" : dimensions.winX + dimensions.scrX + "px"});
164
- },
165
- styleBox : function(properties, image) {
166
- var popup = this,
167
- popupBox = $("#" + this.opts.popupID),
168
- contentSelector = "." + this.opts.contentClass,
169
- imgSelector = contentSelector + " img",
170
- contentHeight,
171
- contentWidth,
172
- outerBoxWidth,
173
- outerBoxHeight,
174
- boxPos,
175
- leftPos,
176
- topPos,
177
- dimensions,
178
- oldBoxHeight,
179
- oldBoxWidth;
180
-
181
- if (image) {
182
- $(imgSelector).attr("src", image.src);
183
- $(imgSelector).attr("height", properties.imgHeight + "px");
184
- $(imgSelector).attr("width", properties.imgWidth + "px");
185
- }
186
- // if this is an image being loaded
187
- if (properties) {
188
- contentHeight = properties.imgHeight + this.opts.titleHeight + this.opts.controlHeight;
189
- contentWidth = properties.imgWidth;
190
- if (this.opts.autoSize === false) {
191
- contentHeight = this.opts.boxHeight + this.opts.titleHeight + this.opts.controlHeight;
192
- contentWidth = this.opts.boxWidth;
193
- }
194
- } else {
195
- contentHeight = this.opts.boxHeight;
196
- contentWidth = this.opts.boxWidth;
197
- }
198
-
199
- outerBoxWidth = contentWidth + (this.opts.shadowLength * 2);
200
- outerBoxHeight = contentHeight + (this.opts.shadowLength * 2);
201
-
202
- // calculate absolute position of the box and then center it on the screen
203
- dimensions = popup.findScreenPos();
204
- boxPos = this.centerBox(dimensions,outerBoxWidth,outerBoxHeight);
205
-
206
- // allow user to specify a fixed position for the popup. Use fixedTop and fixedLeft, if not then center the box
207
- if (this.opts.fixedTop) {
208
- boxPos.topPos = this.opts.fixedTop;
209
- }
210
- if (this.opts.fixedLeft) {
211
- boxPos.leftPos = boxPos.fixedLeft;
212
- }
213
-
214
- topPos = boxPos.topPos;
215
- leftPos = boxPos.leftPos;
216
-
217
- // on window resize - center the box in the middle again
218
- if (this.opts.centerOnResize === true) {
219
-
220
- $(window).on('resize.' + this.namespace, function() {
221
- dimensions = popup.findScreenPos();
222
- boxPos = popup.centerBox(dimensions,outerBoxWidth,outerBoxHeight);
223
- if (popup.opts.fixedTop) {
224
- boxPos.topPos = popup.opts.fixedTop;
225
- }
226
- if (popup.opts.fixedLeft) {
227
- boxPos.leftPos = boxPos.fixedLeft;
228
- }
229
- popupBox.css({top: boxPos.topPos + "px", left: boxPos.leftPos + "px"});
230
- });
231
- }
232
-
233
- // claculate dimensions of popup
234
- // animate to the correct size if it is already open, else just set the values
235
- if (popupBox.css("display") === "block" && properties && this.opts.autoSize === true) {
236
- oldBoxHeight = parseFloat(popupBox.css("height")) - (this.opts.shadowLength * 2) - (this.opts.titleHeight + this.opts.controlHeight);
237
- oldBoxWidth = parseFloat(popupBox.css("width")) - (this.opts.shadowLength * 2);
238
- popupBox.find(".galleryTitle").css({height: this.opts.titleHeight + "px"});
239
- popupBox.find(".galleryControls").css({height: this.opts.controlHeight + "px", "overflow": this.opts.overflow});
240
- popupBox.find("img").css({height: oldBoxHeight + "px", width: oldBoxWidth + "px"});
241
- popupBox.find(".imgPane").css({"width":"100%"});
242
-
243
- // I want to animate most of this through the step function of the main image animation for better IE results
244
- // maybe set up some local variables as well to increase performance
245
- popupBox.find("img").animate({height: properties.imgHeight + "px", width: properties.imgWidth + "px"}, {queue:false, duration: this.opts.transition});
246
- popupBox.animate({height: outerBoxHeight + "px", width: outerBoxWidth + "px", "left": leftPos + "px", "top": topPos + "px"}, {queue:false, duration: this.opts.transition});
247
- popupBox.find(".imgPane").animate({height: (contentHeight - this.opts.titleHeight - this.opts.controlHeight) + "px"}, {queue:false, duration: this.opts.transition});
248
- popupBox.find(".popupContent").animate({height: contentHeight + "px", width: contentWidth + "px"}, {queue:false, duration: this.opts.transition});
249
- popupBox.find(".popupTM, .popupBM").animate({width: properties.imgWidth + "px"}, {queue:false, duration: this.opts.transition});
250
- }
251
- // create box and set its dimensions
252
- else {
253
- popupBox.css({height: outerBoxHeight + "px", width: outerBoxWidth + "px", "position": "absolute", "z-index":100, "overflow": this.opts.overflow});
254
- popupBox.find(".imgPane").css({height:(contentHeight - this.opts.titleHeight - this.opts.controlHeight) + "px"});
255
- popupBox.find(".popupContent").css({height: contentHeight + "px", width: contentWidth + "px"});
256
- popupBox.find(".popupML div, .popupMR div").css({height: contentHeight + "px"});
257
- popupBox.find(".galleryTitle").css({height: this.opts.titleHeight + "px", "overflow": this.opts.overflow});
258
- popupBox.find(".galleryControls").css({height: this.opts.controlHeight + "px", "overflow": this.opts.overflow});
259
- popupBox.find(".corner").css({height: this.opts.shadowLength + "px", width: this.opts.shadowLength + "px"});
260
- popupBox.find(".popupTM").css({height: this.opts.shadowLength + "px", width: contentWidth + "px"});
261
- popupBox.find(".popupBM").css({height: this.opts.shadowLength + "px", width: contentWidth + "px"});
262
- popupBox.css({"left": leftPos + "px", "top": topPos + "px"});
263
- }
264
-
265
- // this probably should go somewhere else - leaving it in for now not to confuse me :P
266
- popupBox.fadeIn("slow");
267
- //var pngTimer = setTimeout(function(){$(".pngbg div").addClass("popupPng");},10);
268
- // not sure why I am doing this anymore, since I would have a seperate box markup for IE6. leaving it oput for now
269
- //$(".pngbg div").addClass("popupPng");
270
-
271
- },
272
- // function centers the box in the middle of the screen
273
- centerBox : function(dimensions,outerBoxWidth,outerBoxHeight) {
274
- var coords = {};
275
- coords.leftPos = ((dimensions.winX - outerBoxWidth) / 2) + dimensions.scrX;
276
- coords.topPos = ((dimensions.winY - outerBoxHeight) / 2) + dimensions.scrY;
277
- if (coords.topPos < 0) {
278
- coords.topPos = 0;
279
- }
280
- if (coords.leftPos < 0) {
281
- coords.leftPos = 0;
282
- }
283
- return coords;
284
- },
285
- isContentImage : function() {
286
- var contentString = this.el.boxSrc.split("."),
287
- ext = contentString[contentString.length-1],
288
- isImage;
289
-
290
- switch(ext) {
291
- case 'jpg' : isImage = true;
292
- break;
293
- case 'gif' : isImage = true;
294
- break;
295
- case 'png' : isImage = true;
296
- break;
297
- case 'bmp' : isImage = true;
298
- break;
299
- default : isImage = false;
300
- }
301
- return isImage;
302
- },
303
- displayImage : function() {
304
- var popup = this,
305
- thisIndex,
306
- galleryLength,
307
- popUpImg,
308
- imgProperties = {},
309
- // add the image tag to the popup content
310
- contentBox = $("#" + this.opts.popupID + " ." + this.opts.contentClass);
311
-
312
- // add image markup to the popup box
313
- contentBox.append('<div class="imgPane"><img class="loader" src="' + this.opts.loaderPath + '" width="" height="" alt="" /></div>');
314
- // if gallery description is set to true then create the box that the description will go into and append after .imgPane
315
- if (this.opts.imageDesc === true) {
316
- $(".imgPane").css("position","relative").append('<div class="imageDesc" style="position:absolute;bottom:0;left:0;width:100%;background:#000;opacity:0.8;filter:alpha(opacity = 80);">' + this.el.imageDesc+'</div>');
317
- }
318
-
319
- // if gallery is a fixed height and width and centerImage = true, then align the image to the center of the box
320
- if (this.opts.autoSize === false && this.opts.centerImage === true) {
321
- contentBox.find(".imgPane").prepend("<span style='display:inline-block;height:" + this.opts.boxHeight + "px;line-height:" + this.opts.boxHeight + "px;width:1px'>&nbsp;</span>");
322
- contentBox.find(".imgPane").css({"line-height": this.opts.boxHeight + "px","text-align":"center"});
323
- contentBox.find(".imgPane img").css({"display":"inline","vertical-align":"middle"});
324
- }
325
- if (this.opts.gallery === true) {
326
- // add gallery controls here
327
- if (this.el.galleryTitle !== false) {
328
- contentBox.append('<div class="galleryControls"><a href="" class="prev">previous</a><a href="" class="next">next</a></div>');
329
- contentBox.prepend('<div class="galleryTitle"><h2>' + this.el.galleryTitle + '</h2>' + this.el.closeBtn + '</div>');
330
- // if gallery counter is true then add counter
331
- if (this.opts.galleryCounter === true) {
332
- thisIndex = $("*[title='" + this.el.galleryTitle + "']").index(this.el) + 1;
333
- galleryLength = $("*[title='" + this.el.galleryTitle + "']").length;
334
- contentBox.find(".galleryControls").append("<p class='galleryCounter'>Displaying " + thisIndex + " of " + galleryLength + "</p>");
335
- }
336
- }
337
- // if not a gallery title then just add the close button
338
- else {
339
- contentBox.prepend('<div class="galleryTitle">' + this.el.closeBtn + '</div>');
340
- }
341
- }
342
-
343
- // start of image loading stuff
344
- popUpImg = new Image();
345
- popUpImg.onload = function() {
346
- imgProperties.imgHeight = popUpImg.height;
347
- imgProperties.imgWidth = popUpImg.width;
348
- popup.styleBox(imgProperties, popUpImg);
349
- };
350
- popUpImg.src = this.el.boxSrc;
351
-
352
- // add close button controls
353
- this.addCloseButton();
354
- // add gallery controls and key functions here
355
- this.addGalleryControls();
356
- },
357
- styleNodeBox : function() {
358
- var contentBox = $("#" + this.opts.popupID+" ." + this.opts.contentClass);
359
- //console.log(this.fragment);
360
- contentBox.find("img.loader").remove();
361
- contentBox.append('<div class="galleryTitle">' + this.el.closeBtn + '</div>');
362
- contentBox.append(this.fragment);
363
- contentBox.find(this.el.boxSrc).css("display","block");
364
- // style popup box
365
- this.styleBox();
366
- // add close button controls
367
- this.addCloseButton();
368
- },
369
- getAjaxContent : function() {
370
- var popup = this;
371
-
372
- $("#" + this.opts.popupID + " ." + this.opts.contentClass).html('<img class="loader" src="' + this.opts.loaderPath + '" width="" height="" alt="" />');
373
- $.ajax({
374
- url: popup.el.boxSrc,
375
- dataType : popup.opts.ajaxType,
376
- success : function(msg) {
377
- popup.fragment = msg;
378
- popup.styleNodeBox();
379
- },
380
- error : function() {
381
- popup.fragment = "ajax request failed";
382
- popup.styleNodeBox();
383
- }
384
- });
385
- },
386
- addGalleryControls : function() {
387
- var popup = this;
388
-
389
- $("#" + this.opts.popupID + " .next").on('click.' + this.namespace, function(){
390
- popup.cycleImage(1);
391
- return false;
392
- });
393
-
394
- $("#" + this.opts.popupID + " .prev").on('click.' + this.namespace, function(){
395
- popup.cycleImage(-1);
396
- return false;
397
- });
398
-
399
- // add key controls and keep escape key handler
400
- $(document).on('keydown.' + this.namespace, function(e) {
401
- if (e.keyCode == 39 && popup.el.isOpen === true) {
402
- popup.cycleImage(1);
403
- } else if (e.keyCode == 37 && popup.el.isOpen === true) {
404
- popup.cycleImage(-1);
405
- }
406
-
407
- if (e.keyCode == 27 && popup.el.isOpen === true) {
408
- popup.closeBox();
409
- }
410
- });
411
- },
412
- addCloseButton : function() {
413
- var popup = this;
414
-
415
- $("#" + popup.opts.popupID + " ." + popup.opts.closeBox).on('click.' + popup.namespace, function(){
416
- if (popup.el.isOpen === true) {
417
- popup.closeBox();
418
- }
419
- return false;
420
- });
421
- },
422
- openBox : function() {
423
- this.el.galleryTitle = $(this.el).attr("title");
424
- this.el.imageDesc = $(this.el).attr("longdesc");
425
-
426
- // *** create the markup for popup box ***
427
- this.createBox();
428
-
429
- // *** find the screen dimensions ***
430
- var dimensions = this.findScreenPos();
431
- this.el.winY = dimensions.winY;
432
- this.el.winX = dimensions.winX;
433
- this.el.scrY = dimensions.scrY;
434
- this.el.scrX = dimensions.scrX;
435
-
436
- // *** either display content as an image OR as a DOM node ***
437
- if (this.isContentImage()) {
438
- // find the index of this image in the gallery
439
- this.displayImage();
440
- } else if (this.opts.ajax === true) {
441
- this.getAjaxContent();
442
- } else {
443
- this.styleNodeBox();
444
- }
445
-
446
- // run the callback function on box open
447
- if (this.el.isOpen === false) {
448
- this.opts.onOpen();
449
- }
450
- // set the isOpen flag
451
- this.el.isOpen = true;
452
- },
453
- closeBox : function() {
454
- // may want to do some fancy stuff here, but for now just fading out the box
455
- $("#" + this.opts.popupID).stop().fadeOut("slow").css("display","none");
456
- // delete the popup box from the DOM
457
- $("#" + this.opts.popupID).remove();
458
- $(".transparency").fadeOut("slow");
459
- // run the callback function on box close if it is open
460
-
461
- if (this.el.isOpen === true)
462
- {
463
- this.opts.onClose();
464
- }
465
- // unbind the key controls
466
- $(document).off('keydown.' + this.namespace);
467
- this.el.isOpen = false;
468
- },
469
- cycleImage : function(imgIndex) {
470
- //console.log("hitting cycle image");
471
- var thisIndex = $("*[title='" + this.el.galleryTitle + "']").index(this.el),
472
- galleryLength = $("*[title='" + this.el.galleryTitle + "']").length,
473
- cycleIndex = thisIndex + imgIndex;
474
-
475
- if (cycleIndex < 0) {
476
- cycleIndex = galleryLength - 1;
477
- }
478
- if (cycleIndex == galleryLength) {
479
- cycleIndex = 0;
480
- }
481
-
482
- this.el.isOpen = false;
483
- // unbind the key controls
484
- $(document).off('keydown.' + this.namespace);
485
- $("*[title='" + this.el.galleryTitle + "']:eq(" + cycleIndex + ")").popup("openBox");
486
- },
487
- option : function(args) {
488
- this.opts = $.extend(true, {}, this.opts, args);
489
- },
490
- // want to change the content element the popup points to? no worries
491
- changeContent : function(content) {
492
- this.fragment = $(content);
493
- },
494
- setFragmentHtml : function(content) { // change the content of the current popup
495
- this.fragment.html(content);
496
- },
497
- destroy : function() {
498
- this.el.off("." + this.namespace);
499
- }
500
- };
501
-
502
- // the plugin bridging layer to allow users to call methods and add data after the plguin has been initialised
503
- // props to https://github.com/jsor/jcarousel/blob/master/src/jquery.jcarousel.js for the base of the code & http://isotope.metafizzy.co/ for a good implementation
504
- $.fn.popup = function(options, callback) {
505
- // define the plugin name here so I don't have to change it anywhere else. This name refers to the jQuery data object that will store the plugin data
506
- var pluginName = "popup",
507
- args;
508
-
509
- // if the argument is a string representing a plugin method then test which one it is
510
- if ( typeof options === 'string' ) {
511
- // define the arguments that the plugin function call may make
512
- args = Array.prototype.slice.call( arguments, 1 );
513
- // iterate over each object that the function is being called upon
514
- this.each(function() {
515
- // test the data object that the DOM element that the plugin has for the DOM element
516
- var pluginInstance = $.data(this, pluginName);
517
-
518
- // if there is no data for this instance of the plugin, then the plugin needs to be initialised first, so just call an error
519
- if (!pluginInstance) {
520
- alert("The plugin has not been initialised yet when you tried to call this method: " + options);
521
- return;
522
- }
523
- // if there is no method defined for the option being called, or it's a private function (but I may not use this) then return an error.
524
- if (!$.isFunction(pluginInstance[options]) || options.charAt(0) === "_") {
525
- alert("the plugin contains no such method: " + options);
526
- return;
527
- }
528
- // apply the method that has been called
529
- else {
530
- pluginInstance[options].apply(pluginInstance, args);
531
- }
532
- });
533
-
534
- }
535
- // initialise the function using the arguments as the plugin options
536
- else {
537
- // initialise each instance of the plugin
538
- this.each(function() {
539
- // define the data object that is going to be attached to the DOM element that the plugin is being called on
540
- var pluginInstance = $.data(this, pluginName);
541
- // if the plugin instance already exists then apply the options to it. I don't think I need to init again, but may have to on some plugins
542
- if (pluginInstance) {
543
- pluginInstance.option(options);
544
- // initialising the plugin here may be dangerous and stack multiple event handlers. if required then the plugin instance may have to be 'destroyed' first
545
- //pluginInstance.init(callback);
546
- }
547
- // initialise a new instance of the plugin
548
- else {
549
- $.data(this, pluginName, new $.Popup(options, this, callback));
550
- }
551
- });
552
- }
553
-
554
- // return the jQuery object from here so that the plugin functions don't have to
555
- return this;
556
- };
557
-
558
- // end of module
559
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ jQuery Popup Plugin
3
+ Copyright (c) 2011 Daniel Thomson
4
+
5
+ Licensed under the MIT license:
6
+ http://www.opensource.org/licenses/mit-license.php
7
+ */
8
+
9
+ // release notes: version 1.0
10
+ // version 1.1 - added support for gallery on non img object, now it just has to have the gallery name in the title attribute
11
+ // - added option for image caption
12
+ // - added option for gallery counter
13
+ // - added a preloader image and option for image path
14
+ // version 1.2 - got sick of trying to support syncronised animations, turned the whole popup content into a table so that the brwoser could animate the table in one go.
15
+ // version 1.3 - modified the extend method to create a new object 'opts' that doesn't destroy the settings object. I will think about creating an
16
+ // 'opts' method so that the settings can be modified outside of the script
17
+ // version 1.4 - not finished - added support for transparency hack on IE6
18
+ // version 1.5 - not sure, I think it was a bit of validation with JsLint
19
+ // version 1.6 - removed transparent layer height bug if scroll Y > 0
20
+ // - added option to set the opacity of the transparent layer
21
+ // - removed the $(window).unbind() method, seems not to be needed
22
+ // version 1.7 - added option to set overflow hidden off so that you can hang elements (namely the close button) outside the box
23
+ // - added proper ajax loading
24
+ // - added the option to fix the "top" or "left" position of the box.
25
+ // - added the option to turn the close button off
26
+ // version 2.0 - refactored script to use new architecture: https://github.com/dansdom/plugins-template-v2
27
+ // version 2.1 - added callback functions For opening and closing the popup, fixed up a bunch of event handling too
28
+ // version 2.2 - added support for more recent versions of jquery 1.9+
29
+ //
30
+ // TO DO: make an option to allow the popup to move with page scrolling
31
+ // add close box function
32
+ // remove hasCloseBtn option - it's stupid and only used for one project
33
+ //
34
+ // level of error suppresion -> low
35
+ // This module is designed as a popup function to use whenever and wherever you might need a popup. call this module on any DOM element you wish like this:
36
+ // $(document).ready(function(){
37
+ // $(".yourClassNameHere").popup({
38
+ // plugin : options,
39
+ // go : here
40
+ // })
41
+ // });
42
+ //
43
+ // You can link multiple popup items together to form a 'gallery'. to do this you need to set the option 'gallery' to true. Also you need to set
44
+ // the title attribute of the DOM element to the gallery name that you want. All other DOM elements with the same class and title attribute will
45
+ // be linked into the navigation structure of this gallery, and the title of this gallery will be displayed above the image in the popup box.
46
+ // galllery navigation is also bound to the left and right arrow keys on the keyboard
47
+ // the link to the popup goes onto the name attribute
48
+ // You can also control the height and width of the navigation box and title box with the following options:
49
+ // titleHeight, controlHeight
50
+ //
51
+ // Other interesting options avaliable:
52
+ // autoSize: allows the box to expand and contract to the image size with an animation of the length: transition
53
+ // centerOnResize: will center the popup when you resize the browser window
54
+ // popupID, contentClass, closeBox: allows custom classes and IDs for these DOM element just in case you need them for your application
55
+ // shadowLength: the box itself has a structure around it to allow for custom drop shadows.
56
+ // This value adjusts the size of this 'outer' layer of the box
57
+ // boxWidth, boxHeight: Sets the dimensions of the box if autoSize is false, and if content node is not an image
58
+ //
59
+
60
+ (function ($) {
61
+ // this ones for you 'uncle' Doug!
62
+ 'use strict';
63
+
64
+ // Plugin namespace definition
65
+ $.Popup = function (options, element, callback) {
66
+ // wrap the element in the jQuery object
67
+ this.el = $(element);
68
+ // this is the namespace for all bound event handlers in the plugin
69
+ this.namespace = "popup";
70
+ // extend the settings object with the options, make a 'deep' copy of the object using an empty 'holding' object
71
+ this.opts = $.extend(true, {}, $.Popup.settings, options);
72
+ this.init();
73
+ // run the callback function if it is defined
74
+ if (typeof callback === "function") {
75
+ callback.call();
76
+ }
77
+ };
78
+
79
+ // these are the plugin default settings that will be over-written by user settings
80
+ $.Popup.settings = {
81
+ 'transparentLayer' : true, // would you like a transparent layer underneath the popup?
82
+ 'transparentOpacity' : 70, // set the opacity percentage of the transparent layer
83
+ 'gallery' : false, // set true for navigation options between popups of the same title attribute
84
+ 'galleryCounter' : false, // add a counter for gallery
85
+ 'titleHeight' : 30, // height in pixels of the gallery title box
86
+ 'controlHeight' : 40, // height in pixels of the gallery navigation box
87
+ 'imageDesc' : false, // add a description box underneath the gallery image
88
+ 'autoSize' : true, // set whether the box with image in it will resize to the image size
89
+ 'boxWidth' : 400, // when autoSize is set to false, or no image then set the dimensions of the box in pixels
90
+ 'boxHeight' : 300, // when autoSize is set to false, or no image then set the dimensions of the box in pixels
91
+ 'centerImage' : true, // centers the image in a fixed size box
92
+ 'shadowLength' : 42, // set the width of the padding around the box for your drop shadows
93
+ 'transition' : 500, // transition speed from one box to the next
94
+ 'popupID' : 'popupBox', // custom class for the popup box
95
+ 'contentClass' : 'popupContent', // custom class for the popup content
96
+ 'closeBox' : 'popupClose', // class the close button has
97
+ 'hasCloseButton' : true, // set whether you want to be able to close the box or not
98
+ 'centerOnResize' : true, // set whether the box centers itself when the browser resizes
99
+ 'loaderPath' : 'loader.gif', // file path to the loading image
100
+ 'overflow' : 'visible', // "hidden" or "visible", can set the css overflow attribute on or off
101
+ 'ajax' : false, // allows user to specify an ajax call to a resource
102
+ 'ajaxType' : "text", // jQuery needs the data type to be specified - http://api.jquery.com/jQuery.ajax/
103
+ 'fixedTop' : false, // false/integer : allow for the user to specify the top position of the popup
104
+ 'fixedLeft' : false, // false/integer : allow for the user to specify the left position of the popup
105
+ 'onOpen' : function() {}, // call back function when the box opens
106
+ 'onClose' : function() {}
107
+ };
108
+
109
+ // plugin functions go here
110
+ $.Popup.prototype = {
111
+ init : function() {
112
+ var popup = this;
113
+
114
+ // this seems a bit hacky, but for now I will unbind the namespace first before binding
115
+ this.destroy();
116
+
117
+ // this is a flag to test if the popup is open. I will only call the close box function on those popup's that are currently open so that only one callback function is called at one time
118
+ this.el.isOpen = false;
119
+
120
+ // *** set content source and gallery title variables ***
121
+ this.el.boxSrc = this.el.attr('name');
122
+
123
+ // store DOM fragment as a variable
124
+ if (!this.opts.gallery) {
125
+ this.fragment = $(this.el.boxSrc);
126
+ }
127
+
128
+ if (this.opts.hasCloseButton) {
129
+ this.el.closeBtn = '<a href="" class="' + this.opts.closeBox + '">close</a>';
130
+ } else {
131
+ this.el.closeBtn = '';
132
+ }
133
+
134
+ $(this.el).on('click.' + this.namespace, function(e) {
135
+ e.preventDefault();
136
+ //if (popup.el.isOpen === false)
137
+ popup.openBox();
138
+ });
139
+
140
+ },
141
+ findScreenPos : function() {
142
+ var dimensions = {},
143
+ win = $(window);
144
+
145
+ dimensions.winY = win.height();
146
+ dimensions.winX = win.width();
147
+ dimensions.scrY = win.scrollTop();
148
+ dimensions.scrX = win.scrollLeft();
149
+ return dimensions;
150
+ },
151
+ createBox : function() {
152
+ var popup = this,
153
+ popupBox,
154
+ dimensions;
155
+
156
+ if ($("#" + this.opts.popupID).length === 0) {
157
+ popupBox = '<div id="' + this.opts.popupID + '"><table cellpadding="0" cellspacing="0"><tbody><tr class="popupTop"><td class="popupTL corner pngbg"></td><td class="popupTM pngbg"></td><td class="popupTR corner pngbg"></td></tr><tr class="popupMid"><td class="popupML pngbg"></td><td class="' + this.opts.contentClass + '"></td><td class="popupMR pngbg"></td></tr><tr class="popupBot"><td class="popupBL corner pngbg"></td><td class="popupBM pngbg"></td><td class="popupBR corner pngbg"></td></tr></tbody></table></div>';
158
+ // oops :( I forgot why I made a different box for IE6, was it to put the png class on the corners?
159
+ $("body").append(popupBox);
160
+ $("#" + this.opts.popupID).css("display","none");
161
+ }
162
+
163
+ // add transparency layer if transparency is true.
164
+ if (this.opts.transparentLayer === true && $(".transparency").length === 0) {
165
+ var transparentLayer = '<div class="transparency" style="z-index:99;background:#000;opacity:' + (this.opts.transparentOpacity / 100) + ';filter:alpha(opacity = ' + this.opts.transparentOpacity + ');top:0;left:0;position:absolute"></div>';
166
+ $("body").append(transparentLayer);
167
+ // add event listeners for browser resizing and scrolling to adjust the transparent layer size
168
+ $(window).on('scroll.' + this.namespace, function(){
169
+ // find height and width of transparent layer
170
+ dimensions = popup.findScreenPos();
171
+ $(".transparency").css({height: dimensions.winY + dimensions.scrY, width: dimensions.winX + dimensions.scrX});
172
+ });
173
+ $(window).on('resize.' + this.namespace, function(){
174
+ // find height and width of transparent layer
175
+ dimensions = popup.findScreenPos();
176
+ $(".transparency").css({height: dimensions.winY + dimensions.scrY + "px", width:dimensions.winX + dimensions.scrX + "px"});
177
+ });
178
+ }
179
+
180
+ // get rid of transparency if 'false' and it already exists and don't need it
181
+ if (this.opts.transparentLayer === false && $(".transparency").length > 0) {
182
+ $(".transparency").remove();
183
+ }
184
+
185
+ // add event handling for closing box
186
+ $(document).on('keydown.' + this.namespace, function(e) {
187
+ if (e.keyCode == 27 && popup.el.isOpen === true) {
188
+ popup.closeBox();
189
+ }
190
+ });
191
+
192
+
193
+ $(".transparency").on('click.' + this.namespace, function(){
194
+ if (popup.el.isOpen === true) {
195
+ popup.closeBox();
196
+ }
197
+ });
198
+
199
+ // clear box of any content
200
+ $("#" + this.opts.popupID + " ." + this.opts.contentClass).children().remove();
201
+ // style transparent layer
202
+ dimensions = this.findScreenPos();
203
+ $(".transparency").css({
204
+ "display" : "block",
205
+ "filter" : "alpha(opacity = " + this.opts.transparentOpacity + ")",
206
+ "opacity" : this.opts.transparentOpacity / 100,
207
+ "height" : dimensions.winY + dimensions.scrY + "px",
208
+ "width" : dimensions.winX + dimensions.scrX + "px"});
209
+ },
210
+ styleBox : function(properties, image) {
211
+ var popup = this,
212
+ popupBox = $("#" + this.opts.popupID),
213
+ contentSelector = "." + this.opts.contentClass,
214
+ imgSelector = contentSelector + " img",
215
+ contentHeight,
216
+ contentWidth,
217
+ outerBoxWidth,
218
+ outerBoxHeight,
219
+ boxPos,
220
+ leftPos,
221
+ topPos,
222
+ dimensions,
223
+ oldBoxHeight,
224
+ oldBoxWidth;
225
+
226
+ if (image) {
227
+ $(imgSelector).attr("src", image.src);
228
+ $(imgSelector).attr("height", properties.imgHeight + "px");
229
+ $(imgSelector).attr("width", properties.imgWidth + "px");
230
+ }
231
+ // if this is an image being loaded
232
+ if (properties) {
233
+ contentHeight = properties.imgHeight + this.opts.titleHeight + this.opts.controlHeight;
234
+ contentWidth = properties.imgWidth;
235
+ if (this.opts.autoSize === false) {
236
+ contentHeight = this.opts.boxHeight + this.opts.titleHeight + this.opts.controlHeight;
237
+ contentWidth = this.opts.boxWidth;
238
+ }
239
+ } else {
240
+ contentHeight = this.opts.boxHeight;
241
+ contentWidth = this.opts.boxWidth;
242
+ }
243
+
244
+ outerBoxWidth = contentWidth + (this.opts.shadowLength * 2);
245
+ outerBoxHeight = contentHeight + (this.opts.shadowLength * 2);
246
+
247
+ // calculate absolute position of the box and then center it on the screen
248
+ dimensions = popup.findScreenPos();
249
+ boxPos = this.centerBox(dimensions,outerBoxWidth,outerBoxHeight);
250
+
251
+ // allow user to specify a fixed position for the popup. Use fixedTop and fixedLeft, if not then center the box
252
+ if (this.opts.fixedTop) {
253
+ boxPos.topPos = this.opts.fixedTop;
254
+ }
255
+ if (this.opts.fixedLeft) {
256
+ boxPos.leftPos = boxPos.fixedLeft;
257
+ }
258
+
259
+ topPos = boxPos.topPos;
260
+ leftPos = boxPos.leftPos;
261
+
262
+ // on window resize - center the box in the middle again
263
+ if (this.opts.centerOnResize === true) {
264
+
265
+ $(window).on('resize.' + this.namespace, function() {
266
+ dimensions = popup.findScreenPos();
267
+ boxPos = popup.centerBox(dimensions,outerBoxWidth,outerBoxHeight);
268
+ if (popup.opts.fixedTop) {
269
+ boxPos.topPos = popup.opts.fixedTop;
270
+ }
271
+ if (popup.opts.fixedLeft) {
272
+ boxPos.leftPos = boxPos.fixedLeft;
273
+ }
274
+ popupBox.css({top: boxPos.topPos + "px", left: boxPos.leftPos + "px"});
275
+ });
276
+ }
277
+
278
+ // claculate dimensions of popup
279
+ // animate to the correct size if it is already open, else just set the values
280
+ if (popupBox.css("display") === "block" && properties && this.opts.autoSize === true) {
281
+ oldBoxHeight = parseFloat(popupBox.css("height")) - (this.opts.shadowLength * 2) - (this.opts.titleHeight + this.opts.controlHeight);
282
+ oldBoxWidth = parseFloat(popupBox.css("width")) - (this.opts.shadowLength * 2);
283
+ popupBox.find(".galleryTitle").css({height: this.opts.titleHeight + "px"});
284
+ popupBox.find(".galleryControls").css({height: this.opts.controlHeight + "px", "overflow": this.opts.overflow});
285
+ popupBox.find("img").css({height: oldBoxHeight + "px", width: oldBoxWidth + "px"});
286
+ popupBox.find(".imgPane").css({"width":"100%"});
287
+
288
+ // I want to animate most of this through the step function of the main image animation for better IE results
289
+ // maybe set up some local variables as well to increase performance
290
+ popupBox.find("img").animate({height: properties.imgHeight + "px", width: properties.imgWidth + "px"}, {queue:false, duration: this.opts.transition});
291
+ popupBox.animate({height: outerBoxHeight + "px", width: outerBoxWidth + "px", "left": leftPos + "px", "top": topPos + "px"}, {queue:false, duration: this.opts.transition});
292
+ popupBox.find(".imgPane").animate({height: (contentHeight - this.opts.titleHeight - this.opts.controlHeight) + "px"}, {queue:false, duration: this.opts.transition});
293
+ popupBox.find(".popupContent").animate({height: contentHeight + "px", width: contentWidth + "px"}, {queue:false, duration: this.opts.transition});
294
+ popupBox.find(".popupTM, .popupBM").animate({width: properties.imgWidth + "px"}, {queue:false, duration: this.opts.transition});
295
+ }
296
+ // create box and set its dimensions
297
+ else {
298
+ popupBox.css({height: outerBoxHeight + "px", width: outerBoxWidth + "px", "position": "absolute", "z-index":100, "overflow": this.opts.overflow});
299
+ popupBox.find(".imgPane").css({height:(contentHeight - this.opts.titleHeight - this.opts.controlHeight) + "px"});
300
+ popupBox.find(".popupContent").css({height: contentHeight + "px", width: contentWidth + "px"});
301
+ popupBox.find(".popupML div, .popupMR div").css({height: contentHeight + "px"});
302
+ popupBox.find(".galleryTitle").css({height: this.opts.titleHeight + "px", "overflow": this.opts.overflow});
303
+ popupBox.find(".galleryControls").css({height: this.opts.controlHeight + "px", "overflow": this.opts.overflow});
304
+ popupBox.find(".corner").css({height: this.opts.shadowLength + "px", width: this.opts.shadowLength + "px"});
305
+ popupBox.find(".popupTM").css({height: this.opts.shadowLength + "px", width: contentWidth + "px"});
306
+ popupBox.find(".popupBM").css({height: this.opts.shadowLength + "px", width: contentWidth + "px"});
307
+ popupBox.css({"left": leftPos + "px", "top": topPos + "px"});
308
+ }
309
+
310
+ // this probably should go somewhere else - leaving it in for now not to confuse me :P
311
+ popupBox.fadeIn("slow");
312
+ //var pngTimer = setTimeout(function(){$(".pngbg div").addClass("popupPng");},10);
313
+ // not sure why I am doing this anymore, since I would have a seperate box markup for IE6. leaving it oput for now
314
+ //$(".pngbg div").addClass("popupPng");
315
+
316
+ },
317
+ // function centers the box in the middle of the screen
318
+ centerBox : function(dimensions,outerBoxWidth,outerBoxHeight) {
319
+ var coords = {};
320
+ coords.leftPos = ((dimensions.winX - outerBoxWidth) / 2) + dimensions.scrX;
321
+ coords.topPos = ((dimensions.winY - outerBoxHeight) / 2) + dimensions.scrY;
322
+ if (coords.topPos < 0) {
323
+ coords.topPos = 0;
324
+ }
325
+ if (coords.leftPos < 0) {
326
+ coords.leftPos = 0;
327
+ }
328
+ return coords;
329
+ },
330
+ isContentImage : function() {
331
+ var contentString = this.el.boxSrc.split("."),
332
+ ext = contentString[contentString.length-1],
333
+ isImage;
334
+
335
+ switch(ext) {
336
+ case 'jpg' : isImage = true;
337
+ break;
338
+ case 'gif' : isImage = true;
339
+ break;
340
+ case 'png' : isImage = true;
341
+ break;
342
+ case 'bmp' : isImage = true;
343
+ break;
344
+ default : isImage = false;
345
+ }
346
+ return isImage;
347
+ },
348
+ displayImage : function() {
349
+ var popup = this,
350
+ thisIndex,
351
+ galleryLength,
352
+ popUpImg,
353
+ imgProperties = {},
354
+ // add the image tag to the popup content
355
+ contentBox = $("#" + this.opts.popupID + " ." + this.opts.contentClass);
356
+
357
+ // add image markup to the popup box
358
+ contentBox.append('<div class="imgPane"><img class="loader" src="' + this.opts.loaderPath + '" width="" height="" alt="" /></div>');
359
+ // if gallery description is set to true then create the box that the description will go into and append after .imgPane
360
+ if (this.opts.imageDesc === true) {
361
+ $(".imgPane").css("position","relative").append('<div class="imageDesc" style="position:absolute;bottom:0;left:0;width:100%;background:#000;opacity:0.8;filter:alpha(opacity = 80);">' + this.el.imageDesc+'</div>');
362
+ }
363
+
364
+ // if gallery is a fixed height and width and centerImage = true, then align the image to the center of the box
365
+ if (this.opts.autoSize === false && this.opts.centerImage === true) {
366
+ contentBox.find(".imgPane").prepend("<span style='display:inline-block;height:" + this.opts.boxHeight + "px;line-height:" + this.opts.boxHeight + "px;width:1px'>&nbsp;</span>");
367
+ contentBox.find(".imgPane").css({"line-height": this.opts.boxHeight + "px","text-align":"center"});
368
+ contentBox.find(".imgPane img").css({"display":"inline","vertical-align":"middle"});
369
+ }
370
+ if (this.opts.gallery === true) {
371
+ // add gallery controls here
372
+ if (this.el.galleryTitle !== false) {
373
+ contentBox.append('<div class="galleryControls"><a href="" class="prev">previous</a><a href="" class="next">next</a></div>');
374
+ contentBox.prepend('<div class="galleryTitle"><h2>' + this.el.galleryTitle + '</h2>' + this.el.closeBtn + '</div>');
375
+ // if gallery counter is true then add counter
376
+ if (this.opts.galleryCounter === true) {
377
+ thisIndex = $("*[title='" + this.el.galleryTitle + "']").index(this.el) + 1;
378
+ galleryLength = $("*[title='" + this.el.galleryTitle + "']").length;
379
+ contentBox.find(".galleryControls").append("<p class='galleryCounter'>Displaying " + thisIndex + " of " + galleryLength + "</p>");
380
+ }
381
+ }
382
+ // if not a gallery title then just add the close button
383
+ else {
384
+ contentBox.prepend('<div class="galleryTitle">' + this.el.closeBtn + '</div>');
385
+ }
386
+ }
387
+
388
+ // start of image loading stuff
389
+ popUpImg = new Image();
390
+ popUpImg.onload = function() {
391
+ imgProperties.imgHeight = popUpImg.height;
392
+ imgProperties.imgWidth = popUpImg.width;
393
+ popup.styleBox(imgProperties, popUpImg);
394
+ };
395
+ popUpImg.src = this.el.boxSrc;
396
+
397
+ // add close button controls
398
+ this.addCloseButton();
399
+ // add gallery controls and key functions here
400
+ this.addGalleryControls();
401
+ },
402
+ styleNodeBox : function() {
403
+ var contentBox = $("#" + this.opts.popupID+" ." + this.opts.contentClass);
404
+ //console.log(this.fragment);
405
+ contentBox.find("img.loader").remove();
406
+ contentBox.append('<div class="galleryTitle">' + this.el.closeBtn + '</div>');
407
+ contentBox.append(this.fragment);
408
+ contentBox.find(this.el.boxSrc).css("display","block");
409
+ // style popup box
410
+ this.styleBox();
411
+ // add close button controls
412
+ this.addCloseButton();
413
+ },
414
+ getAjaxContent : function() {
415
+ var popup = this;
416
+
417
+ $("#" + this.opts.popupID + " ." + this.opts.contentClass).html('<img class="loader" src="' + this.opts.loaderPath + '" width="" height="" alt="" />');
418
+ $.ajax({
419
+ url: popup.el.boxSrc,
420
+ dataType : popup.opts.ajaxType,
421
+ success : function(msg) {
422
+ popup.fragment = msg;
423
+ popup.styleNodeBox();
424
+ },
425
+ error : function() {
426
+ popup.fragment = "ajax request failed";
427
+ popup.styleNodeBox();
428
+ }
429
+ });
430
+ },
431
+ addGalleryControls : function() {
432
+ var popup = this;
433
+
434
+ $("#" + this.opts.popupID + " .next").on('click.' + this.namespace, function(){
435
+ popup.cycleImage(1);
436
+ return false;
437
+ });
438
+
439
+ $("#" + this.opts.popupID + " .prev").on('click.' + this.namespace, function(){
440
+ popup.cycleImage(-1);
441
+ return false;
442
+ });
443
+
444
+ // add key controls and keep escape key handler
445
+ $(document).on('keydown.' + this.namespace, function(e) {
446
+ if (e.keyCode == 39 && popup.el.isOpen === true) {
447
+ popup.cycleImage(1);
448
+ } else if (e.keyCode == 37 && popup.el.isOpen === true) {
449
+ popup.cycleImage(-1);
450
+ }
451
+
452
+ if (e.keyCode == 27 && popup.el.isOpen === true) {
453
+ popup.closeBox();
454
+ }
455
+ });
456
+ },
457
+ addCloseButton : function() {
458
+ var popup = this;
459
+
460
+ $("#" + popup.opts.popupID + " ." + popup.opts.closeBox).on('click.' + popup.namespace, function(){
461
+ if (popup.el.isOpen === true) {
462
+ popup.closeBox();
463
+ }
464
+ return false;
465
+ });
466
+ },
467
+ openBox : function() {
468
+ this.el.galleryTitle = $(this.el).attr("title");
469
+ this.el.imageDesc = $(this.el).attr("longdesc");
470
+
471
+ // *** create the markup for popup box ***
472
+ this.createBox();
473
+
474
+ // *** find the screen dimensions ***
475
+ var dimensions = this.findScreenPos();
476
+ this.el.winY = dimensions.winY;
477
+ this.el.winX = dimensions.winX;
478
+ this.el.scrY = dimensions.scrY;
479
+ this.el.scrX = dimensions.scrX;
480
+
481
+ // *** either display content as an image OR as a DOM node ***
482
+ if (this.isContentImage()) {
483
+ // find the index of this image in the gallery
484
+ this.displayImage();
485
+ } else if (this.opts.ajax === true) {
486
+ this.getAjaxContent();
487
+ } else {
488
+ this.styleNodeBox();
489
+ }
490
+
491
+ // run the callback function on box open
492
+ if (this.el.isOpen === false) {
493
+ this.opts.onOpen();
494
+ }
495
+ // set the isOpen flag
496
+ this.el.isOpen = true;
497
+ },
498
+ closeBox : function() {
499
+ // may want to do some fancy stuff here, but for now just fading out the box
500
+ $("#" + this.opts.popupID).stop().fadeOut("slow").css("display","none");
501
+ // delete the popup box from the DOM
502
+ $("#" + this.opts.popupID).remove();
503
+ $(".transparency").fadeOut("slow");
504
+ // run the callback function on box close if it is open
505
+
506
+ if (this.el.isOpen === true)
507
+ {
508
+ this.opts.onClose();
509
+ }
510
+ // unbind the key controls
511
+ $(document).off('keydown.' + this.namespace);
512
+ this.el.isOpen = false;
513
+ },
514
+ cycleImage : function(imgIndex) {
515
+ //console.log("hitting cycle image");
516
+ var thisIndex = $("*[title='" + this.el.galleryTitle + "']").index(this.el),
517
+ galleryLength = $("*[title='" + this.el.galleryTitle + "']").length,
518
+ cycleIndex = thisIndex + imgIndex;
519
+
520
+ if (cycleIndex < 0) {
521
+ cycleIndex = galleryLength - 1;
522
+ }
523
+ if (cycleIndex == galleryLength) {
524
+ cycleIndex = 0;
525
+ }
526
+
527
+ this.el.isOpen = false;
528
+ // unbind the key controls
529
+ $(document).off('keydown.' + this.namespace);
530
+ $("*[title='" + this.el.galleryTitle + "']:eq(" + cycleIndex + ")").popup("openBox");
531
+ },
532
+ option : function(args) {
533
+ this.opts = $.extend(true, {}, this.opts, args);
534
+ },
535
+ // want to change the content element the popup points to? no worries
536
+ changeContent : function(content) {
537
+ this.fragment = $(content);
538
+ },
539
+ setFragmentHtml : function(content) { // change the content of the current popup
540
+ this.fragment.html(content);
541
+ },
542
+ destroy : function() {
543
+ this.el.off("." + this.namespace);
544
+ }
545
+ };
546
+
547
+ // the plugin bridging layer to allow users to call methods and add data after the plguin has been initialised
548
+ // props to https://github.com/jsor/jcarousel/blob/master/src/jquery.jcarousel.js for the base of the code & http://isotope.metafizzy.co/ for a good implementation
549
+ $.fn.popup = function(options, callback) {
550
+ // define the plugin name here so I don't have to change it anywhere else. This name refers to the jQuery data object that will store the plugin data
551
+ var pluginName = "popup",
552
+ args;
553
+
554
+ // if the argument is a string representing a plugin method then test which one it is
555
+ if ( typeof options === 'string' ) {
556
+ // define the arguments that the plugin function call may make
557
+ args = Array.prototype.slice.call( arguments, 1 );
558
+ // iterate over each object that the function is being called upon
559
+ this.each(function() {
560
+ // test the data object that the DOM element that the plugin has for the DOM element
561
+ var pluginInstance = $.data(this, pluginName);
562
+
563
+ // if there is no data for this instance of the plugin, then the plugin needs to be initialised first, so just call an error
564
+ if (!pluginInstance) {
565
+ alert("The plugin has not been initialised yet when you tried to call this method: " + options);
566
+ return;
567
+ }
568
+ // if there is no method defined for the option being called, or it's a private function (but I may not use this) then return an error.
569
+ if (!$.isFunction(pluginInstance[options]) || options.charAt(0) === "_") {
570
+ alert("the plugin contains no such method: " + options);
571
+ return;
572
+ }
573
+ // apply the method that has been called
574
+ else {
575
+ pluginInstance[options].apply(pluginInstance, args);
576
+ }
577
+ });
578
+
579
+ }
580
+ // initialise the function using the arguments as the plugin options
581
+ else {
582
+ // initialise each instance of the plugin
583
+ this.each(function() {
584
+ // define the data object that is going to be attached to the DOM element that the plugin is being called on
585
+ var pluginInstance = $.data(this, pluginName);
586
+ // if the plugin instance already exists then apply the options to it. I don't think I need to init again, but may have to on some plugins
587
+ if (pluginInstance) {
588
+ pluginInstance.option(options);
589
+ // initialising the plugin here may be dangerous and stack multiple event handlers. if required then the plugin instance may have to be 'destroyed' first
590
+ //pluginInstance.init(callback);
591
+ }
592
+ // initialise a new instance of the plugin
593
+ else {
594
+ $.data(this, pluginName, new $.Popup(options, this, callback));
595
+ }
596
+ });
597
+ }
598
+
599
+ // return the jQuery object from here so that the plugin functions don't have to
600
+ return this;
601
+ };
602
+
603
+ // end of module
604
+ })(jQuery);
skin/frontend/base/default/socialfeeds/js/scroller/jquery.mCustomScrollbar.concat.min.js CHANGED
@@ -1,15 +1,5 @@
1
- /***************************************
2
- *** Social Feeds ***
3
- ***************************************
4
- *
5
- * @copyright Copyright (c) 2015
6
- * @company NetAttingo Technologies
7
- * @package Netgo_Socialfeeds
8
- * @author NetGo
9
- * @dev netattingomails@gmail.com
10
- *
11
- */
12
- !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
13
-
14
- !function(e){"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0,autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&V(t),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),S.call(this),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r.children())),n.overflowed=B.call(this),O.call(this),i.autoDraggerLength&&b.call(this),C.call(this),k.call(this);var s=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?l[0].height()>l[0].parent().height()?T.call(this):(Q(t,s[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(T.call(this),"y"===i.axis?M.call(this):"yx"===i.axis&&n.overflowed[1]&&Q(t,s[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?l[1].width()>l[1].parent().width()?T.call(this):(Q(t,s[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(T.call(this),"x"===i.axis?M.call(this):"yx"===i.axis&&n.overflowed[0]&&Q(t,s[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),X.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=j.call(this,c[0],"y"),c[1]=j.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",Q(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",Q(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&V(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){{o.data(a)}X.call(this,"remove"),M.call(this),t&&T.call(this),O.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),X.call(this,"remove"),M.call(this),T.call(this),n.removeData(a),Z(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),Z(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir="+n.langDir+" /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p.children())),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){return Math.max.apply(Math,t.map(function(){return e(this).outerWidth(!0)}).get())},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis&&i.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),position:"relative"}).unwrap()},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=te(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[14]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[15]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[16]+"' oncontextmenu='return false;' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=t.css("max-height")||"none",r=-1!==i.indexOf("%"),l=t.css("box-sizing");if("none"!==i){var s=r?t.parent().height()*parseInt(i)/100:parseInt(i);"border-box"===l&&(s-=t.innerHeight()-t.height()+(t.outerHeight()-t.innerHeight())),n.css("max-height",Math.round(s))}},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},C=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},y=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},B=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1);return[r>n.height(),l>n.width()]},T=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(V(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),Q(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),Q(t,"_resetX")}},k=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(R.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),H.call(this),i.advanced.autoScrollOnFocus&&z.call(this),i.scrollButtons.enable&&U.call(this),i.keyboard.enable&&F.call(this),n.bindEvents=!0}},M=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),o.bindEvents&&(e(document).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),Z(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),Z(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),Z(s[0],"onCompleteTimeout"),o.bindEvents=!1)},O=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},I=function(e){var t=e.type;switch(t){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return e.target.ownerDocument!==document?[e.originalEvent.screenY,e.originalEvent.screenX,!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var o=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[o.screenY,o.screenX,a>1]:[o.pageY,o.pageX,a>1];default:return[e.pageY,e.pageX,!1]}},R=function(){function t(e){var t=m.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}}function o(e,t,o,a){if(m[0].idleTimer=u.scrollInertia<233?250:0,n.attr("id")===h[1])var i="x",r=(n[0].offsetLeft-t+a)*d.scrollRatio.x;else var i="y",r=(n[0].offsetTop-e+o)*d.scrollRatio.y;Q(l,r.toString(),{dir:i,drag:!0})}var n,i,r,l=e(this),d=l.data(a),u=d.opt,f=a+"_"+d.idx,h=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],m=e("#mCSB_"+d.idx+"_container"),p=e("#"+h[0]+",#"+h[1]),g=u.advanced.releaseDraggableSelectors?p.add(e(u.advanced.releaseDraggableSelectors)):p;p.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(o){if(o.stopImmediatePropagation(),o.preventDefault(),$(o)){c=!0,s&&(document.onselectstart=function(){return!1}),t(!1),V(l),n=e(this);var a=n.offset(),d=I(o)[0]-a.top,f=I(o)[1]-a.left,h=n.height()+a.top,m=n.width()+a.left;h>d&&d>0&&m>f&&f>0&&(i=d,r=f),y(n,"active",u.autoExpandScrollbar)}}).bind("touchmove."+f,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=n.offset(),a=I(e)[0]-t.top,l=I(e)[1]-t.left;o(i,r,a,l)}),e(document).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(e){if(n){var t=n.offset(),a=I(e)[0]-t.top,l=I(e)[1]-t.left;if(i===a)return;o(i,r,a,l)}}).add(g).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(e){n&&(y(n,"active",u.autoExpandScrollbar),n=null),c=!1,s&&(document.onselectstart=null),t(!0)})},D=function(){function o(e){if(!ee(e)||c||I(e)[2])return void(t=0);t=1,S=0,b=0,C.removeClass("mCS_touch_action");var o=M.offset();d=I(e)[0]-o.top,u=I(e)[1]-o.left,A=[I(e)[0],I(e)[1]]}function n(e){if(ee(e)&&!c&&!I(e)[2]&&(e.stopImmediatePropagation(),!b||S)){p=J();var t=k.offset(),o=I(e)[0]-t.top,a=I(e)[1]-t.left,n="mcsLinearOut";if(R.push(o),D.push(a),A[2]=Math.abs(I(e)[0]-A[0]),A[3]=Math.abs(I(e)[1]-A[1]),y.overflowed[0])var i=O[0].parent().height()-O[0].height(),r=d-o>0&&o-d>-(i*y.scrollRatio.y)&&(2*A[3]<A[2]||"yx"===B.axis);if(y.overflowed[1])var l=O[1].parent().width()-O[1].width(),f=u-a>0&&a-u>-(l*y.scrollRatio.x)&&(2*A[2]<A[3]||"yx"===B.axis);r||f?(e.preventDefault(),S=1):(b=1,C.addClass("mCS_touch_action")),_="yx"===B.axis?[d-o,u-a]:"x"===B.axis?[null,u-a]:[d-o,null],M[0].idleTimer=250,y.overflowed[0]&&s(_[0],E,n,"y","all",!0),y.overflowed[1]&&s(_[1],E,n,"x",W,!0)}}function i(e){if(!ee(e)||c||I(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),V(C),m=J();var o=k.offset();f=I(e)[0]-o.top,h=I(e)[1]-o.left,R=[],D=[]}function r(e){if(ee(e)&&!c&&!I(e)[2]){e.stopImmediatePropagation(),S=0,b=0,g=J();var t=k.offset(),o=I(e)[0]-t.top,a=I(e)[1]-t.left;if(!(g-p>30)){x=1e3/(g-m);var n="mcsEaseOut",i=2.5>x,r=i?[R[R.length-2],D[D.length-2]]:[0,0];v=i?[o-r[0],a-r[1]]:[o-f,a-h];var d=[Math.abs(v[0]),Math.abs(v[1])];x=i?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[x,x];var u=[Math.abs(M[0].offsetTop)-v[0]*l(d[0]/x[0],x[0]),Math.abs(M[0].offsetLeft)-v[1]*l(d[1]/x[1],x[1])];_="yx"===B.axis?[u[0],u[1]]:"x"===B.axis?[null,u[1]]:[u[0],null],w=[4*d[0]+B.scrollInertia,4*d[1]+B.scrollInertia];var C=parseInt(B.contentTouchScroll)||0;_[0]=d[0]>C?_[0]:0,_[1]=d[1]>C?_[1]:0,y.overflowed[0]&&s(_[0],w[0],n,"y",W,!1),y.overflowed[1]&&s(_[1],w[1],n,"x",W,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&Q(C,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C=e(this),y=C.data(a),B=y.opt,T=a+"_"+y.idx,k=e("#mCSB_"+y.idx),M=e("#mCSB_"+y.idx+"_container"),O=[e("#mCSB_"+y.idx+"_dragger_vertical"),e("#mCSB_"+y.idx+"_dragger_horizontal")],R=[],D=[],E=0,W="yx"===B.axis?"none":"all",A=[],P=M.find("iframe"),z=["touchstart."+T+" pointerdown."+T+" MSPointerDown."+T,"touchmove."+T+" pointermove."+T+" MSPointerMove."+T,"touchend."+T+" pointerup."+T+" MSPointerUp."+T];M.bind(z[0],function(e){o(e)}).bind(z[1],function(e){n(e)}),k.bind(z[0],function(e){i(e)}).bind(z[2],function(e){r(e)}),P.length&&P.each(function(){e(this).load(function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind(z[0],function(e){o(e),i(e)}).bind(z[1],function(e){n(e)}).bind(z[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,q(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(e){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=I(e)[0]-a.top+f[0].offsetTop,c=I(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u,function(e){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(V(o),!A(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100;if("x"===i.axis||"x"===i.mouseWheel.axis)var d="x",u=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],f="auto"!==i.mouseWheel.scrollAmount?u[1]:u[0]>=l.width()?.9*l.width():u[0],h=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),m=c[1][0].offsetLeft,p=c[1].parent().width()-c[1].width(),g=t.deltaX||t.deltaY||a;else var d="y",u=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],f="auto"!==i.mouseWheel.scrollAmount?u[1]:u[0]>=l.height()?.9*l.height():u[0],h=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),m=c[0][0].offsetTop,p=c[0].parent().height()-c[0].height(),g=t.deltaY||a;"y"===d&&!n.overflowed[0]||"x"===d&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(g=-g),i.mouseWheel.normalizeDelta&&(g=0>g?-1:1),(g>0&&0!==m||0>g&&m!==p||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),Q(o,(h-g*f).toString(),{dir:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).load(function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},L=function(e){var t=null;try{var o=e.contentDocument||e.contentWindow.document;t=o.body.innerHTML}catch(a){}return null!==t},A=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container"),r=i.parent(),l=e(".mCSB_"+o.idx+"_scrollbar ."+d[12]);l.bind("touchstart."+n+" pointerdown."+n+" MSPointerDown."+n,function(e){c=!0}).bind("touchend."+n+" pointerup."+n+" MSPointerUp."+n,function(e){c=!1}).bind("click."+n,function(a){if(e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail")){V(t);var n=e(this),l=n.find(".mCSB_dragger");if(n.parent(".mCSB_scrollTools_horizontal").length>0){if(!o.overflowed[1])return;var s="x",c=a.pageX>l.offset().left?-1:1,u=Math.abs(i[0].offsetLeft)-.9*c*r.width()}else{if(!o.overflowed[0])return;var s="y",c=a.pageY>l.offset().top?-1:1,u=Math.abs(i[0].offsetTop)-.9*c*r.height()}Q(t,u.toString(),{dir:s,scrollEasing:"mcsEaseInOut"})}})},z=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(o){var a=e(document.activeElement),i=r.find(".mCustomScrollBox").length,s=0;a.is(n.advanced.autoScrollOnFocus)&&(V(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=i?(s+17)*i:0,t[0]._focusTimeout=setTimeout(function(){var e=[oe(a)[0],oe(a)[1]],o=[r[0].offsetTop,r[0].offsetLeft],i=[o[0]+e[0]>=0&&o[0]+e[0]<l.height()-a.outerHeight(!1),o[1]+e[1]>=0&&o[0]+e[1]<l.width()-a.outerWidth(!1)],c="yx"!==n.axis||i[0]||i[1]?"all":"none";"x"===n.axis||i[0]||Q(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s}),"y"===n.axis||i[1]||Q(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s})},t[0]._focusTimer))})},H=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(t){(0!==i.scrollTop()||0!==i.scrollLeft())&&e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},U=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.snapAmount||n.scrollButtons.scrollAmount,q(t,e,o)}if(a.preventDefault(),$(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},F=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.snapAmount||i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||q(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){V(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-.9*f*d.width();else var h="y",m=Math.abs(c[0].offsetTop)-.9*f*d.height();Q(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;Q(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).load(function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},q=function(t,o,n,i,r){function l(e){var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],u="x"===f.dir[0]?s[1]+f.dir[1]*d[1]*n:s[0]+f.dir[1]*d[0]*n,m="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),v="auto"!==f.scrollAmount?m:u,x=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",_=e?!0:!1;return e&&17>a&&(v="x"===f.dir[0]?s[1]:s[0]),Q(t,v.toString(),{dir:f.dir[0],scrollEasing:x,dur:a,onComplete:_}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),Z(f,"step"),V(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type?!0:!1,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],V(t),te(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},j=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1):l.outerHeight(!1),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?oe(m)[1]:oe(m)[0];case"string":case"number":if(te(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&te(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?oe(m)[1]:oe(m)[0]}return e(t).length?"x"===o?oe(e(t))[1]:oe(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},X=function(t){function o(){return clearTimeout(h[0].autoUpdate),0===s.parents("html").length?void(s=null):void(h[0].autoUpdate=setTimeout(function(){return f.advanced.updateOnSelectorChange&&(m=r(),m!==w)?(l(3),void(w=m)):(f.advanced.updateOnContentResize&&(p=[h.outerHeight(!1),h.outerWidth(!1),v.height(),v.width(),_()[0],_()[1]],(p[0]!==S[0]||p[1]!==S[1]||p[2]!==S[2]||p[3]!==S[3]||p[4]!==S[4]||p[5]!==S[5])&&(l(p[0]!==S[0]||p[1]!==S[1]),S=p)),f.advanced.updateOnImageLoad&&(g=n(),g!==b&&(h.find("img").each(function(){i(this)}),b=g)),void((f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&o()))},f.advanced.autoUpdateTimeout))}function n(){var e=0;return f.advanced.updateOnImageLoad&&(e=h.find("img").length),e}function i(t){function o(e,t){return function(){return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),l(2)}if(e(t).hasClass(d[2]))return void l();var n=new Image;n.onload=o(n,a),n.src=t.src}function r(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var t=0,o=h.find(f.advanced.updateOnSelectorChange);return f.advanced.updateOnSelectorChange&&o.length>0&&o.each(function(){t+=e(this).height()+e(this).width()}),t}function l(e){clearTimeout(h[0].autoUpdate),u.update.call(null,s[0],e)}var s=e(this),c=s.data(a),f=c.opt,h=e("#mCSB_"+c.idx+"_container");if(t)return clearTimeout(h[0].autoUpdate),void Z(h[0],"autoUpdate");var m,p,g,v=h.parent(),x=[e("#mCSB_"+c.idx+"_scrollbar_vertical"),e("#mCSB_"+c.idx+"_scrollbar_horizontal")],_=function(){return[x[0].is(":visible")?x[0].outerHeight(!0):0,x[1].is(":visible")?x[1].outerWidth(!0):0]},w=r(),S=[h.outerHeight(!1),h.outerWidth(!1),v.height(),v.width(),_()[0],_()[1]],b=n();o()},N=function(e,t,o){return Math.round(e/t)*t-o},V=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){K.call(this)})},Q=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||_>=w[0]+b,c.callbacks.alwaysTriggerOffsets||-C>=_]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[v[0].offsetTop,v[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",
15
  callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,(0!==m.scrollTop()||0!==m.scrollLeft())&&(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){switch(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount&&(o=N(o,c.snapAmount,c.snapOffset)),n.dir){case"x":var v=e("#mCSB_"+s.idx+"_dragger_horizontal"),x="left",_=h[0].offsetLeft,w=[f.width()-h.outerWidth(!1),v.parent().width()-v.width()],S=[o,0===o?0:o/s.scrollRatio.x],b=p[1],C=g[1],B=b>0?b/s.scrollRatio.x:0,T=C>0?C/s.scrollRatio.x:0;break;case"y":var v=e("#mCSB_"+s.idx+"_dragger_vertical"),x="top",_=h[0].offsetTop,w=[f.height()-h.outerHeight(!1),v.parent().height()-v.height()],S=[o,0===o?0:o/s.scrollRatio.y],b=p[0],C=g[0],B=b>0?b/s.scrollRatio.y:0,T=C>0?C/s.scrollRatio.y:0}S[1]<0||0===S[0]&&0===S[1]?S=[0,0]:S[1]>=w[1]?S=[w[0],w[1]]:S[0]=-S[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),(s.tweenRunning||!(0===_&&S[0]>=0||_===w[0]&&S[0]<=w[0]))&&(G(v[0],x,Math.round(S[1]),u[1],n.scrollEasing),G(h[0],x,Math.round(S[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,y(v),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&S[1]>=w[1]-B&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&S[1]<=T&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,y(v,"hide")},e)}}}))}},G=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=J()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=J(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},J=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},K=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},Z=function(e,t){try{delete e[t]}catch(o){e[t]=null}},$=function(e){return!(e.which&&1!==e.which)},ee=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},te=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},oe=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).load(function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+oe(n)[0]>=0&&a[0]+oe(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+oe(n)[1]>=0&&a[1]+oe(n)[1]<o.width()-n.outerWidth(!1)},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});
1
+ /* == jquery mousewheel plugin == Version: 3.1.12, License: MIT License (MIT) */
2
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
3
+ /* == malihu jquery custom scrollbar plugin == Version: 3.0.9, License: MIT License (MIT) */
4
+ !function(e){"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0,autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&V(t),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),S.call(this),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r.children())),n.overflowed=B.call(this),O.call(this),i.autoDraggerLength&&b.call(this),C.call(this),k.call(this);var s=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?l[0].height()>l[0].parent().height()?T.call(this):(Q(t,s[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(T.call(this),"y"===i.axis?M.call(this):"yx"===i.axis&&n.overflowed[1]&&Q(t,s[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?l[1].width()>l[1].parent().width()?T.call(this):(Q(t,s[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(T.call(this),"x"===i.axis?M.call(this):"yx"===i.axis&&n.overflowed[0]&&Q(t,s[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),X.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=j.call(this,c[0],"y"),c[1]=j.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",Q(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",Q(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&V(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){{o.data(a)}X.call(this,"remove"),M.call(this),t&&T.call(this),O.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),X.call(this,"remove"),M.call(this),T.call(this),n.removeData(a),Z(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),Z(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir="+n.langDir+" /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p.children())),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){return Math.max.apply(Math,t.map(function(){return e(this).outerWidth(!0)}).get())},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis&&i.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),position:"relative"}).unwrap()},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=te(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[14]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[15]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[16]+"' oncontextmenu='return false;' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=t.css("max-height")||"none",r=-1!==i.indexOf("%"),l=t.css("box-sizing");if("none"!==i){var s=r?t.parent().height()*parseInt(i)/100:parseInt(i);"border-box"===l&&(s-=t.innerHeight()-t.height()+(t.outerHeight()-t.innerHeight())),n.css("max-height",Math.round(s))}},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},C=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},y=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},B=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1);return[r>n.height(),l>n.width()]},T=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(V(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),Q(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),Q(t,"_resetX")}},k=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(R.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),H.call(this),i.advanced.autoScrollOnFocus&&z.call(this),i.scrollButtons.enable&&U.call(this),i.keyboard.enable&&F.call(this),n.bindEvents=!0}},M=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),o.bindEvents&&(e(document).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),Z(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),Z(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),Z(s[0],"onCompleteTimeout"),o.bindEvents=!1)},O=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},I=function(e){var t=e.type;switch(t){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return e.target.ownerDocument!==document?[e.originalEvent.screenY,e.originalEvent.screenX,!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var o=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[o.screenY,o.screenX,a>1]:[o.pageY,o.pageX,a>1];default:return[e.pageY,e.pageX,!1]}},R=function(){function t(e){var t=m.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}}function o(e,t,o,a){if(m[0].idleTimer=u.scrollInertia<233?250:0,n.attr("id")===h[1])var i="x",r=(n[0].offsetLeft-t+a)*d.scrollRatio.x;else var i="y",r=(n[0].offsetTop-e+o)*d.scrollRatio.y;Q(l,r.toString(),{dir:i,drag:!0})}var n,i,r,l=e(this),d=l.data(a),u=d.opt,f=a+"_"+d.idx,h=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],m=e("#mCSB_"+d.idx+"_container"),p=e("#"+h[0]+",#"+h[1]),g=u.advanced.releaseDraggableSelectors?p.add(e(u.advanced.releaseDraggableSelectors)):p;p.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(o){if(o.stopImmediatePropagation(),o.preventDefault(),$(o)){c=!0,s&&(document.onselectstart=function(){return!1}),t(!1),V(l),n=e(this);var a=n.offset(),d=I(o)[0]-a.top,f=I(o)[1]-a.left,h=n.height()+a.top,m=n.width()+a.left;h>d&&d>0&&m>f&&f>0&&(i=d,r=f),y(n,"active",u.autoExpandScrollbar)}}).bind("touchmove."+f,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=n.offset(),a=I(e)[0]-t.top,l=I(e)[1]-t.left;o(i,r,a,l)}),e(document).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(e){if(n){var t=n.offset(),a=I(e)[0]-t.top,l=I(e)[1]-t.left;if(i===a)return;o(i,r,a,l)}}).add(g).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(e){n&&(y(n,"active",u.autoExpandScrollbar),n=null),c=!1,s&&(document.onselectstart=null),t(!0)})},D=function(){function o(e){if(!ee(e)||c||I(e)[2])return void(t=0);t=1,S=0,b=0,C.removeClass("mCS_touch_action");var o=M.offset();d=I(e)[0]-o.top,u=I(e)[1]-o.left,A=[I(e)[0],I(e)[1]]}function n(e){if(ee(e)&&!c&&!I(e)[2]&&(e.stopImmediatePropagation(),!b||S)){p=J();var t=k.offset(),o=I(e)[0]-t.top,a=I(e)[1]-t.left,n="mcsLinearOut";if(R.push(o),D.push(a),A[2]=Math.abs(I(e)[0]-A[0]),A[3]=Math.abs(I(e)[1]-A[1]),y.overflowed[0])var i=O[0].parent().height()-O[0].height(),r=d-o>0&&o-d>-(i*y.scrollRatio.y)&&(2*A[3]<A[2]||"yx"===B.axis);if(y.overflowed[1])var l=O[1].parent().width()-O[1].width(),f=u-a>0&&a-u>-(l*y.scrollRatio.x)&&(2*A[2]<A[3]||"yx"===B.axis);r||f?(e.preventDefault(),S=1):(b=1,C.addClass("mCS_touch_action")),_="yx"===B.axis?[d-o,u-a]:"x"===B.axis?[null,u-a]:[d-o,null],M[0].idleTimer=250,y.overflowed[0]&&s(_[0],E,n,"y","all",!0),y.overflowed[1]&&s(_[1],E,n,"x",W,!0)}}function i(e){if(!ee(e)||c||I(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),V(C),m=J();var o=k.offset();f=I(e)[0]-o.top,h=I(e)[1]-o.left,R=[],D=[]}function r(e){if(ee(e)&&!c&&!I(e)[2]){e.stopImmediatePropagation(),S=0,b=0,g=J();var t=k.offset(),o=I(e)[0]-t.top,a=I(e)[1]-t.left;if(!(g-p>30)){x=1e3/(g-m);var n="mcsEaseOut",i=2.5>x,r=i?[R[R.length-2],D[D.length-2]]:[0,0];v=i?[o-r[0],a-r[1]]:[o-f,a-h];var d=[Math.abs(v[0]),Math.abs(v[1])];x=i?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[x,x];var u=[Math.abs(M[0].offsetTop)-v[0]*l(d[0]/x[0],x[0]),Math.abs(M[0].offsetLeft)-v[1]*l(d[1]/x[1],x[1])];_="yx"===B.axis?[u[0],u[1]]:"x"===B.axis?[null,u[1]]:[u[0],null],w=[4*d[0]+B.scrollInertia,4*d[1]+B.scrollInertia];var C=parseInt(B.contentTouchScroll)||0;_[0]=d[0]>C?_[0]:0,_[1]=d[1]>C?_[1]:0,y.overflowed[0]&&s(_[0],w[0],n,"y",W,!1),y.overflowed[1]&&s(_[1],w[1],n,"x",W,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&Q(C,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C=e(this),y=C.data(a),B=y.opt,T=a+"_"+y.idx,k=e("#mCSB_"+y.idx),M=e("#mCSB_"+y.idx+"_container"),O=[e("#mCSB_"+y.idx+"_dragger_vertical"),e("#mCSB_"+y.idx+"_dragger_horizontal")],R=[],D=[],E=0,W="yx"===B.axis?"none":"all",A=[],P=M.find("iframe"),z=["touchstart."+T+" pointerdown."+T+" MSPointerDown."+T,"touchmove."+T+" pointermove."+T+" MSPointerMove."+T,"touchend."+T+" pointerup."+T+" MSPointerUp."+T];M.bind(z[0],function(e){o(e)}).bind(z[1],function(e){n(e)}),k.bind(z[0],function(e){i(e)}).bind(z[2],function(e){r(e)}),P.length&&P.each(function(){e(this).load(function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind(z[0],function(e){o(e),i(e)}).bind(z[1],function(e){n(e)}).bind(z[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,q(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(e){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=I(e)[0]-a.top+f[0].offsetTop,c=I(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u,function(e){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(V(o),!A(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100;if("x"===i.axis||"x"===i.mouseWheel.axis)var d="x",u=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],f="auto"!==i.mouseWheel.scrollAmount?u[1]:u[0]>=l.width()?.9*l.width():u[0],h=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),m=c[1][0].offsetLeft,p=c[1].parent().width()-c[1].width(),g=t.deltaX||t.deltaY||a;else var d="y",u=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],f="auto"!==i.mouseWheel.scrollAmount?u[1]:u[0]>=l.height()?.9*l.height():u[0],h=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),m=c[0][0].offsetTop,p=c[0].parent().height()-c[0].height(),g=t.deltaY||a;"y"===d&&!n.overflowed[0]||"x"===d&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(g=-g),i.mouseWheel.normalizeDelta&&(g=0>g?-1:1),(g>0&&0!==m||0>g&&m!==p||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),Q(o,(h-g*f).toString(),{dir:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).load(function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},L=function(e){var t=null;try{var o=e.contentDocument||e.contentWindow.document;t=o.body.innerHTML}catch(a){}return null!==t},A=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container"),r=i.parent(),l=e(".mCSB_"+o.idx+"_scrollbar ."+d[12]);l.bind("touchstart."+n+" pointerdown."+n+" MSPointerDown."+n,function(e){c=!0}).bind("touchend."+n+" pointerup."+n+" MSPointerUp."+n,function(e){c=!1}).bind("click."+n,function(a){if(e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail")){V(t);var n=e(this),l=n.find(".mCSB_dragger");if(n.parent(".mCSB_scrollTools_horizontal").length>0){if(!o.overflowed[1])return;var s="x",c=a.pageX>l.offset().left?-1:1,u=Math.abs(i[0].offsetLeft)-.9*c*r.width()}else{if(!o.overflowed[0])return;var s="y",c=a.pageY>l.offset().top?-1:1,u=Math.abs(i[0].offsetTop)-.9*c*r.height()}Q(t,u.toString(),{dir:s,scrollEasing:"mcsEaseInOut"})}})},z=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(o){var a=e(document.activeElement),i=r.find(".mCustomScrollBox").length,s=0;a.is(n.advanced.autoScrollOnFocus)&&(V(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=i?(s+17)*i:0,t[0]._focusTimeout=setTimeout(function(){var e=[oe(a)[0],oe(a)[1]],o=[r[0].offsetTop,r[0].offsetLeft],i=[o[0]+e[0]>=0&&o[0]+e[0]<l.height()-a.outerHeight(!1),o[1]+e[1]>=0&&o[0]+e[1]<l.width()-a.outerWidth(!1)],c="yx"!==n.axis||i[0]||i[1]?"all":"none";"x"===n.axis||i[0]||Q(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s}),"y"===n.axis||i[1]||Q(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s})},t[0]._focusTimer))})},H=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(t){(0!==i.scrollTop()||0!==i.scrollLeft())&&e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},U=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.snapAmount||n.scrollButtons.scrollAmount,q(t,e,o)}if(a.preventDefault(),$(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},F=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.snapAmount||i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||q(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){V(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-.9*f*d.width();else var h="y",m=Math.abs(c[0].offsetTop)-.9*f*d.height();Q(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;Q(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).load(function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},q=function(t,o,n,i,r){function l(e){var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],u="x"===f.dir[0]?s[1]+f.dir[1]*d[1]*n:s[0]+f.dir[1]*d[0]*n,m="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),v="auto"!==f.scrollAmount?m:u,x=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",_=e?!0:!1;return e&&17>a&&(v="x"===f.dir[0]?s[1]:s[0]),Q(t,v.toString(),{dir:f.dir[0],scrollEasing:x,dur:a,onComplete:_}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),Z(f,"step"),V(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type?!0:!1,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],V(t),te(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},j=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1):l.outerHeight(!1),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?oe(m)[1]:oe(m)[0];case"string":case"number":if(te(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&te(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?oe(m)[1]:oe(m)[0]}return e(t).length?"x"===o?oe(e(t))[1]:oe(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},X=function(t){function o(){return clearTimeout(h[0].autoUpdate),0===s.parents("html").length?void(s=null):void(h[0].autoUpdate=setTimeout(function(){return f.advanced.updateOnSelectorChange&&(m=r(),m!==w)?(l(3),void(w=m)):(f.advanced.updateOnContentResize&&(p=[h.outerHeight(!1),h.outerWidth(!1),v.height(),v.width(),_()[0],_()[1]],(p[0]!==S[0]||p[1]!==S[1]||p[2]!==S[2]||p[3]!==S[3]||p[4]!==S[4]||p[5]!==S[5])&&(l(p[0]!==S[0]||p[1]!==S[1]),S=p)),f.advanced.updateOnImageLoad&&(g=n(),g!==b&&(h.find("img").each(function(){i(this)}),b=g)),void((f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&o()))},f.advanced.autoUpdateTimeout))}function n(){var e=0;return f.advanced.updateOnImageLoad&&(e=h.find("img").length),e}function i(t){function o(e,t){return function(){return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),l(2)}if(e(t).hasClass(d[2]))return void l();var n=new Image;n.onload=o(n,a),n.src=t.src}function r(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var t=0,o=h.find(f.advanced.updateOnSelectorChange);return f.advanced.updateOnSelectorChange&&o.length>0&&o.each(function(){t+=e(this).height()+e(this).width()}),t}function l(e){clearTimeout(h[0].autoUpdate),u.update.call(null,s[0],e)}var s=e(this),c=s.data(a),f=c.opt,h=e("#mCSB_"+c.idx+"_container");if(t)return clearTimeout(h[0].autoUpdate),void Z(h[0],"autoUpdate");var m,p,g,v=h.parent(),x=[e("#mCSB_"+c.idx+"_scrollbar_vertical"),e("#mCSB_"+c.idx+"_scrollbar_horizontal")],_=function(){return[x[0].is(":visible")?x[0].outerHeight(!0):0,x[1].is(":visible")?x[1].outerWidth(!0):0]},w=r(),S=[h.outerHeight(!1),h.outerWidth(!1),v.height(),v.width(),_()[0],_()[1]],b=n();o()},N=function(e,t,o){return Math.round(e/t)*t-o},V=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){K.call(this)})},Q=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||_>=w[0]+b,c.callbacks.alwaysTriggerOffsets||-C>=_]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[v[0].offsetTop,v[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",
 
 
 
 
 
 
 
 
 
 
5
  callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,(0!==m.scrollTop()||0!==m.scrollLeft())&&(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){switch(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount&&(o=N(o,c.snapAmount,c.snapOffset)),n.dir){case"x":var v=e("#mCSB_"+s.idx+"_dragger_horizontal"),x="left",_=h[0].offsetLeft,w=[f.width()-h.outerWidth(!1),v.parent().width()-v.width()],S=[o,0===o?0:o/s.scrollRatio.x],b=p[1],C=g[1],B=b>0?b/s.scrollRatio.x:0,T=C>0?C/s.scrollRatio.x:0;break;case"y":var v=e("#mCSB_"+s.idx+"_dragger_vertical"),x="top",_=h[0].offsetTop,w=[f.height()-h.outerHeight(!1),v.parent().height()-v.height()],S=[o,0===o?0:o/s.scrollRatio.y],b=p[0],C=g[0],B=b>0?b/s.scrollRatio.y:0,T=C>0?C/s.scrollRatio.y:0}S[1]<0||0===S[0]&&0===S[1]?S=[0,0]:S[1]>=w[1]?S=[w[0],w[1]]:S[0]=-S[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),(s.tweenRunning||!(0===_&&S[0]>=0||_===w[0]&&S[0]<=w[0]))&&(G(v[0],x,Math.round(S[1]),u[1],n.scrollEasing),G(h[0],x,Math.round(S[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,y(v),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&S[1]>=w[1]-B&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&S[1]<=T&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,y(v,"hide")},e)}}}))}},G=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=J()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=J(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},J=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},K=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},Z=function(e,t){try{delete e[t]}catch(o){e[t]=null}},$=function(e){return!(e.which&&1!==e.which)},ee=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},te=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},oe=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).load(function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+oe(n)[0]>=0&&a[0]+oe(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+oe(n)[1]>=0&&a[1]+oe(n)[1]<o.width()-n.outerWidth(!1)},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});
skin/frontend/base/default/socialfeeds/js/scroller/jquery.mCustomScrollbar.css CHANGED
@@ -1,1258 +1,1272 @@
1
- /***************************************
2
- *** Social Feeds ***
3
- ***************************************
4
- *
5
- * @copyright Copyright (c) 2015
6
- * @company NetAttingo Technologies
7
- * @package Netgo_Socialfeeds
8
- * @author NetGo
9
- * @dev netattingomails@gmail.com
10
- *
11
- */
12
-
13
- .mCustomScrollbar{ -ms-touch-action: none; touch-action: none; /* MSPointer events - direct all pointer events to js */ }
14
- .mCustomScrollbar.mCS_no_scrollbar, .mCustomScrollbar.mCS_touch_action{ -ms-touch-action: auto; touch-action: auto; }
15
-
16
- .mCustomScrollBox{ /* contains plugin's markup */
17
- position: relative;
18
- overflow: hidden;
19
- height: 100%;
20
- max-width: 100%;
21
- outline: none;
22
- direction: ltr;
23
- }
24
-
25
- .mCSB_container{ /* contains the original content */
26
- overflow: hidden;
27
- width: auto;
28
- height: auto;
29
- }
30
-
31
-
32
-
33
- /*
34
- ------------------------------------------------------------------------------------------------------------------------
35
- 2. VERTICAL SCROLLBAR
36
- y-axis
37
- ------------------------------------------------------------------------------------------------------------------------
38
- */
39
-
40
- .mCSB_inside > .mCSB_container{ margin-right: 30px; }
41
-
42
- .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */
43
-
44
- .mCS-dir-rtl > .mCSB_inside > .mCSB_container{ /* RTL direction/left-side scrollbar */
45
- margin-right: 0;
46
- margin-left: 30px;
47
- }
48
-
49
- .mCS-dir-rtl > .mCSB_inside > .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-left: 0; } /* RTL direction/left-side scrollbar */
50
-
51
- .mCSB_scrollTools{ /* contains scrollbar markup (draggable element, dragger rail, buttons etc.) */
52
- position: absolute;
53
- width: 16px;
54
- height: auto;
55
- left: auto;
56
- top: 0;
57
- right: 0;
58
- bottom: 0;
59
- }
60
-
61
- .mCSB_outside + .mCSB_scrollTools{ right: -26px; } /* scrollbar position: outside */
62
-
63
- .mCS-dir-rtl > .mCSB_inside > .mCSB_scrollTools,
64
- .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ /* RTL direction/left-side scrollbar */
65
- right: auto;
66
- left: 0;
67
- }
68
-
69
- .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ left: -26px; } /* RTL direction/left-side scrollbar (scrollbar position: outside) */
70
-
71
- .mCSB_scrollTools .mCSB_draggerContainer{ /* contains the draggable element and dragger rail markup */
72
- position: absolute;
73
- top: 0;
74
- left: 0;
75
- bottom: 0;
76
- right: 0;
77
- height: auto;
78
- }
79
-
80
- .mCSB_scrollTools a + .mCSB_draggerContainer{ margin: 20px 0; }
81
-
82
- .mCSB_scrollTools .mCSB_draggerRail{
83
- width: 2px;
84
- height: 100%;
85
- margin: 0 auto;
86
- -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
87
- }
88
-
89
- .mCSB_scrollTools .mCSB_dragger{ /* the draggable element */
90
- cursor: pointer;
91
- width: 100%;
92
- height: 30px; /* minimum dragger height */
93
- z-index: 1;
94
- }
95
-
96
- .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ /* the dragger element */
97
- position: relative;
98
- width: 4px;
99
- height: 100%;
100
- margin: 0 auto;
101
- -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
102
- text-align: center;
103
- }
104
-
105
- .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
106
- .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ width: 12px; /* auto-expanded scrollbar */ }
107
-
108
- .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
109
- .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 8px; /* auto-expanded scrollbar */ }
110
-
111
- .mCSB_scrollTools .mCSB_buttonUp,
112
- .mCSB_scrollTools .mCSB_buttonDown{
113
- display: block;
114
- position: absolute;
115
- height: 20px;
116
- width: 100%;
117
- overflow: hidden;
118
- margin: 0 auto;
119
- cursor: pointer;
120
- }
121
-
122
- .mCSB_scrollTools .mCSB_buttonDown{ bottom: 0; }
123
-
124
-
125
-
126
- /*
127
- ------------------------------------------------------------------------------------------------------------------------
128
- 3. HORIZONTAL SCROLLBAR
129
- x-axis
130
- ------------------------------------------------------------------------------------------------------------------------
131
- */
132
-
133
- .mCSB_horizontal.mCSB_inside > .mCSB_container{
134
- margin-right: 0;
135
- margin-bottom: 30px;
136
- }
137
-
138
- .mCSB_horizontal.mCSB_outside > .mCSB_container{ min-height: 100%; }
139
-
140
- .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } /* non-visible scrollbar */
141
-
142
- .mCSB_scrollTools.mCSB_scrollTools_horizontal{
143
- width: auto;
144
- height: 16px;
145
- top: auto;
146
- right: 0;
147
- bottom: 0;
148
- left: 0;
149
- }
150
-
151
- .mCustomScrollBox + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
152
- .mCustomScrollBox + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ bottom: -26px; } /* scrollbar position: outside */
153
-
154
- .mCSB_scrollTools.mCSB_scrollTools_horizontal a + .mCSB_draggerContainer{ margin: 0 20px; }
155
-
156
- .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{
157
- width: 100%;
158
- height: 2px;
159
- margin: 7px 0;
160
- }
161
-
162
- .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{
163
- width: 30px; /* minimum dragger width */
164
- height: 100%;
165
- left: 0;
166
- }
167
-
168
- .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
169
- width: 100%;
170
- height: 4px;
171
- margin: 6px auto;
172
- }
173
-
174
- .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
175
- .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
176
- height: 12px; /* auto-expanded scrollbar */
177
- margin: 2px auto;
178
- }
179
-
180
- .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
181
- .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
182
- height: 8px; /* auto-expanded scrollbar */
183
- margin: 4px 0;
184
- }
185
-
186
- .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,
187
- .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{
188
- display: block;
189
- position: absolute;
190
- width: 20px;
191
- height: 100%;
192
- overflow: hidden;
193
- margin: 0 auto;
194
- cursor: pointer;
195
- }
196
-
197
- .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{ left: 0; }
198
-
199
- .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ right: 0; }
200
-
201
-
202
-
203
- /*
204
- ------------------------------------------------------------------------------------------------------------------------
205
- 4. VERTICAL AND HORIZONTAL SCROLLBARS
206
- yx-axis
207
- ------------------------------------------------------------------------------------------------------------------------
208
- */
209
-
210
- .mCSB_container_wrapper{
211
- position: absolute;
212
- height: auto;
213
- width: auto;
214
- overflow: hidden;
215
- top: 0;
216
- left: 0;
217
- right: 0;
218
- bottom: 0;
219
- margin-right: 30px;
220
- margin-bottom: 30px;
221
- }
222
-
223
- .mCSB_container_wrapper > .mCSB_container{
224
- padding-right: 30px;
225
- padding-bottom: 30px;
226
- }
227
-
228
- .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 20px; }
229
-
230
- .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 20px; }
231
-
232
- /* non-visible horizontal scrollbar */
233
- .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden + .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 0; }
234
-
235
- /* non-visible vertical scrollbar/RTL direction/left-side scrollbar */
236
- .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal,
237
- .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 0; }
238
-
239
- /* RTL direction/left-side scrollbar */
240
- .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 20px; }
241
-
242
- /* non-visible scrollbar/RTL direction/left-side scrollbar */
243
- .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 0; }
244
-
245
- .mCS-dir-rtl > .mCSB_inside > .mCSB_container_wrapper{ /* RTL direction/left-side scrollbar */
246
- margin-right: 0;
247
- margin-left: 30px;
248
- }
249
-
250
- .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden > .mCSB_container{
251
- padding-right: 0;
252
- -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
253
- }
254
-
255
- .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden > .mCSB_container{
256
- padding-bottom: 0;
257
- -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
258
- }
259
-
260
- .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{
261
- margin-right: 0; /* non-visible scrollbar */
262
- margin-left: 0;
263
- }
264
-
265
- /* non-visible horizontal scrollbar */
266
- .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; }
267
-
268
-
269
-
270
- /*
271
- ------------------------------------------------------------------------------------------------------------------------
272
- 5. TRANSITIONS
273
- ------------------------------------------------------------------------------------------------------------------------
274
- */
275
-
276
- .mCSB_scrollTools,
277
- .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
278
- .mCSB_scrollTools .mCSB_buttonUp,
279
- .mCSB_scrollTools .mCSB_buttonDown,
280
- .mCSB_scrollTools .mCSB_buttonLeft,
281
- .mCSB_scrollTools .mCSB_buttonRight{
282
- -webkit-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
283
- -moz-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
284
- -o-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
285
- transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
286
- }
287
-
288
- .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, /* auto-expanded scrollbar */
289
- .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,
290
- .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,
291
- .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{
292
- -webkit-transition: width .2s ease-out .2s, height .2s ease-out .2s,
293
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
294
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
295
- opacity .2s ease-in-out, background-color .2s ease-in-out;
296
- -moz-transition: width .2s ease-out .2s, height .2s ease-out .2s,
297
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
298
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
299
- opacity .2s ease-in-out, background-color .2s ease-in-out;
300
- -o-transition: width .2s ease-out .2s, height .2s ease-out .2s,
301
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
302
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
303
- opacity .2s ease-in-out, background-color .2s ease-in-out;
304
- transition: width .2s ease-out .2s, height .2s ease-out .2s,
305
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
306
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
307
- opacity .2s ease-in-out, background-color .2s ease-in-out;
308
- }
309
-
310
-
311
-
312
- /*
313
- ------------------------------------------------------------------------------------------------------------------------
314
- 6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS
315
- ------------------------------------------------------------------------------------------------------------------------
316
- */
317
-
318
- /*
319
- ----------------------------------------
320
- 6.1 THEMES
321
- ----------------------------------------
322
- */
323
-
324
- /* default theme ("light") */
325
-
326
- .mCSB_scrollTools{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
327
-
328
- .mCS-autoHide > .mCustomScrollBox > .mCSB_scrollTools,
329
- .mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 0; filter: "alpha(opacity=0)"; -ms-filter: "alpha(opacity=0)"; }
330
-
331
- .mCustomScrollbar > .mCustomScrollBox > .mCSB_scrollTools.mCSB_scrollTools_onDrag,
332
- .mCustomScrollbar > .mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag,
333
- .mCustomScrollBox:hover > .mCSB_scrollTools,
334
- .mCustomScrollBox:hover ~ .mCSB_scrollTools,
335
- .mCS-autoHide:hover > .mCustomScrollBox > .mCSB_scrollTools,
336
- .mCS-autoHide:hover > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 1; filter: "alpha(opacity=100)"; -ms-filter: "alpha(opacity=100)"; }
337
-
338
- .mCSB_scrollTools .mCSB_draggerRail{
339
- background-color: #000; background-color: rgba(0,0,0,0.4);
340
- filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
341
- }
342
-
343
- .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
344
- background-color: #fff; background-color: rgba(255,255,255,0.75);
345
- filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)";
346
- }
347
-
348
- .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
349
- background-color: #fff; background-color: rgba(255,255,255,0.85);
350
- filter: "alpha(opacity=85)"; -ms-filter: "alpha(opacity=85)";
351
- }
352
- .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
353
- .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
354
- background-color: #fff; background-color: rgba(255,255,255,0.9);
355
- filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)";
356
- }
357
-
358
- .mCSB_scrollTools .mCSB_buttonUp,
359
- .mCSB_scrollTools .mCSB_buttonDown,
360
- .mCSB_scrollTools .mCSB_buttonLeft,
361
- .mCSB_scrollTools .mCSB_buttonRight{
362
- background-image: url(mCSB_buttons.png); /* css sprites */
363
- background-repeat: no-repeat;
364
- opacity: 0.4; filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
365
- }
366
-
367
- .mCSB_scrollTools .mCSB_buttonUp{
368
- background-position: 0 0;
369
- /*
370
- sprites locations
371
- light: 0 0, -16px 0, -32px 0, -48px 0, 0 -72px, -16px -72px, -32px -72px
372
- dark: -80px 0, -96px 0, -112px 0, -128px 0, -80px -72px, -96px -72px, -112px -72px
373
- */
374
- }
375
-
376
- .mCSB_scrollTools .mCSB_buttonDown{
377
- background-position: 0 -20px;
378
- /*
379
- sprites locations
380
- light: 0 -20px, -16px -20px, -32px -20px, -48px -20px, 0 -92px, -16px -92px, -32px -92px
381
- dark: -80px -20px, -96px -20px, -112px -20px, -128px -20px, -80px -92px, -96px -92px, -112 -92px
382
- */
383
- }
384
-
385
- .mCSB_scrollTools .mCSB_buttonLeft{
386
- background-position: 0 -40px;
387
- /*
388
- sprites locations
389
- light: 0 -40px, -20px -40px, -40px -40px, -60px -40px, 0 -112px, -20px -112px, -40px -112px
390
- dark: -80px -40px, -100px -40px, -120px -40px, -140px -40px, -80px -112px, -100px -112px, -120px -112px
391
- */
392
- }
393
-
394
- .mCSB_scrollTools .mCSB_buttonRight{
395
- background-position: 0 -56px;
396
- /*
397
- sprites locations
398
- light: 0 -56px, -20px -56px, -40px -56px, -60px -56px, 0 -128px, -20px -128px, -40px -128px
399
- dark: -80px -56px, -100px -56px, -120px -56px, -140px -56px, -80px -128px, -100px -128px, -120px -128px
400
- */
401
- }
402
-
403
- .mCSB_scrollTools .mCSB_buttonUp:hover,
404
- .mCSB_scrollTools .mCSB_buttonDown:hover,
405
- .mCSB_scrollTools .mCSB_buttonLeft:hover,
406
- .mCSB_scrollTools .mCSB_buttonRight:hover{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
407
-
408
- .mCSB_scrollTools .mCSB_buttonUp:active,
409
- .mCSB_scrollTools .mCSB_buttonDown:active,
410
- .mCSB_scrollTools .mCSB_buttonLeft:active,
411
- .mCSB_scrollTools .mCSB_buttonRight:active{ opacity: 0.9; filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; }
412
-
413
-
414
- /* theme: "dark" */
415
-
416
- .mCS-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
417
-
418
- .mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
419
-
420
- .mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.85); }
421
-
422
- .mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
423
- .mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.9); }
424
-
425
- .mCS-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
426
-
427
- .mCS-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
428
-
429
- .mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
430
-
431
- .mCS-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
432
-
433
- /* ---------------------------------------- */
434
-
435
-
436
-
437
- /* theme: "light-2", "dark-2" */
438
-
439
- .mCS-light-2.mCSB_scrollTools .mCSB_draggerRail,
440
- .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
441
- width: 4px;
442
- background-color: #fff; background-color: rgba(255,255,255,0.1);
443
- -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
444
- }
445
-
446
- .mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
447
- .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
448
- width: 4px;
449
- background-color: #fff; background-color: rgba(255,255,255,0.75);
450
- -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
451
- }
452
-
453
- .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
454
- .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
455
- .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
456
- .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
457
- width: 100%;
458
- height: 4px;
459
- margin: 6px auto;
460
- }
461
-
462
- .mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
463
-
464
- .mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
465
- .mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
466
-
467
- .mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px 0; }
468
-
469
- .mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -20px; }
470
-
471
- .mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -40px; }
472
-
473
- .mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -56px; }
474
-
475
-
476
- /* theme: "dark-2" */
477
-
478
- .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
479
- background-color: #000; background-color: rgba(0,0,0,0.1);
480
- -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
481
- }
482
-
483
- .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
484
- background-color: #000; background-color: rgba(0,0,0,0.75);
485
- -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
486
- }
487
-
488
- .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
489
-
490
- .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
491
- .mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
492
-
493
- .mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px 0; }
494
-
495
- .mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -20px; }
496
-
497
- .mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -40px; }
498
-
499
- .mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -56px; }
500
-
501
- /* ---------------------------------------- */
502
-
503
-
504
-
505
- /* theme: "light-thick", "dark-thick" */
506
-
507
- .mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail,
508
- .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
509
- width: 4px;
510
- background-color: #fff; background-color: rgba(255,255,255,0.1);
511
- -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
512
- }
513
-
514
- .mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
515
- .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
516
- width: 6px;
517
- background-color: #fff; background-color: rgba(255,255,255,0.75);
518
- -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
519
- }
520
-
521
- .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,
522
- .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{
523
- width: 100%;
524
- height: 4px;
525
- margin: 6px 0;
526
- }
527
-
528
- .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
529
- .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
530
- width: 100%;
531
- height: 6px;
532
- margin: 5px auto;
533
- }
534
-
535
- .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
536
-
537
- .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
538
- .mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
539
-
540
- .mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px 0; }
541
-
542
- .mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -20px; }
543
-
544
- .mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -40px; }
545
-
546
- .mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -56px; }
547
-
548
-
549
- /* theme: "dark-thick" */
550
-
551
- .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
552
- background-color: #000; background-color: rgba(0,0,0,0.1);
553
- -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
554
- }
555
-
556
- .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
557
- background-color: #000; background-color: rgba(0,0,0,0.75);
558
- -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
559
- }
560
-
561
- .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
562
-
563
- .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
564
- .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
565
-
566
- .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px 0; }
567
-
568
- .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -20px; }
569
-
570
- .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -40px; }
571
-
572
- .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -56px; }
573
-
574
- /* ---------------------------------------- */
575
-
576
-
577
-
578
- /* theme: "light-thin", "dark-thin" */
579
-
580
- .mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.1); }
581
-
582
- .mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
583
- .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 2px; }
584
-
585
- .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,
586
- .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{ width: 100%; }
587
-
588
- .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
589
- .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
590
- width: 100%;
591
- height: 2px;
592
- margin: 7px auto;
593
- }
594
-
595
-
596
- /* theme "dark-thin" */
597
-
598
- .mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
599
-
600
- .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
601
-
602
- .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
603
-
604
- .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
605
- .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
606
-
607
- .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
608
-
609
- .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
610
-
611
- .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
612
-
613
- .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
614
-
615
- /* ---------------------------------------- */
616
-
617
-
618
-
619
- /* theme "rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark" */
620
-
621
- .mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.15); }
622
-
623
- .mCS-rounded.mCSB_scrollTools .mCSB_dragger,
624
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,
625
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,
626
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{ height: 14px; }
627
-
628
- .mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
629
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
630
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
631
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
632
- width: 14px;
633
- margin: 0 1px;
634
- }
635
-
636
- .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger,
637
- .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,
638
- .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,
639
- .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 14px; }
640
-
641
- .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
642
- .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
643
- .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
644
- .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
645
- height: 14px;
646
- margin: 1px 0;
647
- }
648
-
649
- .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
650
- .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
651
- .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
652
- .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
653
- width: 16px; /* auto-expanded scrollbar */
654
- height: 16px;
655
- margin: -1px 0;
656
- }
657
-
658
- .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
659
- .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
660
- .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
661
- .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 4px; /* auto-expanded scrollbar */ }
662
-
663
- .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
664
- .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
665
- .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
666
- .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
667
- height: 16px; /* auto-expanded scrollbar */
668
- width: 16px;
669
- margin: 0 -1px;
670
- }
671
-
672
- .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
673
- .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
674
- .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
675
- .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
676
- height: 4px; /* auto-expanded scrollbar */
677
- margin: 6px 0;
678
- }
679
-
680
- .mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{ background-position: 0 -72px; }
681
-
682
- .mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{ background-position: 0 -92px; }
683
-
684
- .mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{ background-position: 0 -112px; }
685
-
686
- .mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{ background-position: 0 -128px; }
687
-
688
-
689
- /* theme "rounded-dark", "rounded-dots-dark" */
690
-
691
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
692
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
693
-
694
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
695
-
696
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
697
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
698
-
699
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
700
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
701
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
702
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
703
-
704
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px -72px; }
705
-
706
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -92px; }
707
-
708
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -112px; }
709
-
710
- .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -128px; }
711
-
712
-
713
- /* theme "rounded-dots", "rounded-dots-dark" */
714
-
715
- .mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail,
716
- .mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{ width: 4px; }
717
-
718
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
719
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,
720
- .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
721
- .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
722
- background-color: transparent;
723
- background-position: center;
724
- }
725
-
726
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
727
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
728
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==");
729
- background-repeat: repeat-y;
730
- opacity: 0.3;
731
- filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
732
- }
733
-
734
- .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
735
- .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
736
- height: 4px;
737
- margin: 6px 0;
738
- background-repeat: repeat-x;
739
- }
740
-
741
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px -72px; }
742
-
743
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -92px; }
744
-
745
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -112px; }
746
-
747
- .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -128px; }
748
-
749
-
750
- /* theme "rounded-dots-dark" */
751
-
752
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
753
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=");
754
- }
755
-
756
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px -72px; }
757
-
758
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -92px; }
759
-
760
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -112px; }
761
-
762
- .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -128px; }
763
-
764
- /* ---------------------------------------- */
765
-
766
-
767
-
768
- /* theme "3d", "3d-dark", "3d-thick", "3d-thick-dark" */
769
-
770
- .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
771
- .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
772
- .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
773
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
774
- background-repeat: repeat-y;
775
- background-image: -moz-linear-gradient(left, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
776
- background-image: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
777
- background-image: -webkit-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
778
- background-image: -o-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
779
- background-image: -ms-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
780
- background-image: linear-gradient(to right, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
781
- }
782
-
783
- .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
784
- .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
785
- .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
786
- .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
787
- background-repeat: repeat-x;
788
- background-image: -moz-linear-gradient(top, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
789
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
790
- background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
791
- background-image: -o-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
792
- background-image: -ms-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
793
- background-image: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
794
- }
795
-
796
-
797
- /* theme "3d", "3d-dark" */
798
-
799
- .mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger,
800
- .mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 70px; }
801
-
802
- .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger,
803
- .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 70px; }
804
-
805
- .mCS-3d.mCSB_scrollTools,
806
- .mCS-3d-dark.mCSB_scrollTools{
807
- opacity: 1;
808
- filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
809
- }
810
-
811
- .mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
812
- .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
813
- .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,
814
- .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; }
815
-
816
- .mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
817
- .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
818
- width: 8px;
819
- background-color: #000; background-color: rgba(0,0,0,0.2);
820
- box-shadow: inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.2);
821
- }
822
-
823
- .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
824
- .mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
825
- .mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
826
- .mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
827
- .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
828
- .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
829
- .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
830
- .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
831
-
832
- .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
833
- .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 8px; }
834
-
835
- .mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail,
836
- .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
837
- width: 100%;
838
- height: 8px;
839
- margin: 4px 0;
840
- box-shadow: inset 0 1px 1px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(255,255,255,0.2);
841
- }
842
-
843
- .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
844
- .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
845
- width: 100%;
846
- height: 8px;
847
- margin: 4px auto;
848
- }
849
-
850
- .mCS-3d.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
851
-
852
- .mCS-3d.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
853
-
854
- .mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
855
-
856
- .mCS-3d.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
857
-
858
-
859
- /* theme "3d-dark" */
860
-
861
- .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
862
- background-color: #000; background-color: rgba(0,0,0,0.1);
863
- box-shadow: inset 1px 0 1px rgba(0,0,0,0.1);
864
- }
865
-
866
- .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); }
867
-
868
- .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
869
-
870
- .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
871
-
872
- .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
873
-
874
- .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
875
-
876
- /* ---------------------------------------- */
877
-
878
-
879
-
880
- /* theme: "3d-thick", "3d-thick-dark" */
881
-
882
- .mCS-3d-thick.mCSB_scrollTools,
883
- .mCS-3d-thick-dark.mCSB_scrollTools{
884
- opacity: 1;
885
- filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
886
- }
887
-
888
- .mCS-3d-thick.mCSB_scrollTools,
889
- .mCS-3d-thick-dark.mCSB_scrollTools,
890
- .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer,
891
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; }
892
-
893
- .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
894
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }
895
-
896
- .mCSB_inside + .mCS-3d-thick.mCSB_scrollTools_vertical,
897
- .mCSB_inside + .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ right: 1px; }
898
-
899
- .mCS-3d-thick.mCSB_scrollTools_vertical,
900
- .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ box-shadow: inset 1px 0 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); }
901
-
902
- .mCS-3d-thick.mCSB_scrollTools_horizontal,
903
- .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{
904
- bottom: 1px;
905
- box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5);
906
- }
907
-
908
- .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
909
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
910
- box-shadow: inset 1px 0 0 rgba(255,255,255,0.4);
911
- width: 12px;
912
- margin: 2px;
913
- position: absolute;
914
- height: auto;
915
- top: 0;
916
- bottom: 0;
917
- left: 0;
918
- right: 0;
919
- }
920
-
921
- .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
922
- .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
923
-
924
- .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
925
- .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
926
- .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
927
- .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
928
-
929
- .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
930
- .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
931
- height: 12px;
932
- width: auto;
933
- }
934
-
935
- .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{
936
- background-color: #000; background-color: rgba(0,0,0,0.05);
937
- box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
938
- }
939
-
940
- .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
941
-
942
- .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
943
-
944
- .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
945
-
946
- .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
947
-
948
- .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
949
-
950
-
951
- /* theme: "3d-thick-dark" */
952
-
953
- .mCS-3d-thick-dark.mCSB_scrollTools{ box-shadow: inset 0 0 14px rgba(0,0,0,0.2); }
954
-
955
- .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.2); }
956
-
957
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 1px 0 0 rgba(255,255,255,0.4), inset -1px 0 0 rgba(0,0,0,0.2); }
958
-
959
- .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.2); }
960
-
961
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
962
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
963
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
964
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #777; }
965
-
966
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{
967
- background-color: #fff; background-color: rgba(0,0,0,0.05);
968
- box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
969
- }
970
-
971
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
972
-
973
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
974
-
975
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
976
-
977
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
978
-
979
- .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
980
-
981
- /* ---------------------------------------- */
982
-
983
-
984
-
985
- /* theme: "minimal", "minimal-dark" */
986
-
987
- .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
988
- .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
989
- right: 0;
990
- margin: 12px 0;
991
- }
992
-
993
- .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
994
- .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
995
- .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
996
- .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{
997
- bottom: 0;
998
- margin: 0 12px;
999
- }
1000
-
1001
- /* RTL direction/left-side scrollbar */
1002
- .mCS-dir-rtl > .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
1003
- .mCS-dir-rtl > .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
1004
- left: 0;
1005
- right: auto;
1006
- }
1007
-
1008
- .mCS-minimal.mCSB_scrollTools .mCSB_draggerRail,
1009
- .mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
1010
-
1011
- .mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger,
1012
- .mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 50px; }
1013
-
1014
- .mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger,
1015
- .mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 50px; }
1016
-
1017
- .mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
1018
- background-color: #fff; background-color: rgba(255,255,255,0.2);
1019
- filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
1020
- }
1021
-
1022
- .mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1023
- .mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
1024
- background-color: #fff; background-color: rgba(255,255,255,0.5);
1025
- filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
1026
- }
1027
-
1028
-
1029
- /* theme: "minimal-dark" */
1030
-
1031
- .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
1032
- background-color: #000; background-color: rgba(0,0,0,0.2);
1033
- filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
1034
- }
1035
-
1036
- .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1037
- .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
1038
- background-color: #000; background-color: rgba(0,0,0,0.5);
1039
- filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
1040
- }
1041
-
1042
- /* ---------------------------------------- */
1043
-
1044
-
1045
-
1046
- /* theme "light-3", "dark-3" */
1047
-
1048
- .mCS-light-3.mCSB_scrollTools .mCSB_draggerRail,
1049
- .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{
1050
- width: 6px;
1051
- background-color: #000; background-color: rgba(0,0,0,0.2);
1052
- }
1053
-
1054
- .mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1055
- .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 6px; }
1056
-
1057
- .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1058
- .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1059
- .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1060
- .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{
1061
- width: 100%;
1062
- height: 6px;
1063
- margin: 5px 0;
1064
- }
1065
-
1066
- .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1067
- .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
1068
- .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1069
- .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
1070
- width: 12px;
1071
- }
1072
-
1073
- .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1074
- .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
1075
- .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1076
- .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
1077
- height: 12px;
1078
- margin: 2px 0;
1079
- }
1080
-
1081
- .mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
1082
-
1083
- .mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
1084
-
1085
- .mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
1086
-
1087
- .mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
1088
-
1089
-
1090
- /* theme "dark-3" */
1091
-
1092
- .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
1093
-
1094
- .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
1095
-
1096
- .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1097
- .mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
1098
-
1099
- .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
1100
-
1101
- .mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
1102
-
1103
- .mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
1104
-
1105
- .mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
1106
-
1107
- .mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
1108
-
1109
- /* ---------------------------------------- */
1110
-
1111
-
1112
-
1113
- /* theme "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark" */
1114
-
1115
- .mCS-inset.mCSB_scrollTools .mCSB_draggerRail,
1116
- .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
1117
- .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
1118
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
1119
- .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,
1120
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{
1121
- width: 12px;
1122
- background-color: #000; background-color: rgba(0,0,0,0.2);
1123
- }
1124
-
1125
- .mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1126
- .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1127
- .mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1128
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1129
- .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1130
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
1131
- width: 6px;
1132
- margin: 3px 5px;
1133
- position: absolute;
1134
- height: auto;
1135
- top: 0;
1136
- bottom: 0;
1137
- left: 0;
1138
- right: 0;
1139
- }
1140
-
1141
- .mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1142
- .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1143
- .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1144
- .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1145
- .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1146
- .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
1147
- height: 6px;
1148
- margin: 5px 3px;
1149
- position: absolute;
1150
- width: auto;
1151
- top: 0;
1152
- bottom: 0;
1153
- left: 0;
1154
- right: 0;
1155
- }
1156
-
1157
- .mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1158
- .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1159
- .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1160
- .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1161
- .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1162
- .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
1163
- width: 100%;
1164
- height: 12px;
1165
- margin: 2px 0;
1166
- }
1167
-
1168
- .mCS-inset.mCSB_scrollTools .mCSB_buttonUp,
1169
- .mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp,
1170
- .mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
1171
-
1172
- .mCS-inset.mCSB_scrollTools .mCSB_buttonDown,
1173
- .mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown,
1174
- .mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
1175
-
1176
- .mCS-inset.mCSB_scrollTools .mCSB_buttonLeft,
1177
- .mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft,
1178
- .mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
1179
-
1180
- .mCS-inset.mCSB_scrollTools .mCSB_buttonRight,
1181
- .mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight,
1182
- .mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
1183
-
1184
-
1185
- /* theme "inset-dark", "inset-2-dark", "inset-3-dark" */
1186
-
1187
- .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1188
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1189
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
1190
-
1191
- .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
1192
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
1193
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
1194
-
1195
- .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1196
- .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
1197
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1198
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
1199
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1200
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
1201
-
1202
- .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
1203
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
1204
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
1205
-
1206
- .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp,
1207
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp,
1208
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
1209
-
1210
- .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown,
1211
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown,
1212
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
1213
-
1214
- .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft,
1215
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft,
1216
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
1217
-
1218
- .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight,
1219
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight,
1220
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
1221
-
1222
-
1223
- /* theme "inset-2", "inset-2-dark" */
1224
-
1225
- .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
1226
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{
1227
- background-color: transparent;
1228
- border-width: 1px;
1229
- border-style: solid;
1230
- border-color: #fff;
1231
- border-color: rgba(255,255,255,0.2);
1232
- -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
1233
- }
1234
-
1235
- .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ border-color: #000; border-color: rgba(0,0,0,0.2); }
1236
-
1237
-
1238
- /* theme "inset-3", "inset-3-dark" */
1239
-
1240
- .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.6); }
1241
-
1242
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.6); }
1243
-
1244
- .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
1245
-
1246
- .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
1247
-
1248
- .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1249
- .mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
1250
-
1251
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.75); }
1252
-
1253
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
1254
-
1255
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1256
- .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
1257
-
1258
- /* ---------------------------------------- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ == malihu jquery custom scrollbar plugin ==
3
+ Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
4
+ */
5
+
6
+
7
+
8
+ /*
9
+ CONTENTS:
10
+ 1. BASIC STYLE - Plugin's basic/essential CSS properties (normally, should not be edited).
11
+ 2. VERTICAL SCROLLBAR - Positioning and dimensions of vertical scrollbar.
12
+ 3. HORIZONTAL SCROLLBAR - Positioning and dimensions of horizontal scrollbar.
13
+ 4. VERTICAL AND HORIZONTAL SCROLLBARS - Positioning and dimensions of 2-axis scrollbars.
14
+ 5. TRANSITIONS - CSS3 transitions for hover events, auto-expanded and auto-hidden scrollbars.
15
+ 6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS
16
+ 6.1 THEMES - Scrollbar colors, opacity, dimensions, backgrounds etc. via ready-to-use themes.
17
+ */
18
+
19
+
20
+
21
+ /*
22
+ ------------------------------------------------------------------------------------------------------------------------
23
+ 1. BASIC STYLE
24
+ ------------------------------------------------------------------------------------------------------------------------
25
+ */
26
+
27
+ .mCustomScrollbar{ -ms-touch-action: none; touch-action: none; /* MSPointer events - direct all pointer events to js */ }
28
+ .mCustomScrollbar.mCS_no_scrollbar, .mCustomScrollbar.mCS_touch_action{ -ms-touch-action: auto; touch-action: auto; }
29
+
30
+ .mCustomScrollBox{ /* contains plugin's markup */
31
+ position: relative;
32
+ overflow: hidden;
33
+ height: 100%;
34
+ max-width: 100%;
35
+ outline: none;
36
+ direction: ltr;
37
+ }
38
+
39
+ .mCSB_container{ /* contains the original content */
40
+ overflow: hidden;
41
+ width: auto;
42
+ height: auto;
43
+ }
44
+
45
+
46
+
47
+ /*
48
+ ------------------------------------------------------------------------------------------------------------------------
49
+ 2. VERTICAL SCROLLBAR
50
+ y-axis
51
+ ------------------------------------------------------------------------------------------------------------------------
52
+ */
53
+
54
+ .mCSB_inside > .mCSB_container{ margin-right: 30px; }
55
+
56
+ .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */
57
+
58
+ .mCS-dir-rtl > .mCSB_inside > .mCSB_container{ /* RTL direction/left-side scrollbar */
59
+ margin-right: 0;
60
+ margin-left: 30px;
61
+ }
62
+
63
+ .mCS-dir-rtl > .mCSB_inside > .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-left: 0; } /* RTL direction/left-side scrollbar */
64
+
65
+ .mCSB_scrollTools{ /* contains scrollbar markup (draggable element, dragger rail, buttons etc.) */
66
+ position: absolute;
67
+ width: 16px;
68
+ height: auto;
69
+ left: auto;
70
+ top: 0;
71
+ right: 0;
72
+ bottom: 0;
73
+ }
74
+
75
+ .mCSB_outside + .mCSB_scrollTools{ right: -26px; } /* scrollbar position: outside */
76
+
77
+ .mCS-dir-rtl > .mCSB_inside > .mCSB_scrollTools,
78
+ .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ /* RTL direction/left-side scrollbar */
79
+ right: auto;
80
+ left: 0;
81
+ }
82
+
83
+ .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ left: -26px; } /* RTL direction/left-side scrollbar (scrollbar position: outside) */
84
+
85
+ .mCSB_scrollTools .mCSB_draggerContainer{ /* contains the draggable element and dragger rail markup */
86
+ position: absolute;
87
+ top: 0;
88
+ left: 0;
89
+ bottom: 0;
90
+ right: 0;
91
+ height: auto;
92
+ }
93
+
94
+ .mCSB_scrollTools a + .mCSB_draggerContainer{ margin: 20px 0; }
95
+
96
+ .mCSB_scrollTools .mCSB_draggerRail{
97
+ width: 2px;
98
+ height: 100%;
99
+ margin: 0 auto;
100
+ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
101
+ }
102
+
103
+ .mCSB_scrollTools .mCSB_dragger{ /* the draggable element */
104
+ cursor: pointer;
105
+ width: 100%;
106
+ height: 30px; /* minimum dragger height */
107
+ z-index: 1;
108
+ }
109
+
110
+ .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ /* the dragger element */
111
+ position: relative;
112
+ width: 4px;
113
+ height: 100%;
114
+ margin: 0 auto;
115
+ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
116
+ text-align: center;
117
+ }
118
+
119
+ .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
120
+ .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ width: 12px; /* auto-expanded scrollbar */ }
121
+
122
+ .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
123
+ .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 8px; /* auto-expanded scrollbar */ }
124
+
125
+ .mCSB_scrollTools .mCSB_buttonUp,
126
+ .mCSB_scrollTools .mCSB_buttonDown{
127
+ display: block;
128
+ position: absolute;
129
+ height: 20px;
130
+ width: 100%;
131
+ overflow: hidden;
132
+ margin: 0 auto;
133
+ cursor: pointer;
134
+ }
135
+
136
+ .mCSB_scrollTools .mCSB_buttonDown{ bottom: 0; }
137
+
138
+
139
+
140
+ /*
141
+ ------------------------------------------------------------------------------------------------------------------------
142
+ 3. HORIZONTAL SCROLLBAR
143
+ x-axis
144
+ ------------------------------------------------------------------------------------------------------------------------
145
+ */
146
+
147
+ .mCSB_horizontal.mCSB_inside > .mCSB_container{
148
+ margin-right: 0;
149
+ margin-bottom: 30px;
150
+ }
151
+
152
+ .mCSB_horizontal.mCSB_outside > .mCSB_container{ min-height: 100%; }
153
+
154
+ .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } /* non-visible scrollbar */
155
+
156
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal{
157
+ width: auto;
158
+ height: 16px;
159
+ top: auto;
160
+ right: 0;
161
+ bottom: 0;
162
+ left: 0;
163
+ }
164
+
165
+ .mCustomScrollBox + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
166
+ .mCustomScrollBox + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ bottom: -26px; } /* scrollbar position: outside */
167
+
168
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal a + .mCSB_draggerContainer{ margin: 0 20px; }
169
+
170
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{
171
+ width: 100%;
172
+ height: 2px;
173
+ margin: 7px 0;
174
+ }
175
+
176
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{
177
+ width: 30px; /* minimum dragger width */
178
+ height: 100%;
179
+ left: 0;
180
+ }
181
+
182
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
183
+ width: 100%;
184
+ height: 4px;
185
+ margin: 6px auto;
186
+ }
187
+
188
+ .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
189
+ .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
190
+ height: 12px; /* auto-expanded scrollbar */
191
+ margin: 2px auto;
192
+ }
193
+
194
+ .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
195
+ .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
196
+ height: 8px; /* auto-expanded scrollbar */
197
+ margin: 4px 0;
198
+ }
199
+
200
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,
201
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{
202
+ display: block;
203
+ position: absolute;
204
+ width: 20px;
205
+ height: 100%;
206
+ overflow: hidden;
207
+ margin: 0 auto;
208
+ cursor: pointer;
209
+ }
210
+
211
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{ left: 0; }
212
+
213
+ .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ right: 0; }
214
+
215
+
216
+
217
+ /*
218
+ ------------------------------------------------------------------------------------------------------------------------
219
+ 4. VERTICAL AND HORIZONTAL SCROLLBARS
220
+ yx-axis
221
+ ------------------------------------------------------------------------------------------------------------------------
222
+ */
223
+
224
+ .mCSB_container_wrapper{
225
+ position: absolute;
226
+ height: auto;
227
+ width: auto;
228
+ overflow: hidden;
229
+ top: 0;
230
+ left: 0;
231
+ right: 0;
232
+ bottom: 0;
233
+ margin-right: 30px;
234
+ margin-bottom: 30px;
235
+ }
236
+
237
+ .mCSB_container_wrapper > .mCSB_container{
238
+ padding-right: 30px;
239
+ padding-bottom: 30px;
240
+ }
241
+
242
+ .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 20px; }
243
+
244
+ .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 20px; }
245
+
246
+ /* non-visible horizontal scrollbar */
247
+ .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden + .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 0; }
248
+
249
+ /* non-visible vertical scrollbar/RTL direction/left-side scrollbar */
250
+ .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal,
251
+ .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 0; }
252
+
253
+ /* RTL direction/left-side scrollbar */
254
+ .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 20px; }
255
+
256
+ /* non-visible scrollbar/RTL direction/left-side scrollbar */
257
+ .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 0; }
258
+
259
+ .mCS-dir-rtl > .mCSB_inside > .mCSB_container_wrapper{ /* RTL direction/left-side scrollbar */
260
+ margin-right: 0;
261
+ margin-left: 30px;
262
+ }
263
+
264
+ .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden > .mCSB_container{
265
+ padding-right: 0;
266
+ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
267
+ }
268
+
269
+ .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden > .mCSB_container{
270
+ padding-bottom: 0;
271
+ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
272
+ }
273
+
274
+ .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{
275
+ margin-right: 0; /* non-visible scrollbar */
276
+ margin-left: 0;
277
+ }
278
+
279
+ /* non-visible horizontal scrollbar */
280
+ .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; }
281
+
282
+
283
+
284
+ /*
285
+ ------------------------------------------------------------------------------------------------------------------------
286
+ 5. TRANSITIONS
287
+ ------------------------------------------------------------------------------------------------------------------------
288
+ */
289
+
290
+ .mCSB_scrollTools,
291
+ .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
292
+ .mCSB_scrollTools .mCSB_buttonUp,
293
+ .mCSB_scrollTools .mCSB_buttonDown,
294
+ .mCSB_scrollTools .mCSB_buttonLeft,
295
+ .mCSB_scrollTools .mCSB_buttonRight{
296
+ -webkit-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
297
+ -moz-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
298
+ -o-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
299
+ transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
300
+ }
301
+
302
+ .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, /* auto-expanded scrollbar */
303
+ .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,
304
+ .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,
305
+ .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{
306
+ -webkit-transition: width .2s ease-out .2s, height .2s ease-out .2s,
307
+ margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
308
+ margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
309
+ opacity .2s ease-in-out, background-color .2s ease-in-out;
310
+ -moz-transition: width .2s ease-out .2s, height .2s ease-out .2s,
311
+ margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
312
+ margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
313
+ opacity .2s ease-in-out, background-color .2s ease-in-out;
314
+ -o-transition: width .2s ease-out .2s, height .2s ease-out .2s,
315
+ margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
316
+ margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
317
+ opacity .2s ease-in-out, background-color .2s ease-in-out;
318
+ transition: width .2s ease-out .2s, height .2s ease-out .2s,
319
+ margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
320
+ margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
321
+ opacity .2s ease-in-out, background-color .2s ease-in-out;
322
+ }
323
+
324
+
325
+
326
+ /*
327
+ ------------------------------------------------------------------------------------------------------------------------
328
+ 6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS
329
+ ------------------------------------------------------------------------------------------------------------------------
330
+ */
331
+
332
+ /*
333
+ ----------------------------------------
334
+ 6.1 THEMES
335
+ ----------------------------------------
336
+ */
337
+
338
+ /* default theme ("light") */
339
+
340
+ .mCSB_scrollTools{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
341
+
342
+ .mCS-autoHide > .mCustomScrollBox > .mCSB_scrollTools,
343
+ .mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 0; filter: "alpha(opacity=0)"; -ms-filter: "alpha(opacity=0)"; }
344
+
345
+ .mCustomScrollbar > .mCustomScrollBox > .mCSB_scrollTools.mCSB_scrollTools_onDrag,
346
+ .mCustomScrollbar > .mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag,
347
+ .mCustomScrollBox:hover > .mCSB_scrollTools,
348
+ .mCustomScrollBox:hover ~ .mCSB_scrollTools,
349
+ .mCS-autoHide:hover > .mCustomScrollBox > .mCSB_scrollTools,
350
+ .mCS-autoHide:hover > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 1; filter: "alpha(opacity=100)"; -ms-filter: "alpha(opacity=100)"; }
351
+
352
+ .mCSB_scrollTools .mCSB_draggerRail{
353
+ background-color: #000; background-color: rgba(0,0,0,0.4);
354
+ filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
355
+ }
356
+
357
+ .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
358
+ background-color: #fff; background-color: rgba(255,255,255,0.75);
359
+ filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)";
360
+ }
361
+
362
+ .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
363
+ background-color: #fff; background-color: rgba(255,255,255,0.85);
364
+ filter: "alpha(opacity=85)"; -ms-filter: "alpha(opacity=85)";
365
+ }
366
+ .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
367
+ .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
368
+ background-color: #fff; background-color: rgba(255,255,255,0.9);
369
+ filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)";
370
+ }
371
+
372
+ .mCSB_scrollTools .mCSB_buttonUp,
373
+ .mCSB_scrollTools .mCSB_buttonDown,
374
+ .mCSB_scrollTools .mCSB_buttonLeft,
375
+ .mCSB_scrollTools .mCSB_buttonRight{
376
+ background-image: url(mCSB_buttons.png); /* css sprites */
377
+ background-repeat: no-repeat;
378
+ opacity: 0.4; filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
379
+ }
380
+
381
+ .mCSB_scrollTools .mCSB_buttonUp{
382
+ background-position: 0 0;
383
+ /*
384
+ sprites locations
385
+ light: 0 0, -16px 0, -32px 0, -48px 0, 0 -72px, -16px -72px, -32px -72px
386
+ dark: -80px 0, -96px 0, -112px 0, -128px 0, -80px -72px, -96px -72px, -112px -72px
387
+ */
388
+ }
389
+
390
+ .mCSB_scrollTools .mCSB_buttonDown{
391
+ background-position: 0 -20px;
392
+ /*
393
+ sprites locations
394
+ light: 0 -20px, -16px -20px, -32px -20px, -48px -20px, 0 -92px, -16px -92px, -32px -92px
395
+ dark: -80px -20px, -96px -20px, -112px -20px, -128px -20px, -80px -92px, -96px -92px, -112 -92px
396
+ */
397
+ }
398
+
399
+ .mCSB_scrollTools .mCSB_buttonLeft{
400
+ background-position: 0 -40px;
401
+ /*
402
+ sprites locations
403
+ light: 0 -40px, -20px -40px, -40px -40px, -60px -40px, 0 -112px, -20px -112px, -40px -112px
404
+ dark: -80px -40px, -100px -40px, -120px -40px, -140px -40px, -80px -112px, -100px -112px, -120px -112px
405
+ */
406
+ }
407
+
408
+ .mCSB_scrollTools .mCSB_buttonRight{
409
+ background-position: 0 -56px;
410
+ /*
411
+ sprites locations
412
+ light: 0 -56px, -20px -56px, -40px -56px, -60px -56px, 0 -128px, -20px -128px, -40px -128px
413
+ dark: -80px -56px, -100px -56px, -120px -56px, -140px -56px, -80px -128px, -100px -128px, -120px -128px
414
+ */
415
+ }
416
+
417
+ .mCSB_scrollTools .mCSB_buttonUp:hover,
418
+ .mCSB_scrollTools .mCSB_buttonDown:hover,
419
+ .mCSB_scrollTools .mCSB_buttonLeft:hover,
420
+ .mCSB_scrollTools .mCSB_buttonRight:hover{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
421
+
422
+ .mCSB_scrollTools .mCSB_buttonUp:active,
423
+ .mCSB_scrollTools .mCSB_buttonDown:active,
424
+ .mCSB_scrollTools .mCSB_buttonLeft:active,
425
+ .mCSB_scrollTools .mCSB_buttonRight:active{ opacity: 0.9; filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; }
426
+
427
+
428
+ /* theme: "dark" */
429
+
430
+ .mCS-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
431
+
432
+ .mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
433
+
434
+ .mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.85); }
435
+
436
+ .mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
437
+ .mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.9); }
438
+
439
+ .mCS-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
440
+
441
+ .mCS-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
442
+
443
+ .mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
444
+
445
+ .mCS-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
446
+
447
+ /* ---------------------------------------- */
448
+
449
+
450
+
451
+ /* theme: "light-2", "dark-2" */
452
+
453
+ .mCS-light-2.mCSB_scrollTools .mCSB_draggerRail,
454
+ .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
455
+ width: 4px;
456
+ background-color: #fff; background-color: rgba(255,255,255,0.1);
457
+ -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
458
+ }
459
+
460
+ .mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
461
+ .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
462
+ width: 4px;
463
+ background-color: #fff; background-color: rgba(255,255,255,0.75);
464
+ -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
465
+ }
466
+
467
+ .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
468
+ .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
469
+ .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
470
+ .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
471
+ width: 100%;
472
+ height: 4px;
473
+ margin: 6px auto;
474
+ }
475
+
476
+ .mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
477
+
478
+ .mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
479
+ .mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
480
+
481
+ .mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px 0; }
482
+
483
+ .mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -20px; }
484
+
485
+ .mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -40px; }
486
+
487
+ .mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -56px; }
488
+
489
+
490
+ /* theme: "dark-2" */
491
+
492
+ .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
493
+ background-color: #000; background-color: rgba(0,0,0,0.1);
494
+ -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
495
+ }
496
+
497
+ .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
498
+ background-color: #000; background-color: rgba(0,0,0,0.75);
499
+ -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
500
+ }
501
+
502
+ .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
503
+
504
+ .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
505
+ .mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
506
+
507
+ .mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px 0; }
508
+
509
+ .mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -20px; }
510
+
511
+ .mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -40px; }
512
+
513
+ .mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -56px; }
514
+
515
+ /* ---------------------------------------- */
516
+
517
+
518
+
519
+ /* theme: "light-thick", "dark-thick" */
520
+
521
+ .mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail,
522
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
523
+ width: 4px;
524
+ background-color: #fff; background-color: rgba(255,255,255,0.1);
525
+ -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
526
+ }
527
+
528
+ .mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
529
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
530
+ width: 6px;
531
+ background-color: #fff; background-color: rgba(255,255,255,0.75);
532
+ -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
533
+ }
534
+
535
+ .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,
536
+ .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{
537
+ width: 100%;
538
+ height: 4px;
539
+ margin: 6px 0;
540
+ }
541
+
542
+ .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
543
+ .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
544
+ width: 100%;
545
+ height: 6px;
546
+ margin: 5px auto;
547
+ }
548
+
549
+ .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
550
+
551
+ .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
552
+ .mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
553
+
554
+ .mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px 0; }
555
+
556
+ .mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -20px; }
557
+
558
+ .mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -40px; }
559
+
560
+ .mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -56px; }
561
+
562
+
563
+ /* theme: "dark-thick" */
564
+
565
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
566
+ background-color: #000; background-color: rgba(0,0,0,0.1);
567
+ -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
568
+ }
569
+
570
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
571
+ background-color: #000; background-color: rgba(0,0,0,0.75);
572
+ -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
573
+ }
574
+
575
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
576
+
577
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
578
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
579
+
580
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px 0; }
581
+
582
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -20px; }
583
+
584
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -40px; }
585
+
586
+ .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -56px; }
587
+
588
+ /* ---------------------------------------- */
589
+
590
+
591
+
592
+ /* theme: "light-thin", "dark-thin" */
593
+
594
+ .mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.1); }
595
+
596
+ .mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
597
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 2px; }
598
+
599
+ .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,
600
+ .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{ width: 100%; }
601
+
602
+ .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
603
+ .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
604
+ width: 100%;
605
+ height: 2px;
606
+ margin: 7px auto;
607
+ }
608
+
609
+
610
+ /* theme "dark-thin" */
611
+
612
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
613
+
614
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
615
+
616
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
617
+
618
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
619
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
620
+
621
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
622
+
623
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
624
+
625
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
626
+
627
+ .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
628
+
629
+ /* ---------------------------------------- */
630
+
631
+
632
+
633
+ /* theme "rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark" */
634
+
635
+ .mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.15); }
636
+
637
+ .mCS-rounded.mCSB_scrollTools .mCSB_dragger,
638
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,
639
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,
640
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{ height: 14px; }
641
+
642
+ .mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
643
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
644
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
645
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
646
+ width: 14px;
647
+ margin: 0 1px;
648
+ }
649
+
650
+ .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger,
651
+ .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,
652
+ .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,
653
+ .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 14px; }
654
+
655
+ .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
656
+ .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
657
+ .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
658
+ .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
659
+ height: 14px;
660
+ margin: 1px 0;
661
+ }
662
+
663
+ .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
664
+ .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
665
+ .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
666
+ .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
667
+ width: 16px; /* auto-expanded scrollbar */
668
+ height: 16px;
669
+ margin: -1px 0;
670
+ }
671
+
672
+ .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
673
+ .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
674
+ .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
675
+ .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 4px; /* auto-expanded scrollbar */ }
676
+
677
+ .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
678
+ .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
679
+ .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
680
+ .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
681
+ height: 16px; /* auto-expanded scrollbar */
682
+ width: 16px;
683
+ margin: 0 -1px;
684
+ }
685
+
686
+ .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
687
+ .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
688
+ .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
689
+ .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
690
+ height: 4px; /* auto-expanded scrollbar */
691
+ margin: 6px 0;
692
+ }
693
+
694
+ .mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{ background-position: 0 -72px; }
695
+
696
+ .mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{ background-position: 0 -92px; }
697
+
698
+ .mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{ background-position: 0 -112px; }
699
+
700
+ .mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{ background-position: 0 -128px; }
701
+
702
+
703
+ /* theme "rounded-dark", "rounded-dots-dark" */
704
+
705
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
706
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
707
+
708
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
709
+
710
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
711
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
712
+
713
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
714
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
715
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
716
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
717
+
718
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px -72px; }
719
+
720
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -92px; }
721
+
722
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -112px; }
723
+
724
+ .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -128px; }
725
+
726
+
727
+ /* theme "rounded-dots", "rounded-dots-dark" */
728
+
729
+ .mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail,
730
+ .mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{ width: 4px; }
731
+
732
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
733
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,
734
+ .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
735
+ .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
736
+ background-color: transparent;
737
+ background-position: center;
738
+ }
739
+
740
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
741
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
742
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==");
743
+ background-repeat: repeat-y;
744
+ opacity: 0.3;
745
+ filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
746
+ }
747
+
748
+ .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
749
+ .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
750
+ height: 4px;
751
+ margin: 6px 0;
752
+ background-repeat: repeat-x;
753
+ }
754
+
755
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px -72px; }
756
+
757
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -92px; }
758
+
759
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -112px; }
760
+
761
+ .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -128px; }
762
+
763
+
764
+ /* theme "rounded-dots-dark" */
765
+
766
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
767
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=");
768
+ }
769
+
770
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px -72px; }
771
+
772
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -92px; }
773
+
774
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -112px; }
775
+
776
+ .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -128px; }
777
+
778
+ /* ---------------------------------------- */
779
+
780
+
781
+
782
+ /* theme "3d", "3d-dark", "3d-thick", "3d-thick-dark" */
783
+
784
+ .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
785
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
786
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
787
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
788
+ background-repeat: repeat-y;
789
+ background-image: -moz-linear-gradient(left, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
790
+ background-image: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
791
+ background-image: -webkit-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
792
+ background-image: -o-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
793
+ background-image: -ms-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
794
+ background-image: linear-gradient(to right, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
795
+ }
796
+
797
+ .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
798
+ .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
799
+ .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
800
+ .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
801
+ background-repeat: repeat-x;
802
+ background-image: -moz-linear-gradient(top, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
803
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
804
+ background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
805
+ background-image: -o-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
806
+ background-image: -ms-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
807
+ background-image: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
808
+ }
809
+
810
+
811
+ /* theme "3d", "3d-dark" */
812
+
813
+ .mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger,
814
+ .mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 70px; }
815
+
816
+ .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger,
817
+ .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 70px; }
818
+
819
+ .mCS-3d.mCSB_scrollTools,
820
+ .mCS-3d-dark.mCSB_scrollTools{
821
+ opacity: 1;
822
+ filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
823
+ }
824
+
825
+ .mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
826
+ .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
827
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,
828
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; }
829
+
830
+ .mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
831
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
832
+ width: 8px;
833
+ background-color: #000; background-color: rgba(0,0,0,0.2);
834
+ box-shadow: inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.2);
835
+ }
836
+
837
+ .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
838
+ .mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
839
+ .mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
840
+ .mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
841
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
842
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
843
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
844
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
845
+
846
+ .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
847
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 8px; }
848
+
849
+ .mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail,
850
+ .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
851
+ width: 100%;
852
+ height: 8px;
853
+ margin: 4px 0;
854
+ box-shadow: inset 0 1px 1px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(255,255,255,0.2);
855
+ }
856
+
857
+ .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
858
+ .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
859
+ width: 100%;
860
+ height: 8px;
861
+ margin: 4px auto;
862
+ }
863
+
864
+ .mCS-3d.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
865
+
866
+ .mCS-3d.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
867
+
868
+ .mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
869
+
870
+ .mCS-3d.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
871
+
872
+
873
+ /* theme "3d-dark" */
874
+
875
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
876
+ background-color: #000; background-color: rgba(0,0,0,0.1);
877
+ box-shadow: inset 1px 0 1px rgba(0,0,0,0.1);
878
+ }
879
+
880
+ .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); }
881
+
882
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
883
+
884
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
885
+
886
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
887
+
888
+ .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
889
+
890
+ /* ---------------------------------------- */
891
+
892
+
893
+
894
+ /* theme: "3d-thick", "3d-thick-dark" */
895
+
896
+ .mCS-3d-thick.mCSB_scrollTools,
897
+ .mCS-3d-thick-dark.mCSB_scrollTools{
898
+ opacity: 1;
899
+ filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
900
+ }
901
+
902
+ .mCS-3d-thick.mCSB_scrollTools,
903
+ .mCS-3d-thick-dark.mCSB_scrollTools,
904
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer,
905
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; }
906
+
907
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
908
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }
909
+
910
+ .mCSB_inside + .mCS-3d-thick.mCSB_scrollTools_vertical,
911
+ .mCSB_inside + .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ right: 1px; }
912
+
913
+ .mCS-3d-thick.mCSB_scrollTools_vertical,
914
+ .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ box-shadow: inset 1px 0 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); }
915
+
916
+ .mCS-3d-thick.mCSB_scrollTools_horizontal,
917
+ .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{
918
+ bottom: 1px;
919
+ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5);
920
+ }
921
+
922
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
923
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
924
+ box-shadow: inset 1px 0 0 rgba(255,255,255,0.4);
925
+ width: 12px;
926
+ margin: 2px;
927
+ position: absolute;
928
+ height: auto;
929
+ top: 0;
930
+ bottom: 0;
931
+ left: 0;
932
+ right: 0;
933
+ }
934
+
935
+ .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
936
+ .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
937
+
938
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
939
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
940
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
941
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
942
+
943
+ .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
944
+ .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
945
+ height: 12px;
946
+ width: auto;
947
+ }
948
+
949
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{
950
+ background-color: #000; background-color: rgba(0,0,0,0.05);
951
+ box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
952
+ }
953
+
954
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
955
+
956
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
957
+
958
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
959
+
960
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
961
+
962
+ .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
963
+
964
+
965
+ /* theme: "3d-thick-dark" */
966
+
967
+ .mCS-3d-thick-dark.mCSB_scrollTools{ box-shadow: inset 0 0 14px rgba(0,0,0,0.2); }
968
+
969
+ .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.2); }
970
+
971
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 1px 0 0 rgba(255,255,255,0.4), inset -1px 0 0 rgba(0,0,0,0.2); }
972
+
973
+ .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.2); }
974
+
975
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
976
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
977
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
978
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #777; }
979
+
980
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{
981
+ background-color: #fff; background-color: rgba(0,0,0,0.05);
982
+ box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
983
+ }
984
+
985
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
986
+
987
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
988
+
989
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
990
+
991
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
992
+
993
+ .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
994
+
995
+ /* ---------------------------------------- */
996
+
997
+
998
+
999
+ /* theme: "minimal", "minimal-dark" */
1000
+
1001
+ .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
1002
+ .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
1003
+ right: 0;
1004
+ margin: 12px 0;
1005
+ }
1006
+
1007
+ .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
1008
+ .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
1009
+ .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
1010
+ .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{
1011
+ bottom: 0;
1012
+ margin: 0 12px;
1013
+ }
1014
+
1015
+ /* RTL direction/left-side scrollbar */
1016
+ .mCS-dir-rtl > .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
1017
+ .mCS-dir-rtl > .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
1018
+ left: 0;
1019
+ right: auto;
1020
+ }
1021
+
1022
+ .mCS-minimal.mCSB_scrollTools .mCSB_draggerRail,
1023
+ .mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
1024
+
1025
+ .mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger,
1026
+ .mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 50px; }
1027
+
1028
+ .mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger,
1029
+ .mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 50px; }
1030
+
1031
+ .mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
1032
+ background-color: #fff; background-color: rgba(255,255,255,0.2);
1033
+ filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
1034
+ }
1035
+
1036
+ .mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1037
+ .mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
1038
+ background-color: #fff; background-color: rgba(255,255,255,0.5);
1039
+ filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
1040
+ }
1041
+
1042
+
1043
+ /* theme: "minimal-dark" */
1044
+
1045
+ .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
1046
+ background-color: #000; background-color: rgba(0,0,0,0.2);
1047
+ filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
1048
+ }
1049
+
1050
+ .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1051
+ .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
1052
+ background-color: #000; background-color: rgba(0,0,0,0.5);
1053
+ filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
1054
+ }
1055
+
1056
+ /* ---------------------------------------- */
1057
+
1058
+
1059
+
1060
+ /* theme "light-3", "dark-3" */
1061
+
1062
+ .mCS-light-3.mCSB_scrollTools .mCSB_draggerRail,
1063
+ .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{
1064
+ width: 6px;
1065
+ background-color: #000; background-color: rgba(0,0,0,0.2);
1066
+ }
1067
+
1068
+ .mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1069
+ .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 6px; }
1070
+
1071
+ .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1072
+ .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1073
+ .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1074
+ .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{
1075
+ width: 100%;
1076
+ height: 6px;
1077
+ margin: 5px 0;
1078
+ }
1079
+
1080
+ .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1081
+ .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
1082
+ .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1083
+ .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
1084
+ width: 12px;
1085
+ }
1086
+
1087
+ .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1088
+ .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
1089
+ .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
1090
+ .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
1091
+ height: 12px;
1092
+ margin: 2px 0;
1093
+ }
1094
+
1095
+ .mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
1096
+
1097
+ .mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
1098
+
1099
+ .mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
1100
+
1101
+ .mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
1102
+
1103
+
1104
+ /* theme "dark-3" */
1105
+
1106
+ .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
1107
+
1108
+ .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
1109
+
1110
+ .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1111
+ .mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
1112
+
1113
+ .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
1114
+
1115
+ .mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
1116
+
1117
+ .mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
1118
+
1119
+ .mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
1120
+
1121
+ .mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
1122
+
1123
+ /* ---------------------------------------- */
1124
+
1125
+
1126
+
1127
+ /* theme "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark" */
1128
+
1129
+ .mCS-inset.mCSB_scrollTools .mCSB_draggerRail,
1130
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
1131
+ .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
1132
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
1133
+ .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,
1134
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{
1135
+ width: 12px;
1136
+ background-color: #000; background-color: rgba(0,0,0,0.2);
1137
+ }
1138
+
1139
+ .mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1140
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1141
+ .mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1142
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1143
+ .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1144
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
1145
+ width: 6px;
1146
+ margin: 3px 5px;
1147
+ position: absolute;
1148
+ height: auto;
1149
+ top: 0;
1150
+ bottom: 0;
1151
+ left: 0;
1152
+ right: 0;
1153
+ }
1154
+
1155
+ .mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1156
+ .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1157
+ .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1158
+ .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1159
+ .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
1160
+ .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
1161
+ height: 6px;
1162
+ margin: 5px 3px;
1163
+ position: absolute;
1164
+ width: auto;
1165
+ top: 0;
1166
+ bottom: 0;
1167
+ left: 0;
1168
+ right: 0;
1169
+ }
1170
+
1171
+ .mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1172
+ .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1173
+ .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1174
+ .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1175
+ .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
1176
+ .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
1177
+ width: 100%;
1178
+ height: 12px;
1179
+ margin: 2px 0;
1180
+ }
1181
+
1182
+ .mCS-inset.mCSB_scrollTools .mCSB_buttonUp,
1183
+ .mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp,
1184
+ .mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
1185
+
1186
+ .mCS-inset.mCSB_scrollTools .mCSB_buttonDown,
1187
+ .mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown,
1188
+ .mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
1189
+
1190
+ .mCS-inset.mCSB_scrollTools .mCSB_buttonLeft,
1191
+ .mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft,
1192
+ .mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
1193
+
1194
+ .mCS-inset.mCSB_scrollTools .mCSB_buttonRight,
1195
+ .mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight,
1196
+ .mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
1197
+
1198
+
1199
+ /* theme "inset-dark", "inset-2-dark", "inset-3-dark" */
1200
+
1201
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1202
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1203
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
1204
+
1205
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
1206
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
1207
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
1208
+
1209
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1210
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
1211
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1212
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
1213
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1214
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
1215
+
1216
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
1217
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
1218
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
1219
+
1220
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp,
1221
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp,
1222
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
1223
+
1224
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown,
1225
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown,
1226
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
1227
+
1228
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft,
1229
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft,
1230
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
1231
+
1232
+ .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight,
1233
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight,
1234
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
1235
+
1236
+
1237
+ /* theme "inset-2", "inset-2-dark" */
1238
+
1239
+ .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
1240
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{
1241
+ background-color: transparent;
1242
+ border-width: 1px;
1243
+ border-style: solid;
1244
+ border-color: #fff;
1245
+ border-color: rgba(255,255,255,0.2);
1246
+ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
1247
+ }
1248
+
1249
+ .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ border-color: #000; border-color: rgba(0,0,0,0.2); }
1250
+
1251
+
1252
+ /* theme "inset-3", "inset-3-dark" */
1253
+
1254
+ .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.6); }
1255
+
1256
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.6); }
1257
+
1258
+ .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
1259
+
1260
+ .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
1261
+
1262
+ .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1263
+ .mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
1264
+
1265
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.75); }
1266
+
1267
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
1268
+
1269
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1270
+ .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
1271
+
1272
+ /* ---------------------------------------- */