Netgo_Nbanners - Version 1.0.3

Version Notes

Fourth Preview Release

Download this release

Release Info

Developer NetGo
Extension Netgo_Nbanners
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

Files changed (25) hide show
  1. app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners.php +25 -25
  2. app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit.php +53 -53
  3. app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit/Form.php +28 -28
  4. app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit/Tab/Form.php +92 -92
  5. app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit/Tabs.php +32 -32
  6. app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Grid.php +207 -207
  7. app/code/community/Netgo/Nbanners/Block/Index.php +30 -30
  8. app/code/community/Netgo/Nbanners/Block/Left.php +14 -14
  9. app/code/community/Netgo/Nbanners/Helper/Data.php +46 -46
  10. app/code/community/Netgo/Nbanners/Model/Adminhtml/System/Config/Source/Effects.php +27 -27
  11. app/code/community/Netgo/Nbanners/Model/Mysql4/Nbanners.php +18 -18
  12. app/code/community/Netgo/Nbanners/Model/Mysql4/Nbanners/Collection.php +22 -22
  13. app/code/community/Netgo/Nbanners/Model/Nbanners.php +21 -21
  14. app/code/community/Netgo/Nbanners/controllers/Adminhtml/NbannersController.php +219 -219
  15. app/code/community/Netgo/Nbanners/controllers/IndexController.php +33 -38
  16. app/code/community/Netgo/Nbanners/etc/adminhtml.xml +35 -35
  17. app/code/community/Netgo/Nbanners/etc/config.xml +138 -138
  18. app/code/community/Netgo/Nbanners/etc/system.xml +110 -110
  19. app/code/community/Netgo/Nbanners/sql/nbanners_setup/mysql4-install-0.1.0.php +24 -24
  20. app/design/adminhtml/default/default/layout/nbanners.xml +4 -4
  21. app/design/frontend/base/default/layout/nbanners.xml +34 -34
  22. app/design/frontend/base/default/template/nbanners/index.phtml +69 -69
  23. app/etc/modules/Netgo_Nbanners.xml +4 -4
  24. package.xml +6 -6
  25. skin/frontend/base/default/js/lib/nbanners/jquery.cycle2.scrollVert.js +4 -4
app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Adminhtml_Nbanners extends Mage_Adminhtml_Block_Widget_Grid_Container{
14
-
15
- public function __construct()
16
- {
17
-
18
- $this->_controller = "adminhtml_nbanners";
19
- $this->_blockGroup = "nbanners";
20
- $this->_headerText = Mage::helper("nbanners")->__("Nbanners Manager");
21
- $this->_addButtonLabel = Mage::helper("nbanners")->__("Add New Item");
22
- parent::__construct();
23
-
24
- }
25
-
26
  }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Adminhtml_Nbanners extends Mage_Adminhtml_Block_Widget_Grid_Container{
14
+
15
+ public function __construct()
16
+ {
17
+
18
+ $this->_controller = "adminhtml_nbanners";
19
+ $this->_blockGroup = "nbanners";
20
+ $this->_headerText = Mage::helper("nbanners")->__("Nbanners Manager");
21
+ $this->_addButtonLabel = Mage::helper("nbanners")->__("Add New Item");
22
+ parent::__construct();
23
+
24
+ }
25
+
26
  }
app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit.php CHANGED
@@ -1,54 +1,54 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
14
- {
15
- public function __construct()
16
- {
17
-
18
- parent::__construct();
19
- $this->_objectId = "nbanners_id";
20
- $this->_blockGroup = "nbanners";
21
- $this->_controller = "adminhtml_nbanners";
22
- $this->_updateButton("save", "label", Mage::helper("nbanners")->__("Save Item"));
23
- $this->_updateButton("delete", "label", Mage::helper("nbanners")->__("Delete Item"));
24
-
25
- $this->_addButton("saveandcontinue", array(
26
- "label" => Mage::helper("nbanners")->__("Save And Continue Edit"),
27
- "onclick" => "saveAndContinueEdit()",
28
- "class" => "save",
29
- ), -100);
30
-
31
-
32
-
33
- $this->_formScripts[] = "
34
-
35
- function saveAndContinueEdit(){
36
- editForm.submit($('edit_form').action+'back/edit/');
37
- }
38
- ";
39
- }
40
-
41
- public function getHeaderText()
42
- {
43
- if( Mage::registry("nbanners_data") && Mage::registry("nbanners_data")->getId() ){
44
-
45
- return Mage::helper("nbanners")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("nbanners_data")->getId()));
46
-
47
- }
48
- else{
49
-
50
- return Mage::helper("nbanners")->__("Add Item");
51
-
52
- }
53
- }
54
  }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
14
+ {
15
+ public function __construct()
16
+ {
17
+
18
+ parent::__construct();
19
+ $this->_objectId = "nbanners_id";
20
+ $this->_blockGroup = "nbanners";
21
+ $this->_controller = "adminhtml_nbanners";
22
+ $this->_updateButton("save", "label", Mage::helper("nbanners")->__("Save Item"));
23
+ $this->_updateButton("delete", "label", Mage::helper("nbanners")->__("Delete Item"));
24
+
25
+ $this->_addButton("saveandcontinue", array(
26
+ "label" => Mage::helper("nbanners")->__("Save And Continue Edit"),
27
+ "onclick" => "saveAndContinueEdit()",
28
+ "class" => "save",
29
+ ), -100);
30
+
31
+
32
+
33
+ $this->_formScripts[] = "
34
+
35
+ function saveAndContinueEdit(){
36
+ editForm.submit($('edit_form').action+'back/edit/');
37
+ }
38
+ ";
39
+ }
40
+
41
+ public function getHeaderText()
42
+ {
43
+ if( Mage::registry("nbanners_data") && Mage::registry("nbanners_data")->getId() ){
44
+
45
+ return Mage::helper("nbanners")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("nbanners_data")->getId()));
46
+
47
+ }
48
+ else{
49
+
50
+ return Mage::helper("nbanners")->__("Add Item");
51
+
52
+ }
53
+ }
54
  }
