Yantrakaar_NewsTicker - Version 0.1.0

Version Notes

Newsticker with minimal options .

Download this release

Release Info

Developer navinkumar singh
Extension Yantrakaar_NewsTicker
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

Files changed (39) hide show
  1. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup.php +17 -0
  2. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit.php +44 -0
  3. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit/Form.php +17 -0
  4. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit/Tab/Form.php +37 -0
  5. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit/Tabs.php +21 -0
  6. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Grid.php +86 -0
  7. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext.php +17 -0
  8. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit.php +44 -0
  9. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit/Form.php +17 -0
  10. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit/Tab/Form.php +37 -0
  11. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit/Tabs.php +21 -0
  12. app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Grid.php +92 -0
  13. app/code/local/Yantrakaar/NewsTicker/Block/Newsticker.php +4 -0
  14. app/code/local/Yantrakaar/NewsTicker/Helper/Data.php +26 -0
  15. app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Autodirection.php +13 -0
  16. app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Mode.php +14 -0
  17. app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Pagertype.php +13 -0
  18. app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Preloadimages.php +13 -0
  19. app/code/local/Yantrakaar/NewsTicker/Model/Config.php +93 -0
  20. app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickergroup.php +8 -0
  21. app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickergroup/Collection.php +12 -0
  22. app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickertext.php +8 -0
  23. app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickertext/Collection.php +12 -0
  24. app/code/local/Yantrakaar/NewsTicker/Model/Tickergroup.php +12 -0
  25. app/code/local/Yantrakaar/NewsTicker/Model/Tickertext.php +12 -0
  26. app/code/local/Yantrakaar/NewsTicker/controllers/Adminhtml/TickergroupController.php +165 -0
  27. app/code/local/Yantrakaar/NewsTicker/controllers/Adminhtml/TickertextController.php +165 -0
  28. app/code/local/Yantrakaar/NewsTicker/etc/adminhtml.xml +51 -0
  29. app/code/local/Yantrakaar/NewsTicker/etc/config.xml +196 -0
  30. app/code/local/Yantrakaar/NewsTicker/etc/system.xml +663 -0
  31. app/code/local/Yantrakaar/NewsTicker/sql/newsticker_setup/mysql4-install-0.1.0.php +15 -0
  32. app/design/adminhtml/default/default/layout/newsticker.xml +13 -0
  33. app/design/frontend/base/default/layout/newsticker.xml +30 -0
  34. app/design/frontend/base/default/template/newsticker/newsticker.phtml +85 -0
  35. app/etc/modules/Yantrakaar_NewsTicker.xml +9 -0
  36. package.xml +18 -0
  37. skin/frontend/base/default/css/jquery.bxslider.css +197 -0
  38. skin/frontend/base/default/images/bx_loader.gif +0 -0
  39. skin/frontend/base/default/images/controls.png +0 -0
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup extends Mage_Adminhtml_Block_Widget_Grid_Container{
5
+
6
+ public function __construct()
7
+ {
8
+
9
+ $this->_controller = "adminhtml_tickergroup";
10
+ $this->_blockGroup = "newsticker";
11
+ $this->_headerText = Mage::helper("newsticker")->__("Tickergroup Manager");
12
+ $this->_addButtonLabel = Mage::helper("newsticker")->__("Add New Item");
13
+ parent::__construct();
14
+
15
+ }
16
+
17
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+
8
+ parent::__construct();
9
+ $this->_objectId = "group_id";
10
+ $this->_blockGroup = "newsticker";
11
+ $this->_controller = "adminhtml_tickergroup";
12
+ $this->_updateButton("save", "label", Mage::helper("newsticker")->__("Save Item"));
13
+ $this->_updateButton("delete", "label", Mage::helper("newsticker")->__("Delete Item"));
14
+
15
+ $this->_addButton("saveandcontinue", array(
16
+ "label" => Mage::helper("newsticker")->__("Save And Continue Edit"),
17
+ "onclick" => "saveAndContinueEdit()",
18
+ "class" => "save",
19
+ ), -100);
20
+
21
+
22
+
23
+ $this->_formScripts[] = "
24
+
25
+ function saveAndContinueEdit(){
26
+ editForm.submit($('edit_form').action+'back/edit/');
27
+ }
28
+ ";
29
+ }
30
+
31
+ public function getHeaderText()
32
+ {
33
+ if( Mage::registry("tickergroup_data") && Mage::registry("tickergroup_data")->getId() ){
34
+
35
+ return Mage::helper("newsticker")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("tickergroup_data")->getId()));
36
+
37
+ }
38
+ else{
39
+
40
+ return Mage::helper("newsticker")->__("Add Item");
41
+
42
+ }
43
+ }
44
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit/Form.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+ $form = new Varien_Data_Form(array(
7
+ "id" => "edit_form",
8
+ "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
9
+ "method" => "post",
10
+ "enctype" =>"multipart/form-data",
11
+ )
12
+ );
13
+ $form->setUseContainer(true);
14
+ $this->setForm($form);
15
+ return parent::_prepareForm();
16
+ }
17
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit/Tab/Form.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset("newsticker_form", array("legend"=>Mage::helper("newsticker")->__("Item information")));
10
+
11
+
12
+ $fieldset->addField("group_name", "text", array(
13
+ "label" => Mage::helper("newsticker")->__("Group Name"),
14
+ "class" => "required-entry",
15
+ "required" => true,
16
+ "name" => "group_name",
17
+ ));
18
+
19
+ $fieldset->addField('group_active', 'select', array(
20
+ 'label' => Mage::helper('newsticker')->__('Group Active '),
21
+ 'values' => Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Grid::getValueArray1(),
22
+ 'name' => 'group_active',
23
+ "class" => "required-entry",
24
+ "required" => true,
25
+ ));
26
+
27
+ if (Mage::getSingleton("adminhtml/session")->getTickergroupData())
28
+ {
29
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getTickergroupData());
30
+ Mage::getSingleton("adminhtml/session")->setTickergroupData(null);
31
+ }
32
+ elseif(Mage::registry("tickergroup_data")) {
33
+ $form->setValues(Mage::registry("tickergroup_data")->getData());
34
+ }
35
+ return parent::_prepareForm();
36
+ }
37
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Edit/Tabs.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->setId("tickergroup_tabs");
8
+ $this->setDestElementId("edit_form");
9
+ $this->setTitle(Mage::helper("newsticker")->__("Item Information"));
10
+ }
11
+ protected function _beforeToHtml()
12
+ {
13
+ $this->addTab("form_section", array(
14
+ "label" => Mage::helper("newsticker")->__("Item Information"),
15
+ "title" => Mage::helper("newsticker")->__("Item Information"),
16
+ "content" => $this->getLayout()->createBlock("newsticker/adminhtml_tickergroup_edit_tab_form")->toHtml(),
17
+ ));
18
+ return parent::_beforeToHtml();
19
+ }
20
+
21
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickergroup/Grid.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId("tickergroupGrid");
10
+ $this->setDefaultSort("group_id");
11
+ $this->setDefaultDir("DESC");
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel("newsticker/tickergroup")->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+ protected function _prepareColumns()
22
+ {
23
+ $this->addColumn("group_id", array(
24
+ "header" => Mage::helper("newsticker")->__("ID"),
25
+ "align" =>"right",
26
+ "width" => "50px",
27
+ "type" => "number",
28
+ "index" => "group_id",
29
+ ));
30
+
31
+ $this->addColumn("group_name", array(
32
+ "header" => Mage::helper("newsticker")->__("Group Name"),
33
+ "index" => "group_name",
34
+ ));
35
+ $this->addColumn('group_active', array(
36
+ 'header' => Mage::helper('newsticker')->__('Group Active '),
37
+ 'index' => 'group_active',
38
+ 'type' => 'options',
39
+ 'options'=>Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Grid::getOptionArray1(),
40
+ ));
41
+
42
+ $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
43
+ $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
44
+
45
+ return parent::_prepareColumns();
46
+ }
47
+
48
+ public function getRowUrl($row)
49
+ {
50
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
51
+ }
52
+
53
+
54
+
55
+ protected function _prepareMassaction()
56
+ {
57
+ $this->setMassactionIdField('group_id');
58
+ $this->getMassactionBlock()->setFormFieldName('group_ids');
59
+ $this->getMassactionBlock()->setUseSelectAll(true);
60
+ $this->getMassactionBlock()->addItem('remove_tickergroup', array(
61
+ 'label'=> Mage::helper('newsticker')->__('Remove Tickergroup'),
62
+ 'url' => $this->getUrl('*/adminhtml_tickergroup/massRemove'),
63
+ 'confirm' => Mage::helper('newsticker')->__('Are you sure?')
64
+ ));
65
+ return $this;
66
+ }
67
+
68
+ static public function getOptionArray1()
69
+ {
70
+ $data_array=array();
71
+ $data_array[1]='Yes';
72
+ $data_array[0]='No';
73
+ return($data_array);
74
+ }
75
+ static public function getValueArray1()
76
+ {
77
+ $data_array=array();
78
+ foreach(Yantrakaar_NewsTicker_Block_Adminhtml_Tickergroup_Grid::getOptionArray1() as $k=>$v){
79
+ $data_array[]=array('value'=>$k,'label'=>$v);
80
+ }
81
+ return($data_array);
82
+
83
+ }
84
+
85
+
86
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext extends Mage_Adminhtml_Block_Widget_Grid_Container{
5
+
6
+ public function __construct()
7
+ {
8
+
9
+ $this->_controller = "adminhtml_tickertext";
10
+ $this->_blockGroup = "newsticker";
11
+ $this->_headerText = Mage::helper("newsticker")->__("Tickertext Manager");
12
+ $this->_addButtonLabel = Mage::helper("newsticker")->__("Add New Item");
13
+ parent::__construct();
14
+
15
+ }
16
+
17
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+
8
+ parent::__construct();
9
+ $this->_objectId = "ticker_id";
10
+ $this->_blockGroup = "newsticker";
11
+ $this->_controller = "adminhtml_tickertext";
12
+ $this->_updateButton("save", "label", Mage::helper("newsticker")->__("Save Item"));
13
+ $this->_updateButton("delete", "label", Mage::helper("newsticker")->__("Delete Item"));
14
+
15
+ $this->_addButton("saveandcontinue", array(
16
+ "label" => Mage::helper("newsticker")->__("Save And Continue Edit"),
17
+ "onclick" => "saveAndContinueEdit()",
18
+ "class" => "save",
19
+ ), -100);
20
+
21
+
22
+
23
+ $this->_formScripts[] = "
24
+
25
+ function saveAndContinueEdit(){
26
+ editForm.submit($('edit_form').action+'back/edit/');
27
+ }
28
+ ";
29
+ }
30
+
31
+ public function getHeaderText()
32
+ {
33
+ if( Mage::registry("tickertext_data") && Mage::registry("tickertext_data")->getId() ){
34
+
35
+ return Mage::helper("newsticker")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("tickertext_data")->getId()));
36
+
37
+ }
38
+ else{
39
+
40
+ return Mage::helper("newsticker")->__("Add Item");
41
+
42
+ }
43
+ }
44
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit/Form.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+ $form = new Varien_Data_Form(array(
7
+ "id" => "edit_form",
8
+ "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
9
+ "method" => "post",
10
+ "enctype" =>"multipart/form-data",
11
+ )
12
+ );
13
+ $form->setUseContainer(true);
14
+ $this->setForm($form);
15
+ return parent::_prepareForm();
16
+ }
17
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit/Tab/Form.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset("newsticker_form", array("legend"=>Mage::helper("newsticker")->__("Item information")));
10
+
11
+
12
+ $fieldset->addField("ticker_text", "text", array(
13
+ "label" => Mage::helper("newsticker")->__("Ticker Text"),
14
+ "class" => "required-entry",
15
+ "required" => true,
16
+ "name" => "ticker_text",
17
+ ));
18
+
19
+ $fieldset->addField('ticker_group_id', 'select', array(
20
+ 'label' => Mage::helper('newsticker')->__('Group Name'),
21
+ 'values' => Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Grid::getValueArray3(),
22
+ 'name' => 'ticker_group_id',
23
+ "class" => "required-entry",
24
+ "required" => true,
25
+ ));
26
+
27
+ if (Mage::getSingleton("adminhtml/session")->getTickertextData())
28
+ {
29
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getTickertextData());
30
+ Mage::getSingleton("adminhtml/session")->setTickertextData(null);
31
+ }
32
+ elseif(Mage::registry("tickertext_data")) {
33
+ $form->setValues(Mage::registry("tickertext_data")->getData());
34
+ }
35
+ return parent::_prepareForm();
36
+ }
37
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Edit/Tabs.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->setId("tickertext_tabs");
8
+ $this->setDestElementId("edit_form");
9
+ $this->setTitle(Mage::helper("newsticker")->__("Item Information"));
10
+ }
11
+ protected function _beforeToHtml()
12
+ {
13
+ $this->addTab("form_section", array(
14
+ "label" => Mage::helper("newsticker")->__("Item Information"),
15
+ "title" => Mage::helper("newsticker")->__("Item Information"),
16
+ "content" => $this->getLayout()->createBlock("newsticker/adminhtml_tickertext_edit_tab_form")->toHtml(),
17
+ ));
18
+ return parent::_beforeToHtml();
19
+ }
20
+
21
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Adminhtml/Tickertext/Grid.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId("tickertextGrid");
10
+ $this->setDefaultSort("ticker_id");
11
+ $this->setDefaultDir("DESC");
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel("newsticker/tickertext")->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+ protected function _prepareColumns()
22
+ {
23
+ $this->addColumn("ticker_id", array(
24
+ "header" => Mage::helper("newsticker")->__("ID"),
25
+ "align" =>"right",
26
+ "width" => "50px",
27
+ "type" => "number",
28
+ "index" => "ticker_id",
29
+ ));
30
+
31
+ $this->addColumn("ticker_text", array(
32
+ "header" => Mage::helper("newsticker")->__("Ticker Text"),
33
+ "index" => "ticker_text",
34
+ ));
35
+ $this->addColumn('ticker_group_id', array(
36
+ 'header' => Mage::helper('newsticker')->__('Group Name'),
37
+ 'index' => 'ticker_group_id',
38
+ 'type' => 'options',
39
+ 'options'=>Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Grid::getOptionArray3(),
40
+ ));
41
+
42
+ $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
43
+ $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
44
+
45
+ return parent::_prepareColumns();
46
+ }
47
+
48
+ public function getRowUrl($row)
49
+ {
50
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
51
+ }
52
+
53
+
54
+
55
+ protected function _prepareMassaction()
56
+ {
57
+ $this->setMassactionIdField('ticker_id');
58
+ $this->getMassactionBlock()->setFormFieldName('ticker_ids');
59
+ $this->getMassactionBlock()->setUseSelectAll(true);
60
+ $this->getMassactionBlock()->addItem('remove_tickertext', array(
61
+ 'label'=> Mage::helper('newsticker')->__('Remove Tickertext'),
62
+ 'url' => $this->getUrl('*/adminhtml_tickertext/massRemove'),
63
+ 'confirm' => Mage::helper('newsticker')->__('Are you sure?')
64
+ ));
65
+ return $this;
66
+ }
67
+
68
+ static public function getOptionArray3()
69
+ {
70
+ $options = Mage::getModel('newsticker/tickergroup')->getCollection()->addFieldToFilter('group_active',1);
71
+ $data_array=array();
72
+ if(!empty($options)){
73
+ foreach($options as $option){
74
+ $data_array[$option->getGroupId()]=$option->getGroupName();
75
+ }
76
+ } else {
77
+ $data_array[0] = '';
78
+ }
79
+ return($data_array);
80
+ }
81
+ static public function getValueArray3()
82
+ {
83
+ $data_array=array();
84
+ foreach(Yantrakaar_NewsTicker_Block_Adminhtml_Tickertext_Grid::getOptionArray3() as $k=>$v){
85
+ $data_array[]=array('value'=>$k,'label'=>$v);
86
+ }
87
+ return($data_array);
88
+
89
+ }
90
+
91
+
92
+ }
app/code/local/Yantrakaar/NewsTicker/Block/Newsticker.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ Class Yantrakaar_NewsTicker_Block_Newsticker extends Mage_Core_Block_Template{
3
+
4
+ }
app/code/local/Yantrakaar/NewsTicker/Helper/Data.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ public function getTickerData($groupid = null){
5
+ if(is_null($groupid))
6
+ {
7
+ $groupid = Mage::getModel("newsticker/config")->getSettingsGroupid();
8
+ }
9
+
10
+ if($this->isEnabled())
11
+ {
12
+ $collection = Mage::getModel('newsticker/tickergroup')->getCollection();
13
+ $collection->addFieldToFilter('group_id',$groupid);
14
+ $collection->addFieldToFilter('group_active',1);
15
+ $collection->getSelect()->join(array('text' => 'newsticker_text'),'main_table.group_id = text.ticker_group_id',array('text.ticker_text'));
16
+ $collection->addFieldToSelect('group_name');
17
+ return $collection->getData();
18
+ } else {
19
+ return '';
20
+ }
21
+ }
22
+
23
+ public function isEnabled(){
24
+ return Mage::getModel("newsticker/config")->getSettingsActive();
25
+ }
26
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Autodirection.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Autodirection
3
+ {
4
+ public function toOptionArray(){
5
+
6
+ $mode = array(
7
+ array('value'=>'next','label'=>'next'),
8
+ array('value'=>'prev','label'=>'prev'),
9
+ );
10
+ return $mode;
11
+ }
12
+
13
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Mode.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Mode
3
+ {
4
+ public function toOptionArray(){
5
+
6
+ $mode = array(
7
+ array('value'=>'horizontal','label'=>'horizontal'),
8
+ array('value'=>'vertical','label'=>'vertical'),
9
+ array('value'=>'fade','label'=>'fade'),
10
+ );
11
+ return $mode;
12
+ }
13
+
14
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Pagertype.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Pagertype
3
+ {
4
+ public function toOptionArray(){
5
+
6
+ $mode = array(
7
+ array('value'=>'full','label'=>'full'),
8
+ array('value'=>'short','label'=>'short'),
9
+ );
10
+ return $mode;
11
+ }
12
+
13
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Adminhtml/System/Config/Source/Preloadimages.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Preloadimages
3
+ {
4
+ public function toOptionArray(){
5
+
6
+ $mode = array(
7
+ array('value'=>'all','label'=>'all'),
8
+ array('value'=>'visible','label'=>'visible'),
9
+ );
10
+ return $mode;
11
+ }
12
+
13
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Config.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Config{
3
+
4
+ private static $config = array(
5
+ 'SETTINGS_ACTIVE' => 'yantrakaar_newsticker/yantrakaar_newsticker_settings/enabled',
6
+ 'SETTINGS_GROUPID' => 'yantrakaar_newsticker/yantrakaar_newsticker_settings/groupid',
7
+ 'SETTINGS_JQUERY' => 'yantrakaar_newsticker/yantrakaar_newsticker_settings/jquery',
8
+
9
+
10
+ 'GENERAL_MODE' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/mode',
11
+ 'GENERAL_SPEED' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/speed',
12
+ 'GENERAL_SLIDEMARGIN' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/slidemargin',
13
+ 'GENERAL_STARTSLIDE' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/startslide',
14
+ 'GENERAL_RANDOMSTART' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/randomstart',
15
+ 'GENERAL_SLIDESELECTOR' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/slideselector',
16
+ 'GENERAL_INFINITELOOP' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/infiniteloop',
17
+ 'GENERAL_HIDECONTROLONEND' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/hidecontrolonend',
18
+ 'GENERAL_CAPTIONS' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/captions',
19
+ 'GENERAL_TICKER' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/ticker',
20
+ 'GENERAL_TICKERHOVER' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/tickerhover',
21
+ 'GENERAL_ADAPTIVEHEIGHT' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/adaptiveheight',
22
+ 'GENERAL_ADAPTIVEHEIGHTSPEED' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/adaptiveheightspeed',
23
+ 'GENERAL_RESPONSIVE' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/responsive',
24
+ 'GENERAL_USECSS' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/usecss',
25
+ 'GENERAL_PRELOADIMAGES' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/preloadimages',
26
+ 'GENERAL_TOUCHENABLED' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/touchenabled',
27
+ 'GENERAL_SWIPETHRESHOLD' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/swipethreshold',
28
+ 'GENERAL_ONETOONETOUCH' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/onetoonetouch',
29
+ 'GENERAL_PREVENTDEFAULTSWIPEX' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/preventdefaultswipex',
30
+ 'GENERAL_PREVENTDEFAULTSWIPEY' => 'yantrakaar_newsticker/yantrakaar_newsticker_general/preventdefaultswipey',
31
+
32
+
33
+
34
+ 'PAGER_ENABLED' => 'yantrakaar_newsticker/yantrakaar_newsticker_pager/pager',
35
+ 'PAGER_TYPE' => 'yantrakaar_newsticker/yantrakaar_newsticker_pager/pagertype',
36
+ 'PAGER_SHORTSEPARATOR' => 'yantrakaar_newsticker/yantrakaar_newsticker_pager/pagershortseparator',
37
+
38
+
39
+
40
+ 'CONTROLS_ENABLED' => 'yantrakaar_newsticker/yantrakaar_newsticker_controls/controls',
41
+ 'CONTROLS_NEXTTEXT' => 'yantrakaar_newsticker/yantrakaar_newsticker_controls/nexttext',
42
+ 'CONTROLS_PREVTEXT' => 'yantrakaar_newsticker/yantrakaar_newsticker_controls/prevtext',
43
+ 'CONTROLS_AUTOCONTROLS' => 'yantrakaar_newsticker/yantrakaar_newsticker_controls/autocontrols',
44
+ 'CONTROLS_STARTTEXT' => 'yantrakaar_newsticker/yantrakaar_newsticker_controls/starttext',
45
+ 'CONTROLS_STOPTEXT' => 'yantrakaar_newsticker/yantrakaar_newsticker_controls/stoptext',
46
+ 'CONTROLS_AUTOCONTROLSCOMBINE' => 'yantrakaar_newsticker/yantrakaar_newsticker_controls/autocontrolscombine',
47
+
48
+
49
+ 'AUTO_ENABLED' => 'yantrakaar_newsticker/yantrakaar_newsticker_auto/auto',
50
+ 'AUTO_PAUSE' => 'yantrakaar_newsticker/yantrakaar_newsticker_auto/pause',
51
+ 'AUTO_AUTOSTART' => 'yantrakaar_newsticker/yantrakaar_newsticker_auto/autostart',
52
+ 'AUTO_AUTODIRECTION' => 'yantrakaar_newsticker/yantrakaar_newsticker_auto/autodirection',
53
+ 'AUTO_AUTOHOVER' => 'yantrakaar_newsticker/yantrakaar_newsticker_auto/autohover',
54
+ 'AUTO_AUTODELAY' => 'yantrakaar_newsticker/yantrakaar_newsticker_auto/autodelay',
55
+
56
+
57
+ 'CAROUSEL_MINSLIDES' => 'yantrakaar_newsticker/yantrakaar_newsticker_carousel/minslides',
58
+ 'CAROUSEL_MAXSLIDES' => 'yantrakaar_newsticker/yantrakaar_newsticker_carousel/maxslides',
59
+ 'CAROUSEL_MOVESLIDES' => 'yantrakaar_newsticker/yantrakaar_newsticker_carousel/moveslides',
60
+ 'CAROUSEL_SLIDEWIDTH' => 'yantrakaar_newsticker/yantrakaar_newsticker_carousel/slidewidth',
61
+
62
+
63
+ 'EASING_ENABLED' => 'yantrakaar_newsticker/yantrakaar_newsticker_easing/enabled',
64
+ 'EASING_EASING' => 'yantrakaar_newsticker/yantrakaar_newsticker_easing/easing',
65
+
66
+
67
+ 'VIDS_ENABLED' => 'yantrakaar_newsticker/yantrakaar_newsticker_vids/enabled'
68
+ );
69
+
70
+ public function __call($method , $args)
71
+ {
72
+ switch (substr($method, 0, 3)) {
73
+ case 'get' :
74
+ $key = $this->_underscore(substr($method,3));
75
+ $data = $this->getTickerConfig($key);
76
+ return $data;
77
+ }
78
+ throw new Varien_Exception("Invalid method ".get_class($this)."::".$method."(".print_r($args,1).")");
79
+ }
80
+
81
+ protected function _underscore($name)
82
+ {
83
+ $result = strtoupper(preg_replace('/(.)([A-Z])/', "$1_$2", $name));
84
+ return $result;
85
+ }
86
+
87
+ protected function getTickerConfig($key)
88
+ {
89
+ return Mage::getStoreConfig(self::$config[$key]);
90
+ }
91
+
92
+
93
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickergroup.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Mysql4_Tickergroup extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("newsticker/tickergroup", "group_id");
7
+ }
8
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickergroup/Collection.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Mysql4_Tickergroup_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+
5
+ public function _construct(){
6
+ $this->_init("newsticker/tickergroup");
7
+ }
8
+
9
+
10
+
11
+ }
12
+
app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickertext.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Mysql4_Tickertext extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("newsticker/tickertext", "ticker_id");
7
+ }
8
+ }
app/code/local/Yantrakaar/NewsTicker/Model/Mysql4/Tickertext/Collection.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yantrakaar_NewsTicker_Model_Mysql4_Tickertext_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+
5
+ public function _construct(){
6
+ $this->_init("newsticker/tickertext");
7
+ }
8
+
9
+
10
+
11
+ }
12
+
app/code/local/Yantrakaar/NewsTicker/Model/Tickergroup.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Model_Tickergroup extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+
7
+ $this->_init("newsticker/tickergroup");
8
+
9
+ }
10
+
11
+ }
12
+
app/code/local/Yantrakaar/NewsTicker/Model/Tickertext.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Model_Tickertext extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+
7
+ $this->_init("newsticker/tickertext");
8
+
9
+ }
10
+
11
+ }
12
+
app/code/local/Yantrakaar/NewsTicker/controllers/Adminhtml/TickergroupController.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Adminhtml_TickergroupController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ protected function _initAction()
6
+ {
7
+ $this->loadLayout()->_setActiveMenu("newsticker/tickergroup")->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickergroup Manager"),Mage::helper("adminhtml")->__("Tickergroup Manager"));
8
+ return $this;
9
+ }
10
+ public function indexAction()
11
+ {
12
+ $this->_title($this->__("NewsTicker"));
13
+ $this->_title($this->__("Manager Tickergroup"));
14
+
15
+ $this->_initAction();
16
+ $this->renderLayout();
17
+ }
18
+ public function editAction()
19
+ {
20
+ $this->_title($this->__("NewsTicker"));
21
+ $this->_title($this->__("Tickergroup"));
22
+ $this->_title($this->__("Edit Item"));
23
+
24
+ $id = $this->getRequest()->getParam("id");
25
+ $model = Mage::getModel("newsticker/tickergroup")->load($id);
26
+ if ($model->getId()) {
27
+ Mage::register("tickergroup_data", $model);
28
+ $this->loadLayout();
29
+ $this->_setActiveMenu("newsticker/tickergroup");
30
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickergroup Manager"), Mage::helper("adminhtml")->__("Tickergroup Manager"));
31
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickergroup Description"), Mage::helper("adminhtml")->__("Tickergroup Description"));
32
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
33
+ $this->_addContent($this->getLayout()->createBlock("newsticker/adminhtml_tickergroup_edit"))->_addLeft($this->getLayout()->createBlock("newsticker/adminhtml_tickergroup_edit_tabs"));
34
+ $this->renderLayout();
35
+ }
36
+ else {
37
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("newsticker")->__("Item does not exist."));
38
+ $this->_redirect("*/*/");
39
+ }
40
+ }
41
+
42
+ public function newAction()
43
+ {
44
+
45
+ $this->_title($this->__("NewsTicker"));
46
+ $this->_title($this->__("Tickergroup"));
47
+ $this->_title($this->__("New Item"));
48
+
49
+ $id = $this->getRequest()->getParam("id");
50
+ $model = Mage::getModel("newsticker/tickergroup")->load($id);
51
+
52
+ $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
+ if (!empty($data)) {
54
+ $model->setData($data);
55
+ }
56
+
57
+ Mage::register("tickergroup_data", $model);
58
+
59
+ $this->loadLayout();
60
+ $this->_setActiveMenu("newsticker/tickergroup");
61
+
62
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
+
64
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickergroup Manager"), Mage::helper("adminhtml")->__("Tickergroup Manager"));
65
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickergroup Description"), Mage::helper("adminhtml")->__("Tickergroup Description"));
66
+
67
+
68
+ $this->_addContent($this->getLayout()->createBlock("newsticker/adminhtml_tickergroup_edit"))->_addLeft($this->getLayout()->createBlock("newsticker/adminhtml_tickergroup_edit_tabs"));
69
+
70
+ $this->renderLayout();
71
+
72
+ }
73
+ public function saveAction()
74
+ {
75
+
76
+ $post_data=$this->getRequest()->getPost();
77
+
78
+
79
+ if ($post_data) {
80
+
81
+ try {
82
+
83
+
84
+
85
+ $model = Mage::getModel("newsticker/tickergroup")
86
+ ->addData($post_data)
87
+ ->setId($this->getRequest()->getParam("id"))
88
+ ->save();
89
+
90
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Tickergroup was successfully saved"));
91
+ Mage::getSingleton("adminhtml/session")->setTickergroupData(false);
92
+
93
+ if ($this->getRequest()->getParam("back")) {
94
+ $this->_redirect("*/*/edit", array("id" => $model->getId()));
95
+ return;
96
+ }
97
+ $this->_redirect("*/*/");
98
+ return;
99
+ }
100
+ catch (Exception $e) {
101
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
102
+ Mage::getSingleton("adminhtml/session")->setTickergroupData($this->getRequest()->getPost());
103
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
104
+ return;
105
+ }
106
+
107
+ }
108
+ $this->_redirect("*/*/");
109
+ }
110
+
111
+
112
+
113
+ public function deleteAction()
114
+ {
115
+ if( $this->getRequest()->getParam("id") > 0 ) {
116
+ try {
117
+ $model = Mage::getModel("newsticker/tickergroup");
118
+ $model->setId($this->getRequest()->getParam("id"))->delete();
119
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
120
+ $this->_redirect("*/*/");
121
+ }
122
+ catch (Exception $e) {
123
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
124
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
125
+ }
126
+ }
127
+ $this->_redirect("*/*/");
128
+ }
129
+
130
+
131
+ public function massRemoveAction()
132
+ {
133
+ try {
134
+ $ids = $this->getRequest()->getPost('group_ids', array());
135
+ foreach ($ids as $id) {
136
+ $model = Mage::getModel("newsticker/tickergroup");
137
+ $model->setId($id)->delete();
138
+ }
139
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
140
+ }
141
+ catch (Exception $e) {
142
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
143
+ }
144
+ $this->_redirect('*/*/');
145
+ }
146
+
147
+ /**
148
+ * Export order grid to CSV format
149
+ */
150
+ public function exportCsvAction()
151
+ {
152
+ $fileName = 'tickergroup.csv';
153
+ $grid = $this->getLayout()->createBlock('newsticker/adminhtml_tickergroup_grid');
154
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
155
+ }
156
+ /**
157
+ * Export order grid to Excel XML format
158
+ */
159
+ public function exportExcelAction()
160
+ {
161
+ $fileName = 'tickergroup.xml';
162
+ $grid = $this->getLayout()->createBlock('newsticker/adminhtml_tickergroup_grid');
163
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
164
+ }
165
+ }
app/code/local/Yantrakaar/NewsTicker/controllers/Adminhtml/TickertextController.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yantrakaar_NewsTicker_Adminhtml_TickertextController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ protected function _initAction()
6
+ {
7
+ $this->loadLayout()->_setActiveMenu("newsticker/tickertext")->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickertext Manager"),Mage::helper("adminhtml")->__("Tickertext Manager"));
8
+ return $this;
9
+ }
10
+ public function indexAction()
11
+ {
12
+ $this->_title($this->__("NewsTicker"));
13
+ $this->_title($this->__("Manager Tickertext"));
14
+
15
+ $this->_initAction();
16
+ $this->renderLayout();
17
+ }
18
+ public function editAction()
19
+ {
20
+ $this->_title($this->__("NewsTicker"));
21
+ $this->_title($this->__("Tickertext"));
22
+ $this->_title($this->__("Edit Item"));
23
+
24
+ $id = $this->getRequest()->getParam("id");
25
+ $model = Mage::getModel("newsticker/tickertext")->load($id);
26
+ if ($model->getId()) {
27
+ Mage::register("tickertext_data", $model);
28
+ $this->loadLayout();
29
+ $this->_setActiveMenu("newsticker/tickertext");
30
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickertext Manager"), Mage::helper("adminhtml")->__("Tickertext Manager"));
31
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickertext Description"), Mage::helper("adminhtml")->__("Tickertext Description"));
32
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
33
+ $this->_addContent($this->getLayout()->createBlock("newsticker/adminhtml_tickertext_edit"))->_addLeft($this->getLayout()->createBlock("newsticker/adminhtml_tickertext_edit_tabs"));
34
+ $this->renderLayout();
35
+ }
36
+ else {
37
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("newsticker")->__("Item does not exist."));
38
+ $this->_redirect("*/*/");
39
+ }
40
+ }
41
+
42
+ public function newAction()
43
+ {
44
+
45
+ $this->_title($this->__("NewsTicker"));
46
+ $this->_title($this->__("Tickertext"));
47
+ $this->_title($this->__("New Item"));
48
+
49
+ $id = $this->getRequest()->getParam("id");
50
+ $model = Mage::getModel("newsticker/tickertext")->load($id);
51
+
52
+ $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
+ if (!empty($data)) {
54
+ $model->setData($data);
55
+ }
56
+
57
+ Mage::register("tickertext_data", $model);
58
+
59
+ $this->loadLayout();
60
+ $this->_setActiveMenu("newsticker/tickertext");
61
+
62
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
+
64
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickertext Manager"), Mage::helper("adminhtml")->__("Tickertext Manager"));
65
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Tickertext Description"), Mage::helper("adminhtml")->__("Tickertext Description"));
66
+
67
+
68
+ $this->_addContent($this->getLayout()->createBlock("newsticker/adminhtml_tickertext_edit"))->_addLeft($this->getLayout()->createBlock("newsticker/adminhtml_tickertext_edit_tabs"));
69
+
70
+ $this->renderLayout();
71
+
72
+ }
73
+ public function saveAction()
74
+ {
75
+
76
+ $post_data=$this->getRequest()->getPost();
77
+
78
+
79
+ if ($post_data) {
80
+
81
+ try {
82
+
83
+
84
+
85
+ $model = Mage::getModel("newsticker/tickertext")
86
+ ->addData($post_data)
87
+ ->setId($this->getRequest()->getParam("id"))
88
+ ->save();
89
+
90
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Tickertext was successfully saved"));
91
+ Mage::getSingleton("adminhtml/session")->setTickertextData(false);
92
+
93
+ if ($this->getRequest()->getParam("back")) {
94
+ $this->_redirect("*/*/edit", array("id" => $model->getId()));
95
+ return;
96
+ }
97
+ $this->_redirect("*/*/");
98
+ return;
99
+ }
100
+ catch (Exception $e) {
101
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
102
+ Mage::getSingleton("adminhtml/session")->setTickertextData($this->getRequest()->getPost());
103
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
104
+ return;
105
+ }
106
+
107
+ }
108
+ $this->_redirect("*/*/");
109
+ }
110
+
111
+
112
+
113
+ public function deleteAction()
114
+ {
115
+ if( $this->getRequest()->getParam("id") > 0 ) {
116
+ try {
117
+ $model = Mage::getModel("newsticker/tickertext");
118
+ $model->setId($this->getRequest()->getParam("id"))->delete();
119
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
120
+ $this->_redirect("*/*/");
121
+ }
122
+ catch (Exception $e) {
123
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
124
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
125
+ }
126
+ }
127
+ $this->_redirect("*/*/");
128
+ }
129
+
130
+
131
+ public function massRemoveAction()
132
+ {
133
+ try {
134
+ $ids = $this->getRequest()->getPost('ticker_ids', array());
135
+ foreach ($ids as $id) {
136
+ $model = Mage::getModel("newsticker/tickertext");
137
+ $model->setId($id)->delete();
138
+ }
139
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
140
+ }
141
+ catch (Exception $e) {
142
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
143
+ }
144
+ $this->_redirect('*/*/');
145
+ }
146
+
147
+ /**
148
+ * Export order grid to CSV format
149
+ */
150
+ public function exportCsvAction()
151
+ {
152
+ $fileName = 'tickertext.csv';
153
+ $grid = $this->getLayout()->createBlock('newsticker/adminhtml_tickertext_grid');
154
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
155
+ }
156
+ /**
157
+ * Export order grid to Excel XML format
158
+ */
159
+ public function exportExcelAction()
160
+ {
161
+ $fileName = 'tickertext.xml';
162
+ $grid = $this->getLayout()->createBlock('newsticker/adminhtml_tickertext_grid');
163
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
164
+ }
165
+ }
app/code/local/Yantrakaar/NewsTicker/etc/adminhtml.xml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <newsticker translate="title" module="newsticker">
5
+ <title>News Ticker</title>
6
+ <sort_order>2</sort_order>
7
+ <children>
8
+ <settings translate="title" module="newsticker">
9
+ <title>Settings</title>
10
+ <sort_order>10</sort_order>
11
+ <action>adminhtml/system_config/edit/section/yantrakaar_newsticker</action>
12
+ </settings>
13
+ </children>
14
+ </newsticker>
15
+ </menu>
16
+ <acl>
17
+ <resources>
18
+ <admin>
19
+ <children>
20
+ <newsticker>
21
+ <title>News Ticker</title>
22
+ <children>
23
+ <settings translate="title" module="newsticker">
24
+ <title>Settings</title>
25
+ </settings>
26
+ </children>
27
+ </newsticker>
28
+ </children>
29
+ </admin>
30
+ </resources>
31
+ </acl>
32
+ <acl>
33
+ <resources>
34
+ <admin>
35
+ <children>
36
+ <system>
37
+ <children>
38
+ <config>
39
+ <children>
40
+ <yantrakaar_newsticker translate="title">
41
+ <title>News Ticker Settings</title>
42
+ </yantrakaar_newsticker>
43
+ </children>
44
+ </config>
45
+ </children>
46
+ </system>
47
+ </children>
48
+ </admin>
49
+ </resources>
50
+ </acl>
51
+ </config>
app/code/local/Yantrakaar/NewsTicker/etc/config.xml ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Yantrakaar_NewsTicker>
5
+ <version>0.1.0</version>
6
+ </Yantrakaar_NewsTicker>
7
+ </modules>
8
+ <frontend>
9
+ <layout>
10
+ <updates>
11
+ <newsticker>
12
+ <file>newsticker.xml</file>
13
+ </newsticker>
14
+ </updates>
15
+ </layout>
16
+ </frontend>
17
+ <global>
18
+ <helpers>
19
+ <newsticker>
20
+ <class>Yantrakaar_NewsTicker_Helper</class>
21
+ </newsticker>
22
+ </helpers>
23
+ <blocks>
24
+ <newsticker>
25
+ <class>Yantrakaar_NewsTicker_Block</class>
26
+ </newsticker>
27
+ </blocks>
28
+ <models>
29
+ <newsticker>
30
+ <class>Yantrakaar_NewsTicker_Model</class>
31
+ <resourceModel>newsticker_mysql4</resourceModel>
32
+ </newsticker>
33
+ <newsticker_mysql4>
34
+ <class>Yantrakaar_NewsTicker_Model_Mysql4</class>
35
+ <entities>
36
+ <tickergroup>
37
+ <table>newsticker_group</table>
38
+ </tickergroup>
39
+ <tickertext>
40
+ <table>newsticker_text</table>
41
+ </tickertext>
42
+ </entities>
43
+ </newsticker_mysql4>
44
+ </models>
45
+ <resources>
46
+ <newsticker_setup>
47
+ <setup>
48
+ <module>Yantrakaar_NewsTicker</module>
49
+ </setup>
50
+ <connection>
51
+ <use>core_setup</use>
52
+ </connection>
53
+ </newsticker_setup>
54
+ <newsticker_write>
55
+ <connection>
56
+ <use>core_write</use>
57
+ </connection>
58
+ </newsticker_write>
59
+ <newsticker_read>
60
+ <connection>
61
+ <use>core_read</use>
62
+ </connection>
63
+ </newsticker_read>
64
+ </resources>
65
+ </global>
66
+ <admin>
67
+ <routers>
68
+ <newsticker>
69
+ <use>admin</use>
70
+ <args>
71
+ <module>Yantrakaar_NewsTicker</module>
72
+ <frontName>newsticker</frontName>
73
+ </args>
74
+ </newsticker>
75
+ </routers>
76
+ </admin>
77
+ <adminhtml>
78
+ <menu>
79
+ <newsticker module="newsticker">
80
+ <title>NewsTicker</title>
81
+ <sort_order>41</sort_order>
82
+ <children>
83
+ <tickergroup module="newsticker">
84
+ <title>Manage Tickergroup</title>
85
+ <sort_order>0</sort_order>
86
+ <action>newsticker/adminhtml_tickergroup</action>
87
+ </tickergroup>
88
+ <tickertext module="newsticker">
89
+ <title>Manage Tickertext</title>
90
+ <sort_order>10</sort_order>
91
+ <action>newsticker/adminhtml_tickertext</action>
92
+ </tickertext>
93
+ </children>
94
+ </newsticker>
95
+ </menu>
96
+ <acl>
97
+ <resources>
98
+ <all>
99
+ <title>Allow Everything</title>
100
+ </all>
101
+ <admin>
102
+ <children>
103
+ <newsticker translate="title" module="newsticker">
104
+ <title>NewsTicker</title>
105
+ <sort_order>1000</sort_order>
106
+ <children>
107
+ <tickergroup translate="title">
108
+ <title>Manage Tickergroup</title>
109
+ <sort_order>0</sort_order>
110
+ </tickergroup>
111
+ <tickertext translate="title">
112
+ <title>Manage Tickertext</title>
113
+ <sort_order>10</sort_order>
114
+ </tickertext>
115
+ </children>
116
+ </newsticker>
117
+ </children>
118
+ </admin>
119
+ </resources>
120
+ </acl>
121
+ <layout>
122
+ <updates>
123
+ <newsticker>
124
+ <file>newsticker.xml</file>
125
+ </newsticker>
126
+ </updates>
127
+ </layout>
128
+ </adminhtml>
129
+ <default>
130
+ <yantrakaar_newsticker>
131
+ <yantrakaar_newsticker_settings>
132
+ <enabled></enabled>
133
+ <groupid>1</groupid>
134
+ <jquery>1</jquery>
135
+ </yantrakaar_newsticker_settings>
136
+ <yantrakaar_newsticker_general>
137
+ <mode>horizontal</mode>
138
+ <speed>7200</speed>
139
+ <slidemargin>0</slidemargin>
140
+ <startslide>0</startslide>
141
+ <randomstart>0</randomstart>
142
+ <slideselector></slideselector>
143
+ <infiniteloop>1</infiniteloop>
144
+ <hidecontrolonend>0</hidecontrolonend>
145
+ <captions>0</captions>
146
+ <ticker>1</ticker>
147
+ <tickerhover>1</tickerhover>
148
+ <adaptiveheight>0</adaptiveheight>
149
+ <adaptiveheightspeed>500</adaptiveheightspeed>
150
+ <responsive>1</responsive>
151
+ <usecss>1</usecss>
152
+ <preloadimages>visible</preloadimages>
153
+ <touchenabled>1</touchenabled>
154
+ <swipethreshold>50</swipethreshold>
155
+ <onetoonetouch>1</onetoonetouch>
156
+ <preventdefaultswipex>1</preventdefaultswipex>
157
+ <preventdefaultswipey>0</preventdefaultswipey>
158
+ </yantrakaar_newsticker_general>
159
+ <yantrakaar_newsticker_pager>
160
+ <pager>1</pager>
161
+ <pagertype>full</pagertype>
162
+ <pagershortseparator><![CDATA[/]]></pagershortseparator>
163
+ </yantrakaar_newsticker_pager>
164
+ <yantrakaar_newsticker_controls>
165
+ <controls>1</controls>
166
+ <nexttext>Next</nexttext>
167
+ <prevtext>Prev</prevtext>
168
+ <autocontrols>0</autocontrols>
169
+ <starttext>Start</starttext>
170
+ <stoptext>Stop</stoptext>
171
+ <autocontrolscombine>0</autocontrolscombine>
172
+ </yantrakaar_newsticker_controls>
173
+ <yantrakaar_newsticker_auto>
174
+ <auto>0</auto>
175
+ <pause>4000</pause>
176
+ <autostart>1</autostart>
177
+ <autodirection>next</autodirection>
178
+ <autohover>0</autohover>
179
+ <autodelay>0</autodelay>
180
+ </yantrakaar_newsticker_auto>
181
+ <yantrakaar_newsticker_carousel>
182
+ <minslides>1</minslides>
183
+ <maxslides>1</maxslides>
184
+ <moveslides>0</moveslides>
185
+ <slidewidth>500</slidewidth>
186
+ </yantrakaar_newsticker_carousel>
187
+ <yantrakaar_newsticker_easing>
188
+ <enabled>1</enabled>
189
+ <easing></easing>
190
+ </yantrakaar_newsticker_easing>
191
+ <yantrakaar_newsticker_vids>
192
+ <enabled>0</enabled>
193
+ </yantrakaar_newsticker_vids>
194
+ </yantrakaar_newsticker>
195
+ </default>
196
+ </config>
app/code/local/Yantrakaar/NewsTicker/etc/system.xml ADDED
@@ -0,0 +1,663 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <yantrakaar translate="label">
5
+ <label>Yantrakaar</label>
6
+ <sort_order>50</sort_order>
7
+ </yantrakaar>
8
+ </tabs>
9
+
10
+ <sections>
11
+ <yantrakaar_newsticker translate="label">
12
+ <label><![CDATA[News Ticker]]></label>
13
+ <tab>yantrakaar</tab>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>1000</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+
20
+ <groups>
21
+ <yantrakaar_newsticker_settings>
22
+ <label>Settings</label>
23
+ <frontend_type>text</frontend_type>
24
+ <sort_order>10</sort_order>
25
+ <show_in_default>1</show_in_default>
26
+ <show_in_website>1</show_in_website>
27
+ <show_in_store>1</show_in_store>
28
+ <expanded>1</expanded>
29
+
30
+ <comment><![CDATA[<p style="font-weight: bold;">Settings for News Ticker</p>]]></comment>
31
+ <fields>
32
+ <enabled translate="label comment">
33
+ <label>Ticker Enabled</label>
34
+ <frontend_type>select</frontend_type>
35
+ <source_model>adminhtml/system_config_source_yesno</source_model>
36
+ <sort_order>10</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ </enabled>
41
+
42
+ <groupid translate="label comment">
43
+ <label>Ticker Group Id</label>
44
+ <frontend_type>text</frontend_type>
45
+ <comment>Ticker group id to be displayed</comment>
46
+ <sort_order>20</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>1</show_in_store>
50
+ </groupid>
51
+
52
+
53
+ <jquery>
54
+ <label>Jquery Enabled</label>
55
+ <comment>Use jquery from this module</comment>
56
+ <frontend_type>select</frontend_type>
57
+ <source_model>adminhtml/system_config_source_yesno</source_model>
58
+ <sort_order>30</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>1</show_in_store>
62
+ </jquery>
63
+ </fields>
64
+ </yantrakaar_newsticker_settings>
65
+
66
+ </groups>
67
+ <groups>
68
+ <yantrakaar_newsticker_general>
69
+ <label>General</label>
70
+ <frontend_type>text</frontend_type>
71
+ <sort_order>20</sort_order>
72
+ <show_in_default>1</show_in_default>
73
+ <show_in_website>1</show_in_website>
74
+ <show_in_store>1</show_in_store>
75
+ <expanded>1</expanded>
76
+
77
+ <comment><![CDATA[<p style="font-weight: bold;">General Settings</p>]]></comment>
78
+ <fields>
79
+ <mode translate="label comment">
80
+ <label>Mode</label>
81
+ <frontend_type>select</frontend_type>
82
+ <comment>Type of transition between slides</comment>
83
+ <source_model>Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Mode</source_model>
84
+ <sort_order>10</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
+ </mode>
89
+
90
+
91
+ <speed translate="label comment">
92
+ <label>Speed</label>
93
+ <comment>Slide transition duration (in ms)</comment>
94
+ <frontend_type>text</frontend_type>
95
+ <sort_order>30</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>1</show_in_website>
98
+ <show_in_store>1</show_in_store>
99
+ </speed>
100
+
101
+ <slidemargin translate="label comment">
102
+ <label>Slide Margin</label>
103
+ <comment>Margin between each slide</comment>
104
+ <frontend_type>text</frontend_type>
105
+ <sort_order>50</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>1</show_in_store>
109
+ </slidemargin>
110
+
111
+ <startslide translate="label comment">
112
+ <label>Start Slide</label>
113
+ <comment>Starting slide index (zero-based)</comment>
114
+ <frontend_type>text</frontend_type>
115
+ <sort_order>60</sort_order>
116
+ <show_in_default>1</show_in_default>
117
+ <show_in_website>1</show_in_website>
118
+ <show_in_store>1</show_in_store>
119
+ </startslide>
120
+
121
+ <randomstart translate="label comment">
122
+ <label>Random Start</label>
123
+ <comment>Start slider on a random slide</comment>
124
+ <frontend_type>select</frontend_type>
125
+ <source_model>adminhtml/system_config_source_yesno</source_model>
126
+ <sort_order>70</sort_order>
127
+ <show_in_default>1</show_in_default>
128
+ <show_in_website>1</show_in_website>
129
+ <show_in_store>1</show_in_store>
130
+ </randomstart>
131
+
132
+ <slideselector translate="label comment">
133
+ <label>Slide Selector</label>
134
+ <comment>Element to use as slides (ex. 'div.slide').</comment>
135
+ <frontend_type>text</frontend_type>
136
+ <sort_order>80</sort_order>
137
+ <show_in_default>1</show_in_default>
138
+ <show_in_website>1</show_in_website>
139
+ <show_in_store>1</show_in_store>
140
+ </slideselector>
141
+
142
+ <infiniteloop translate="label comment">
143
+ <label>Infinite Loop</label>
144
+ <comment>Element to use as slides (ex. 'div.slide').</comment>
145
+ <frontend_type>select</frontend_type>
146
+ <source_model>adminhtml/system_config_source_yesno</source_model>
147
+ <sort_order>90</sort_order>
148
+ <show_in_default>1</show_in_default>
149
+ <show_in_website>1</show_in_website>
150
+ <show_in_store>1</show_in_store>
151
+ </infiniteloop>
152
+
153
+ <hidecontrolonend translate="label comment">
154
+ <label>Hide Control On End</label>
155
+ <comment>If true, "Next" control will be hidden on last slide and vice-versa . Note: Only used when infiniteLoop: false</comment>
156
+ <frontend_type>select</frontend_type>
157
+ <source_model>adminhtml/system_config_source_yesno</source_model>
158
+ <sort_order>100</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ </hidecontrolonend>
163
+
164
+ <captions translate="label comment">
165
+ <label>Captions</label>
166
+ <comment>Include image captions. Captions are derived from the image's title attribute</comment>
167
+ <frontend_type>select</frontend_type>
168
+ <source_model>adminhtml/system_config_source_yesno</source_model>
169
+ <sort_order>110</sort_order>
170
+ <show_in_default>1</show_in_default>
171
+ <show_in_website>1</show_in_website>
172
+ <show_in_store>1</show_in_store>
173
+ </captions>
174
+
175
+ <ticker translate="label comment">
176
+ <label>Ticker</label>
177
+ <comment>Use slider in ticker mode (similar to a news ticker)</comment>
178
+ <frontend_type>select</frontend_type>
179
+ <source_model>adminhtml/system_config_source_yesno</source_model>
180
+ <sort_order>120</sort_order>
181
+ <show_in_default>1</show_in_default>
182
+ <show_in_website>1</show_in_website>
183
+ <show_in_store>1</show_in_store>
184
+ </ticker>
185
+
186
+ <tickerhover translate="label comment">
187
+ <label>Ticker Hover</label>
188
+ <comment>Ticker will pause when mouse hovers over slider. Note: this functionality does NOT work if using CSS transitions!</comment>
189
+ <frontend_type>select</frontend_type>
190
+ <source_model>adminhtml/system_config_source_yesno</source_model>
191
+ <sort_order>130</sort_order>
192
+ <show_in_default>1</show_in_default>
193
+ <show_in_website>1</show_in_website>
194
+ <show_in_store>1</show_in_store>
195
+ </tickerhover>
196
+
197
+ <adaptiveheight translate="label comment">
198
+ <label>Adaptive Height</label>
199
+ <comment>Dynamically adjust slider height based on each slide's height</comment>
200
+ <frontend_type>select</frontend_type>
201
+ <source_model>adminhtml/system_config_source_yesno</source_model>
202
+ <sort_order>140</sort_order>
203
+ <show_in_default>1</show_in_default>
204
+ <show_in_website>1</show_in_website>
205
+ <show_in_store>1</show_in_store>
206
+ </adaptiveheight>
207
+
208
+ <adaptiveheightspeed translate="label comment">
209
+ <label>Adaptive Height Speed</label>
210
+ <depends><adaptiveheight>1</adaptiveheight></depends>
211
+ <comment>Slide height transition duration (in ms). Note: only used if adaptiveHeight: true</comment>
212
+ <frontend_type>text</frontend_type>
213
+ <sort_order>150</sort_order>
214
+ <show_in_default>1</show_in_default>
215
+ <show_in_website>1</show_in_website>
216
+ <show_in_store>1</show_in_store>
217
+ </adaptiveheightspeed>
218
+
219
+ <responsive translate="label comment">
220
+ <label>Responsive</label>
221
+ <comment>Enable or disable auto resize of the slider. Useful if you need to use fixed width sliders.</comment>
222
+ <frontend_type>select</frontend_type>
223
+ <source_model>adminhtml/system_config_source_yesno</source_model>
224
+ <sort_order>160</sort_order>
225
+ <show_in_default>1</show_in_default>
226
+ <show_in_website>1</show_in_website>
227
+ <show_in_store>1</show_in_store>
228
+ </responsive>
229
+
230
+ <usecss translate="label comment">
231
+ <label>Use CSS</label>
232
+ <comment>If true, CSS transitions will be used for horizontal and vertical slide animations (this uses native hardware acceleration). If false, jQuery animate() will be used.</comment>
233
+ <frontend_type>select</frontend_type>
234
+ <source_model>adminhtml/system_config_source_yesno</source_model>
235
+ <sort_order>170</sort_order>
236
+ <show_in_default>1</show_in_default>
237
+ <show_in_website>1</show_in_website>
238
+ <show_in_store>1</show_in_store>
239
+ </usecss>
240
+
241
+ <preloadimages translate="label comment">
242
+ <label>Preload Images</label>
243
+ <comment>If 'all', preloads all images before starting the slider. If 'visible', preloads only images in the initially visible slides before starting the slider (tip: use 'visible' if all slides are identical dimensions)</comment>
244
+ <frontend_type>select</frontend_type>
245
+ <source_model>Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Preloadimages</source_model>
246
+ <sort_order>180</sort_order>
247
+ <show_in_default>1</show_in_default>
248
+ <show_in_website>1</show_in_website>
249
+ <show_in_store>1</show_in_store>
250
+ </preloadimages>
251
+
252
+ <touchenabled translate="label comment">
253
+ <label>Touch Enabled</label>
254
+ <comment>If true, slider will allow touch swipe transitions</comment>
255
+ <frontend_type>select</frontend_type>
256
+ <source_model>adminhtml/system_config_source_yesno</source_model>
257
+ <sort_order>181</sort_order>
258
+ <show_in_default>1</show_in_default>
259
+ <show_in_website>1</show_in_website>
260
+ <show_in_store>1</show_in_store>
261
+ </touchenabled>
262
+
263
+ <swipethreshold translate="label comment">
264
+ <label>Swipe Threshold</label>
265
+ <depends><touchenabled>1</touchenabled></depends>
266
+ <comment>Amount of pixels a touch swipe needs to exceed in order to execute a slide transition. Note: only used if touchEnabled: true</comment>
267
+ <frontend_type>text</frontend_type>
268
+ <sort_order>190</sort_order>
269
+ <show_in_default>1</show_in_default>
270
+ <show_in_website>1</show_in_website>
271
+ <show_in_store>1</show_in_store>
272
+ </swipethreshold>
273
+
274
+ <onetoonetouch translate="label comment">
275
+ <label>One To One Touch</label>
276
+ <comment>If true, non-fade slides follow the finger as it swipes</comment>
277
+ <frontend_type>select</frontend_type>
278
+ <source_model>adminhtml/system_config_source_yesno</source_model>
279
+ <sort_order>191</sort_order>
280
+ <show_in_default>1</show_in_default>
281
+ <show_in_website>1</show_in_website>
282
+ <show_in_store>1</show_in_store>
283
+ </onetoonetouch>
284
+
285
+ <preventdefaultswipex translate="label comment">
286
+ <label>Prevent Default Swipe X</label>
287
+ <comment>If true, touch screen will not move along the x-axis as the finger swipes</comment>
288
+ <frontend_type>select</frontend_type>
289
+ <source_model>adminhtml/system_config_source_yesno</source_model>
290
+ <sort_order>200</sort_order>
291
+ <show_in_default>1</show_in_default>
292
+ <show_in_website>1</show_in_website>
293
+ <show_in_store>1</show_in_store>
294
+ </preventdefaultswipex>
295
+
296
+ <preventdefaultswipey translate="label comment">
297
+ <label>Prevent Default Swipe Y</label>
298
+ <comment>If true, touch screen will not move along the y-axis as the finger swipes</comment>
299
+ <frontend_type>select</frontend_type>
300
+ <source_model>adminhtml/system_config_source_yesno</source_model>
301
+ <sort_order>210</sort_order>
302
+ <show_in_default>1</show_in_default>
303
+ <show_in_website>1</show_in_website>
304
+ <show_in_store>1</show_in_store>
305
+ </preventdefaultswipey>
306
+
307
+ </fields>
308
+ </yantrakaar_newsticker_general>
309
+
310
+ </groups>
311
+
312
+ <groups>
313
+ <yantrakaar_newsticker_pager>
314
+ <label>Pager Settings</label>
315
+ <frontend_type>text</frontend_type>
316
+ <sort_order>89</sort_order>
317
+ <show_in_default>1</show_in_default>
318
+ <show_in_website>1</show_in_website>
319
+ <show_in_store>1</show_in_store>
320
+ <expanded>1</expanded>
321
+
322
+ <comment><![CDATA[<p style="font-weight: bold;">Pager</p>]]></comment>
323
+ <fields>
324
+ <pager translate="label comment">
325
+ <label>Pager</label>
326
+ <frontend_type>select</frontend_type>
327
+ <source_model>adminhtml/system_config_source_yesno</source_model>
328
+ <comment>If true, a pager will be added</comment>
329
+ <sort_order>10</sort_order>
330
+ <show_in_default>1</show_in_default>
331
+ <show_in_website>1</show_in_website>
332
+ <show_in_store>1</show_in_store>
333
+ </pager>
334
+
335
+ <pagertype translate="label comment">
336
+ <label>Pager Type</label>
337
+ <frontend_type>select</frontend_type>
338
+ <source_model>Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Pagertype</source_model>
339
+ <comment>If 'full', a pager link will be generated for each slide. If 'short', a x / y pager will be used (ex. 1 / 5)</comment>
340
+ <sort_order>20</sort_order>
341
+ <show_in_default>1</show_in_default>
342
+ <show_in_website>1</show_in_website>
343
+ <show_in_store>1</show_in_store>
344
+ </pagertype>
345
+
346
+
347
+ <pagershortseparator>
348
+ <label>Pager Short Separator</label>
349
+ <comment>If pagerType: 'short', pager will use this value as the separating character</comment>
350
+ <frontend_type>text</frontend_type>
351
+ <sort_order>30</sort_order>
352
+ <show_in_default>1</show_in_default>
353
+ <show_in_website>1</show_in_website>
354
+ <show_in_store>1</show_in_store>
355
+ </pagershortseparator>
356
+ </fields>
357
+ </yantrakaar_newsticker_pager>
358
+
359
+ </groups>
360
+
361
+ <groups>
362
+ <yantrakaar_newsticker_controls>
363
+ <label>Controls Settings</label>
364
+ <frontend_type>text</frontend_type>
365
+ <sort_order>100</sort_order>
366
+ <show_in_default>1</show_in_default>
367
+ <show_in_website>1</show_in_website>
368
+ <show_in_store>1</show_in_store>
369
+ <expanded>1</expanded>
370
+
371
+ <comment><![CDATA[<p style="font-weight: bold;">Controls</p>]]></comment>
372
+ <fields>
373
+ <controls translate="label comment">
374
+ <label>Controls</label>
375
+ <frontend_type>select</frontend_type>
376
+ <source_model>adminhtml/system_config_source_yesno</source_model>
377
+ <comment>If true, "Next" / "Prev" controls will be added</comment>
378
+ <sort_order>10</sort_order>
379
+ <show_in_default>1</show_in_default>
380
+ <show_in_website>1</show_in_website>
381
+ <show_in_store>1</show_in_store>
382
+ </controls>
383
+
384
+ <nexttext translate="label comment">
385
+ <label>Next Text</label>
386
+ <frontend_type>text</frontend_type>
387
+ <comment>Text to be used for the "Next" control</comment>
388
+ <sort_order>20</sort_order>
389
+ <show_in_default>1</show_in_default>
390
+ <show_in_website>1</show_in_website>
391
+ <show_in_store>1</show_in_store>
392
+ </nexttext>
393
+
394
+
395
+ <prevtext>
396
+ <label>Prev Text</label>
397
+ <comment>Text to be used for the "Prev" control</comment>
398
+ <frontend_type>text</frontend_type>
399
+ <sort_order>30</sort_order>
400
+ <show_in_default>1</show_in_default>
401
+ <show_in_website>1</show_in_website>
402
+ <show_in_store>1</show_in_store>
403
+ </prevtext>
404
+
405
+ <autocontrols>
406
+ <label>Auto Controls</label>
407
+ <comment>If true, "Start" / "Stop" controls will be added</comment>
408
+ <frontend_type>select</frontend_type>
409
+ <source_model>adminhtml/system_config_source_yesno</source_model>
410
+ <sort_order>40</sort_order>
411
+ <show_in_default>1</show_in_default>
412
+ <show_in_website>1</show_in_website>
413
+ <show_in_store>1</show_in_store>
414
+ </autocontrols>
415
+
416
+ <starttext translate="label comment">
417
+ <label>Start Text</label>
418
+ <frontend_type>text</frontend_type>
419
+ <comment>Text to be used for the "Start" control</comment>
420
+ <sort_order>50</sort_order>
421
+ <show_in_default>1</show_in_default>
422
+ <show_in_website>1</show_in_website>
423
+ <show_in_store>1</show_in_store>
424
+ </starttext>
425
+
426
+
427
+ <stoptext>
428
+ <label>Stop Text</label>
429
+ <comment>Text to be used for the "Stop" control</comment>
430
+ <frontend_type>text</frontend_type>
431
+ <sort_order>60</sort_order>
432
+ <show_in_default>1</show_in_default>
433
+ <show_in_website>1</show_in_website>
434
+ <show_in_store>1</show_in_store>
435
+ </stoptext>
436
+
437
+ <autocontrolscombine>
438
+ <label>Auto Controls Combine</label>
439
+ <comment>When slideshow is playing only "Stop" control is displayed and vice-versa</comment>
440
+ <frontend_type>select</frontend_type>
441
+ <source_model>adminhtml/system_config_source_yesno</source_model>
442
+ <sort_order>70</sort_order>
443
+ <show_in_default>1</show_in_default>
444
+ <show_in_website>1</show_in_website>
445
+ <show_in_store>1</show_in_store>
446
+ </autocontrolscombine>
447
+
448
+ </fields>
449
+ </yantrakaar_newsticker_controls>
450
+
451
+ </groups>
452
+
453
+ <groups>
454
+ <yantrakaar_newsticker_auto>
455
+ <label>Auto Settings</label>
456
+ <frontend_type>text</frontend_type>
457
+ <sort_order>110</sort_order>
458
+ <show_in_default>1</show_in_default>
459
+ <show_in_website>1</show_in_website>
460
+ <show_in_store>1</show_in_store>
461
+ <expanded>1</expanded>
462
+
463
+ <comment><![CDATA[<p style="font-weight: bold;">Settings for Auto</p>]]></comment>
464
+ <fields>
465
+ <auto translate="label comment">
466
+ <label>Auto</label>
467
+ <frontend_type>select</frontend_type>
468
+ <source_model>adminhtml/system_config_source_yesno</source_model>
469
+ <comment>Slides will automatically transition</comment>
470
+ <sort_order>10</sort_order>
471
+ <show_in_default>1</show_in_default>
472
+ <show_in_website>1</show_in_website>
473
+ <show_in_store>1</show_in_store>
474
+ </auto>
475
+
476
+
477
+ <pause>
478
+ <label>Pause</label>
479
+ <comment>The amount of time (in ms) between each auto transition</comment>
480
+ <frontend_type>text</frontend_type>
481
+ <sort_order>20</sort_order>
482
+ <show_in_default>1</show_in_default>
483
+ <show_in_website>1</show_in_website>
484
+ <show_in_store>1</show_in_store>
485
+ </pause>
486
+
487
+ <autostart translate="label comment">
488
+ <label>Auto Start</label>
489
+ <frontend_type>select</frontend_type>
490
+ <source_model>adminhtml/system_config_source_yesno</source_model>
491
+ <comment>Auto show starts playing on load. If false, slideshow will start when the "Start" control is clicked</comment>
492
+ <sort_order>30</sort_order>
493
+ <show_in_default>1</show_in_default>
494
+ <show_in_website>1</show_in_website>
495
+ <show_in_store>1</show_in_store>
496
+ </autostart>
497
+
498
+ <autodirection translate="label comment">
499
+ <label>Auto Direction</label>
500
+ <frontend_type>select</frontend_type>
501
+ <source_model>Yantrakaar_NewsTicker_Model_Adminhtml_System_Config_Source_Autodirection</source_model>
502
+ <comment>The direction of auto show slide transitions</comment>
503
+ <sort_order>40</sort_order>
504
+ <show_in_default>1</show_in_default>
505
+ <show_in_website>1</show_in_website>
506
+ <show_in_store>1</show_in_store>
507
+ </autodirection>
508
+
509
+ <autohover translate="label comment">
510
+ <label>Auto Hover</label>
511
+ <frontend_type>select</frontend_type>
512
+ <source_model>adminhtml/system_config_source_yesno</source_model>
513
+ <comment>Auto show will pause when mouse hovers over slider</comment>
514
+ <sort_order>50</sort_order>
515
+ <show_in_default>1</show_in_default>
516
+ <show_in_website>1</show_in_website>
517
+ <show_in_store>1</show_in_store>
518
+ </autohover>
519
+
520
+ <autodelay translate="label comment">
521
+ <label>Auto Delay</label>
522
+ <frontend_type>text</frontend_type>
523
+ <comment>Time (in ms) auto show should wait before starting</comment>
524
+ <sort_order>50</sort_order>
525
+ <show_in_default>1</show_in_default>
526
+ <show_in_website>1</show_in_website>
527
+ <show_in_store>1</show_in_store>
528
+ </autodelay>
529
+
530
+ </fields>
531
+ </yantrakaar_newsticker_auto>
532
+
533
+ </groups>
534
+
535
+ <groups>
536
+ <yantrakaar_newsticker_carousel>
537
+ <label>Carousel Settings</label>
538
+ <frontend_type>text</frontend_type>
539
+ <sort_order>125</sort_order>
540
+ <show_in_default>1</show_in_default>
541
+ <show_in_website>1</show_in_website>
542
+ <show_in_store>1</show_in_store>
543
+ <expanded>1</expanded>
544
+
545
+ <comment><![CDATA[<p style="font-weight: bold;">Settings for Carousel</p>]]></comment>
546
+ <fields>
547
+
548
+ <minslides>
549
+ <label>Min Slides</label>
550
+ <comment>The minimum number of slides to be shown. Slides will be sized down if carousel becomes smaller than the original size.</comment>
551
+ <frontend_type>text</frontend_type>
552
+ <sort_order>10</sort_order>
553
+ <show_in_default>1</show_in_default>
554
+ <show_in_website>1</show_in_website>
555
+ <show_in_store>1</show_in_store>
556
+ </minslides>
557
+
558
+ <maxslides>
559
+ <label>Max Slides</label>
560
+ <comment>The maximum number of slides to be shown. Slides will be sized up if carousel becomes larger than the original size.</comment>
561
+ <frontend_type>text</frontend_type>
562
+ <sort_order>20</sort_order>
563
+ <show_in_default>1</show_in_default>
564
+ <show_in_website>1</show_in_website>
565
+ <show_in_store>1</show_in_store>
566
+ </maxslides>
567
+
568
+ <moveslides>
569
+ <label>Move Slides</label>
570
+ <comment><![CDATA[The number of slides to move on transition. This value must be >= minSlides, and <= maxSlides. If zero (default), the number of fully-visible slides will be used.]]></comment>
571
+ <frontend_type>text</frontend_type>
572
+ <sort_order>30</sort_order>
573
+ <show_in_default>1</show_in_default>
574
+ <show_in_website>1</show_in_website>
575
+ <show_in_store>1</show_in_store>
576
+ </moveslides>
577
+
578
+ <slidewidth>
579
+ <label>Slide Width</label>
580
+ <comment>The width of each slide. This setting is required for all horizontal carousels!</comment>
581
+ <frontend_type>text</frontend_type>
582
+ <sort_order>40</sort_order>
583
+ <show_in_default>1</show_in_default>
584
+ <show_in_website>1</show_in_website>
585
+ <show_in_store>1</show_in_store>
586
+ </slidewidth>
587
+ </fields>
588
+ </yantrakaar_newsticker_carousel>
589
+
590
+ </groups>
591
+
592
+ <groups>
593
+ <yantrakaar_newsticker_easing>
594
+ <label>Easing Settings</label>
595
+ <frontend_type>text</frontend_type>
596
+ <sort_order>140</sort_order>
597
+ <show_in_default>1</show_in_default>
598
+ <show_in_website>1</show_in_website>
599
+ <show_in_store>1</show_in_store>
600
+ <expanded>1</expanded>
601
+
602
+ <comment><![CDATA[<p style="font-weight: bold;">The type of "easing" to use during transitions. If using CSS transitions, include a value for the transition-timing-function property. If not using CSS transitions, you may include plugins/jquery.easing.1.3.js for many options.
603
+ See http://gsgd.co.uk/sandbox/jquery/easing/ for more info.</p>]]></comment>
604
+ <fields>
605
+ <enabled translate="label comment">
606
+ <label>Easing Enabled</label>
607
+ <frontend_type>select</frontend_type>
608
+ <source_model>adminhtml/system_config_source_yesno</source_model>
609
+ <sort_order>10</sort_order>
610
+ <show_in_default>1</show_in_default>
611
+ <show_in_website>1</show_in_website>
612
+ <show_in_store>1</show_in_store>
613
+ </enabled>
614
+
615
+
616
+ <easing>
617
+ <label>Easing Value</label>
618
+ <comment><![CDATA[options: if using CSS: 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'cubic-bezier(n,n,n,n)'. If not using CSS: 'swing', 'linear' (see the above file for more options)]]></comment>
619
+ <frontend_type>text</frontend_type>
620
+ <sort_order>30</sort_order>
621
+ <show_in_default>1</show_in_default>
622
+ <show_in_website>1</show_in_website>
623
+ <show_in_store>1</show_in_store>
624
+ </easing>
625
+ </fields>
626
+ </yantrakaar_newsticker_easing>
627
+
628
+ </groups>
629
+
630
+ <groups>
631
+ <yantrakaar_newsticker_vids>
632
+ <label>Video Settings</label>
633
+ <frontend_type>text</frontend_type>
634
+ <sort_order>150</sort_order>
635
+ <show_in_default>1</show_in_default>
636
+ <show_in_website>1</show_in_website>
637
+ <show_in_store>1</show_in_store>
638
+ <expanded>1</expanded>
639
+
640
+ <comment><![CDATA[<p style="font-weight: bold;">If any slides contain video, set this to true. Also, include plugins/jquery.fitvids.js
641
+ See http://fitvidsjs.com/ for more info</p>]]></comment>
642
+ <fields>
643
+ <enabled translate="label comment">
644
+ <label>Video Enabled</label>
645
+ <frontend_type>select</frontend_type>
646
+ <source_model>adminhtml/system_config_source_yesno</source_model>
647
+ <sort_order>10</sort_order>
648
+ <show_in_default>1</show_in_default>
649
+ <show_in_website>1</show_in_website>
650
+ <show_in_store>1</show_in_store>
651
+ </enabled>
652
+
653
+
654
+ </fields>
655
+ </yantrakaar_newsticker_vids>
656
+
657
+ </groups>
658
+
659
+ </yantrakaar_newsticker>
660
+
661
+ </sections>
662
+
663
+ </config>
app/code/local/Yantrakaar/NewsTicker/sql/newsticker_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $sql=<<<SQLTEXT
5
+ drop table if exists newsticker_group ; create table newsticker_group(group_id int auto_increment not null ,group_name varchar(50) not null ,group_active bool not null,primary key(group_id));
6
+ drop table if exists newsticker_text; create table newsticker_text(ticker_id int auto_increment not null , ticker_text varchar(500) , ticker_group_id int,primary key(ticker_id) , foreign key(ticker_group_id) references newsticker_group(group_id));
7
+
8
+ SQLTEXT;
9
+
10
+ $installer->run($sql);
11
+ //demo
12
+ //Mage::getModel('core/url_rewrite')->setId(null);
13
+ //demo
14
+ $installer->endSetup();
15
+
app/design/adminhtml/default/default/layout/newsticker.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <newsticker_adminhtml_tickergroup_index>
4
+ <reference name="content">
5
+ <block type="newsticker/adminhtml_tickergroup" name="tickergroup" />
6
+ </reference>
7
+ </newsticker_adminhtml_tickergroup_index>
8
+ <newsticker_adminhtml_tickertext_index>
9
+ <reference name="content">
10
+ <block type="newsticker/adminhtml_tickertext" name="tickertext" />
11
+ </reference>
12
+ </newsticker_adminhtml_tickertext_index>
13
+ </layout>
app/design/frontend/base/default/layout/newsticker.xml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addItem">
6
+ <type>skin_css</type>
7
+ <name>css/jquery.bxslider.css</name>
8
+ </action>
9
+ <action method="addItem" ifconfig="yantrakaar_newsticker/yantrakaar_newsticker_settings/jquery">
10
+ <type>skin_js</type>
11
+ <name>js/newsticker/jquery-1.11.0.min.js</name>
12
+ </action>
13
+ <action method="addItem" ifconfig="yantrakaar_newsticker/yantrakaar_newsticker_easing/enabled">
14
+ <type>skin_js</type>
15
+ <name>js/newsticker/jquery.easing.1.3.js</name>
16
+ </action>
17
+ <action method="addItem" ifconfig="yantrakaar_newsticker/yantrakaar_newsticker_vids/enabled">
18
+ <type>skin_js</type>
19
+ <name>js/newsticker/jquery.fitvids.js</name>
20
+ </action>
21
+ <action method="addItem">
22
+ <type>skin_js</type>
23
+ <name>js/newsticker/jquery.bxslider.min.js</name>
24
+ </action>
25
+ </reference>
26
+ <reference name="breadcrumbs">
27
+ <block name="newsticker" type="newsticker/newsticker" template="newsticker/newsticker.phtml" />
28
+ </reference>
29
+ </default>
30
+ </layout>
app/design/frontend/base/default/template/newsticker/newsticker.phtml ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $ticker_helper = Mage::helper('newsticker');
3
+ $config = Mage::getModel("newsticker/config");
4
+ $easing = $config->getEasingEasing();
5
+ ?>
6
+ <?php if($ticker_helper->isEnabled()):?>
7
+ <?php
8
+ /**
9
+ * get tickers array based on group id
10
+ */
11
+ $tickers = $ticker_helper->getTickerData();
12
+ ?>
13
+ <?php if(!empty($tickers)):?>
14
+ <ul class="bxslider">
15
+ <?php foreach($tickers as $ticker):?>
16
+ <li><?php echo $this->__($ticker['ticker_text']);?></li>
17
+ <?php endforeach;?>
18
+ </ul>
19
+ <script type="text/javascript">
20
+ jQuery('.bxslider').bxSlider({
21
+ // GENERAL
22
+ mode: '<?php echo $config->getGeneralMode();?>',
23
+ slideSelector: '<?php echo $config->getGeneralSlideselector();?>',
24
+ infiniteLoop: <?php echo $config->getGeneralInfiniteloop();?>,
25
+ hideControlOnEnd: <?php echo $config->getGeneralHidecontrolonend();?>,
26
+ speed: <?php echo $config->getGeneralSpeed();?>,
27
+ easing: <?php echo !empty($easing) ? sprintf("'%s'",$easing) : 'null';?>,
28
+ slideMargin: <?php echo $config->getGeneralSlidemargin();?>,
29
+ startSlide: <?php echo $config->getGeneralStartslide();?>,
30
+ randomStart: <?php echo $config->getGeneralRandomstart();?>,
31
+ captions: <?php echo $config->getGeneralCaptions();?>,
32
+ ticker: <?php echo $config->getGeneralTicker();?>,
33
+ tickerHover : <?php echo $config->getGeneralTickerhover();?>,
34
+ adaptiveHeight: <?php echo $config->getGeneralAdaptiveheight();?>,
35
+ adaptiveHeightSpeed: <?php echo $config->getGeneralAdaptiveheightspeed();?>,
36
+ video: <?php echo $config->getVidsEnabled();?>,
37
+ useCSS: <?php echo $config->getGeneralUsecss();?>,
38
+ preloadImages: '<?php echo $config->getGeneralPreloadimages();?>',
39
+ responsive: <?php echo $config->getGeneralResponsive();?>,
40
+
41
+ // TOUCH
42
+ touchEnabled: <?php echo $config->getGeneralTouchenabled();?>,
43
+ swipeThreshold: <?php echo $config->getGeneralSwipethreshold();?>,
44
+ oneToOneTouch: <?php echo $config->getGeneralOnetoonetouch();?>,
45
+ preventDefaultSwipeX: <?php echo $config->getGeneralPreventdefaultswipex();?>,
46
+ preventDefaultSwipeY: <?php echo $config->getGeneralPreventdefaultswipey();?>,
47
+
48
+ // PAGER
49
+ pager: <?php echo $config->getPagerEnabled();?>,
50
+ pagerType: '<?php echo $config->getPagerType();?>',
51
+ pagerShortSeparator: '<?php echo $config->getPagerShortseparator();?>',
52
+ pagerSelector: null,
53
+ buildPager: null,
54
+ pagerCustom: null,
55
+
56
+ // CONTROLS
57
+ controls: <?php echo $config->getControlsEnabled();?>,
58
+ nextText: '<?php echo $config->getControlsNexttext();?>',
59
+ prevText: '<?php echo $config->getControlsPrevtext();?>',
60
+ nextSelector: null,
61
+ prevSelector: null,
62
+ autoControls: <?php echo $config->getControlsAutocontrols();?>,
63
+ startText: '<?php echo $config->getControlsStarttext();?>',
64
+ stopText: '<?php echo $config->getControlsStoptext();?>',
65
+ autoControlsCombine: <?php echo $config->getControlsAutocontrolscombine();?>,
66
+ autoControlsSelector: null,
67
+
68
+ // AUTO
69
+ auto: <?php echo $config->getAutoEnabled();?>,
70
+ pause: <?php echo $config->getAutoPause();?>,
71
+ autoStart: <?php echo $config->getAutoAutostart();?>,
72
+ autoDirection: '<?php echo $config->getAutoAutodirection();?>',
73
+ autoHover: <?php echo $config->getAutoAutohover();?>,
74
+ autoDelay: <?php echo $config->getAutoAutodelay();?>,
75
+
76
+ // CAROUSEL
77
+ minSlides: <?php echo $config->getCarouselMinslides();?>,
78
+ maxSlides: <?php echo $config->getCarouselMaxslides();?>,
79
+ moveSlides: <?php echo $config->getCarouselMoveslides();?>,
80
+ slideWidth: <?php echo $config->getCarouselSlidewidth();?>,
81
+
82
+ });
83
+ </script>
84
+ <?php endif;?>
85
+ <?php endif;?>
app/etc/modules/Yantrakaar_NewsTicker.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Yantrakaar_NewsTicker>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Yantrakaar_NewsTicker>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Yantrakaar_NewsTicker</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This extension is used to display news ticker on the website. </summary>
10
+ <description>You can manage the tickers from the options provided in the admin panel to create group of tickers and display it on the website . There are many options available to control the behaviour of ticker which is based on bxslider jquery plugin.</description>
11
+ <notes>Newsticker with minimal options .</notes>
12
+ <authors><author><name>navinkumar singh</name><user>montuff</user><email>navinkumar.a.singh@gmail.com</email></author></authors>
13
+ <date>2014-03-29</date>
14
+ <time>16:46:09</time>
15
+ <contents><target name="magelocal"><dir name="Yantrakaar"><dir name="NewsTicker"><dir name="Block"><dir name="Adminhtml"><dir name="Tickergroup"><dir name="Edit"><file name="Form.php" hash="7c45d2356dff85489dac4ea6418b998c"/><dir name="Tab"><file name="Form.php" hash="f72c7ced004b289a52c421bdf35b11f0"/></dir><file name="Tabs.php" hash="84801305e28d2c3e3c3c10302961c21c"/></dir><file name="Edit.php" hash="59fd40697169dd665072f3efbf3f4415"/><file name="Grid.php" hash="d2538b091ee68f4ae47ff3b1e83e5215"/></dir><file name="Tickergroup.php" hash="187ba1183c855d23e9339aca4b38146d"/><dir name="Tickertext"><dir name="Edit"><file name="Form.php" hash="6cdf1009a4a5d26be4a60dd456f6968d"/><dir name="Tab"><file name="Form.php" hash="98b7518ab1a3b6e8ca9cbffa86d24628"/></dir><file name="Tabs.php" hash="ca556f19762cf3fc39164277479e9240"/></dir><file name="Edit.php" hash="767af106f498a4337f24b629d2d59e9a"/><file name="Grid.php" hash="32edca324345c67971e1c8eb9e313455"/></dir><file name="Tickertext.php" hash="9a0aa438ac508cc8e2a36e305823bf2c"/></dir><file name="Newsticker.php" hash="1f21d3d7cc1f33a6d5a7046d1d5f54c9"/></dir><dir name="Helper"><file name="Data.php" hash="e8494d2c2741f325bb2994008a839967"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Autodirection.php" hash="bc4365484fe5a60a333d2ea9d94f87db"/><file name="Mode.php" hash="c7c28b1906e5f3117eed1ea3553c9e5f"/><file name="Pagertype.php" hash="c2f9e2cfbf6c02691b5a6dd3ec0753ba"/><file name="Preloadimages.php" hash="d5a8b86f8faacff038d14027b0b29818"/></dir></dir></dir></dir><file name="Config.php" hash="aefc5ba0da942e746bfba6d25ae00e0b"/><dir name="Mysql4"><dir name="Tickergroup"><file name="Collection.php" hash="a06bc3e86f987886a54859c22e2ae319"/></dir><file name="Tickergroup.php" hash="ed0dad8f99427ec06054ab7c6f508a89"/><dir name="Tickertext"><file name="Collection.php" hash="b97b4a06871c29daa4e3c5a74b4b3f0d"/></dir><file name="Tickertext.php" hash="1053d25f128871ba84e2779c4771fdf8"/></dir><file name="Tickergroup.php" hash="c5940a25b48563e0e1dcb50b8dd377f6"/><file name="Tickertext.php" hash="e3114e4db43f04142b93d4afbd876758"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="TickergroupController.php" hash="20ddfa6df5e024db48f448f5b3745e5a"/><file name="TickertextController.php" hash="01ba38895a2783ad740711576b5cf86b"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="985e1719ed5cedf6c3fa0b16724798a3"/><file name="config.xml" hash="071c75276ab5057d229c04b2653f9460"/><file name="system.xml" hash="81dd5d8e1ea426a6cf425d302e57e780"/></dir><dir name="sql"><dir name="newsticker_setup"><file name="mysql4-install-0.1.0.php" hash="b2c8529ef9459fdb169f93cc781cfdad"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="newsticker.xml" hash="522f1aa32e4eaf0279f1710c418bcdd5"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="newsticker.xml" hash="fba7dcd90231c0aa4447c62135047662"/></dir><dir name="template"><dir name="newsticker"><file name="newsticker.phtml" hash="38a17e514ea3aca4394681de180ea7d0"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Yantrakaar_NewsTicker.xml" hash="ee2407f64ac20bbf1d421c15194ac904"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="jquery.bxslider.css" hash="8dd29c4d87588309e29681ef95a4c61e"/></dir><dir name="images"><file name="bx_loader.gif" hash="931bdb6b50816b03206c66921760b246"/><file name="controls.png" hash="d9d25372f38c6b242b9b51d5841fe86e"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/frontend/base/default/css/jquery.bxslider.css ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BxSlider v4.0 - Fully loaded, responsive content slider
3
+ * http://bxslider.com
4
+ *
5
+ * Written by: Steven Wanderski, 2012
6
+ * http://stevenwanderski.com
7
+ * (while drinking Belgian ales and listening to jazz)
8
+ *
9
+ * CEO and founder of bxCreative, LTD
10
+ * http://bxcreative.com
11
+ */
12
+
13
+
14
+ /** RESET AND LAYOUT
15
+ ===================================*/
16
+
17
+ .bx-wrapper {
18
+ position: relative;
19
+ margin: 0 auto 60px;
20
+ padding: 0;
21
+ *zoom: 1;
22
+ }
23
+
24
+ .bx-wrapper img {
25
+ max-width: 100%;
26
+ display: block;
27
+ }
28
+
29
+ /** THEME
30
+ ===================================*/
31
+
32
+ .bx-wrapper .bx-viewport {
33
+ -moz-box-shadow: 0 0 5px #ccc;
34
+ -webkit-box-shadow: 0 0 5px #ccc;
35
+ box-shadow: 0 0 5px #ccc;
36
+ border: solid #fff 5px;
37
+ left: -5px;
38
+ background: #fff;
39
+ }
40
+
41
+ .bx-wrapper .bx-pager,
42
+ .bx-wrapper .bx-controls-auto {
43
+ position: absolute;
44
+ bottom: -30px;
45
+ width: 100%;
46
+ }
47
+
48
+ /* LOADER */
49
+
50
+ .bx-wrapper .bx-loading {
51
+ min-height: 50px;
52
+ background: url(../images/bx_loader.gif) center center no-repeat #fff;
53
+ height: 100%;
54
+ width: 100%;
55
+ position: absolute;
56
+ top: 0;
57
+ left: 0;
58
+ z-index: 2000;
59
+ }
60
+
61
+ /* PAGER */
62
+
63
+ .bx-wrapper .bx-pager {
64
+ text-align: center;
65
+ font-size: .85em;
66
+ font-family: Arial;
67
+ font-weight: bold;
68
+ color: #666;
69
+ padding-top: 20px;
70
+ }
71
+
72
+ .bx-wrapper .bx-pager .bx-pager-item,
73
+ .bx-wrapper .bx-controls-auto .bx-controls-auto-item {
74
+ display: inline-block;
75
+ *zoom: 1;
76
+ *display: inline;
77
+ }
78
+
79
+ .bx-wrapper .bx-pager.bx-default-pager a {
80
+ background: #666;
81
+ text-indent: -9999px;
82
+ display: block;
83
+ width: 10px;
84
+ height: 10px;
85
+ margin: 0 5px;
86
+ outline: 0;
87
+ -moz-border-radius: 5px;
88
+ -webkit-border-radius: 5px;
89
+ border-radius: 5px;
90
+ }
91
+
92
+ .bx-wrapper .bx-pager.bx-default-pager a:hover,
93
+ .bx-wrapper .bx-pager.bx-default-pager a.active {
94
+ background: #000;
95
+ }
96
+
97
+ /* DIRECTION CONTROLS (NEXT / PREV) */
98
+
99
+ .bx-wrapper .bx-prev {
100
+ left: 10px;
101
+ background: url(../images/controls.png) no-repeat 0 -32px;
102
+ }
103
+
104
+ .bx-wrapper .bx-next {
105
+ right: 10px;
106
+ background: url(../images/controls.png) no-repeat -43px -32px;
107
+ }
108
+
109
+ .bx-wrapper .bx-prev:hover {
110
+ background-position: 0 0;
111
+ }
112
+
113
+ .bx-wrapper .bx-next:hover {
114
+ background-position: -43px 0;
115
+ }
116
+
117
+ .bx-wrapper .bx-controls-direction a {
118
+ position: absolute;
119
+ top: 50%;
120
+ margin-top: -16px;
121
+ outline: 0;
122
+ width: 32px;
123
+ height: 32px;
124
+ text-indent: -9999px;
125
+ z-index: 9999;
126
+ }
127
+
128
+ .bx-wrapper .bx-controls-direction a.disabled {
129
+ display: none;
130
+ }
131
+
132
+ /* AUTO CONTROLS (START / STOP) */
133
+
134
+ .bx-wrapper .bx-controls-auto {
135
+ text-align: center;
136
+ }
137
+
138
+ .bx-wrapper .bx-controls-auto .bx-start {
139
+ display: block;
140
+ text-indent: -9999px;
141
+ width: 10px;
142
+ height: 11px;
143
+ outline: 0;
144
+ background: url(../images/controls.png) -86px -11px no-repeat;
145
+ margin: 0 3px;
146
+ }
147
+
148
+ .bx-wrapper .bx-controls-auto .bx-start:hover,
149
+ .bx-wrapper .bx-controls-auto .bx-start.active {
150
+ background-position: -86px 0;
151
+ }
152
+
153
+ .bx-wrapper .bx-controls-auto .bx-stop {
154
+ display: block;
155
+ text-indent: -9999px;
156
+ width: 9px;
157
+ height: 11px;
158
+ outline: 0;
159
+ background: url(../images/controls.png) -86px -44px no-repeat;
160
+ margin: 0 3px;
161
+ }
162
+
163
+ .bx-wrapper .bx-controls-auto .bx-stop:hover,
164
+ .bx-wrapper .bx-controls-auto .bx-stop.active {
165
+ background-position: -86px -33px;
166
+ }
167
+
168
+ /* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
169
+
170
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
171
+ text-align: left;
172
+ width: 80%;
173
+ }
174
+
175
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
176
+ right: 0;
177
+ width: 35px;
178
+ }
179
+
180
+ /* IMAGE CAPTIONS */
181
+
182
+ .bx-wrapper .bx-caption {
183
+ position: absolute;
184
+ bottom: 0;
185
+ left: 0;
186
+ background: #666\9;
187
+ background: rgba(80, 80, 80, 0.75);
188
+ width: 100%;
189
+ }
190
+
191
+ .bx-wrapper .bx-caption span {
192
+ color: #fff;
193
+ font-family: Arial;
194
+ display: block;
195
+ font-size: .85em;
196
+ padding: 10px;
197
+ }
skin/frontend/base/default/images/bx_loader.gif ADDED
Binary file
skin/frontend/base/default/images/controls.png ADDED
Binary file