app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit/Form.php CHANGED
@@ -1,28 +1,28 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
14
- {
15
- protected function _prepareForm()
16
- {
17
- $form = new Varien_Data_Form(array(
18
- "id" => "edit_form",
19
- "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
20
- "method" => "post",
21
- "enctype" =>"multipart/form-data",
22
- )
23
- );
24
- $form->setUseContainer(true);
25
- $this->setForm($form);
26
- return parent::_prepareForm();
27
- }
28
- }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
14
+ {
15
+ protected function _prepareForm()
16
+ {
17
+ $form = new Varien_Data_Form(array(
18
+ "id" => "edit_form",
19
+ "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
20
+ "method" => "post",
21
+ "enctype" =>"multipart/form-data",
22
+ )
23
+ );
24
+ $form->setUseContainer(true);
25
+ $this->setForm($form);
26
+ return parent::_prepareForm();
27
+ }
28
+ }
app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit/Tab/Form.php CHANGED
@@ -1,92 +1,92 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
14
- {
15
- protected function _prepareForm()
16
- {
17
-
18
- $form = new Varien_Data_Form();
19
- $this->setForm($form);
20
- $fieldset = $form->addFieldset("nbanners_form", array("legend"=>Mage::helper("nbanners")->__("Item information")));
21
-
22
-
23
- $fieldset->addField("nbannergroup", "text", array(
24
- "label" => Mage::helper("nbanners")->__("Group"),
25
- "class" => "required-entry",
26
- "required" => true,
27
- "name" => "nbannergroup",
28
- ));
29
-
30
- $fieldset->addField("nbanners_name", "text", array(
31
- "label" => Mage::helper("nbanners")->__("Name"),
32
- "class" => "required-entry",
33
- "required" => true,
34
- "name" => "nbanners_name",
35
- ));
36
-
37
- $fieldset->addField("nbanners_alt", "text", array(
38
- "label" => Mage::helper("nbanners")->__("Alt text"),
39
- "class" => "required-entry",
40
- "required" => true,
41
- "name" => "nbanners_alt",
42
- ));
43
-
44
- $fieldset->addField("nbanners_caption", "textarea", array(
45
- "label" => Mage::helper("nbanners")->__("Caption"),
46
- "name" => "nbanners_caption",
47
- ));
48
-
49
- $fieldset->addField('nbanners_cap_pos', 'select', array(
50
- 'label' => Mage::helper('nbanners')->__('Caption Position'),
51
- 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray5(),
52
- 'name' => 'nbanners_cap_pos',
53
- ));
54
- /* $fieldset->addField('nbanners_effect', 'select', array(
55
- 'label' => Mage::helper('nbanners')->__('Effect'),
56
- 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray6(),
57
- 'name' => 'nbanners_effect',
58
- ));
59
- $fieldset->addField('nbanners_show_pag', 'select', array(
60
- 'label' => Mage::helper('nbanners')->__('Show Pagination'),
61
- 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray8(),
62
- 'name' => 'nbanners_show_pag',
63
- ));
64
- $fieldset->addField('nbanners_show_pr_next', 'select', array(
65
- 'label' => Mage::helper('nbanners')->__('Show Pr Next'),
66
- 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray9(),
67
- 'name' => 'nbanners_show_pr_next',
68
- )); */
69
- $fieldset->addField('nbanners_image', 'image', array(
70
- 'label' => Mage::helper('nbanners')->__('Banner Image'),
71
- 'name' => 'nbanners_image',
72
- 'note' => '(*.jpg, *.png, *.gif)',
73
- ));
74
- $fieldset->addField('nbanners_status', 'select', array(
75
- 'label' => Mage::helper('nbanners')->__('Status'),
76
- 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray11(),
77
- 'name' => 'nbanners_status',
78
- "class" => "required-entry",
79
- "required" => true,
80
- ));
81
-
82
- if (Mage::getSingleton("adminhtml/session")->getNbannersData())
83
- {
84
- $form->setValues(Mage::getSingleton("adminhtml/session")->getNbannersData());
85
- Mage::getSingleton("adminhtml/session")->setNbannersData(null);
86
- }
87
- elseif(Mage::registry("nbanners_data")) {
88
- $form->setValues(Mage::registry("nbanners_data")->getData());
89
- }
90
- return parent::_prepareForm();
91
- }
92
- }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
14
+ {
15
+ protected function _prepareForm()
16
+ {
17
+
18
+ $form = new Varien_Data_Form();
19
+ $this->setForm($form);
20
+ $fieldset = $form->addFieldset("nbanners_form", array("legend"=>Mage::helper("nbanners")->__("Item information")));
21
+
22
+
23
+ $fieldset->addField("nbannergroup", "text", array(
24
+ "label" => Mage::helper("nbanners")->__("Group"),
25
+ "class" => "required-entry",
26
+ "required" => true,
27
+ "name" => "nbannergroup",
28
+ ));
29
+
30
+ $fieldset->addField("nbanners_name", "text", array(
31
+ "label" => Mage::helper("nbanners")->__("Name"),
32
+ "class" => "required-entry",
33
+ "required" => true,
34
+ "name" => "nbanners_name",
35
+ ));
36
+
37
+ $fieldset->addField("nbanners_alt", "text", array(
38
+ "label" => Mage::helper("nbanners")->__("Alt text"),
39
+ "class" => "required-entry",
40
+ "required" => true,
41
+ "name" => "nbanners_alt",
42
+ ));
43
+
44
+ $fieldset->addField("nbanners_caption", "textarea", array(
45
+ "label" => Mage::helper("nbanners")->__("Caption"),
46
+ "name" => "nbanners_caption",
47
+ ));
48
+
49
+ $fieldset->addField('nbanners_cap_pos', 'select', array(
50
+ 'label' => Mage::helper('nbanners')->__('Caption Position'),
51
+ 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray5(),
52
+ 'name' => 'nbanners_cap_pos',
53
+ ));
54
+ /* $fieldset->addField('nbanners_effect', 'select', array(
55
+ 'label' => Mage::helper('nbanners')->__('Effect'),
56
+ 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray6(),
57
+ 'name' => 'nbanners_effect',
58
+ ));
59
+ $fieldset->addField('nbanners_show_pag', 'select', array(
60
+ 'label' => Mage::helper('nbanners')->__('Show Pagination'),
61
+ 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray8(),
62
+ 'name' => 'nbanners_show_pag',
63
+ ));
64
+ $fieldset->addField('nbanners_show_pr_next', 'select', array(
65
+ 'label' => Mage::helper('nbanners')->__('Show Pr Next'),
66
+ 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray9(),
67
+ 'name' => 'nbanners_show_pr_next',
68
+ )); */
69
+ $fieldset->addField('nbanners_image', 'image', array(
70
+ 'label' => Mage::helper('nbanners')->__('Banner Image'),
71
+ 'name' => 'nbanners_image',
72
+ 'note' => '(*.jpg, *.png, *.gif)',
73
+ ));
74
+ $fieldset->addField('nbanners_status', 'select', array(
75
+ 'label' => Mage::helper('nbanners')->__('Status'),
76
+ 'values' => Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getValueArray11(),
77
+ 'name' => 'nbanners_status',
78
+ "class" => "required-entry",
79
+ "required" => true,
80
+ ));
81
+
82
+ if (Mage::getSingleton("adminhtml/session")->getNbannersData())
83
+ {
84
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getNbannersData());
85
+ Mage::getSingleton("adminhtml/session")->setNbannersData(null);
86
+ }
87
+ elseif(Mage::registry("nbanners_data")) {
88
+ $form->setValues(Mage::registry("nbanners_data")->getData());
89
+ }
90
+ return parent::_prepareForm();
91
+ }
92
+ }
app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Edit/Tabs.php CHANGED
@@ -1,32 +1,32 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
14
- {
15
- public function __construct()
16
- {
17
- parent::__construct();
18
- $this->setId("nbanners_tabs");
19
- $this->setDestElementId("edit_form");
20
- $this->setTitle(Mage::helper("nbanners")->__("Item Information"));
21
- }
22
- protected function _beforeToHtml()
23
- {
24
- $this->addTab("form_section", array(
25
- "label" => Mage::helper("nbanners")->__("Item Information"),
26
- "title" => Mage::helper("nbanners")->__("Item Information"),
27
- "content" => $this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit_tab_form")->toHtml(),
28
- ));
29
- return parent::_beforeToHtml();
30
- }
31
-
32
- }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Adminhtml_Nbanners_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
14
+ {
15
+ public function __construct()
16
+ {
17
+ parent::__construct();
18
+ $this->setId("nbanners_tabs");
19
+ $this->setDestElementId("edit_form");
20
+ $this->setTitle(Mage::helper("nbanners")->__("Item Information"));
21
+ }
22
+ protected function _beforeToHtml()
23
+ {
24
+ $this->addTab("form_section", array(
25
+ "label" => Mage::helper("nbanners")->__("Item Information"),
26
+ "title" => Mage::helper("nbanners")->__("Item Information"),
27
+ "content" => $this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit_tab_form")->toHtml(),
28
+ ));
29
+ return parent::_beforeToHtml();
30
+ }
31
+
32
+ }
app/code/community/Netgo/Nbanners/Block/Adminhtml/Nbanners/Grid.php CHANGED
@@ -1,208 +1,208 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid extends Mage_Adminhtml_Block_Widget_Grid
14
- {
15
-
16
- public function __construct()
17
- {
18
- parent::__construct();
19
- $this->setId("nbannersGrid");
20
- $this->setDefaultSort("nbanners_id");
21
- $this->setDefaultDir("DESC");
22
- $this->setSaveParametersInSession(true);
23
- }
24
-
25
- protected function _prepareCollection()
26
- {
27
- $collection = Mage::getModel("nbanners/nbanners")->getCollection();
28
- $this->setCollection($collection);
29
- return parent::_prepareCollection();
30
- }
31
- protected function _prepareColumns()
32
- {
33
- $this->addColumn("nbanners_id", array(
34
- "header" => Mage::helper("nbanners")->__("ID"),
35
- "align" =>"right",
36
- "width" => "50px",
37
- "type" => "number",
38
- "index" => "nbanners_id",
39
- ));
40
-
41
- $this->addColumn("nbannergroup", array(
42
- "header" => Mage::helper("nbanners")->__("Group"),
43
- "index" => "nbannergroup",
44
- ));
45
- $this->addColumn("nbanners_name", array(
46
- "header" => Mage::helper("nbanners")->__("Name"),
47
- "index" => "nbanners_name",
48
- ));
49
- $this->addColumn("nbanners_alt", array(
50
- "header" => Mage::helper("nbanners")->__("Alt text"),
51
- "index" => "nbanners_alt",
52
- ));
53
- $this->addColumn('nbanners_cap_pos', array(
54
- 'header' => Mage::helper('nbanners')->__('Caption Position'),
55
- 'index' => 'nbanners_cap_pos',
56
- 'type' => 'options',
57
- 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray5(),
58
- ));
59
-
60
- /*$this->addColumn('nbanners_effect', array(
61
- 'header' => Mage::helper('nbanners')->__('Effect'),
62
- 'index' => 'nbanners_effect',
63
- 'type' => 'options',
64
- 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray6(),
65
- ));
66
-
67
- $this->addColumn('nbanners_show_pag', array(
68
- 'header' => Mage::helper('nbanners')->__('Show Pagination'),
69
- 'index' => 'nbanners_show_pag',
70
- 'type' => 'options',
71
- 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray8(),
72
- ));
73
-
74
- $this->addColumn('nbanners_show_pr_next', array(
75
- 'header' => Mage::helper('nbanners')->__('Show Pr Next'),
76
- 'index' => 'nbanners_show_pr_next',
77
- 'type' => 'options',
78
- 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray9(),
79
- ));*/
80
-
81
- $this->addColumn('nbanners_status', array(
82
- 'header' => Mage::helper('nbanners')->__('Status'),
83
- 'index' => 'nbanners_status',
84
- 'type' => 'options',
85
- 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray11(),
86
- ));
87
-
88
- $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
89
- $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
90
-
91
- return parent::_prepareColumns();
92
- }
93
-
94
- public function getRowUrl($row)
95
- {
96
- return $this->getUrl("*/*/edit", array("id" => $row->getId()));
97
- }
98
-
99
-
100
-
101
- protected function _prepareMassaction()
102
- {
103
- $this->setMassactionIdField('nbanners_id');
104
- $this->getMassactionBlock()->setFormFieldName('nbanners_ids');
105
- $this->getMassactionBlock()->setUseSelectAll(true);
106
- $this->getMassactionBlock()->addItem('remove_nbanners', array(
107
- 'label'=> Mage::helper('nbanners')->__('Remove Nbanners'),
108
- 'url' => $this->getUrl('*/adminhtml_nbanners/massRemove'),
109
- 'confirm' => Mage::helper('nbanners')->__('Are you sure?')
110
- ));
111
- return $this;
112
- }
113
-
114
- static public function getOptionArray5()
115
- {
116
- $data_array=array();
117
- $data_array[0]='Position1';
118
- $data_array[1]='Position2';
119
- $data_array[2]='Position3';
120
- $data_array[3]='Position4';
121
- $data_array[4]='Position5';
122
- $data_array[5]='Position6';
123
- return($data_array);
124
- }
125
- static public function getValueArray5()
126
- {
127
- $data_array=array();
128
- foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray5() as $k=>$v){
129
- $data_array[]=array('value'=>$k,'label'=>$v);
130
- }
131
- return($data_array);
132
-
133
- }
134
-
135
- static public function getOptionArray6()
136
- {
137
- $data_array=array();
138
- $data_array[0]='Effect1';
139
- $data_array[1]='Effect2';
140
- $data_array[2]='Effect3';
141
- $data_array[3]='Effect4';
142
- $data_array[4]='Effect5';
143
- $data_array[5]='Effect6';
144
- return($data_array);
145
- }
146
- static public function getValueArray6()
147
- {
148
- $data_array=array();
149
- foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray6() as $k=>$v){
150
- $data_array[]=array('value'=>$k,'label'=>$v);
151
- }
152
- return($data_array);
153
-
154
- }
155
-
156
- static public function getOptionArray8()
157
- {
158
- $data_array=array();
159
- $data_array[0]='No';
160
- $data_array[1]='Yes';
161
- return($data_array);
162
- }
163
- static public function getValueArray8()
164
- {
165
- $data_array=array();
166
- foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray8() as $k=>$v){
167
- $data_array[]=array('value'=>$k,'label'=>$v);
168
- }
169
- return($data_array);
170
-
171
- }
172
-
173
- static public function getOptionArray9()
174
- {
175
- $data_array=array();
176
- $data_array[0]='No';
177
- $data_array[1]='Yes';
178
- return($data_array);
179
- }
180
- static public function getValueArray9()
181
- {
182
- $data_array=array();
183
- foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray9() as $k=>$v){
184
- $data_array[]=array('value'=>$k,'label'=>$v);
185
- }
186
- return($data_array);
187
-
188
- }
189
-
190
- static public function getOptionArray11()
191
- {
192
- $data_array=array();
193
- $data_array[0]='Disable';
194
- $data_array[1]='Enable';
195
- return($data_array);
196
- }
197
- static public function getValueArray11()
198
- {
199
- $data_array=array();
200
- foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray11() as $k=>$v){
201
- $data_array[]=array('value'=>$k,'label'=>$v);
202
- }
203
- return($data_array);
204
-
205
- }
206
-
207
-
208
  }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid extends Mage_Adminhtml_Block_Widget_Grid
14
+ {
15
+
16
+ public function __construct()
17
+ {
18
+ parent::__construct();
19
+ $this->setId("nbannersGrid");
20
+ $this->setDefaultSort("nbanners_id");
21
+ $this->setDefaultDir("DESC");
22
+ $this->setSaveParametersInSession(true);
23
+ }
24
+
25
+ protected function _prepareCollection()
26
+ {
27
+ $collection = Mage::getModel("nbanners/nbanners")->getCollection();
28
+ $this->setCollection($collection);
29
+ return parent::_prepareCollection();
30
+ }
31
+ protected function _prepareColumns()
32
+ {
33
+ $this->addColumn("nbanners_id", array(
34
+ "header" => Mage::helper("nbanners")->__("ID"),
35
+ "align" =>"right",
36
+ "width" => "50px",
37
+ "type" => "number",
38
+ "index" => "nbanners_id",
39
+ ));
40
+
41
+ $this->addColumn("nbannergroup", array(
42
+ "header" => Mage::helper("nbanners")->__("Group"),
43
+ "index" => "nbannergroup",
44
+ ));
45
+ $this->addColumn("nbanners_name", array(
46
+ "header" => Mage::helper("nbanners")->__("Name"),
47
+ "index" => "nbanners_name",
48
+ ));
49
+ $this->addColumn("nbanners_alt", array(
50
+ "header" => Mage::helper("nbanners")->__("Alt text"),
51
+ "index" => "nbanners_alt",
52
+ ));
53
+ $this->addColumn('nbanners_cap_pos', array(
54
+ 'header' => Mage::helper('nbanners')->__('Caption Position'),
55
+ 'index' => 'nbanners_cap_pos',
56
+ 'type' => 'options',
57
+ 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray5(),
58
+ ));
59
+
60
+ /*$this->addColumn('nbanners_effect', array(
61
+ 'header' => Mage::helper('nbanners')->__('Effect'),
62
+ 'index' => 'nbanners_effect',
63
+ 'type' => 'options',
64
+ 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray6(),
65
+ ));
66
+
67
+ $this->addColumn('nbanners_show_pag', array(
68
+ 'header' => Mage::helper('nbanners')->__('Show Pagination'),
69
+ 'index' => 'nbanners_show_pag',
70
+ 'type' => 'options',
71
+ 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray8(),
72
+ ));
73
+
74
+ $this->addColumn('nbanners_show_pr_next', array(
75
+ 'header' => Mage::helper('nbanners')->__('Show Pr Next'),
76
+ 'index' => 'nbanners_show_pr_next',
77
+ 'type' => 'options',
78
+ 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray9(),
79
+ ));*/
80
+
81
+ $this->addColumn('nbanners_status', array(
82
+ 'header' => Mage::helper('nbanners')->__('Status'),
83
+ 'index' => 'nbanners_status',
84
+ 'type' => 'options',
85
+ 'options'=>Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray11(),
86
+ ));
87
+
88
+ $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
89
+ $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
90
+
91
+ return parent::_prepareColumns();
92
+ }
93
+
94
+ public function getRowUrl($row)
95
+ {
96
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
97
+ }
98
+
99
+
100
+
101
+ protected function _prepareMassaction()
102
+ {
103
+ $this->setMassactionIdField('nbanners_id');
104
+ $this->getMassactionBlock()->setFormFieldName('nbanners_ids');
105
+ $this->getMassactionBlock()->setUseSelectAll(true);
106
+ $this->getMassactionBlock()->addItem('remove_nbanners', array(
107
+ 'label'=> Mage::helper('nbanners')->__('Remove Nbanners'),
108
+ 'url' => $this->getUrl('*/adminhtml_nbanners/massRemove'),
109
+ 'confirm' => Mage::helper('nbanners')->__('Are you sure?')
110
+ ));
111
+ return $this;
112
+ }
113
+
114
+ static public function getOptionArray5()
115
+ {
116
+ $data_array=array();
117
+ $data_array[0]='Position1';
118
+ $data_array[1]='Position2';
119
+ $data_array[2]='Position3';
120
+ $data_array[3]='Position4';
121
+ $data_array[4]='Position5';
122
+ $data_array[5]='Position6';
123
+ return($data_array);
124
+ }
125
+ static public function getValueArray5()
126
+ {
127
+ $data_array=array();
128
+ foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray5() as $k=>$v){
129
+ $data_array[]=array('value'=>$k,'label'=>$v);
130
+ }
131
+ return($data_array);
132
+
133
+ }
134
+
135
+ static public function getOptionArray6()
136
+ {
137
+ $data_array=array();
138
+ $data_array[0]='Effect1';
139
+ $data_array[1]='Effect2';
140
+ $data_array[2]='Effect3';
141
+ $data_array[3]='Effect4';
142
+ $data_array[4]='Effect5';
143
+ $data_array[5]='Effect6';
144
+ return($data_array);
145
+ }
146
+ static public function getValueArray6()
147
+ {
148
+ $data_array=array();
149
+ foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray6() as $k=>$v){
150
+ $data_array[]=array('value'=>$k,'label'=>$v);
151
+ }
152
+ return($data_array);
153
+
154
+ }
155
+
156
+ static public function getOptionArray8()
157
+ {
158
+ $data_array=array();
159
+ $data_array[0]='No';
160
+ $data_array[1]='Yes';
161
+ return($data_array);
162
+ }
163
+ static public function getValueArray8()
164
+ {
165
+ $data_array=array();
166
+ foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray8() as $k=>$v){
167
+ $data_array[]=array('value'=>$k,'label'=>$v);
168
+ }
169
+ return($data_array);
170
+
171
+ }
172
+
173
+ static public function getOptionArray9()
174
+ {
175
+ $data_array=array();
176
+ $data_array[0]='No';
177
+ $data_array[1]='Yes';
178
+ return($data_array);
179
+ }
180
+ static public function getValueArray9()
181
+ {
182
+ $data_array=array();
183
+ foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray9() as $k=>$v){
184
+ $data_array[]=array('value'=>$k,'label'=>$v);
185
+ }
186
+ return($data_array);
187
+
188
+ }
189
+
190
+ static public function getOptionArray11()
191
+ {
192
+ $data_array=array();
193
+ $data_array[0]='Disable';
194
+ $data_array[1]='Enable';
195
+ return($data_array);
196
+ }
197
+ static public function getValueArray11()
198
+ {
199
+ $data_array=array();
200
+ foreach(Netgo_Nbanners_Block_Adminhtml_Nbanners_Grid::getOptionArray11() as $k=>$v){
201
+ $data_array[]=array('value'=>$k,'label'=>$v);
202
+ }
203
+ return($data_array);
204
+
205
+ }
206
+
207
+
208
  }
app/code/community/Netgo/Nbanners/Block/Index.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Index extends Mage_Core_Block_Template{
14
-
15
-
16
- public function __construct()
17
- {
18
- parent::__construct();
19
- }
20
-
21
- public function getSliderCollection()
22
- {
23
-
24
-
25
- $collection = Mage::getModel('nbanners/nbanners')->getCollection();
26
- $collection->addFieldToFilter('nbanners_status', 1);
27
- $collection->addFieldToFilter('nbannergroup', $this->getGroup());
28
- return $collection;
29
-
30
- }
31
  }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Index extends Mage_Core_Block_Template{
14
+
15
+
16
+ public function __construct()
17
+ {
18
+ parent::__construct();
19
+ }
20
+
21
+ public function getSliderCollection()
22
+ {
23
+
24
+
25
+ $collection = Mage::getModel('nbanners/nbanners')->getCollection();
26
+ $collection->addFieldToFilter('nbanners_status', 1);
27
+ $collection->addFieldToFilter('nbannergroup', $this->getGroup());
28
+ return $collection;
29
+
30
+ }
31
  }
app/code/community/Netgo/Nbanners/Block/Left.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Block_Left extends Mage_Core_Block_Template{
14
-
15
  }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Block_Left extends Mage_Core_Block_Template{
14
+
15
  }
app/code/community/Netgo/Nbanners/Helper/Data.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Helper_Data extends Mage_Core_Helper_Abstract
14
- {
15
-
16
- public function enabledisable(){
17
- $enableDisableValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/status', Mage::app()->getStore());
18
- return $enableDisableValue;
19
-
20
- }
21
- /*public function enablejquery(){
22
- $enableJqueryValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/enablejquery', Mage::app()->getStore());
23
- return $enableJqueryValue;
24
-
25
- }*/
26
- public function showpagination(){
27
- $paginationValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/pagination', Mage::app()->getStore());
28
- return $paginationValue;
29
-
30
- }
31
- public function effecttype(){
32
- $effectValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/effect', Mage::app()->getStore());
33
- return $effectValue;
34
-
35
- }
36
- /*public function pauseonhover(){
37
- $pauseonhoverValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/pauseonhover', Mage::app()->getStore());
38
- return $pauseonhoverValue;
39
-
40
- }*/
41
- public function sliderspeed(){
42
- $speedValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/speed', Mage::app()->getStore());
43
- return $speedValue;
44
-
45
- }
46
- }
47
 
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Helper_Data extends Mage_Core_Helper_Abstract
14
+ {
15
+
16
+ public function enabledisable(){
17
+ $enableDisableValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/status', Mage::app()->getStore());
18
+ return $enableDisableValue;
19
+
20
+ }
21
+ /*public function enablejquery(){
22
+ $enableJqueryValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/enablejquery', Mage::app()->getStore());
23
+ return $enableJqueryValue;
24
+
25
+ }*/
26
+ public function showpagination(){
27
+ $paginationValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/pagination', Mage::app()->getStore());
28
+ return $paginationValue;
29
+
30
+ }
31
+ public function effecttype(){
32
+ $effectValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/effect', Mage::app()->getStore());
33
+ return $effectValue;
34
+
35
+ }
36
+ /*public function pauseonhover(){
37
+ $pauseonhoverValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/pauseonhover', Mage::app()->getStore());
38
+ return $pauseonhoverValue;
39
+
40
+ }*/
41
+ public function sliderspeed(){
42
+ $speedValue = Mage::getStoreConfig('netgo_nbanners/netgo_nbanners_group/speed', Mage::app()->getStore());
43
+ return $speedValue;
44
+
45
+ }
46
+ }
47
 
app/code/community/Netgo/Nbanners/Model/Adminhtml/System/Config/Source/Effects.php CHANGED
@@ -1,27 +1,27 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Model_Adminhtml_System_Config_Source_Effects
14
- {
15
- public function toOptionArray()
16
- {
17
- $effects = array(
18
- array('value' => 'scrollHorz', 'label' => 'Scroll Horizontal'),
19
- array('value' => 'scrollVert', 'label' => 'Scroll Vertical'),
20
- array('value' => 'shuffle', 'label' => 'Shuffle'),
21
- array('value' => 'fade', 'label' => 'Fade'),
22
- array('value' => 'scrollUp', 'label' => 'Scroll Up'),
23
- );
24
-
25
- return $effects;
26
- }
27
- }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Model_Adminhtml_System_Config_Source_Effects
14
+ {
15
+ public function toOptionArray()
16
+ {
17
+ $effects = array(
18
+ array('value' => 'scrollHorz', 'label' => 'Scroll Horizontal'),
19
+ array('value' => 'scrollVert', 'label' => 'Scroll Vertical'),
20
+ array('value' => 'shuffle', 'label' => 'Shuffle'),
21
+ array('value' => 'fade', 'label' => 'Fade'),
22
+ array('value' => 'scrollUp', 'label' => 'Scroll Up'),
23
+ );
24
+
25
+ return $effects;
26
+ }
27
+ }
app/code/community/Netgo/Nbanners/Model/Mysql4/Nbanners.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Model_Mysql4_Nbanners extends Mage_Core_Model_Mysql4_Abstract
14
- {
15
- protected function _construct()
16
- {
17
- $this->_init("nbanners/nbanners", "nbanners_id");
18
- }
19
  }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Model_Mysql4_Nbanners extends Mage_Core_Model_Mysql4_Abstract
14
+ {
15
+ protected function _construct()
16
+ {
17
+ $this->_init("nbanners/nbanners", "nbanners_id");
18
+ }
19
  }
app/code/community/Netgo/Nbanners/Model/Mysql4/Nbanners/Collection.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Model_Mysql4_Nbanners_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
14
- {
15
-
16
- public function _construct(){
17
- $this->_init("nbanners/nbanners");
18
- }
19
-
20
-
21
-
22
- }
23
 
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Model_Mysql4_Nbanners_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
14
+ {
15
+
16
+ public function _construct(){
17
+ $this->_init("nbanners/nbanners");
18
+ }
19
+
20
+
21
+
22
+ }
23
 
app/code/community/Netgo/Nbanners/Model/Nbanners.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Model_Nbanners extends Mage_Core_Model_Abstract
14
- {
15
- protected function _construct(){
16
-
17
- $this->_init("nbanners/nbanners");
18
-
19
- }
20
-
21
- }
22
 
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Model_Nbanners extends Mage_Core_Model_Abstract
14
+ {
15
+ protected function _construct(){
16
+
17
+ $this->_init("nbanners/nbanners");
18
+
19
+ }
20
+
21
+ }
22
 
app/code/community/Netgo/Nbanners/controllers/Adminhtml/NbannersController.php CHANGED
@@ -1,219 +1,219 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_Adminhtml_NbannersController extends Mage_Adminhtml_Controller_Action
14
- {
15
- protected function _initAction()
16
- {
17
- $this->loadLayout()->_setActiveMenu("nbanners/nbanners")->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Manager"),Mage::helper("adminhtml")->__("Nbanners Manager"));
18
- return $this;
19
- }
20
- public function indexAction()
21
- {
22
- $this->_title($this->__("Nbanners"));
23
- $this->_title($this->__("Manager Nbanners"));
24
-
25
- $this->_initAction();
26
- $this->renderLayout();
27
- }
28
- public function editAction()
29
- {
30
- $this->_title($this->__("Nbanners"));
31
- $this->_title($this->__("Nbanners"));
32
- $this->_title($this->__("Edit Item"));
33
-
34
- $id = $this->getRequest()->getParam("id");
35
- $model = Mage::getModel("nbanners/nbanners")->load($id);
36
- if ($model->getId()) {
37
- Mage::register("nbanners_data", $model);
38
- $this->loadLayout();
39
- $this->_setActiveMenu("nbanners/nbanners");
40
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Manager"), Mage::helper("adminhtml")->__("Nbanners Manager"));
41
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Description"), Mage::helper("adminhtml")->__("Nbanners Description"));
42
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
43
- $this->_addContent($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit"))->_addLeft($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit_tabs"));
44
- $this->renderLayout();
45
- }
46
- else {
47
- Mage::getSingleton("adminhtml/session")->addError(Mage::helper("nbanners")->__("Item does not exist."));
48
- $this->_redirect("*/*/");
49
- }
50
- }
51
-
52
- public function newAction()
53
- {
54
-
55
- $this->_title($this->__("Nbanners"));
56
- $this->_title($this->__("Nbanners"));
57
- $this->_title($this->__("New Item"));
58
-
59
- $id = $this->getRequest()->getParam("id");
60
- $model = Mage::getModel("nbanners/nbanners")->load($id);
61
-
62
- $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
63
- if (!empty($data)) {
64
- $model->setData($data);
65
- }
66
-
67
- Mage::register("nbanners_data", $model);
68
-
69
- $this->loadLayout();
70
- $this->_setActiveMenu("nbanners/nbanners");
71
-
72
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
73
-
74
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Manager"), Mage::helper("adminhtml")->__("Nbanners Manager"));
75
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Description"), Mage::helper("adminhtml")->__("Nbanners Description"));
76
-
77
-
78
- $this->_addContent($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit"))->_addLeft($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit_tabs"));
79
-
80
- $this->renderLayout();
81
-
82
- }
83
- public function saveAction()
84
- {
85
-
86
- $post_data=$this->getRequest()->getPost();
87
-
88
-
89
- if ($post_data) {
90
-
91
- try {
92
-
93
-
94
- //save image
95
- try{
96
-
97
- if((bool)$post_data['nbanners_image']['delete']==1) {
98
-
99
- $post_data['nbanners_image']='';
100
-
101
- }
102
- else {
103
-
104
- unset($post_data['nbanners_image']);
105
-
106
- if (isset($_FILES)){
107
-
108
- if ($_FILES['nbanners_image']['name']) {
109
-
110
- if($this->getRequest()->getParam("id")){
111
- $model = Mage::getModel("nbanners/nbanners")->load($this->getRequest()->getParam("id"));
112
- if($model->getData('nbanners_image')){
113
- $io = new Varien_Io_File();
114
- $io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('nbanners_image'))));
115
- }
116
- }
117
- $path = Mage::getBaseDir('media') . DS . 'nbanners' . DS .'nbanners'.DS;
118
- $uploader = new Varien_File_Uploader('nbanners_image');
119
- $uploader->setAllowedExtensions(array('jpg','png','gif'));
120
- $uploader->setAllowRenameFiles(false);
121
- $uploader->setFilesDispersion(false);
122
- $destFile = $path.$_FILES['nbanners_image']['name'];
123
- $filename = $uploader->getNewFileName($destFile);
124
- $uploader->save($path, $filename);
125
-
126
- $post_data['nbanners_image']='nbanners/nbanners/'.$filename;
127
- }
128
- }
129
- }
130
-
131
- } catch (Exception $e) {
132
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
133
- $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
134
- return;
135
- }
136
- //save image
137
-
138
-
139
- $model = Mage::getModel("nbanners/nbanners")
140
- ->addData($post_data)
141
- ->setId($this->getRequest()->getParam("id"))
142
- ->save();
143
-
144
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Nbanners was successfully saved"));
145
- Mage::getSingleton("adminhtml/session")->setNbannersData(false);
146
-
147
- if ($this->getRequest()->getParam("back")) {
148
- $this->_redirect("*/*/edit", array("id" => $model->getId()));
149
- return;
150
- }
151
- $this->_redirect("*/*/");
152
- return;
153
- }
154
- catch (Exception $e) {
155
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
156
- Mage::getSingleton("adminhtml/session")->setNbannersData($this->getRequest()->getPost());
157
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
158
- return;
159
- }
160
-
161
- }
162
- $this->_redirect("*/*/");
163
- }
164
-
165
-
166
-
167
- public function deleteAction()
168
- {
169
- if( $this->getRequest()->getParam("id") > 0 ) {
170
- try {
171
- $model = Mage::getModel("nbanners/nbanners");
172
- $model->setId($this->getRequest()->getParam("id"))->delete();
173
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
174
- $this->_redirect("*/*/");
175
- }
176
- catch (Exception $e) {
177
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
178
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
179
- }
180
- }
181
- $this->_redirect("*/*/");
182
- }
183
-
184
-
185
- public function massRemoveAction()
186
- {
187
- try {
188
- $ids = $this->getRequest()->getPost('nbanners_ids', array());
189
- foreach ($ids as $id) {
190
- $model = Mage::getModel("nbanners/nbanners");
191
- $model->setId($id)->delete();
192
- }
193
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
194
- }
195
- catch (Exception $e) {
196
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
197
- }
198
- $this->_redirect('*/*/');
199
- }
200
-
201
- /**
202
- * Export order grid to CSV format
203
- */
204
- public function exportCsvAction()
205
- {
206
- $fileName = 'nbanners.csv';
207
- $grid = $this->getLayout()->createBlock('nbanners/adminhtml_nbanners_grid');
208
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
209
- }
210
- /**
211
- * Export order grid to Excel XML format
212
- */
213
- public function exportExcelAction()
214
- {
215
- $fileName = 'nbanners.xml';
216
- $grid = $this->getLayout()->createBlock('nbanners/adminhtml_nbanners_grid');
217
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
218
- }
219
- }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_Adminhtml_NbannersController extends Mage_Adminhtml_Controller_Action
14
+ {
15
+ protected function _initAction()
16
+ {
17
+ $this->loadLayout()->_setActiveMenu("nbanners/nbanners")->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Manager"),Mage::helper("adminhtml")->__("Nbanners Manager"));
18
+ return $this;
19
+ }
20
+ public function indexAction()
21
+ {
22
+ $this->_title($this->__("Nbanners"));
23
+ $this->_title($this->__("Manager Nbanners"));
24
+
25
+ $this->_initAction();
26
+ $this->renderLayout();
27
+ }
28
+ public function editAction()
29
+ {
30
+ $this->_title($this->__("Nbanners"));
31
+ $this->_title($this->__("Nbanners"));
32
+ $this->_title($this->__("Edit Item"));
33
+
34
+ $id = $this->getRequest()->getParam("id");
35
+ $model = Mage::getModel("nbanners/nbanners")->load($id);
36
+ if ($model->getId()) {
37
+ Mage::register("nbanners_data", $model);
38
+ $this->loadLayout();
39
+ $this->_setActiveMenu("nbanners/nbanners");
40
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Manager"), Mage::helper("adminhtml")->__("Nbanners Manager"));
41
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Description"), Mage::helper("adminhtml")->__("Nbanners Description"));
42
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
43
+ $this->_addContent($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit"))->_addLeft($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit_tabs"));
44
+ $this->renderLayout();
45
+ }
46
+ else {
47
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("nbanners")->__("Item does not exist."));
48
+ $this->_redirect("*/*/");
49
+ }
50
+ }
51
+
52
+ public function newAction()
53
+ {
54
+
55
+ $this->_title($this->__("Nbanners"));
56
+ $this->_title($this->__("Nbanners"));
57
+ $this->_title($this->__("New Item"));
58
+
59
+ $id = $this->getRequest()->getParam("id");
60
+ $model = Mage::getModel("nbanners/nbanners")->load($id);
61
+
62
+ $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
63
+ if (!empty($data)) {
64
+ $model->setData($data);
65
+ }
66
+
67
+ Mage::register("nbanners_data", $model);
68
+
69
+ $this->loadLayout();
70
+ $this->_setActiveMenu("nbanners/nbanners");
71
+
72
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
73
+
74
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Manager"), Mage::helper("adminhtml")->__("Nbanners Manager"));
75
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Nbanners Description"), Mage::helper("adminhtml")->__("Nbanners Description"));
76
+
77
+
78
+ $this->_addContent($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit"))->_addLeft($this->getLayout()->createBlock("nbanners/adminhtml_nbanners_edit_tabs"));
79
+
80
+ $this->renderLayout();
81
+
82
+ }
83
+ public function saveAction()
84
+ {
85
+
86
+ $post_data=$this->getRequest()->getPost();
87
+
88
+
89
+ if ($post_data) {
90
+
91
+ try {
92
+
93
+
94
+ //save image
95
+ try{
96
+
97
+ if((bool)$post_data['nbanners_image']['delete']==1) {
98
+
99
+ $post_data['nbanners_image']='';
100
+
101
+ }
102
+ else {
103
+
104
+ unset($post_data['nbanners_image']);
105
+
106
+ if (isset($_FILES)){
107
+
108
+ if ($_FILES['nbanners_image']['name']) {
109
+
110
+ if($this->getRequest()->getParam("id")){
111
+ $model = Mage::getModel("nbanners/nbanners")->load($this->getRequest()->getParam("id"));
112
+ if($model->getData('nbanners_image')){
113
+ $io = new Varien_Io_File();
114
+ $io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('nbanners_image'))));
115
+ }
116
+ }
117
+ $path = Mage::getBaseDir('media') . DS . 'nbanners' . DS .'nbanners'.DS;
118
+ $uploader = new Varien_File_Uploader('nbanners_image');
119
+ $uploader->setAllowedExtensions(array('jpg','png','gif'));
120
+ $uploader->setAllowRenameFiles(false);
121
+ $uploader->setFilesDispersion(false);
122
+ $destFile = $path.$_FILES['nbanners_image']['name'];
123
+ $filename = $uploader->getNewFileName($destFile);
124
+ $uploader->save($path, $filename);
125
+
126
+ $post_data['nbanners_image']='nbanners/nbanners/'.$filename;
127
+ }
128
+ }
129
+ }
130
+
131
+ } catch (Exception $e) {
132
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
133
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
134
+ return;
135
+ }
136
+ //save image
137
+
138
+
139
+ $model = Mage::getModel("nbanners/nbanners")
140
+ ->addData($post_data)
141
+ ->setId($this->getRequest()->getParam("id"))
142
+ ->save();
143
+
144
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Nbanners was successfully saved"));
145
+ Mage::getSingleton("adminhtml/session")->setNbannersData(false);
146
+
147
+ if ($this->getRequest()->getParam("back")) {
148
+ $this->_redirect("*/*/edit", array("id" => $model->getId()));
149
+ return;
150
+ }
151
+ $this->_redirect("*/*/");
152
+ return;
153
+ }
154
+ catch (Exception $e) {
155
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
156
+ Mage::getSingleton("adminhtml/session")->setNbannersData($this->getRequest()->getPost());
157
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
158
+ return;
159
+ }
160
+
161
+ }
162
+ $this->_redirect("*/*/");
163
+ }
164
+
165
+
166
+
167
+ public function deleteAction()
168
+ {
169
+ if( $this->getRequest()->getParam("id") > 0 ) {
170
+ try {
171
+ $model = Mage::getModel("nbanners/nbanners");
172
+ $model->setId($this->getRequest()->getParam("id"))->delete();
173
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
174
+ $this->_redirect("*/*/");
175
+ }
176
+ catch (Exception $e) {
177
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
178
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
179
+ }
180
+ }
181
+ $this->_redirect("*/*/");
182
+ }
183
+
184
+
185
+ public function massRemoveAction()
186
+ {
187
+ try {
188
+ $ids = $this->getRequest()->getPost('nbanners_ids', array());
189
+ foreach ($ids as $id) {
190
+ $model = Mage::getModel("nbanners/nbanners");
191
+ $model->setId($id)->delete();
192
+ }
193
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
194
+ }
195
+ catch (Exception $e) {
196
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
197
+ }
198
+ $this->_redirect('*/*/');
199
+ }
200
+
201
+ /**
202
+ * Export order grid to CSV format
203
+ */
204
+ public function exportCsvAction()
205
+ {
206
+ $fileName = 'nbanners.csv';
207
+ $grid = $this->getLayout()->createBlock('nbanners/adminhtml_nbanners_grid');
208
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
209
+ }
210
+ /**
211
+ * Export order grid to Excel XML format
212
+ */
213
+ public function exportExcelAction()
214
+ {
215
+ $fileName = 'nbanners.xml';
216
+ $grid = $this->getLayout()->createBlock('nbanners/adminhtml_nbanners_grid');
217
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
218
+ }
219
+ }
app/code/community/Netgo/Nbanners/controllers/IndexController.php CHANGED
@@ -1,39 +1,34 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- class Netgo_Nbanners_IndexController extends Mage_Core_Controller_Front_Action{
14
- /**
15
- * @access Public
16
- * @author Vipin
17
- * @dev 77vips@gmail.com
18
- * @output NA
19
- */
20
- public function IndexAction() {
21
-
22
- $this->loadLayout();
23
- $this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
24
- $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
25
- $breadcrumbs->addCrumb("home", array(
26
- "label" => $this->__("Home Page"),
27
- "title" => $this->__("Home Page"),
28
- "link" => Mage::getBaseUrl()
29
- ));
30
-
31
- $breadcrumbs->addCrumb("titlename", array(
32
- "label" => $this->__("Titlename"),
33
- "title" => $this->__("Titlename")
34
- ));
35
-
36
- $this->renderLayout();
37
-
38
- }
39
  }
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ class Netgo_Nbanners_IndexController extends Mage_Core_Controller_Front_Action{
14
+
15
+ public function IndexAction() {
16
+
17
+ $this->loadLayout();
18
+ $this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
19
+ $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
20
+ $breadcrumbs->addCrumb("home", array(
21
+ "label" => $this->__("Home Page"),
22
+ "title" => $this->__("Home Page"),
23
+ "link" => Mage::getBaseUrl()
24
+ ));
25
+
26
+ $breadcrumbs->addCrumb("titlename", array(
27
+ "label" => $this->__("Titlename"),
28
+ "title" => $this->__("Titlename")
29
+ ));
30
+
31
+ $this->renderLayout();
32
+
33
+ }
 
 
 
 
 
34
  }
app/code/community/Netgo/Nbanners/etc/adminhtml.xml CHANGED
@@ -1,36 +1,36 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Complete RWD Slider ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Nbanners
10
- * @author Vipin
11
- * @dev 77vips@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_nbanners translate="title" module="nbanners">
25
- <title>Netgo Banners Section</title>
26
- <sort_order>0</sort_order>
27
- </netgo_nbanners>
28
- </children>
29
- </config>
30
- </children>
31
- </system>
32
- </children>
33
- </admin>
34
- </resources>
35
- </acl>
36
  </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /***************************************
4
+ *** Complete RWD Slider ***
5
+ ***************************************
6
+ *
7
+ * @category Netgo
8
+ * @package Netgo_Nbanners
9
+ * @author Afroz Alam <afroz92@gmail.com>
10
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
11
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
12
+ *
13
+ */
14
+ -->
15
+ <config>
16
+ <acl>
17
+ <resources>
18
+ <admin>
19
+ <children>
20
+ <system>
21
+ <children>
22
+ <config>
23
+ <children>
24
+ <netgo_nbanners translate="title" module="nbanners">
25
+ <title>Netgo Banners Section</title>
26
+ <sort_order>0</sort_order>
27
+ </netgo_nbanners>
28
+ </children>
29
+ </config>
30
+ </children>
31
+ </system>
32
+ </children>
33
+ </admin>
34
+ </resources>
35
+ </acl>
36
  </config>
app/code/community/Netgo/Nbanners/etc/config.xml CHANGED
@@ -1,139 +1,139 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Complete RWD Slider ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Nbanners
10
- * @author Vipin
11
- * @dev 77vips@gmail.com
12
- *
13
- */
14
- -->
15
- <config>
16
- <modules>
17
- <Netgo_Nbanners>
18
- <version>1.0.0</version>
19
- </Netgo_Nbanners>
20
- </modules>
21
- <frontend>
22
- <routers>
23
- <nbanners>
24
- <use>standard</use>
25
- <args>
26
- <module>Netgo_Nbanners</module>
27
- <frontName>nbanners</frontName>
28
- </args>
29
- </nbanners>
30
- </routers>
31
- <layout>
32
- <updates>
33
- <nbanners>
34
- <file>nbanners.xml</file>
35
- </nbanners>
36
- </updates>
37
- </layout>
38
- </frontend>
39
- <global>
40
- <helpers>
41
- <nbanners>
42
- <class>Netgo_Nbanners_Helper</class>
43
- </nbanners>
44
- </helpers>
45
- <blocks>
46
- <nbanners>
47
- <class>Netgo_Nbanners_Block</class>
48
- </nbanners>
49
- </blocks>
50
- <models>
51
- <nbanners>
52
- <class>Netgo_Nbanners_Model</class>
53
- <resourceModel>nbanners_mysql4</resourceModel>
54
- </nbanners>
55
- <nbanners_mysql4>
56
- <class>Netgo_Nbanners_Model_Mysql4</class>
57
- <entities>
58
- <nbanners>
59
- <table>nbanners</table>
60
- </nbanners>
61
- </entities>
62
- </nbanners_mysql4>
63
- </models>
64
- <resources>
65
- <nbanners_setup>
66
- <setup>
67
- <module>Netgo_Nbanners</module>
68
- </setup>
69
- <connection>
70
- <use>core_setup</use>
71
- </connection>
72
- </nbanners_setup>
73
- <nbanners_write>
74
- <connection>
75
- <use>core_write</use>
76
- </connection>
77
- </nbanners_write>
78
- <nbanners_read>
79
- <connection>
80
- <use>core_read</use>
81
- </connection>
82
- </nbanners_read>
83
- </resources>
84
- </global>
85
- <admin>
86
- <routers>
87
- <nbanners>
88
- <use>admin</use>
89
- <args>
90
- <module>Netgo_Nbanners</module>
91
- <frontName>admin_nbanners</frontName>
92
- </args>
93
- </nbanners>
94
- </routers>
95
- </admin>
96
- <adminhtml>
97
- <menu>
98
- <nbanners module="nbanners">
99
- <title>Nbanners</title>
100
- <sort_order>100</sort_order>
101
- <children>
102
- <nbanners module="nbanners">
103
- <title>Manage Nbanners</title>
104
- <sort_order>0</sort_order>
105
- <action>admin_nbanners/adminhtml_nbanners</action>
106
- </nbanners>
107
- </children>
108
- </nbanners>
109
- </menu>
110
- <acl>
111
- <resources>
112
- <all>
113
- <title>Allow Everything</title>
114
- </all>
115
- <admin>
116
- <children>
117
- <nbanners translate="title" module="nbanners">
118
- <title>Nbanners</title>
119
- <sort_order>1000</sort_order>
120
- <children>
121
- <nbanners translate="title">
122
- <title>Manage Nbanners</title>
123
- <sort_order>0</sort_order>
124
- </nbanners>
125
- </children>
126
- </nbanners>
127
- </children>
128
- </admin>
129
- </resources>
130
- </acl>
131
- <layout>
132
- <updates>
133
- <nbanners>
134
- <file>nbanners.xml</file>
135
- </nbanners>
136
- </updates>
137
- </layout>
138
- </adminhtml>
139
  </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /***************************************
4
+ *** Complete RWD Slider ***
5
+ ***************************************
6
+ *
7
+ * @category Netgo
8
+ * @package Netgo_Nbanners
9
+ * @author Afroz Alam <afroz92@gmail.com>
10
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
11
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
12
+ *
13
+ */
14
+ -->
15
+ <config>
16
+ <modules>
17
+ <Netgo_Nbanners>
18
+ <version>1.0.0</version>
19
+ </Netgo_Nbanners>
20
+ </modules>
21
+ <frontend>
22
+ <routers>
23
+ <nbanners>
24
+ <use>standard</use>
25
+ <args>
26
+ <module>Netgo_Nbanners</module>
27
+ <frontName>nbanners</frontName>
28
+ </args>
29
+ </nbanners>
30
+ </routers>
31
+ <layout>
32
+ <updates>
33
+ <nbanners>
34
+ <file>nbanners.xml</file>
35
+ </nbanners>
36
+ </updates>
37
+ </layout>
38
+ </frontend>
39
+ <global>
40
+ <helpers>
41
+ <nbanners>
42
+ <class>Netgo_Nbanners_Helper</class>
43
+ </nbanners>
44
+ </helpers>
45
+ <blocks>
46
+ <nbanners>
47
+ <class>Netgo_Nbanners_Block</class>
48
+ </nbanners>
49
+ </blocks>
50
+ <models>
51
+ <nbanners>
52
+ <class>Netgo_Nbanners_Model</class>
53
+ <resourceModel>nbanners_mysql4</resourceModel>
54
+ </nbanners>
55
+ <nbanners_mysql4>
56
+ <class>Netgo_Nbanners_Model_Mysql4</class>
57
+ <entities>
58
+ <nbanners>
59
+ <table>nbanners</table>
60
+ </nbanners>
61
+ </entities>
62
+ </nbanners_mysql4>
63
+ </models>
64
+ <resources>
65
+ <nbanners_setup>
66
+ <setup>
67
+ <module>Netgo_Nbanners</module>
68
+ </setup>
69
+ <connection>
70
+ <use>core_setup</use>
71
+ </connection>
72
+ </nbanners_setup>
73
+ <nbanners_write>
74
+ <connection>
75
+ <use>core_write</use>
76
+ </connection>
77
+ </nbanners_write>
78
+ <nbanners_read>
79
+ <connection>
80
+ <use>core_read</use>
81
+ </connection>
82
+ </nbanners_read>
83
+ </resources>
84
+ </global>
85
+ <admin>
86
+ <routers>
87
+ <nbanners>
88
+ <use>admin</use>
89
+ <args>
90
+ <module>Netgo_Nbanners</module>
91
+ <frontName>admin_nbanners</frontName>
92
+ </args>
93
+ </nbanners>
94
+ </routers>
95
+ </admin>
96
+ <adminhtml>
97
+ <menu>
98
+ <nbanners module="nbanners">
99
+ <title>Nbanners</title>
100
+ <sort_order>100</sort_order>
101
+ <children>
102
+ <nbanners module="nbanners">
103
+ <title>Manage Nbanners</title>
104
+ <sort_order>0</sort_order>
105
+ <action>admin_nbanners/adminhtml_nbanners</action>
106
+ </nbanners>
107
+ </children>
108
+ </nbanners>
109
+ </menu>
110
+ <acl>
111
+ <resources>
112
+ <all>
113
+ <title>Allow Everything</title>
114
+ </all>
115
+ <admin>
116
+ <children>
117
+ <nbanners translate="title" module="nbanners">
118
+ <title>Nbanners</title>
119
+ <sort_order>1000</sort_order>
120
+ <children>
121
+ <nbanners translate="title">
122
+ <title>Manage Nbanners</title>
123
+ <sort_order>0</sort_order>
124
+ </nbanners>
125
+ </children>
126
+ </nbanners>
127
+ </children>
128
+ </admin>
129
+ </resources>
130
+ </acl>
131
+ <layout>
132
+ <updates>
133
+ <nbanners>
134
+ <file>nbanners.xml</file>
135
+ </nbanners>
136
+ </updates>
137
+ </layout>
138
+ </adminhtml>
139
  </config>
app/code/community/Netgo/Nbanners/etc/system.xml CHANGED
@@ -1,110 +1,110 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Complete RWD Slider ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Nbanners
10
- * @author Vipin
11
- * @dev 77vips@gmail.com
12
- *
13
- */
14
- -->
15
- <config>
16
- <tabs>
17
- <netgo translate="label" module="nbanners">
18
- <label>Netgo</label>
19
- <sort_order>0</sort_order>
20
- </netgo>
21
- </tabs>
22
- <sections>
23
- <netgo_nbanners translate="label" module="nbanners">
24
- <label>Netgo Banners</label>
25
- <tab>netgo</tab>
26
- <frontend_type>text</frontend_type>
27
- <sort_order>0</sort_order>
28
- <show_in_default>1</show_in_default>
29
- <show_in_website>1</show_in_website>
30
- <show_in_store>1</show_in_store>
31
- <groups>
32
- <netgo_nbanners_group translate="label">
33
- <label>Netgo Banners</label>
34
- <frontend_type>text</frontend_type>
35
- <sort_order>0</sort_order>
36
- <show_in_default>1</show_in_default>
37
- <show_in_website>1</show_in_website>
38
- <show_in_store>1</show_in_store>
39
- <!--<fields>
40
- <status translate="label">
41
- <label>Enable/Disable</label>
42
- <frontend_type>select</frontend_type>
43
- <source_model>adminhtml/system_config_source_yesno</source_model>
44
- <sort_order>0</sort_order>
45
- <show_in_default>1</show_in_default>
46
- <show_in_website>1</show_in_website>
47
- <show_in_store>1</show_in_store>
48
- </status>
49
- </fields>
50
-
51
- <fields>
52
- <enablejquery translate="label">
53
- <label>Enable JQuery</label>
54
- <frontend_type>select</frontend_type>
55
- <source_model>adminhtml/system_config_source_yesno</source_model>
56
- <sort_order>1</sort_order>
57
- <show_in_default>1</show_in_default>
58
- <show_in_website>1</show_in_website>
59
- <show_in_store>1</show_in_store>
60
- </enablejquery>
61
- </fields>-->
62
-
63
- <fields>
64
- <pagination translate="label">
65
- <label>Show Pagination</label>
66
- <frontend_type>select</frontend_type>
67
- <source_model>adminhtml/system_config_source_yesno</source_model>
68
- <sort_order>1</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
- </pagination>
73
- </fields>
74
- <fields>
75
- <effect translate="label">
76
- <label>Effect</label>
77
- <frontend_type>select</frontend_type>
78
- <source_model>Netgo_Nbanners_Model_Adminhtml_System_Config_Source_Effects</source_model>
79
- <sort_order>2</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
- </effect>
84
- </fields>
85
- <!--<fields>
86
- <pauseonhover translate="label">
87
- <label>Pause on hover</label>
88
- <frontend_type>select</frontend_type>
89
- <source_model>adminhtml/system_config_source_yesno</source_model>
90
- <sort_order>4</sort_order>
91
- <show_in_default>1</show_in_default>
92
- <show_in_website>1</show_in_website>
93
- <show_in_store>1</show_in_store>
94
- </pauseonhover>
95
- </fields>-->
96
- <fields>
97
- <speed translate="label">
98
- <label>Speed (in ms eg. 1000)</label>
99
- <frontend_type>text</frontend_type>
100
- <sort_order>5</sort_order>
101
- <show_in_default>1</show_in_default>
102
- <show_in_website>1</show_in_website>
103
- <show_in_store>1</show_in_store>
104
- </speed>
105
- </fields>
106
- </netgo_nbanners_group>
107
- </groups>
108
- </netgo_nbanners>
109
- </sections>
110
- </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /***************************************
4
+ *** Complete RWD Slider ***
5
+ ***************************************
6
+ *
7
+ * @category Netgo
8
+ * @package Netgo_Nbanners
9
+ * @author Afroz Alam <afroz92@gmail.com>
10
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
11
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
12
+ *
13
+ */
14
+ -->
15
+ <config>
16
+ <tabs>
17
+ <netgo translate="label" module="nbanners">
18
+ <label>Netgo</label>
19
+ <sort_order>0</sort_order>
20
+ </netgo>
21
+ </tabs>
22
+ <sections>
23
+ <netgo_nbanners translate="label" module="nbanners">
24
+ <label>Netgo Banners</label>
25
+ <tab>netgo</tab>
26
+ <frontend_type>text</frontend_type>
27
+ <sort_order>0</sort_order>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>1</show_in_store>
31
+ <groups>
32
+ <netgo_nbanners_group translate="label">
33
+ <label>Netgo Banners</label>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>0</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ <!--<fields>
40
+ <status translate="label">
41
+ <label>Enable/Disable</label>
42
+ <frontend_type>select</frontend_type>
43
+ <source_model>adminhtml/system_config_source_yesno</source_model>
44
+ <sort_order>0</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ </status>
49
+ </fields>
50
+
51
+ <fields>
52
+ <enablejquery translate="label">
53
+ <label>Enable JQuery</label>
54
+ <frontend_type>select</frontend_type>
55
+ <source_model>adminhtml/system_config_source_yesno</source_model>
56
+ <sort_order>1</sort_order>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_website>1</show_in_website>
59
+ <show_in_store>1</show_in_store>
60
+ </enablejquery>
61
+ </fields>-->
62
+
63
+ <fields>
64
+ <pagination translate="label">
65
+ <label>Show Pagination</label>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ <sort_order>1</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
+ </pagination>
73
+ </fields>
74
+ <fields>
75
+ <effect translate="label">
76
+ <label>Effect</label>
77
+ <frontend_type>select</frontend_type>
78
+ <source_model>Netgo_Nbanners_Model_Adminhtml_System_Config_Source_Effects</source_model>
79
+ <sort_order>2</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
+ </effect>
84
+ </fields>
85
+ <!--<fields>
86
+ <pauseonhover translate="label">
87
+ <label>Pause on hover</label>
88
+ <frontend_type>select</frontend_type>
89
+ <source_model>adminhtml/system_config_source_yesno</source_model>
90
+ <sort_order>4</sort_order>
91
+ <show_in_default>1</show_in_default>
92
+ <show_in_website>1</show_in_website>
93
+ <show_in_store>1</show_in_store>
94
+ </pauseonhover>
95
+ </fields>-->
96
+ <fields>
97
+ <speed translate="label">
98
+ <label>Speed (in ms eg. 1000)</label>
99
+ <frontend_type>text</frontend_type>
100
+ <sort_order>5</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ <show_in_store>1</show_in_store>
104
+ </speed>
105
+ </fields>
106
+ </netgo_nbanners_group>
107
+ </groups>
108
+ </netgo_nbanners>
109
+ </sections>
110
+ </config>
app/code/community/Netgo/Nbanners/sql/nbanners_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- $installer = $this;
14
- $installer->startSetup();
15
- $sql=<<<SQLTEXT
16
- create table nbanners(nbanners_id int not null auto_increment, nbannergroup varchar(100), nbanners_name varchar(100), nbanners_alt varchar(100), nbanners_caption varchar(100), nbanners_cap_pos varchar(100), nbanners_effect varchar(100), nbanners_show_pag varchar(10), nbanners_show_pr_next varchar(10), nbanners_image varchar(100), nbanners_status varchar(5), primary key(nbanners_id));
17
-
18
- SQLTEXT;
19
-
20
- $installer->run($sql);
21
- //demo
22
- //Mage::getModel('core/url_rewrite')->setId(null);
23
- //demo
24
- $installer->endSetup();
25
 
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ $installer = $this;
14
+ $installer->startSetup();
15
+ $sql=<<<SQLTEXT
16
+ create table nbanners(nbanners_id int not null auto_increment, nbannergroup varchar(100), nbanners_name varchar(100), nbanners_alt varchar(100), nbanners_caption varchar(100), nbanners_cap_pos varchar(100), nbanners_effect varchar(100), nbanners_show_pag varchar(10), nbanners_show_pr_next varchar(10), nbanners_image varchar(100), nbanners_status varchar(5), primary key(nbanners_id));
17
+
18
+ SQLTEXT;
19
+
20
+ $installer->run($sql);
21
+ //demo
22
+ //Mage::getModel('core/url_rewrite')->setId(null);
23
+ //demo
24
+ $installer->endSetup();
25
 
app/design/adminhtml/default/default/layout/nbanners.xml CHANGED
@@ -4,11 +4,11 @@
4
  *** Complete RWD Slider ***
5
  ***************************************
6
  *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
  * @package Netgo_Nbanners
10
- * @author Vipin
11
- * @dev 77vips@gmail.com
 
12
  *
13
  */
14
  -->
4
  *** Complete RWD Slider ***
5
  ***************************************
6
  *
7
+ * @category Netgo
 
8
  * @package Netgo_Nbanners
9
+ * @author Afroz Alam <afroz92@gmail.com>
10
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
11
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
12
  *
13
  */
14
  -->
app/design/frontend/base/default/layout/nbanners.xml CHANGED
@@ -1,35 +1,35 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Complete RWD Slider ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Nbanners
10
- * @author Vipin
11
- * @dev 77vips@gmail.com
12
- *
13
- */
14
- -->
15
- <layout version="1.0.0">
16
-
17
- <default>
18
- <reference name="head">
19
- <action method="addItem"><type>skin_js</type><name>js/lib/nbanners/jquery.cycle2.scrollVert.js</name></action>
20
- </reference>
21
- </default>
22
-
23
- <nbanners_index_index>
24
- <reference name="root">
25
- <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
26
- </reference>
27
- <reference name="left">
28
- <block type="nbanners/left" name="nbanners_left" template="nbanners/left.phtml"/>
29
- </reference>
30
- <reference name="content">
31
- <block type="nbanners/index" name="nbanners_index" template="nbanners/index.phtml"/>
32
- </reference>
33
- </nbanners_index_index>
34
- </layout>
35
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /***************************************
4
+ *** Complete RWD Slider ***
5
+ ***************************************
6
+ *
7
+ * @category Netgo
8
+ * @package Netgo_Nbanners
9
+ * @author Afroz Alam <afroz92@gmail.com>
10
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
11
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
12
+ *
13
+ */
14
+ -->
15
+ <layout version="1.0.0">
16
+
17
+ <default>
18
+ <reference name="head">
19
+ <action method="addItem"><type>skin_js</type><name>js/lib/nbanners/jquery.cycle2.scrollVert.js</name></action>
20
+ </reference>
21
+ </default>
22
+
23
+ <nbanners_index_index>
24
+ <reference name="root">
25
+ <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
26
+ </reference>
27
+ <reference name="left">
28
+ <block type="nbanners/left" name="nbanners_left" template="nbanners/left.phtml"/>
29
+ </reference>
30
+ <reference name="content">
31
+ <block type="nbanners/index" name="nbanners_index" template="nbanners/index.phtml"/>
32
+ </reference>
33
+ </nbanners_index_index>
34
+ </layout>
35
 
app/design/frontend/base/default/template/nbanners/index.phtml CHANGED
@@ -1,69 +1,69 @@
1
- <?php
2
- /***************************************
3
- *** Complete RWD Slider ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Nbanners
9
- * @author Vipin
10
- * @dev 77vips@gmail.com
11
- *
12
- */
13
- $isPagination = Netgo_Nbanners_Helper_Data::showpagination();
14
- $effectType = Netgo_Nbanners_Helper_Data::effecttype();
15
-
16
- //check if pagination is set to yes or not
17
- if($isPagination == 1){
18
- $paginationStatus = '.slideshow-pager';
19
- }
20
- else{
21
- $paginationStatus = 'null';
22
- }
23
- ?>
24
-
25
- <script>
26
- $j(document).ready(function () {
27
-
28
- // ==============================================
29
- // UI Pattern - Slideshow
30
- // ==============================================
31
-
32
- $j('.slideshow-container1 .slideshow')
33
- .cycle({
34
- slides: '> li',
35
- pager: '<?php echo $paginationStatus; ?>', //'.slideshow-pager',
36
- pagerTemplate: '<span class="pager-box"></span>',
37
- speed: 600,
38
- pauseOnHover: true,
39
- swipe: true,
40
- prev: '.slideshow-prev',
41
- next: '.slideshow-next',
42
- fx: '<?php echo $effectType; ?>', // options: scrollHorz, scrollVert, shuffle, fade, scrollUp,
43
- fit: 0,
44
- timeout: 3000
45
- });
46
- });
47
-
48
- </script>
49
- <?php
50
- $coll = $this->getSliderCollection();
51
- $group = $this->getData('group');
52
- $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
53
- ?>
54
-
55
- <div class="slideshow-container1">
56
- <ul class="slideshow">
57
- <?php
58
- foreach($coll as $val)
59
- {
60
- $sImg = $val->getNbannersImage();
61
- $sCaption = $val->getNbannersCaption();
62
- ?>
63
-
64
- <li><a href="#"><img alt="" src="<?php echo $baseUrl.$sImg; ?>" /></a><div class="main_slidertext"><div class="slider-contant"><?php echo $sCaption; ?></div></div></li>
65
- <?php } ?>
66
- </ul>
67
- <div class="slideshow-pager">&nbsp;</div>
68
- <span class="slideshow-prev">&nbsp;</span> <span class="slideshow-next">&nbsp;</span>
69
- </div>
1
+ <?php
2
+ /***************************************
3
+ *** Complete RWD Slider ***
4
+ ***************************************
5
+ *
6
+ * @category Netgo
7
+ * @package Netgo_Nbanners
8
+ * @author Afroz Alam <afroz92@gmail.com>
9
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ *
12
+ */
13
+ $isPagination = Netgo_Nbanners_Helper_Data::showpagination();
14
+ $effectType = Netgo_Nbanners_Helper_Data::effecttype();
15
+
16
+ //check if pagination is set to yes or not
17
+ if($isPagination == 1){
18
+ $paginationStatus = '.slideshow-pager';
19
+ }
20
+ else{
21
+ $paginationStatus = 'null';
22
+ }
23
+ ?>
24
+
25
+ <script>
26
+ $j(document).ready(function () {
27
+
28
+ // ==============================================
29
+ // UI Pattern - Slideshow
30
+ // ==============================================
31
+
32
+ $j('.slideshow-container1 .slideshow')
33
+ .cycle({
34
+ slides: '> li',
35
+ pager: '<?php echo $paginationStatus; ?>', //'.slideshow-pager',
36
+ pagerTemplate: '<span class="pager-box"></span>',
37
+ speed: 600,
38
+ pauseOnHover: true,
39
+ swipe: true,
40
+ prev: '.slideshow-prev',
41
+ next: '.slideshow-next',
42
+ fx: '<?php echo $effectType; ?>', // options: scrollHorz, scrollVert, shuffle, fade, scrollUp,
43
+ fit: 0,
44
+ timeout: 3000
45
+ });
46
+ });
47
+
48
+ </script>
49
+ <?php
50
+ $coll = $this->getSliderCollection();
51
+ $group = $this->getData('group');
52
+ $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
53
+ ?>
54
+
55
+ <div class="slideshow-container1">
56
+ <ul class="slideshow">
57
+ <?php
58
+ foreach($coll as $val)
59
+ {
60
+ $sImg = $val->getNbannersImage();
61
+ $sCaption = $val->getNbannersCaption();
62
+ ?>
63
+
64
+ <li><a href="#"><img alt="" src="<?php echo $baseUrl.$sImg; ?>" /></a><div class="main_slidertext"><div class="slider-contant"><?php echo $sCaption; ?></div></div></li>
65
+ <?php } ?>
66
+ </ul>
67
+ <div class="slideshow-pager">&nbsp;</div>
68
+ <span class="slideshow-prev">&nbsp;</span> <span class="slideshow-next">&nbsp;</span>
69
+ </div>
app/etc/modules/Netgo_Nbanners.xml CHANGED
@@ -4,11 +4,11 @@
4
  *** Complete RWD Slider ***
5
  ***************************************
6
  *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
  * @package Netgo_Nbanners
10
- * @author Vipin
11
- * @dev 77vips@gmail.com
 
12
  *
13
  */
14
  -->
4
  *** Complete RWD Slider ***
5
  ***************************************
6
  *
7
+ * @category Netgo
 
8
  * @package Netgo_Nbanners
9
+ * @author Afroz Alam <afroz92@gmail.com>
10
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
11
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
12
  *
13
  */
14
  -->
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Netgo_Nbanners</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -10,11 +10,11 @@
10
  <description>This slider is exclusively for customers that are not satisfied with the back end management of sliders provided by Magento. The feature of uploading slider images from back end is enhanced in this module.The module also involves method of GROUP SLIDER, this emphasizes that if any user requires different banner slider for different pages then can form groups of slider for respective pages. &#xD;
11
  &#xD;
12
  This stopped the complex methodologies of uploading images via WYSIWYG editor or CMS page.Thus making Admin user friendly for all the users.</description>
13
- <notes>Third Preview Release</notes>
14
- <authors><author><name>Netgo</name><user>Netgo</user><email>77vips@gmail.com</email></author></authors>
15
- <date>2015-07-26</date>
16
- <time>23:50:20</time>
17
- <contents><target name="magecommunity"><dir name="Netgo"><dir name="Nbanners"><dir name="Block"><dir name="Adminhtml"><dir name="Nbanners"><dir name="Edit"><file name="Form.php" hash="3fbe2145660cc1cdcfaa4aea0fa32435"/><dir name="Tab"><file name="Form.php" hash="81ba3e1064888386fcf4f6333d00ed67"/></dir><file name="Tabs.php" hash="2fd49e481e123ee0e08cbd237f0a6710"/></dir><file name="Edit.php" hash="5a9713fe01d8da0c549295b7ca241436"/><file name="Grid.php" hash="7a8347fadb7a63b7321e6e543eaffb21"/></dir><file name="Nbanners.php" hash="7e95662669baaf96bc83dccb692bbbab"/></dir><file name="Index.php" hash="31d1f9121fe7e00c7ed891b49c57091e"/><file name="Left.php" hash="b16d7bdb474517707c7a7142f4aa8320"/></dir><dir name="Helper"><file name="Data.php" hash="31e9acde2fc8229f510b3d16d8bf3191"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Effects.php" hash="3e3d577e67b7e01de234bab5f21dd989"/></dir></dir></dir></dir><dir name="Mysql4"><dir name="Nbanners"><file name="Collection.php" hash="fac1cd030448246abf05c328d944a03d"/></dir><file name="Nbanners.php" hash="1a7bd7119a93f3c98d6c02a2fc391fe1"/></dir><file name="Nbanners.php" hash="dac54ae33ada538c2ca88ebf3ccea594"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="NbannersController.php" hash="fcb2ac3302931641f7fd1b4ff366bcfc"/></dir><file name="IndexController.php" hash="13f5eba780c38400b5077dd596c75121"/></dir><dir name="etc"><file name="adminhtml.xml" hash="abea19749af37315b7868c88faf925b2"/><file name="config.xml" hash="c32f6249f80ccb396fe380fe180276ad"/><file name="system.xml" hash="e57ecb2b37922dc61df5c3b08967ba87"/></dir><dir name="sql"><dir name="nbanners_setup"><file name="mysql4-install-0.1.0.php" hash="de6cc96b2d052383d907822d559603b8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="nbanners.xml" hash="86c0ae959ed9082a1c52c73b57002739"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="nbanners.xml" hash="97b127561ea9c94bfd82914aba9ab9ce"/></dir><dir name="template"><dir name="nbanners"><file name="index.phtml" hash="9083bf83b0473f724682863bbdfdff4a"/><file name="left.phtml" hash="0285dc1e312060f0a98a9e3569f72cdd"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="lib"><dir name="nbanners"><file name="jquery.cycle2.scrollVert.js" hash="06e50735f44de6c820f35df17b961471"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="readme.txt" hash="a22b9e03d9613f56c3c6f75061b96869"/><file name="User_Manual.pdf" hash="ff4f936d586c78208e712f1348037538"/></dir></target><target name="mageetc"><dir name="modules"><file name="Netgo_Nbanners.xml" hash="37ca468c432f3eaa8c04d1b09db91e53"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Netgo_Nbanners</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
10
  <description>This slider is exclusively for customers that are not satisfied with the back end management of sliders provided by Magento. The feature of uploading slider images from back end is enhanced in this module.The module also involves method of GROUP SLIDER, this emphasizes that if any user requires different banner slider for different pages then can form groups of slider for respective pages. &#xD;
11
  &#xD;
12
  This stopped the complex methodologies of uploading images via WYSIWYG editor or CMS page.Thus making Admin user friendly for all the users.</description>
13
+ <notes>Fourth Preview Release</notes>
14
+ <authors><author><name>Netgo</name><user>Netgo</user><email>netattingomails@gmail.com</email></author></authors>
15
+ <date>2015-08-14</date>
16
+ <time>03:20:50</time>
17
+ <contents><target name="magecommunity"><dir name="Netgo"><dir name="Nbanners"><dir name="Block"><dir name="Adminhtml"><dir name="Nbanners"><dir name="Edit"><file name="Form.php" hash="aec984b92d67400e80fc33993a70b3f7"/><dir name="Tab"><file name="Form.php" hash="379a4cbf47e5a16f0b4c364230d49307"/></dir><file name="Tabs.php" hash="05f4e12c0fa6b6ea15714d1701ac7aef"/></dir><file name="Edit.php" hash="f3919932b05112a8716abae785276336"/><file name="Grid.php" hash="1ad45db81aea855596869258040de067"/></dir><file name="Nbanners.php" hash="bcba4c7195e3315eab58dd16e84335cd"/></dir><file name="Index.php" hash="c67c93ac42964603d2ff85b943da96b7"/><file name="Left.php" hash="5692f187189b7952ba9eeb76b3c1e0ee"/></dir><dir name="Helper"><file name="Data.php" hash="9465abb8c8644f7503681e50bd80e577"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Effects.php" hash="443faa8721b5d446634f007e141135e2"/></dir></dir></dir></dir><dir name="Mysql4"><dir name="Nbanners"><file name="Collection.php" hash="4fee446e758d3c00eb6601729feede96"/></dir><file name="Nbanners.php" hash="1bf0add3f3e171d63c4d270fe1e6a882"/></dir><file name="Nbanners.php" hash="677153390f2b0fe6b542bd6749301a84"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="NbannersController.php" hash="594b6ed09752c4d114954903b7cfc1f0"/></dir><file name="IndexController.php" hash="a82bf7b5aea368718e76843e4fbb34a9"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0ace3142748d6ca2140545a4a531367a"/><file name="config.xml" hash="c63db4378e3263d10aebe111d535958a"/><file name="system.xml" hash="db00f3a9547e3257d7a8cce71baa5a63"/></dir><dir name="sql"><dir name="nbanners_setup"><file name="mysql4-install-0.1.0.php" hash="ad922da9794d4b32926cee2a1d909e81"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="nbanners.xml" hash="91c237fc7c9f16bbc96c3159dd4b8077"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="nbanners.xml" hash="4e15a24a5ee5d092121631cbe1bc030c"/></dir><dir name="template"><dir name="nbanners"><file name="index.phtml" hash="f9af16bc345587d1478ad6bcdda29962"/><file name="left.phtml" hash="0285dc1e312060f0a98a9e3569f72cdd"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="lib"><dir name="nbanners"><file name="jquery.cycle2.scrollVert.js" hash="1c3fb1ac155efd70a556db24945a18e2"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="readme.txt" hash="a22b9e03d9613f56c3c6f75061b96869"/><file name="User_Manual.pdf" hash="ff4f936d586c78208e712f1348037538"/></dir></target><target name="mageetc"><dir name="modules"><file name="Netgo_Nbanners.xml" hash="b2637d3e8d9f7693123e5650ca4d1939"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
skin/frontend/base/default/js/lib/nbanners/jquery.cycle2.scrollVert.js CHANGED
@@ -2,11 +2,11 @@
2
  *** Complete RWD Slider ***
3
  ***************************************
4
  *
5
- * @copyright Copyright (c) 2015
6
- * @company NetAttingo Technologies
7
  * @package Netgo_Nbanners
8
- * @author Vipin
9
- * @dev 77vips@gmail.com
 
10
  *
11
  */
12
  /*! scrollVert transition plugin for Cycle2; version: 20140128 */
2
  *** Complete RWD Slider ***
3
  ***************************************
4
  *
5
+ * @category Netgo
 
6
  * @package Netgo_Nbanners
7
+ * @author Afroz Alam <afroz92@gmail.com>
8
+ * @copyright NetAttingo Technologies (http://www.netattingo.com/)
9
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
  *
11
  */
12
  /*! scrollVert transition plugin for Cycle2; version: 20140128 */