shweta_testimonials - Version 1.0.3

Version Notes

please fix the small errors if any.

Download this release

Release Info

Developer Shweta Agarwal
Extension shweta_testimonials
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.3

Files changed (37) hide show
  1. app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials.php +16 -16
  2. app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit.php +43 -43
  3. app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit/Form.php +17 -17
  4. app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit/Tab/Form.php +38 -38
  5. app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit/Tabs.php +21 -21
  6. app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Grid.php +61 -61
  7. app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonialsbackend.php +4 -4
  8. app/code/local/Shweta/Testimonials/Block/Index.php +37 -37
  9. app/code/local/Shweta/Testimonials/Block/Left.php +35 -35
  10. app/code/local/Shweta/Testimonials/Block/Testimonials.php +13 -13
  11. app/code/local/Shweta/Testimonials/Helper/Data.php +6 -6
  12. app/code/local/Shweta/Testimonials/Model/Mysql4/Testimonials.php +7 -7
  13. app/code/local/Shweta/Testimonials/Model/Mysql4/Testimonials/Collection.php +11 -11
  14. app/code/local/Shweta/Testimonials/Model/Testimonials.php +11 -11
  15. app/code/local/Shweta/Testimonials/Model/{words.php → Words.php} +14 -14
  16. app/code/local/Shweta/Testimonials/controllers/Adminhtml/TestimonialsController.php +209 -209
  17. app/code/local/Shweta/Testimonials/controllers/Adminhtml/TestimonialsbackendController.php +9 -9
  18. app/code/local/Shweta/Testimonials/controllers/IndexController.php +21 -21
  19. app/code/local/Shweta/Testimonials/controllers/TestimonialsController.php +21 -21
  20. app/code/local/Shweta/Testimonials/etc/10.5.13config.xml +143 -143
  21. app/code/local/Shweta/Testimonials/etc/10.5.13system.xml +14 -14
  22. app/code/local/Shweta/Testimonials/etc/13.5.13config.xml +159 -159
  23. app/code/local/Shweta/Testimonials/etc/13.5.13system.xml +59 -59
  24. app/code/local/Shweta/Testimonials/etc/9.5.13config.xml +133 -133
  25. app/code/local/Shweta/Testimonials/etc/adminhtml.xml +26 -26
  26. app/code/local/Shweta/Testimonials/etc/config.xml +154 -154
  27. app/code/local/Shweta/Testimonials/etc/system.xml +79 -79
  28. app/code/local/Shweta/Testimonials/sql/testimonials_setup/mysql4-install-0.1.0.php +13 -13
  29. app/design/adminhtml/default/default/layout/testimonials.xml +12 -12
  30. app/design/adminhtml/default/default/template/testimonials/testimonialsbackend.phtml +1 -0
  31. app/design/frontend/base/default/layout/testimonials.xml +22 -22
  32. app/design/frontend/base/default/template/testimonials/index.phtml +81 -81
  33. app/design/frontend/base/default/template/testimonials/left.phtml +81 -81
  34. app/design/frontend/base/default/template/testimonials/testimonials.phtml +59 -59
  35. app/etc/modules/Shweta_Testimonials.xml +9 -9
  36. js/jquery.cycle.all.latest.js +1331 -1331
  37. package.xml +4 -4
app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
-
3
-
4
- class Shweta_Testimonials_Block_Adminhtml_Testimonials extends Mage_Adminhtml_Block_Widget_Grid_Container{
5
-
6
- public function __construct()
7
- {
8
-
9
- $this->_controller = "adminhtml_testimonials";
10
- $this->_blockGroup = "testimonials";
11
- $this->_headerText = Mage::helper("testimonials")->__("Testimonials Manager");
12
- $this->_addButtonLabel = Mage::helper("testimonials")->__("Add New Item");
13
- parent::__construct();
14
-
15
- }
16
-
17
  }
1
+ <?php
2
+
3
+
4
+ class Shweta_Testimonials_Block_Adminhtml_Testimonials extends Mage_Adminhtml_Block_Widget_Grid_Container{
5
+
6
+ public function __construct()
7
+ {
8
+
9
+ $this->_controller = "adminhtml_testimonials";
10
+ $this->_blockGroup = "testimonials";
11
+ $this->_headerText = Mage::helper("testimonials")->__("Testimonials Manager");
12
+ $this->_addButtonLabel = Mage::helper("testimonials")->__("Add New Item");
13
+ parent::__construct();
14
+
15
+ }
16
+
17
  }
app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit.php CHANGED
@@ -1,44 +1,44 @@
1
- <?php
2
-
3
- class Shweta_Testimonials_Block_Adminhtml_Testimonials_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
- {
5
- public function __construct()
6
- {
7
-
8
- parent::__construct();
9
- $this->_objectId = "id";
10
- $this->_blockGroup = "testimonials";
11
- $this->_controller = "adminhtml_testimonials";
12
- $this->_updateButton("save", "label", Mage::helper("testimonials")->__("Save Item"));
13
- $this->_updateButton("delete", "label", Mage::helper("testimonials")->__("Delete Item"));
14
-
15
- $this->_addButton("saveandcontinue", array(
16
- "label" => Mage::helper("testimonials")->__("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("testimonials_data") && Mage::registry("testimonials_data")->getId() ){
34
-
35
- return Mage::helper("testimonials")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("testimonials_data")->getId()));
36
-
37
- }
38
- else{
39
-
40
- return Mage::helper("testimonials")->__("Add Item");
41
-
42
- }
43
- }
44
  }
1
+ <?php
2
+
3
+ class Shweta_Testimonials_Block_Adminhtml_Testimonials_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+
8
+ parent::__construct();
9
+ $this->_objectId = "id";
10
+ $this->_blockGroup = "testimonials";
11
+ $this->_controller = "adminhtml_testimonials";
12
+ $this->_updateButton("save", "label", Mage::helper("testimonials")->__("Save Item"));
13
+ $this->_updateButton("delete", "label", Mage::helper("testimonials")->__("Delete Item"));
14
+
15
+ $this->_addButton("saveandcontinue", array(
16
+ "label" => Mage::helper("testimonials")->__("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("testimonials_data") && Mage::registry("testimonials_data")->getId() ){
34
+
35
+ return Mage::helper("testimonials")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("testimonials_data")->getId()));
36
+
37
+ }
38
+ else{
39
+
40
+ return Mage::helper("testimonials")->__("Add Item");
41
+
42
+ }
43
+ }
44
  }
app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit/Form.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- class Shweta_Testimonials_Block_Adminhtml_Testimonials_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
- }
1
+ <?php
2
+ class Shweta_Testimonials_Block_Adminhtml_Testimonials_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/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit/Tab/Form.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php
2
- class Shweta_Testimonials_Block_Adminhtml_Testimonials_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("testimonials_form", array("legend"=>Mage::helper("testimonials")->__("Item information")));
10
-
11
-
12
- $fieldset->addField("name", "text", array(
13
- "label" => Mage::helper("testimonials")->__("name"),
14
- "name" => "name",
15
- ));
16
-
17
- $fieldset->addField('pic', 'image', array(
18
- 'label' => Mage::helper('testimonials')->__('picture'),
19
- 'name' => 'pic',
20
- 'note' => '(*.jpg, *.png, *.gif)',
21
- ));
22
- $fieldset->addField("message", "textarea", array(
23
- "label" => Mage::helper("testimonials")->__("message"),
24
- "name" => "message",
25
- ));
26
-
27
-
28
- if (Mage::getSingleton("adminhtml/session")->getTestimonialsData())
29
- {
30
- $form->setValues(Mage::getSingleton("adminhtml/session")->getTestimonialsData());
31
- Mage::getSingleton("adminhtml/session")->setTestimonialsData(null);
32
- }
33
- elseif(Mage::registry("testimonials_data")) {
34
- $form->setValues(Mage::registry("testimonials_data")->getData());
35
- }
36
- return parent::_prepareForm();
37
- }
38
- }
1
+ <?php
2
+ class Shweta_Testimonials_Block_Adminhtml_Testimonials_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("testimonials_form", array("legend"=>Mage::helper("testimonials")->__("Item information")));
10
+
11
+
12
+ $fieldset->addField("name", "text", array(
13
+ "label" => Mage::helper("testimonials")->__("name"),
14
+ "name" => "name",
15
+ ));
16
+
17
+ $fieldset->addField('pic', 'image', array(
18
+ 'label' => Mage::helper('testimonials')->__('picture'),
19
+ 'name' => 'pic',
20
+ 'note' => '(*.jpg, *.png, *.gif)',
21
+ ));
22
+ $fieldset->addField("message", "textarea", array(
23
+ "label" => Mage::helper("testimonials")->__("message"),
24
+ "name" => "message",
25
+ ));
26
+
27
+
28
+ if (Mage::getSingleton("adminhtml/session")->getTestimonialsData())
29
+ {
30
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getTestimonialsData());
31
+ Mage::getSingleton("adminhtml/session")->setTestimonialsData(null);
32
+ }
33
+ elseif(Mage::registry("testimonials_data")) {
34
+ $form->setValues(Mage::registry("testimonials_data")->getData());
35
+ }
36
+ return parent::_prepareForm();
37
+ }
38
+ }
app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Edit/Tabs.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- class Shweta_Testimonials_Block_Adminhtml_Testimonials_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
- {
4
- public function __construct()
5
- {
6
- parent::__construct();
7
- $this->setId("testimonials_tabs");
8
- $this->setDestElementId("edit_form");
9
- $this->setTitle(Mage::helper("testimonials")->__("Item Information"));
10
- }
11
- protected function _beforeToHtml()
12
- {
13
- $this->addTab("form_section", array(
14
- "label" => Mage::helper("testimonials")->__("Item Information"),
15
- "title" => Mage::helper("testimonials")->__("Item Information"),
16
- "content" => $this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit_tab_form")->toHtml(),
17
- ));
18
- return parent::_beforeToHtml();
19
- }
20
-
21
- }
1
+ <?php
2
+ class Shweta_Testimonials_Block_Adminhtml_Testimonials_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->setId("testimonials_tabs");
8
+ $this->setDestElementId("edit_form");
9
+ $this->setTitle(Mage::helper("testimonials")->__("Item Information"));
10
+ }
11
+ protected function _beforeToHtml()
12
+ {
13
+ $this->addTab("form_section", array(
14
+ "label" => Mage::helper("testimonials")->__("Item Information"),
15
+ "title" => Mage::helper("testimonials")->__("Item Information"),
16
+ "content" => $this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit_tab_form")->toHtml(),
17
+ ));
18
+ return parent::_beforeToHtml();
19
+ }
20
+
21
+ }
app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonials/Grid.php CHANGED
@@ -1,62 +1,62 @@
1
- <?php
2
-
3
- class Shweta_Testimonials_Block_Adminhtml_Testimonials_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- $this->setId("testimonialsGrid");
10
- $this->setDefaultSort("id");
11
- $this->setDefaultDir("ASC");
12
- $this->setSaveParametersInSession(true);
13
- }
14
-
15
- protected function _prepareCollection()
16
- {
17
- $collection = Mage::getModel("testimonials/testimonials")->getCollection();
18
- $this->setCollection($collection);
19
- return parent::_prepareCollection();
20
- }
21
- protected function _prepareColumns()
22
- {
23
- $this->addColumn("id", array(
24
- "header" => Mage::helper("testimonials")->__("ID"),
25
- "align" =>"right",
26
- "width" => "50px",
27
- "type" => "number",
28
- "index" => "id",
29
- ));
30
-
31
- $this->addColumn("name", array(
32
- "header" => Mage::helper("testimonials")->__("name"),
33
- "index" => "name",
34
- ));
35
- $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
36
- $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
37
-
38
- return parent::_prepareColumns();
39
- }
40
-
41
- public function getRowUrl($row)
42
- {
43
- return $this->getUrl("*/*/edit", array("id" => $row->getId()));
44
- }
45
-
46
-
47
-
48
- protected function _prepareMassaction()
49
- {
50
- $this->setMassactionIdField('id');
51
- $this->getMassactionBlock()->setFormFieldName('ids');
52
- $this->getMassactionBlock()->setUseSelectAll(true);
53
- $this->getMassactionBlock()->addItem('remove_testimonials', array(
54
- 'label'=> Mage::helper('testimonials')->__('Remove Testimonials'),
55
- 'url' => $this->getUrl('*/adminhtml_testimonials/massRemove'),
56
- 'confirm' => Mage::helper('testimonials')->__('Are you sure?')
57
- ));
58
- return $this;
59
- }
60
-
61
-
62
  }
1
+ <?php
2
+
3
+ class Shweta_Testimonials_Block_Adminhtml_Testimonials_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId("testimonialsGrid");
10
+ $this->setDefaultSort("id");
11
+ $this->setDefaultDir("ASC");
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel("testimonials/testimonials")->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+ protected function _prepareColumns()
22
+ {
23
+ $this->addColumn("id", array(
24
+ "header" => Mage::helper("testimonials")->__("ID"),
25
+ "align" =>"right",
26
+ "width" => "50px",
27
+ "type" => "number",
28
+ "index" => "id",
29
+ ));
30
+
31
+ $this->addColumn("name", array(
32
+ "header" => Mage::helper("testimonials")->__("name"),
33
+ "index" => "name",
34
+ ));
35
+ $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
36
+ $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
37
+
38
+ return parent::_prepareColumns();
39
+ }
40
+
41
+ public function getRowUrl($row)
42
+ {
43
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
44
+ }
45
+
46
+
47
+
48
+ protected function _prepareMassaction()
49
+ {
50
+ $this->setMassactionIdField('id');
51
+ $this->getMassactionBlock()->setFormFieldName('ids');
52
+ $this->getMassactionBlock()->setUseSelectAll(true);
53
+ $this->getMassactionBlock()->addItem('remove_testimonials', array(
54
+ 'label'=> Mage::helper('testimonials')->__('Remove Testimonials'),
55
+ 'url' => $this->getUrl('*/adminhtml_testimonials/massRemove'),
56
+ 'confirm' => Mage::helper('testimonials')->__('Are you sure?')
57
+ ));
58
+ return $this;
59
+ }
60
+
61
+
62
  }
app/code/local/Shweta/Testimonials/Block/Adminhtml/Testimonialsbackend.php CHANGED
@@ -1,5 +1,5 @@
1
- <?php
2
-
3
- class Shweta_Testimonials_Block_Adminhtml_Testimonialsbackend extends Mage_Adminhtml_Block_Template {
4
-
5
  }
1
+ <?php
2
+
3
+ class Shweta_Testimonials_Block_Adminhtml_Testimonialsbackend extends Mage_Adminhtml_Block_Template {
4
+
5
  }
app/code/local/Shweta/Testimonials/Block/Index.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
-
3
- class Shweta_Testimonials_Block_Index extends Mage_Core_Block_Template{
4
-
5
-
6
-
7
- public function ShowTestimonialsRecords()
8
- {
9
- $w = Mage::getSingleton('core/resource')->getConnection('core_write');
10
- $results = $w->query('SELECT * FROM shweta_testimonials');
11
- return $results;
12
-
13
- }
14
-
15
- public function getTestimonialsEnabled()
16
- {
17
- return Mage::getStoreConfig('shweta/shweta_group/shweta_select',Mage::app()->getStore());
18
- }
19
- public function getTestimonialsImageWidth()
20
- {
21
- return Mage::getStoreConfig('shweta/shweta_group/shweta_width',Mage::app()->getStore());
22
- }
23
- public function getTestimonialsImageHeight()
24
- {
25
- return Mage::getStoreConfig('shweta/shweta_group/shweta_height',Mage::app()->getStore());
26
- }
27
- public function getTestimonialsView()
28
- {
29
- return Mage::getStoreConfig('shweta/shweta_group/shweta_view',Mage::app()->getStore());
30
- }
31
- public function getTestimonialsImages()
32
- {
33
- return Mage::getStoreConfig('shweta/shweta_group/shweta_image',Mage::app()->getStore());
34
- }
35
-
36
-
37
- }
1
+ <?php
2
+
3
+ class Shweta_Testimonials_Block_Index extends Mage_Core_Block_Template{
4
+
5
+
6
+
7
+ public function ShowTestimonialsRecords()
8
+ {
9
+ $w = Mage::getSingleton('core/resource')->getConnection('core_write');
10
+ $results = $w->query('SELECT * FROM shweta_testimonials');
11
+ return $results;
12
+
13
+ }
14
+
15
+ public function getTestimonialsEnabled()
16
+ {
17
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_select',Mage::app()->getStore());
18
+ }
19
+ public function getTestimonialsImageWidth()
20
+ {
21
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_width',Mage::app()->getStore());
22
+ }
23
+ public function getTestimonialsImageHeight()
24
+ {
25
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_height',Mage::app()->getStore());
26
+ }
27
+ public function getTestimonialsView()
28
+ {
29
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_view',Mage::app()->getStore());
30
+ }
31
+ public function getTestimonialsImages()
32
+ {
33
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_image',Mage::app()->getStore());
34
+ }
35
+
36
+
37
+ }
app/code/local/Shweta/Testimonials/Block/Left.php CHANGED
@@ -1,35 +1,35 @@
1
- <?php
2
- class Shweta_Testimonials_Block_Left extends Mage_Core_Block_Template{
3
-
4
- public function ShowTestimonialsRecords()
5
- {
6
- $w = Mage::getSingleton('core/resource')->getConnection('core_write');
7
- $results = $w->query('SELECT * FROM shweta_testimonials');
8
- return $results;
9
-
10
- }
11
-
12
- public function getTestimonialsEnabled()
13
- {
14
- return Mage::getStoreConfig('shweta/shweta_group/shweta_select',Mage::app()->getStore());
15
- }
16
- public function getTestimonialsImageWidth()
17
- {
18
- return Mage::getStoreConfig('shweta/shweta_group/shweta_width',Mage::app()->getStore());
19
- }
20
- public function getTestimonialsImageHeight()
21
- {
22
- return Mage::getStoreConfig('shweta/shweta_group/shweta_height',Mage::app()->getStore());
23
- }
24
- public function getTestimonialsView()
25
- {
26
- return Mage::getStoreConfig('shweta/shweta_group/shweta_view',Mage::app()->getStore());
27
- }
28
- public function getTestimonialsImages()
29
- {
30
- return Mage::getStoreConfig('shweta/shweta_group/shweta_image',Mage::app()->getStore());
31
- }
32
-
33
-
34
-
35
- }
1
+ <?php
2
+ class Shweta_Testimonials_Block_Left extends Mage_Core_Block_Template{
3
+
4
+ public function ShowTestimonialsRecords()
5
+ {
6
+ $w = Mage::getSingleton('core/resource')->getConnection('core_write');
7
+ $results = $w->query('SELECT * FROM shweta_testimonials');
8
+ return $results;
9
+
10
+ }
11
+
12
+ public function getTestimonialsEnabled()
13
+ {
14
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_select',Mage::app()->getStore());
15
+ }
16
+ public function getTestimonialsImageWidth()
17
+ {
18
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_width',Mage::app()->getStore());
19
+ }
20
+ public function getTestimonialsImageHeight()
21
+ {
22
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_height',Mage::app()->getStore());
23
+ }
24
+ public function getTestimonialsView()
25
+ {
26
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_view',Mage::app()->getStore());
27
+ }
28
+ public function getTestimonialsImages()
29
+ {
30
+ return Mage::getStoreConfig('shweta/shweta_group/shweta_image',Mage::app()->getStore());
31
+ }
32
+
33
+
34
+
35
+ }
app/code/local/Shweta/Testimonials/Block/Testimonials.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
- class Shweta_Testimonials_Block_Testimonials extends Mage_Core_Block_Template{
3
-
4
-
5
- public function ShowCustomRecords()
6
- {
7
- $w = Mage::getSingleton('core/resource')->getConnection('core_write');
8
- $results = $w->query('SELECT * FROM shweta_testimonials');
9
- return $results;
10
-
11
- }
12
-
13
- }
1
+ <?php
2
+ class Shweta_Testimonials_Block_Testimonials extends Mage_Core_Block_Template{
3
+
4
+
5
+ public function ShowCustomRecords()
6
+ {
7
+ $w = Mage::getSingleton('core/resource')->getConnection('core_write');
8
+ $results = $w->query('SELECT * FROM shweta_testimonials');
9
+ return $results;
10
+
11
+ }
12
+
13
+ }
app/code/local/Shweta/Testimonials/Helper/Data.php CHANGED
@@ -1,6 +1,6 @@
1
- <?php
2
- class Shweta_Testimonials_Helper_Data extends Mage_Core_Helper_Abstract
3
- {
4
-
5
- }
6
-
1
+ <?php
2
+ class Shweta_Testimonials_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+
5
+ }
6
+
app/code/local/Shweta/Testimonials/Model/Mysql4/Testimonials.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
- class Shweta_Testimonials_Model_Mysql4_Testimonials extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("testimonials/testimonials", "id");
7
- }
8
  }
1
+ <?php
2
+ class Shweta_Testimonials_Model_Mysql4_Testimonials extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("testimonials/testimonials", "id");
7
+ }
8
  }
app/code/local/Shweta/Testimonials/Model/Mysql4/Testimonials/Collection.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
- class Shweta_Testimonials_Model_Mysql4_Testimonials_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
-
5
- public function _construct(){
6
- $this->_init("testimonials/testimonials");
7
- }
8
-
9
-
10
-
11
- }
12
 
1
+ <?php
2
+ class Shweta_Testimonials_Model_Mysql4_Testimonials_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+
5
+ public function _construct(){
6
+ $this->_init("testimonials/testimonials");
7
+ }
8
+
9
+
10
+
11
+ }
12
 
app/code/local/Shweta/Testimonials/Model/Testimonials.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
-
3
- class Shweta_Testimonials_Model_Testimonials extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
-
7
- $this->_init("testimonials/testimonials");
8
-
9
- }
10
-
11
- }
12
 
1
+ <?php
2
+
3
+ class Shweta_Testimonials_Model_Testimonials extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+
7
+ $this->_init("testimonials/testimonials");
8
+
9
+ }
10
+
11
+ }
12
 
app/code/local/Shweta/Testimonials/Model/{words.php → Words.php} RENAMED
@@ -1,14 +1,14 @@
1
- <?php
2
-
3
- class Shweta_Testimonials_Model_Words
4
- {
5
- public function toOptionArray()
6
- {
7
- return array(
8
- array('value'=>1, 'label'=>Mage::helper('testimonials')->__('left')),
9
- array('value'=>2, 'label'=>Mage::helper('testimonials')->__('middle')),
10
- );
11
- }
12
-
13
- }
14
-
1
+ <?php
2
+
3
+ class Shweta_Testimonials_Model_Words
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value'=>1, 'label'=>Mage::helper('testimonials')->__('left')),
9
+ array('value'=>2, 'label'=>Mage::helper('testimonials')->__('middle')),
10
+ );
11
+ }
12
+
13
+ }
14
+
app/code/local/Shweta/Testimonials/controllers/Adminhtml/TestimonialsController.php CHANGED
@@ -1,209 +1,209 @@
1
- <?php
2
-
3
- class Shweta_Testimonials_Adminhtml_TestimonialsController extends Mage_Adminhtml_Controller_Action
4
- {
5
- protected function _initAction()
6
- {
7
- $this->loadLayout()->_setActiveMenu("testimonials/testimonials")->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Manager"),Mage::helper("adminhtml")->__("Testimonials Manager"));
8
- return $this;
9
- }
10
- public function indexAction()
11
- {
12
- $this->_title($this->__("Testimonials"));
13
- $this->_title($this->__("Manager Testimonials"));
14
-
15
- $this->_initAction();
16
- $this->renderLayout();
17
- }
18
- public function editAction()
19
- {
20
- $this->_title($this->__("Testimonials"));
21
- $this->_title($this->__("Testimonials"));
22
- $this->_title($this->__("Edit Item"));
23
-
24
- $id = $this->getRequest()->getParam("id");
25
- $model = Mage::getModel("testimonials/testimonials")->load($id);
26
- if ($model->getId()) {
27
- Mage::register("testimonials_data", $model);
28
- $this->loadLayout();
29
- $this->_setActiveMenu("testimonials/testimonials");
30
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Manager"), Mage::helper("adminhtml")->__("Testimonials Manager"));
31
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Description"), Mage::helper("adminhtml")->__("Testimonials Description"));
32
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
33
- $this->_addContent($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit"))->_addLeft($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit_tabs"));
34
- $this->renderLayout();
35
- }
36
- else {
37
- Mage::getSingleton("adminhtml/session")->addError(Mage::helper("testimonials")->__("Item does not exist."));
38
- $this->_redirect("*/*/");
39
- }
40
- }
41
-
42
- public function newAction()
43
- {
44
-
45
- $this->_title($this->__("Testimonials"));
46
- $this->_title($this->__("Testimonials"));
47
- $this->_title($this->__("New Item"));
48
-
49
- $id = $this->getRequest()->getParam("id");
50
- $model = Mage::getModel("testimonials/testimonials")->load($id);
51
-
52
- $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
- if (!empty($data)) {
54
- $model->setData($data);
55
- }
56
-
57
- Mage::register("testimonials_data", $model);
58
-
59
- $this->loadLayout();
60
- $this->_setActiveMenu("testimonials/testimonials");
61
-
62
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
-
64
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Manager"), Mage::helper("adminhtml")->__("Testimonials Manager"));
65
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Description"), Mage::helper("adminhtml")->__("Testimonials Description"));
66
-
67
-
68
- $this->_addContent($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit"))->_addLeft($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_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
- //save image
85
- try{
86
-
87
- if((bool)$post_data['pic']['delete']==1) {
88
-
89
- $post_data['pic']='';
90
-
91
- }
92
- else {
93
-
94
- unset($post_data['pic']);
95
-
96
- if (isset($_FILES)){
97
-
98
- if ($_FILES['pic']['name']) {
99
-
100
- if($this->getRequest()->getParam("id")){
101
- $model = Mage::getModel("testimonials/testimonials")->load($this->getRequest()->getParam("id"));
102
- if($model->getData('pic')){
103
- $io = new Varien_Io_File();
104
- $io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('pic'))));
105
- }
106
- }
107
- $path = Mage::getBaseDir('media') . DS . 'testimonials' . DS .'testimonials'.DS;
108
- $uploader = new Varien_File_Uploader('pic');
109
- $uploader->setAllowedExtensions(array('jpg','png','gif'));
110
- $uploader->setAllowRenameFiles(false);
111
- $uploader->setFilesDispersion(false);
112
- $destFile = $path.$_FILES['pic']['name'];
113
- $filename = $uploader->getNewFileName($destFile);
114
- $uploader->save($path, $filename);
115
-
116
- $post_data['pic']='testimonials/testimonials/'.$filename;
117
- }
118
- }
119
- }
120
-
121
- } catch (Exception $e) {
122
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
123
- $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
124
- return;
125
- }
126
- //save image
127
-
128
-
129
- $model = Mage::getModel("testimonials/testimonials")
130
- ->addData($post_data)
131
- ->setId($this->getRequest()->getParam("id"))
132
- ->save();
133
-
134
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Testimonials was successfully saved"));
135
- Mage::getSingleton("adminhtml/session")->setTestimonialsData(false);
136
-
137
- if ($this->getRequest()->getParam("back")) {
138
- $this->_redirect("*/*/edit", array("id" => $model->getId()));
139
- return;
140
- }
141
- $this->_redirect("*/*/");
142
- return;
143
- }
144
- catch (Exception $e) {
145
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
146
- Mage::getSingleton("adminhtml/session")->setTestimonialsData($this->getRequest()->getPost());
147
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
148
- return;
149
- }
150
-
151
- }
152
- $this->_redirect("*/*/");
153
- }
154
-
155
-
156
-
157
- public function deleteAction()
158
- {
159
- if( $this->getRequest()->getParam("id") > 0 ) {
160
- try {
161
- $model = Mage::getModel("testimonials/testimonials");
162
- $model->setId($this->getRequest()->getParam("id"))->delete();
163
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
164
- $this->_redirect("*/*/");
165
- }
166
- catch (Exception $e) {
167
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
168
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
169
- }
170
- }
171
- $this->_redirect("*/*/");
172
- }
173
-
174
-
175
- public function massRemoveAction()
176
- {
177
- try {
178
- $ids = $this->getRequest()->getPost('ids', array());
179
- foreach ($ids as $id) {
180
- $model = Mage::getModel("testimonials/testimonials");
181
- $model->setId($id)->delete();
182
- }
183
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
184
- }
185
- catch (Exception $e) {
186
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
187
- }
188
- $this->_redirect('*/*/');
189
- }
190
-
191
- /**
192
- * Export order grid to CSV format
193
- */
194
- public function exportCsvAction()
195
- {
196
- $fileName = 'testimonials.csv';
197
- $grid = $this->getLayout()->createBlock('testimonials/adminhtml_testimonials_grid');
198
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
199
- }
200
- /**
201
- * Export order grid to Excel XML format
202
- */
203
- public function exportExcelAction()
204
- {
205
- $fileName = 'testimonials.xml';
206
- $grid = $this->getLayout()->createBlock('testimonials/adminhtml_testimonials_grid');
207
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
208
- }
209
- }
1
+ <?php
2
+
3
+ class Shweta_Testimonials_Adminhtml_TestimonialsController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ protected function _initAction()
6
+ {
7
+ $this->loadLayout()->_setActiveMenu("testimonials/testimonials")->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Manager"),Mage::helper("adminhtml")->__("Testimonials Manager"));
8
+ return $this;
9
+ }
10
+ public function indexAction()
11
+ {
12
+ $this->_title($this->__("Testimonials"));
13
+ $this->_title($this->__("Manager Testimonials"));
14
+
15
+ $this->_initAction();
16
+ $this->renderLayout();
17
+ }
18
+ public function editAction()
19
+ {
20
+ $this->_title($this->__("Testimonials"));
21
+ $this->_title($this->__("Testimonials"));
22
+ $this->_title($this->__("Edit Item"));
23
+
24
+ $id = $this->getRequest()->getParam("id");
25
+ $model = Mage::getModel("testimonials/testimonials")->load($id);
26
+ if ($model->getId()) {
27
+ Mage::register("testimonials_data", $model);
28
+ $this->loadLayout();
29
+ $this->_setActiveMenu("testimonials/testimonials");
30
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Manager"), Mage::helper("adminhtml")->__("Testimonials Manager"));
31
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Description"), Mage::helper("adminhtml")->__("Testimonials Description"));
32
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
33
+ $this->_addContent($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit"))->_addLeft($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit_tabs"));
34
+ $this->renderLayout();
35
+ }
36
+ else {
37
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("testimonials")->__("Item does not exist."));
38
+ $this->_redirect("*/*/");
39
+ }
40
+ }
41
+
42
+ public function newAction()
43
+ {
44
+
45
+ $this->_title($this->__("Testimonials"));
46
+ $this->_title($this->__("Testimonials"));
47
+ $this->_title($this->__("New Item"));
48
+
49
+ $id = $this->getRequest()->getParam("id");
50
+ $model = Mage::getModel("testimonials/testimonials")->load($id);
51
+
52
+ $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
+ if (!empty($data)) {
54
+ $model->setData($data);
55
+ }
56
+
57
+ Mage::register("testimonials_data", $model);
58
+
59
+ $this->loadLayout();
60
+ $this->_setActiveMenu("testimonials/testimonials");
61
+
62
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
+
64
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Manager"), Mage::helper("adminhtml")->__("Testimonials Manager"));
65
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonials Description"), Mage::helper("adminhtml")->__("Testimonials Description"));
66
+
67
+
68
+ $this->_addContent($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_edit"))->_addLeft($this->getLayout()->createBlock("testimonials/adminhtml_testimonials_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
+ //save image
85
+ try{
86
+
87
+ if((bool)$post_data['pic']['delete']==1) {
88
+
89
+ $post_data['pic']='';
90
+
91
+ }
92
+ else {
93
+
94
+ unset($post_data['pic']);
95
+
96
+ if (isset($_FILES)){
97
+
98
+ if ($_FILES['pic']['name']) {
99
+
100
+ if($this->getRequest()->getParam("id")){
101
+ $model = Mage::getModel("testimonials/testimonials")->load($this->getRequest()->getParam("id"));
102
+ if($model->getData('pic')){
103
+ $io = new Varien_Io_File();
104
+ $io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('pic'))));
105
+ }
106
+ }
107
+ $path = Mage::getBaseDir('media') . DS . 'testimonials' . DS .'testimonials'.DS;
108
+ $uploader = new Varien_File_Uploader('pic');
109
+ $uploader->setAllowedExtensions(array('jpg','png','gif'));
110
+ $uploader->setAllowRenameFiles(false);
111
+ $uploader->setFilesDispersion(false);
112
+ $destFile = $path.$_FILES['pic']['name'];
113
+ $filename = $uploader->getNewFileName($destFile);
114
+ $uploader->save($path, $filename);
115
+
116
+ $post_data['pic']='testimonials/testimonials/'.$filename;
117
+ }
118
+ }
119
+ }
120
+
121
+ } catch (Exception $e) {
122
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
123
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
124
+ return;
125
+ }
126
+ //save image
127
+
128
+
129
+ $model = Mage::getModel("testimonials/testimonials")
130
+ ->addData($post_data)
131
+ ->setId($this->getRequest()->getParam("id"))
132
+ ->save();
133
+
134
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Testimonials was successfully saved"));
135
+ Mage::getSingleton("adminhtml/session")->setTestimonialsData(false);
136
+
137
+ if ($this->getRequest()->getParam("back")) {
138
+ $this->_redirect("*/*/edit", array("id" => $model->getId()));
139
+ return;
140
+ }
141
+ $this->_redirect("*/*/");
142
+ return;
143
+ }
144
+ catch (Exception $e) {
145
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
146
+ Mage::getSingleton("adminhtml/session")->setTestimonialsData($this->getRequest()->getPost());
147
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
148
+ return;
149
+ }
150
+
151
+ }
152
+ $this->_redirect("*/*/");
153
+ }
154
+
155
+
156
+
157
+ public function deleteAction()
158
+ {
159
+ if( $this->getRequest()->getParam("id") > 0 ) {
160
+ try {
161
+ $model = Mage::getModel("testimonials/testimonials");
162
+ $model->setId($this->getRequest()->getParam("id"))->delete();
163
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
164
+ $this->_redirect("*/*/");
165
+ }
166
+ catch (Exception $e) {
167
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
168
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
169
+ }
170
+ }
171
+ $this->_redirect("*/*/");
172
+ }
173
+
174
+
175
+ public function massRemoveAction()
176
+ {
177
+ try {
178
+ $ids = $this->getRequest()->getPost('ids', array());
179
+ foreach ($ids as $id) {
180
+ $model = Mage::getModel("testimonials/testimonials");
181
+ $model->setId($id)->delete();
182
+ }
183
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
184
+ }
185
+ catch (Exception $e) {
186
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
187
+ }
188
+ $this->_redirect('*/*/');
189
+ }
190
+
191
+ /**
192
+ * Export order grid to CSV format
193
+ */
194
+ public function exportCsvAction()
195
+ {
196
+ $fileName = 'testimonials.csv';
197
+ $grid = $this->getLayout()->createBlock('testimonials/adminhtml_testimonials_grid');
198
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
199
+ }
200
+ /**
201
+ * Export order grid to Excel XML format
202
+ */
203
+ public function exportExcelAction()
204
+ {
205
+ $fileName = 'testimonials.xml';
206
+ $grid = $this->getLayout()->createBlock('testimonials/adminhtml_testimonials_grid');
207
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
208
+ }
209
+ }
app/code/local/Shweta/Testimonials/controllers/Adminhtml/TestimonialsbackendController.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- class Shweta_Testimonials_Adminhtml_TestimonialsbackendController extends Mage_Adminhtml_Controller_Action
3
- {
4
- public function indexAction()
5
- {
6
- $this->loadLayout();
7
- $this->_title($this->__("Testimonials"));
8
- $this->renderLayout();
9
- }
10
  }
1
+ <?php
2
+ class Shweta_Testimonials_Adminhtml_TestimonialsbackendController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->_title($this->__("Testimonials"));
8
+ $this->renderLayout();
9
+ }
10
  }
app/code/local/Shweta/Testimonials/controllers/IndexController.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- class Shweta_Testimonials_IndexController extends Mage_Core_Controller_Front_Action{
3
- public function IndexAction() {
4
-
5
- $this->loadLayout();
6
- $this->getLayout()->getBlock("head")->setTitle($this->__("Testimonials"));
7
- $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
- $breadcrumbs->addCrumb("home", array(
9
- "label" => $this->__("Home Page"),
10
- "title" => $this->__("Home Page"),
11
- "link" => Mage::getBaseUrl()
12
- ));
13
-
14
- $breadcrumbs->addCrumb("testimonials", array(
15
- "label" => $this->__("Testimonials"),
16
- "title" => $this->__("Testimonials")
17
- ));
18
-
19
- $this->renderLayout();
20
-
21
- }
22
  }
1
+ <?php
2
+ class Shweta_Testimonials_IndexController extends Mage_Core_Controller_Front_Action{
3
+ public function IndexAction() {
4
+
5
+ $this->loadLayout();
6
+ $this->getLayout()->getBlock("head")->setTitle($this->__("Testimonials"));
7
+ $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
+ $breadcrumbs->addCrumb("home", array(
9
+ "label" => $this->__("Home Page"),
10
+ "title" => $this->__("Home Page"),
11
+ "link" => Mage::getBaseUrl()
12
+ ));
13
+
14
+ $breadcrumbs->addCrumb("testimonials", array(
15
+ "label" => $this->__("Testimonials"),
16
+ "title" => $this->__("Testimonials")
17
+ ));
18
+
19
+ $this->renderLayout();
20
+
21
+ }
22
  }
app/code/local/Shweta/Testimonials/controllers/TestimonialsController.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- class Shweta_Testimonials_TestimonialsController extends Mage_Core_Controller_Front_Action{
3
- public function IndexAction() {
4
-
5
- $this->loadLayout();
6
- $this->getLayout()->getBlock("head")->setTitle($this->__("Testimonials"));
7
- $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
- $breadcrumbs->addCrumb("home", array(
9
- "label" => $this->__("Home Page"),
10
- "title" => $this->__("Home Page"),
11
- "link" => Mage::getBaseUrl()
12
- ));
13
-
14
- $breadcrumbs->addCrumb("testimonials", array(
15
- "label" => $this->__("Testimonials"),
16
- "title" => $this->__("Testimonials")
17
- ));
18
-
19
- $this->renderLayout();
20
-
21
- }
22
  }
1
+ <?php
2
+ class Shweta_Testimonials_TestimonialsController extends Mage_Core_Controller_Front_Action{
3
+ public function IndexAction() {
4
+
5
+ $this->loadLayout();
6
+ $this->getLayout()->getBlock("head")->setTitle($this->__("Testimonials"));
7
+ $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
+ $breadcrumbs->addCrumb("home", array(
9
+ "label" => $this->__("Home Page"),
10
+ "title" => $this->__("Home Page"),
11
+ "link" => Mage::getBaseUrl()
12
+ ));
13
+
14
+ $breadcrumbs->addCrumb("testimonials", array(
15
+ "label" => $this->__("Testimonials"),
16
+ "title" => $this->__("Testimonials")
17
+ ));
18
+
19
+ $this->renderLayout();
20
+
21
+ }
22
  }
app/code/local/Shweta/Testimonials/etc/10.5.13config.xml CHANGED
@@ -1,143 +1,143 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <default>
4
- <shweta>
5
- <SAMPLE>
6
- <ENABLED>1</ENABLED>
7
- </SAMPLE>
8
- </shweta>
9
- </default>
10
-
11
- <modules>
12
- <Shweta_Testimonials>
13
- <version>0.1.0</version>
14
- </Shweta_Testimonials>
15
- </modules>
16
- <frontend>
17
- <routers>
18
- <testimonials>
19
- <use>standard</use>
20
- <args>
21
- <module>Shweta_Testimonials</module>
22
- <frontName>testimonials</frontName>
23
- </args>
24
- </testimonials>
25
- </routers>
26
- <layout>
27
- <updates>
28
- <testimonials>
29
- <file>testimonials.xml</file>
30
- </testimonials>
31
- </updates>
32
- </layout>
33
- </frontend>
34
- <global>
35
- <helpers>
36
- <testimonials>
37
- <class>Shweta_Testimonials_Helper</class>
38
- </testimonials>
39
- </helpers>
40
- <blocks>
41
- <testimonials>
42
- <class>Shweta_Testimonials_Block</class>
43
- </testimonials>
44
- </blocks>
45
- <models>
46
- <testimonials>
47
- <class>Shweta_Testimonials_Model</class>
48
- <resourceModel>testimonials_mysql4</resourceModel>
49
- </testimonials>
50
- <testimonials_mysql4>
51
- <class>Shweta_Testimonials_Model_Mysql4</class>
52
- <entities>
53
- <testimonials>
54
- <table>shweta_testimonials</table>
55
- </testimonials>
56
- </entities>
57
- </testimonials_mysql4>
58
- </models>
59
- <resources>
60
- <testimonials_setup>
61
- <setup>
62
- <module>Shweta_Testimonials</module>
63
- </setup>
64
- <connection>
65
- <use>core_setup</use>
66
- </connection>
67
- </testimonials_setup>
68
- <testimonials_write>
69
- <connection>
70
- <use>core_write</use>
71
- </connection>
72
- </testimonials_write>
73
- <testimonials_read>
74
- <connection>
75
- <use>core_read</use>
76
- </connection>
77
- </testimonials_read>
78
- </resources>
79
- </global>
80
- <admin>
81
- <routers>
82
- <testimonials>
83
- <use>admin</use>
84
- <args>
85
- <module>Shweta_Testimonials</module>
86
- <frontName>testimonials</frontName>
87
- </args>
88
- </testimonials>
89
- </routers>
90
- </admin>
91
- <adminhtml>
92
- <menu>
93
- <testimonials module="testimonials">
94
- <title>Testimonials</title>
95
- <sort_order>100</sort_order>
96
- <children>
97
- <testimonialsbackend module="testimonials">
98
- <title>Testimonials</title>
99
- <sort_order>0</sort_order>
100
- <action>testimonials/adminhtml_testimonialsbackend</action>
101
- </testimonialsbackend>
102
- <testimonials module="testimonials">
103
- <title>Manage Testimonials</title>
104
- <sort_order>0</sort_order>
105
- <action>testimonials/adminhtml_testimonials</action>
106
- </testimonials>
107
- </children>
108
- </testimonials>
109
- </menu>
110
- <acl>
111
- <resources>
112
- <all>
113
- <title>Allow Everything</title>
114
- </all>
115
- <admin>
116
- <children>
117
- <testimonials translate="title" module="testimonials">
118
- <title>Testimonials</title>
119
- <sort_order>1000</sort_order>
120
- <children>
121
- <testimonialsbackend translate="title">
122
- <title>Testimonials</title>
123
- </testimonialsbackend>
124
- <testimonials translate="title">
125
- <title>Manage Testimonials</title>
126
- <sort_order>0</sort_order>
127
- </testimonials>
128
- </children>
129
- </testimonials>
130
- </children>
131
- </admin>
132
- </resources>
133
- </acl>
134
- <layout>
135
- <updates>
136
- <testimonials>
137
- <file>testimonials.xml</file>
138
- </testimonials>
139
- </updates>
140
- </layout>
141
- </adminhtml>
142
-
143
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <default>
4
+ <shweta>
5
+ <SAMPLE>
6
+ <ENABLED>1</ENABLED>
7
+ </SAMPLE>
8
+ </shweta>
9
+ </default>
10
+
11
+ <modules>
12
+ <Shweta_Testimonials>
13
+ <version>0.1.0</version>
14
+ </Shweta_Testimonials>
15
+ </modules>
16
+ <frontend>
17
+ <routers>
18
+ <testimonials>
19
+ <use>standard</use>
20
+ <args>
21
+ <module>Shweta_Testimonials</module>
22
+ <frontName>testimonials</frontName>
23
+ </args>
24
+ </testimonials>
25
+ </routers>
26
+ <layout>
27
+ <updates>
28
+ <testimonials>
29
+ <file>testimonials.xml</file>
30
+ </testimonials>
31
+ </updates>
32
+ </layout>
33
+ </frontend>
34
+ <global>
35
+ <helpers>
36
+ <testimonials>
37
+ <class>Shweta_Testimonials_Helper</class>
38
+ </testimonials>
39
+ </helpers>
40
+ <blocks>
41
+ <testimonials>
42
+ <class>Shweta_Testimonials_Block</class>
43
+ </testimonials>
44
+ </blocks>
45
+ <models>
46
+ <testimonials>
47
+ <class>Shweta_Testimonials_Model</class>
48
+ <resourceModel>testimonials_mysql4</resourceModel>
49
+ </testimonials>
50
+ <testimonials_mysql4>
51
+ <class>Shweta_Testimonials_Model_Mysql4</class>
52
+ <entities>
53
+ <testimonials>
54
+ <table>shweta_testimonials</table>
55
+ </testimonials>
56
+ </entities>
57
+ </testimonials_mysql4>
58
+ </models>
59
+ <resources>
60
+ <testimonials_setup>
61
+ <setup>
62
+ <module>Shweta_Testimonials</module>
63
+ </setup>
64
+ <connection>
65
+ <use>core_setup</use>
66
+ </connection>
67
+ </testimonials_setup>
68
+ <testimonials_write>
69
+ <connection>
70
+ <use>core_write</use>
71
+ </connection>
72
+ </testimonials_write>
73
+ <testimonials_read>
74
+ <connection>
75
+ <use>core_read</use>
76
+ </connection>
77
+ </testimonials_read>
78
+ </resources>
79
+ </global>
80
+ <admin>
81
+ <routers>
82
+ <testimonials>
83
+ <use>admin</use>
84
+ <args>
85
+ <module>Shweta_Testimonials</module>
86
+ <frontName>testimonials</frontName>
87
+ </args>
88
+ </testimonials>
89
+ </routers>
90
+ </admin>
91
+ <adminhtml>
92
+ <menu>
93
+ <testimonials module="testimonials">
94
+ <title>Testimonials</title>
95
+ <sort_order>100</sort_order>
96
+ <children>
97
+ <testimonialsbackend module="testimonials">
98
+ <title>Testimonials</title>
99
+ <sort_order>0</sort_order>
100
+ <action>testimonials/adminhtml_testimonialsbackend</action>
101
+ </testimonialsbackend>
102
+ <testimonials module="testimonials">
103
+ <title>Manage Testimonials</title>
104
+ <sort_order>0</sort_order>
105
+ <action>testimonials/adminhtml_testimonials</action>
106
+ </testimonials>
107
+ </children>
108
+ </testimonials>
109
+ </menu>
110
+ <acl>
111
+ <resources>
112
+ <all>
113
+ <title>Allow Everything</title>
114
+ </all>
115
+ <admin>
116
+ <children>
117
+ <testimonials translate="title" module="testimonials">
118
+ <title>Testimonials</title>
119
+ <sort_order>1000</sort_order>
120
+ <children>
121
+ <testimonialsbackend translate="title">
122
+ <title>Testimonials</title>
123
+ </testimonialsbackend>
124
+ <testimonials translate="title">
125
+ <title>Manage Testimonials</title>
126
+ <sort_order>0</sort_order>
127
+ </testimonials>
128
+ </children>
129
+ </testimonials>
130
+ </children>
131
+ </admin>
132
+ </resources>
133
+ </acl>
134
+ <layout>
135
+ <updates>
136
+ <testimonials>
137
+ <file>testimonials.xml</file>
138
+ </testimonials>
139
+ </updates>
140
+ </layout>
141
+ </adminhtml>
142
+
143
+ </config>
app/code/local/Shweta/Testimonials/etc/10.5.13system.xml CHANGED
@@ -1,14 +1,14 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <sections>
4
- <shweta translate="label">
5
- <label>Testimonials</label>
6
- <tab>general</tab>
7
- <frontend_type>text</frontend_type>
8
- <sort_order>1000</sort_order>
9
- <show_in_default>1</show_in_default>
10
- <show_in_website>1</show_in_website>
11
- <show_in_store>1</show_in_store>
12
- </shweta>
13
- </sections>
14
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <shweta translate="label">
5
+ <label>Testimonials</label>
6
+ <tab>general</tab>
7
+ <frontend_type>text</frontend_type>
8
+ <sort_order>1000</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>1</show_in_store>
12
+ </shweta>
13
+ </sections>
14
+ </config>
app/code/local/Shweta/Testimonials/etc/13.5.13config.xml CHANGED
@@ -1,159 +1,159 @@
1
- <?xml version="1.0"?>
2
- <config>
3
-
4
- <modules>
5
- <Shweta_Testimonials>
6
- <version>0.1.0</version>
7
- </Shweta_Testimonials>
8
- </modules>
9
- <frontend>
10
- <routers>
11
- <testimonials>
12
- <use>standard</use>
13
- <args>
14
- <module>Shweta_Testimonials</module>
15
- <frontName>testimonials</frontName>
16
- </args>
17
- </testimonials>
18
- </routers>
19
- <layout>
20
- <updates>
21
- <testimonials>
22
- <file>testimonials.xml</file>
23
- </testimonials>
24
- </updates>
25
- </layout>
26
- </frontend>
27
- <global>
28
- <helpers>
29
- <testimonials>
30
- <class>Shweta_Testimonials_Helper</class>
31
- </testimonials>
32
- </helpers>
33
- <blocks>
34
- <testimonials>
35
- <class>Shweta_Testimonials_Block</class>
36
- </testimonials>
37
- </blocks>
38
- <models>
39
- <testimonials>
40
- <class>Shweta_Testimonials_Model</class>
41
- <resourceModel>testimonials_mysql4</resourceModel>
42
- </testimonials>
43
- <testimonials_mysql4>
44
- <class>Shweta_Testimonials_Model_Mysql4</class>
45
- <entities>
46
- <testimonials>
47
- <table>shweta_testimonials</table>
48
- </testimonials>
49
- </entities>
50
- </testimonials_mysql4>
51
- </models>
52
- <resources>
53
- <testimonials_setup>
54
- <setup>
55
- <module>Shweta_Testimonials</module>
56
- </setup>
57
- <connection>
58
- <use>core_setup</use>
59
- </connection>
60
- </testimonials_setup>
61
- <testimonials_write>
62
- <connection>
63
- <use>core_write</use>
64
- </connection>
65
- </testimonials_write>
66
- <testimonials_read>
67
- <connection>
68
- <use>core_read</use>
69
- </connection>
70
- </testimonials_read>
71
- </resources>
72
- </global>
73
- <admin>
74
- <routers>
75
- <testimonials>
76
- <use>admin</use>
77
- <args>
78
- <module>Shweta_Testimonials</module>
79
- <frontName>testimonials</frontName>
80
- </args>
81
- </testimonials>
82
- </routers>
83
- </admin>
84
- <adminhtml>
85
- <menu>
86
- <testimonials module="testimonials">
87
- <title>Testimonials</title>
88
- <sort_order>100</sort_order>
89
- <children>
90
- <testimonialsbackend module="testimonials">
91
- <title>Testimonials</title>
92
- <sort_order>0</sort_order>
93
- <action>testimonials/adminhtml_testimonialsbackend</action>
94
- </testimonialsbackend>
95
- <testimonials module="testimonials">
96
- <title>Manage Testimonials</title>
97
- <sort_order>0</sort_order>
98
- <action>testimonials/adminhtml_testimonials</action>
99
- </testimonials>
100
- </children>
101
- </testimonials>
102
- </menu>
103
- <acl>
104
- <resources>
105
- <all>
106
- <title>Allow Everything</title>
107
- </all>
108
- <admin>
109
- <children>
110
- <testimonials translate="title" module="testimonials">
111
- <title>Testimonials</title>
112
- <sort_order>1000</sort_order>
113
- <children>
114
- <testimonialsbackend translate="title">
115
- <title>Testimonials</title>
116
- </testimonialsbackend>
117
- <testimonials translate="title">
118
- <title>Manage Testimonials</title>
119
- <sort_order>0</sort_order>
120
- </testimonials>
121
- </children>
122
- </testimonials>
123
- </children>
124
- </admin>
125
- </resources>
126
- </acl>
127
- <layout>
128
- <updates>
129
- <testimonials>
130
- <file>testimonials.xml</file>
131
- </testimonials>
132
- </updates>
133
- </layout>
134
- </adminhtml>
135
- <adminhtml>
136
- <acl>
137
- <resources>
138
- <all>
139
- <title>Allow Everything</title>
140
- </all>
141
- <admin>
142
- <children>
143
- <system>
144
- <children>
145
- <config>
146
- <children>
147
- <Shweta>
148
- <title>Shweta Testimonials</title>
149
- </Shweta>
150
- </children>
151
- </config>
152
- </children>
153
- </system>
154
- </children>
155
- </admin>
156
- </resources>
157
- </acl>
158
- </adminhtml>
159
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+
4
+ <modules>
5
+ <Shweta_Testimonials>
6
+ <version>0.1.0</version>
7
+ </Shweta_Testimonials>
8
+ </modules>
9
+ <frontend>
10
+ <routers>
11
+ <testimonials>
12
+ <use>standard</use>
13
+ <args>
14
+ <module>Shweta_Testimonials</module>
15
+ <frontName>testimonials</frontName>
16
+ </args>
17
+ </testimonials>
18
+ </routers>
19
+ <layout>
20
+ <updates>
21
+ <testimonials>
22
+ <file>testimonials.xml</file>
23
+ </testimonials>
24
+ </updates>
25
+ </layout>
26
+ </frontend>
27
+ <global>
28
+ <helpers>
29
+ <testimonials>
30
+ <class>Shweta_Testimonials_Helper</class>
31
+ </testimonials>
32
+ </helpers>
33
+ <blocks>
34
+ <testimonials>
35
+ <class>Shweta_Testimonials_Block</class>
36
+ </testimonials>
37
+ </blocks>
38
+ <models>
39
+ <testimonials>
40
+ <class>Shweta_Testimonials_Model</class>
41
+ <resourceModel>testimonials_mysql4</resourceModel>
42
+ </testimonials>
43
+ <testimonials_mysql4>
44
+ <class>Shweta_Testimonials_Model_Mysql4</class>
45
+ <entities>
46
+ <testimonials>
47
+ <table>shweta_testimonials</table>
48
+ </testimonials>
49
+ </entities>
50
+ </testimonials_mysql4>
51
+ </models>
52
+ <resources>
53
+ <testimonials_setup>
54
+ <setup>
55
+ <module>Shweta_Testimonials</module>
56
+ </setup>
57
+ <connection>
58
+ <use>core_setup</use>
59
+ </connection>
60
+ </testimonials_setup>
61
+ <testimonials_write>
62
+ <connection>
63
+ <use>core_write</use>
64
+ </connection>
65
+ </testimonials_write>
66
+ <testimonials_read>
67
+ <connection>
68
+ <use>core_read</use>
69
+ </connection>
70
+ </testimonials_read>
71
+ </resources>
72
+ </global>
73
+ <admin>
74
+ <routers>
75
+ <testimonials>
76
+ <use>admin</use>
77
+ <args>
78
+ <module>Shweta_Testimonials</module>
79
+ <frontName>testimonials</frontName>
80
+ </args>
81
+ </testimonials>
82
+ </routers>
83
+ </admin>
84
+ <adminhtml>
85
+ <menu>
86
+ <testimonials module="testimonials">
87
+ <title>Testimonials</title>
88
+ <sort_order>100</sort_order>
89
+ <children>
90
+ <testimonialsbackend module="testimonials">
91
+ <title>Testimonials</title>
92
+ <sort_order>0</sort_order>
93
+ <action>testimonials/adminhtml_testimonialsbackend</action>
94
+ </testimonialsbackend>
95
+ <testimonials module="testimonials">
96
+ <title>Manage Testimonials</title>
97
+ <sort_order>0</sort_order>
98
+ <action>testimonials/adminhtml_testimonials</action>
99
+ </testimonials>
100
+ </children>
101
+ </testimonials>
102
+ </menu>
103
+ <acl>
104
+ <resources>
105
+ <all>
106
+ <title>Allow Everything</title>
107
+ </all>
108
+ <admin>
109
+ <children>
110
+ <testimonials translate="title" module="testimonials">
111
+ <title>Testimonials</title>
112
+ <sort_order>1000</sort_order>
113
+ <children>
114
+ <testimonialsbackend translate="title">
115
+ <title>Testimonials</title>
116
+ </testimonialsbackend>
117
+ <testimonials translate="title">
118
+ <title>Manage Testimonials</title>
119
+ <sort_order>0</sort_order>
120
+ </testimonials>
121
+ </children>
122
+ </testimonials>
123
+ </children>
124
+ </admin>
125
+ </resources>
126
+ </acl>
127
+ <layout>
128
+ <updates>
129
+ <testimonials>
130
+ <file>testimonials.xml</file>
131
+ </testimonials>
132
+ </updates>
133
+ </layout>
134
+ </adminhtml>
135
+ <adminhtml>
136
+ <acl>
137
+ <resources>
138
+ <all>
139
+ <title>Allow Everything</title>
140
+ </all>
141
+ <admin>
142
+ <children>
143
+ <system>
144
+ <children>
145
+ <config>
146
+ <children>
147
+ <Shweta>
148
+ <title>Shweta Testimonials</title>
149
+ </Shweta>
150
+ </children>
151
+ </config>
152
+ </children>
153
+ </system>
154
+ </children>
155
+ </admin>
156
+ </resources>
157
+ </acl>
158
+ </adminhtml>
159
+ </config>
app/code/local/Shweta/Testimonials/etc/13.5.13system.xml CHANGED
@@ -1,59 +1,59 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <config>
3
- <tabs>
4
- <shweta translate="label" module="testimonials">
5
- <label>Testimonials</label>
6
- <sort_order>100</sort_order>
7
- </shweta>
8
- </tabs>
9
- <sections>
10
- <shweta translate="label" module="testimonials">
11
- <label>Shweta testimonials</label>
12
- <tab>shweta</tab>
13
- <sort_order>1000</sort_order>
14
- <show_in_default>1</show_in_default>
15
- <show_in_website>1</show_in_website>
16
- <show_in_store>1</show_in_store>
17
- <groups>
18
- <shweta_group translate="label" module="testimonials">
19
- <label>Settings</label>
20
- <frontend_type>text</frontend_type>
21
- <sort_order>1000</sort_order>
22
- <show_in_default>1</show_in_default>
23
- <show_in_website>1</show_in_website>
24
- <show_in_store>1</show_in_store>
25
- <fields>
26
- <shweta_select translate="label">
27
- <label>Enable Testimonials </label>
28
- <comment>enable testimonials to your site Yes/No </comment>
29
- <frontend_type>select</frontend_type>
30
- <sort_order>1</sort_order>
31
- <show_in_default>1</show_in_default>
32
- <show_in_website>1</show_in_website>
33
- <show_in_store>1</show_in_store>
34
- <source_model>adminhtml/system_config_source_yesno</source_model>
35
- </shweta_select>
36
- <shweta_width translate="label">
37
- <label>Image Width: </label>
38
- <comment><![CDATA[in px]]></comment>
39
- <frontend_type>text</frontend_type>
40
- <sort_order>2</sort_order>
41
- <show_in_default>1</show_in_default>
42
- <show_in_website>1</show_in_website>
43
- <show_in_store>1</show_in_store>
44
- </shweta_width>
45
- <shweta_height translate="label">
46
- <label>Image Height: </label>
47
- <comment><![CDATA[in px]]></comment>
48
- <frontend_type>text</frontend_type>
49
- <sort_order>3</sort_order>
50
- <show_in_default>1</show_in_default>
51
- <show_in_website>1</show_in_website>
52
- <show_in_store>1</show_in_store>
53
- </shweta_height>
54
- </fields>
55
- </shweta_group>
56
- </groups>
57
- </shweta>
58
- </sections>
59
- </config>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <shweta translate="label" module="testimonials">
5
+ <label>Testimonials</label>
6
+ <sort_order>100</sort_order>
7
+ </shweta>
8
+ </tabs>
9
+ <sections>
10
+ <shweta translate="label" module="testimonials">
11
+ <label>Shweta testimonials</label>
12
+ <tab>shweta</tab>
13
+ <sort_order>1000</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ <groups>
18
+ <shweta_group translate="label" module="testimonials">
19
+ <label>Settings</label>
20
+ <frontend_type>text</frontend_type>
21
+ <sort_order>1000</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ <fields>
26
+ <shweta_select translate="label">
27
+ <label>Enable Testimonials </label>
28
+ <comment>enable testimonials to your site Yes/No </comment>
29
+ <frontend_type>select</frontend_type>
30
+ <sort_order>1</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ <source_model>adminhtml/system_config_source_yesno</source_model>
35
+ </shweta_select>
36
+ <shweta_width translate="label">
37
+ <label>Image Width: </label>
38
+ <comment><![CDATA[in px]]></comment>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>2</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </shweta_width>
45
+ <shweta_height translate="label">
46
+ <label>Image Height: </label>
47
+ <comment><![CDATA[in px]]></comment>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>3</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ </shweta_height>
54
+ </fields>
55
+ </shweta_group>
56
+ </groups>
57
+ </shweta>
58
+ </sections>
59
+ </config>
app/code/local/Shweta/Testimonials/etc/9.5.13config.xml CHANGED
@@ -1,134 +1,134 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Shweta_Testimonials>
5
- <version>0.1.0</version>
6
- </Shweta_Testimonials>
7
- </modules>
8
- <frontend>
9
- <routers>
10
- <testimonials>
11
- <use>standard</use>
12
- <args>
13
- <module>Shweta_Testimonials</module>
14
- <frontName>testimonials</frontName>
15
- </args>
16
- </testimonials>
17
- </routers>
18
- <layout>
19
- <updates>
20
- <testimonials>
21
- <file>testimonials.xml</file>
22
- </testimonials>
23
- </updates>
24
- </layout>
25
- </frontend>
26
- <global>
27
- <helpers>
28
- <testimonials>
29
- <class>Shweta_Testimonials_Helper</class>
30
- </testimonials>
31
- </helpers>
32
- <blocks>
33
- <testimonials>
34
- <class>Shweta_Testimonials_Block</class>
35
- </testimonials>
36
- </blocks>
37
- <models>
38
- <testimonials>
39
- <class>Shweta_Testimonials_Model</class>
40
- <resourceModel>testimonials_mysql4</resourceModel>
41
- </testimonials>
42
- <testimonials_mysql4>
43
- <class>Shweta_Testimonials_Model_Mysql4</class>
44
- <entities>
45
- <testimonials>
46
- <table>shweta_testimonials</table>
47
- </testimonials>
48
- </entities>
49
- </testimonials_mysql4>
50
- </models>
51
- <resources>
52
- <testimonials_setup>
53
- <setup>
54
- <module>Shweta_Testimonials</module>
55
- </setup>
56
- <connection>
57
- <use>core_setup</use>
58
- </connection>
59
- </testimonials_setup>
60
- <testimonials_write>
61
- <connection>
62
- <use>core_write</use>
63
- </connection>
64
- </testimonials_write>
65
- <testimonials_read>
66
- <connection>
67
- <use>core_read</use>
68
- </connection>
69
- </testimonials_read>
70
- </resources>
71
- </global>
72
- <admin>
73
- <routers>
74
- <testimonials>
75
- <use>admin</use>
76
- <args>
77
- <module>Shweta_Testimonials</module>
78
- <frontName>testimonials</frontName>
79
- </args>
80
- </testimonials>
81
- </routers>
82
- </admin>
83
- <adminhtml>
84
- <menu>
85
- <testimonials module="testimonials">
86
- <title>Testimonials</title>
87
- <sort_order>100</sort_order>
88
- <children>
89
- <testimonialsbackend module="testimonials">
90
- <title>Testimonials</title>
91
- <sort_order>0</sort_order>
92
- <action>testimonials/adminhtml_testimonialsbackend</action>
93
- </testimonialsbackend>
94
- <testimonials module="testimonials">
95
- <title>Manage Testimonials</title>
96
- <sort_order>0</sort_order>
97
- <action>testimonials/adminhtml_testimonials</action>
98
- </testimonials>
99
- </children>
100
- </testimonials>
101
- </menu>
102
- <acl>
103
- <resources>
104
- <all>
105
- <title>Allow Everything</title>
106
- </all>
107
- <admin>
108
- <children>
109
- <testimonials translate="title" module="testimonials">
110
- <title>Testimonials</title>
111
- <sort_order>1000</sort_order>
112
- <children>
113
- <testimonialsbackend translate="title">
114
- <title>Testimonials</title>
115
- </testimonialsbackend>
116
- <testimonials translate="title">
117
- <title>Manage Testimonials</title>
118
- <sort_order>0</sort_order>
119
- </testimonials>
120
- </children>
121
- </testimonials>
122
- </children>
123
- </admin>
124
- </resources>
125
- </acl>
126
- <layout>
127
- <updates>
128
- <testimonials>
129
- <file>testimonials.xml</file>
130
- </testimonials>
131
- </updates>
132
- </layout>
133
- </adminhtml>
134
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Shweta_Testimonials>
5
+ <version>0.1.0</version>
6
+ </Shweta_Testimonials>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <testimonials>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Shweta_Testimonials</module>
14
+ <frontName>testimonials</frontName>
15
+ </args>
16
+ </testimonials>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <testimonials>
21
+ <file>testimonials.xml</file>
22
+ </testimonials>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <helpers>
28
+ <testimonials>
29
+ <class>Shweta_Testimonials_Helper</class>
30
+ </testimonials>
31
+ </helpers>
32
+ <blocks>
33
+ <testimonials>
34
+ <class>Shweta_Testimonials_Block</class>
35
+ </testimonials>
36
+ </blocks>
37
+ <models>
38
+ <testimonials>
39
+ <class>Shweta_Testimonials_Model</class>
40
+ <resourceModel>testimonials_mysql4</resourceModel>
41
+ </testimonials>
42
+ <testimonials_mysql4>
43
+ <class>Shweta_Testimonials_Model_Mysql4</class>
44
+ <entities>
45
+ <testimonials>
46
+ <table>shweta_testimonials</table>
47
+ </testimonials>
48
+ </entities>
49
+ </testimonials_mysql4>
50
+ </models>
51
+ <resources>
52
+ <testimonials_setup>
53
+ <setup>
54
+ <module>Shweta_Testimonials</module>
55
+ </setup>
56
+ <connection>
57
+ <use>core_setup</use>
58
+ </connection>
59
+ </testimonials_setup>
60
+ <testimonials_write>
61
+ <connection>
62
+ <use>core_write</use>
63
+ </connection>
64
+ </testimonials_write>
65
+ <testimonials_read>
66
+ <connection>
67
+ <use>core_read</use>
68
+ </connection>
69
+ </testimonials_read>
70
+ </resources>
71
+ </global>
72
+ <admin>
73
+ <routers>
74
+ <testimonials>
75
+ <use>admin</use>
76
+ <args>
77
+ <module>Shweta_Testimonials</module>
78
+ <frontName>testimonials</frontName>
79
+ </args>
80
+ </testimonials>
81
+ </routers>
82
+ </admin>
83
+ <adminhtml>
84
+ <menu>
85
+ <testimonials module="testimonials">
86
+ <title>Testimonials</title>
87
+ <sort_order>100</sort_order>
88
+ <children>
89
+ <testimonialsbackend module="testimonials">
90
+ <title>Testimonials</title>
91
+ <sort_order>0</sort_order>
92
+ <action>testimonials/adminhtml_testimonialsbackend</action>
93
+ </testimonialsbackend>
94
+ <testimonials module="testimonials">
95
+ <title>Manage Testimonials</title>
96
+ <sort_order>0</sort_order>
97
+ <action>testimonials/adminhtml_testimonials</action>
98
+ </testimonials>
99
+ </children>
100
+ </testimonials>
101
+ </menu>
102
+ <acl>
103
+ <resources>
104
+ <all>
105
+ <title>Allow Everything</title>
106
+ </all>
107
+ <admin>
108
+ <children>
109
+ <testimonials translate="title" module="testimonials">
110
+ <title>Testimonials</title>
111
+ <sort_order>1000</sort_order>
112
+ <children>
113
+ <testimonialsbackend translate="title">
114
+ <title>Testimonials</title>
115
+ </testimonialsbackend>
116
+ <testimonials translate="title">
117
+ <title>Manage Testimonials</title>
118
+ <sort_order>0</sort_order>
119
+ </testimonials>
120
+ </children>
121
+ </testimonials>
122
+ </children>
123
+ </admin>
124
+ </resources>
125
+ </acl>
126
+ <layout>
127
+ <updates>
128
+ <testimonials>
129
+ <file>testimonials.xml</file>
130
+ </testimonials>
131
+ </updates>
132
+ </layout>
133
+ </adminhtml>
134
  </config>
app/code/local/Shweta/Testimonials/etc/adminhtml.xml CHANGED
@@ -1,26 +1,26 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <acl>
4
- <resources>
5
- <all>
6
- <title>Allow Everything</title>
7
- </all>
8
- <admin>
9
- <children>
10
- <system>
11
- <children>
12
- <config>
13
- <children>
14
- <shweta translate="title">
15
- <title>Testimonials</title>
16
- <sort_order>100</sort_order>
17
- </shweta>
18
- </children>
19
- </config>
20
- </children>
21
- </system>
22
- </children>
23
- </admin>
24
- </resources>
25
- </acl>
26
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <all>
6
+ <title>Allow Everything</title>
7
+ </all>
8
+ <admin>
9
+ <children>
10
+ <system>
11
+ <children>
12
+ <config>
13
+ <children>
14
+ <shweta translate="title">
15
+ <title>Testimonials</title>
16
+ <sort_order>100</sort_order>
17
+ </shweta>
18
+ </children>
19
+ </config>
20
+ </children>
21
+ </system>
22
+ </children>
23
+ </admin>
24
+ </resources>
25
+ </acl>
26
+ </config>
app/code/local/Shweta/Testimonials/etc/config.xml CHANGED
@@ -1,154 +1,154 @@
1
- <?xml version="1.0"?>
2
- <config>
3
-
4
- <modules>
5
- <Shweta_Testimonials>
6
- <version>0.1.0</version>
7
- </Shweta_Testimonials>
8
- </modules>
9
- <frontend>
10
- <routers>
11
- <testimonials>
12
- <use>standard</use>
13
- <args>
14
- <module>Shweta_Testimonials</module>
15
- <frontName>testimonials</frontName>
16
- </args>
17
- </testimonials>
18
- </routers>
19
- <layout>
20
- <updates>
21
- <testimonials>
22
- <file>testimonials.xml</file>
23
- </testimonials>
24
- </updates>
25
- </layout>
26
- </frontend>
27
- <global>
28
- <helpers>
29
- <testimonials>
30
- <class>Shweta_Testimonials_Helper</class>
31
- </testimonials>
32
- </helpers>
33
- <blocks>
34
- <testimonials>
35
- <class>Shweta_Testimonials_Block</class>
36
- </testimonials>
37
- </blocks>
38
- <models>
39
- <testimonials>
40
- <class>Shweta_Testimonials_Model</class>
41
- <resourceModel>testimonials_mysql4</resourceModel>
42
- </testimonials>
43
- <testimonials_mysql4>
44
- <class>Shweta_Testimonials_Model_Mysql4</class>
45
- <entities>
46
- <testimonials>
47
- <table>shweta_testimonials</table>
48
- </testimonials>
49
- </entities>
50
- </testimonials_mysql4>
51
- </models>
52
- <resources>
53
- <testimonials_setup>
54
- <setup>
55
- <module>Shweta_Testimonials</module>
56
- </setup>
57
- <connection>
58
- <use>core_setup</use>
59
- </connection>
60
- </testimonials_setup>
61
- <testimonials_write>
62
- <connection>
63
- <use>core_write</use>
64
- </connection>
65
- </testimonials_write>
66
- <testimonials_read>
67
- <connection>
68
- <use>core_read</use>
69
- </connection>
70
- </testimonials_read>
71
- </resources>
72
- </global>
73
- <admin>
74
- <routers>
75
- <testimonials>
76
- <use>admin</use>
77
- <args>
78
- <module>Shweta_Testimonials</module>
79
- <frontName>testimonials</frontName>
80
- </args>
81
- </testimonials>
82
- </routers>
83
- </admin>
84
- <adminhtml>
85
- <menu>
86
- <testimonials module="testimonials">
87
- <title>Testimonials</title>
88
- <sort_order>100</sort_order>
89
- <children>
90
- <testimonials module="testimonials">
91
- <title>Manage Testimonials</title>
92
- <sort_order>0</sort_order>
93
- <action>testimonials/adminhtml_testimonials</action>
94
- </testimonials>
95
- </children>
96
- </testimonials>
97
- </menu>
98
- <acl>
99
- <resources>
100
- <all>
101
- <title>Allow Everything</title>
102
- </all>
103
- <admin>
104
- <children>
105
- <testimonials translate="title" module="testimonials">
106
- <title>Testimonials</title>
107
- <sort_order>1000</sort_order>
108
- <children>
109
- <testimonialsbackend translate="title">
110
- <title>Testimonials</title>
111
- </testimonialsbackend>
112
- <testimonials translate="title">
113
- <title>Manage Testimonials</title>
114
- <sort_order>0</sort_order>
115
- </testimonials>
116
- </children>
117
- </testimonials>
118
- </children>
119
- </admin>
120
- </resources>
121
- </acl>
122
- <layout>
123
- <updates>
124
- <testimonials>
125
- <file>testimonials.xml</file>
126
- </testimonials>
127
- </updates>
128
- </layout>
129
- </adminhtml>
130
- <adminhtml>
131
- <acl>
132
- <resources>
133
- <all>
134
- <title>Allow Everything</title>
135
- </all>
136
- <admin>
137
- <children>
138
- <system>
139
- <children>
140
- <config>
141
- <children>
142
- <Shweta>
143
- <title>Shweta Testimonials</title>
144
- </Shweta>
145
- </children>
146
- </config>
147
- </children>
148
- </system>
149
- </children>
150
- </admin>
151
- </resources>
152
- </acl>
153
- </adminhtml>
154
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+
4
+ <modules>
5
+ <Shweta_Testimonials>
6
+ <version>0.1.0</version>
7
+ </Shweta_Testimonials>
8
+ </modules>
9
+ <frontend>
10
+ <routers>
11
+ <testimonials>
12
+ <use>standard</use>
13
+ <args>
14
+ <module>Shweta_Testimonials</module>
15
+ <frontName>testimonials</frontName>
16
+ </args>
17
+ </testimonials>
18
+ </routers>
19
+ <layout>
20
+ <updates>
21
+ <testimonials>
22
+ <file>testimonials.xml</file>
23
+ </testimonials>
24
+ </updates>
25
+ </layout>
26
+ </frontend>
27
+ <global>
28
+ <helpers>
29
+ <testimonials>
30
+ <class>Shweta_Testimonials_Helper</class>
31
+ </testimonials>
32
+ </helpers>
33
+ <blocks>
34
+ <testimonials>
35
+ <class>Shweta_Testimonials_Block</class>
36
+ </testimonials>
37
+ </blocks>
38
+ <models>
39
+ <testimonials>
40
+ <class>Shweta_Testimonials_Model</class>
41
+ <resourceModel>testimonials_mysql4</resourceModel>
42
+ </testimonials>
43
+ <testimonials_mysql4>
44
+ <class>Shweta_Testimonials_Model_Mysql4</class>
45
+ <entities>
46
+ <testimonials>
47
+ <table>shweta_testimonials</table>
48
+ </testimonials>
49
+ </entities>
50
+ </testimonials_mysql4>
51
+ </models>
52
+ <resources>
53
+ <testimonials_setup>
54
+ <setup>
55
+ <module>Shweta_Testimonials</module>
56
+ </setup>
57
+ <connection>
58
+ <use>core_setup</use>
59
+ </connection>
60
+ </testimonials_setup>
61
+ <testimonials_write>
62
+ <connection>
63
+ <use>core_write</use>
64
+ </connection>
65
+ </testimonials_write>
66
+ <testimonials_read>
67
+ <connection>
68
+ <use>core_read</use>
69
+ </connection>
70
+ </testimonials_read>
71
+ </resources>
72
+ </global>
73
+ <admin>
74
+ <routers>
75
+ <testimonials>
76
+ <use>admin</use>
77
+ <args>
78
+ <module>Shweta_Testimonials</module>
79
+ <frontName>testimonials</frontName>
80
+ </args>
81
+ </testimonials>
82
+ </routers>
83
+ </admin>
84
+ <adminhtml>
85
+ <menu>
86
+ <testimonials module="testimonials">
87
+ <title>Testimonials</title>
88
+ <sort_order>100</sort_order>
89
+ <children>
90
+ <testimonials module="testimonials">
91
+ <title>Manage Testimonials</title>
92
+ <sort_order>0</sort_order>
93
+ <action>testimonials/adminhtml_testimonials</action>
94
+ </testimonials>
95
+ </children>
96
+ </testimonials>
97
+ </menu>
98
+ <acl>
99
+ <resources>
100
+ <all>
101
+ <title>Allow Everything</title>
102
+ </all>
103
+ <admin>
104
+ <children>
105
+ <testimonials translate="title" module="testimonials">
106
+ <title>Testimonials</title>
107
+ <sort_order>1000</sort_order>
108
+ <children>
109
+ <testimonialsbackend translate="title">
110
+ <title>Testimonials</title>
111
+ </testimonialsbackend>
112
+ <testimonials translate="title">
113
+ <title>Manage Testimonials</title>
114
+ <sort_order>0</sort_order>
115
+ </testimonials>
116
+ </children>
117
+ </testimonials>
118
+ </children>
119
+ </admin>
120
+ </resources>
121
+ </acl>
122
+ <layout>
123
+ <updates>
124
+ <testimonials>
125
+ <file>testimonials.xml</file>
126
+ </testimonials>
127
+ </updates>
128
+ </layout>
129
+ </adminhtml>
130
+ <adminhtml>
131
+ <acl>
132
+ <resources>
133
+ <all>
134
+ <title>Allow Everything</title>
135
+ </all>
136
+ <admin>
137
+ <children>
138
+ <system>
139
+ <children>
140
+ <config>
141
+ <children>
142
+ <Shweta>
143
+ <title>Shweta Testimonials</title>
144
+ </Shweta>
145
+ </children>
146
+ </config>
147
+ </children>
148
+ </system>
149
+ </children>
150
+ </admin>
151
+ </resources>
152
+ </acl>
153
+ </adminhtml>
154
+ </config>
app/code/local/Shweta/Testimonials/etc/system.xml CHANGED
@@ -1,79 +1,79 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <config>
3
- <tabs>
4
- <shweta translate="label" module="testimonials">
5
- <label>Testimonials</label>
6
- <sort_order>100</sort_order>
7
- </shweta>
8
- </tabs>
9
- <sections>
10
- <shweta translate="label" module="testimonials">
11
- <label>Shweta testimonials</label>
12
- <tab>shweta</tab>
13
- <sort_order>1000</sort_order>
14
- <show_in_default>1</show_in_default>
15
- <show_in_website>1</show_in_website>
16
- <show_in_store>1</show_in_store>
17
- <groups>
18
- <shweta_group translate="label" module="testimonials">
19
- <label>Settings</label>
20
- <frontend_type>text</frontend_type>
21
- <sort_order>1000</sort_order>
22
- <show_in_default>1</show_in_default>
23
- <show_in_website>1</show_in_website>
24
- <show_in_store>1</show_in_store>
25
- <fields>
26
- <shweta_select translate="label">
27
- <label>Enable Testimonials </label>
28
- <comment>enable testimonials to your site Yes/No </comment>
29
- <frontend_type>select</frontend_type>
30
- <sort_order>1</sort_order>
31
- <show_in_default>1</show_in_default>
32
- <show_in_website>1</show_in_website>
33
- <show_in_store>1</show_in_store>
34
- <source_model>adminhtml/system_config_source_yesno</source_model>
35
- </shweta_select>
36
- <shweta_view translate="label">
37
- <label>View Testimonials </label>
38
- <comment>select testimonials to visible at</comment>
39
- <frontend_type>select</frontend_type>
40
- <sort_order>1</sort_order>
41
- <show_in_default>1</show_in_default>
42
- <show_in_website>1</show_in_website>
43
- <show_in_store>1</show_in_store>
44
- <source_model>testimonials/words</source_model>
45
- </shweta_view>
46
- <shweta_width translate="label">
47
- <label>Image Width: </label>
48
- <comment><![CDATA[in px]]></comment>
49
- <frontend_type>text</frontend_type>
50
- <sort_order>2</sort_order>
51
- <show_in_default>1</show_in_default>
52
- <show_in_website>1</show_in_website>
53
- <show_in_store>1</show_in_store>
54
- </shweta_width>
55
- <shweta_height translate="label">
56
- <label>Image Height: </label>
57
- <comment><![CDATA[in px]]></comment>
58
- <frontend_type>text</frontend_type>
59
- <sort_order>3</sort_order>
60
- <show_in_default>1</show_in_default>
61
- <show_in_website>1</show_in_website>
62
- <show_in_store>1</show_in_store>
63
- </shweta_height>
64
- <shweta_image translate="label">
65
- <label>Show face Images: </label>
66
- <comment>enable Images to your testimonials Yes/No </comment>
67
- <frontend_type>select</frontend_type>
68
- <sort_order>1</sort_order>
69
- <show_in_default>1</show_in_default>
70
- <show_in_website>1</show_in_website>
71
- <show_in_store>1</show_in_store>
72
- <source_model>adminhtml/system_config_source_yesno</source_model>
73
- </shweta_image>
74
- </fields>
75
- </shweta_group>
76
- </groups>
77
- </shweta>
78
- </sections>
79
- </config>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <shweta translate="label" module="testimonials">
5
+ <label>Testimonials</label>
6
+ <sort_order>100</sort_order>
7
+ </shweta>
8
+ </tabs>
9
+ <sections>
10
+ <shweta translate="label" module="testimonials">
11
+ <label>Shweta testimonials</label>
12
+ <tab>shweta</tab>
13
+ <sort_order>1000</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ <groups>
18
+ <shweta_group translate="label" module="testimonials">
19
+ <label>Settings</label>
20
+ <frontend_type>text</frontend_type>
21
+ <sort_order>1000</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ <fields>
26
+ <shweta_select translate="label">
27
+ <label>Enable Testimonials </label>
28
+ <comment>enable testimonials to your site Yes/No </comment>
29
+ <frontend_type>select</frontend_type>
30
+ <sort_order>1</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ <source_model>adminhtml/system_config_source_yesno</source_model>
35
+ </shweta_select>
36
+ <shweta_view translate="label">
37
+ <label>View Testimonials </label>
38
+ <comment>select testimonials to visible at</comment>
39
+ <frontend_type>select</frontend_type>
40
+ <sort_order>1</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ <source_model>testimonials/words</source_model>
45
+ </shweta_view>
46
+ <shweta_width translate="label">
47
+ <label>Image Width: </label>
48
+ <comment><![CDATA[in px]]></comment>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>2</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ </shweta_width>
55
+ <shweta_height translate="label">
56
+ <label>Image Height: </label>
57
+ <comment><![CDATA[in px]]></comment>
58
+ <frontend_type>text</frontend_type>
59
+ <sort_order>3</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </shweta_height>
64
+ <shweta_image translate="label">
65
+ <label>Show face Images: </label>
66
+ <comment>enable Images to your testimonials Yes/No </comment>
67
+ <frontend_type>select</frontend_type>
68
+ <sort_order>1</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ <source_model>adminhtml/system_config_source_yesno</source_model>
73
+ </shweta_image>
74
+ </fields>
75
+ </shweta_group>
76
+ </groups>
77
+ </shweta>
78
+ </sections>
79
+ </config>
app/code/local/Shweta/Testimonials/sql/testimonials_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,14 +1,14 @@
1
- <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
- $sql=<<<SQLTEXT
5
- create table shweta_testimonials(id int not null auto_increment, name varchar(100), pic varchar(255), message varchar(255),primary key(id));
6
-
7
- SQLTEXT;
8
-
9
- $installer->run($sql);
10
- //demo
11
- //Mage::getModel('core/url_rewrite')->setId(null);
12
- //demo
13
- $installer->endSetup();
14
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $sql=<<<SQLTEXT
5
+ create table shweta_testimonials(id int not null auto_increment, name varchar(100), pic varchar(255), message varchar(255),primary key(id));
6
+
7
+ SQLTEXT;
8
+
9
+ $installer->run($sql);
10
+ //demo
11
+ //Mage::getModel('core/url_rewrite')->setId(null);
12
+ //demo
13
+ $installer->endSetup();
14
 
app/design/adminhtml/default/default/layout/testimonials.xml CHANGED
@@ -1,13 +1,13 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <testimonials_adminhtml_testimonialsbackend_index>
4
- <reference name="content">
5
- <block type="testimonials/adminhtml_testimonialsbackend" name="testimonialsbackend" template="testimonials/testimonialsbackend.phtml"/>
6
- </reference>
7
- </testimonials_adminhtml_testimonialsbackend_index>
8
- <testimonials_adminhtml_testimonials_index>
9
- <reference name="content">
10
- <block type="testimonials/adminhtml_testimonials" name="testimonials" />
11
- </reference>
12
- </testimonials_adminhtml_testimonials_index>
13
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <testimonials_adminhtml_testimonialsbackend_index>
4
+ <reference name="content">
5
+ <block type="testimonials/adminhtml_testimonialsbackend" name="testimonialsbackend" template="testimonials/testimonialsbackend.phtml"/>
6
+ </reference>
7
+ </testimonials_adminhtml_testimonialsbackend_index>
8
+ <testimonials_adminhtml_testimonials_index>
9
+ <reference name="content">
10
+ <block type="testimonials/adminhtml_testimonials" name="testimonials" />
11
+ </reference>
12
+ </testimonials_adminhtml_testimonials_index>
13
  </layout>
app/design/adminhtml/default/default/template/testimonials/testimonialsbackend.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Testimonials
app/design/frontend/base/default/layout/testimonials.xml CHANGED
@@ -1,23 +1,23 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <testimonials_index_index>
4
- <reference name="root">
5
- <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
6
- </reference>
7
- <reference name="left">
8
- <block type="testimonials/left" name="testimonials_left" template="testimonials/left.phtml"/>
9
- </reference>
10
- <reference name="content">
11
- <block type="testimonials/index" name="testimonials_index" template="testimonials/index.phtml"/>
12
- </reference>
13
- </testimonials_index_index>
14
- <testimonials_testimonials_index>
15
- <reference name="root">
16
- <action method="setTemplate"><template>page/1column.phtml</template></action>
17
- </reference>
18
- <reference name="content">
19
- <block type="testimonials/testimonials" name="testimonials_testimonials" template="testimonials/testimonials.phtml"/>
20
- </reference>
21
- </testimonials_testimonials_index>
22
- </layout>
23
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <testimonials_index_index>
4
+ <reference name="root">
5
+ <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
6
+ </reference>
7
+ <reference name="left">
8
+ <block type="testimonials/left" name="testimonials_left" template="testimonials/left.phtml"/>
9
+ </reference>
10
+ <reference name="content">
11
+ <block type="testimonials/index" name="testimonials_index" template="testimonials/index.phtml"/>
12
+ </reference>
13
+ </testimonials_index_index>
14
+ <testimonials_testimonials_index>
15
+ <reference name="root">
16
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
17
+ </reference>
18
+ <reference name="content">
19
+ <block type="testimonials/testimonials" name="testimonials_testimonials" template="testimonials/testimonials.phtml"/>
20
+ </reference>
21
+ </testimonials_testimonials_index>
22
+ </layout>
23
 
app/design/frontend/base/default/template/testimonials/index.phtml CHANGED
@@ -1,81 +1,81 @@
1
- <?php $enab=$this->getTestimonialsEnabled();
2
- if($enab==1) { ?>
3
- <?php $view=$this->getTestimonialsView();
4
- if($view==2) { ?>
5
- <?php $wid=$this->getTestimonialsImageWidth(); ?>
6
- <?php $hei=$this->getTestimonialsImageHeight(); ?>
7
- <?php $faceimg=$this->getTestimonialsImages(); ?>
8
-
9
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
10
- <!-- include Cycle plugin -->
11
-
12
- <script type="text/javascript" src="<?php echo $this->getJsUrl('jquery.cycle.all.latest.js') ?>"></script>
13
- <script type="text/javascript">
14
- $(document).ready(function() {
15
- $('#testimonials')
16
- .cycle({
17
- fx: 'fade', // choose your transition type, ex: fade, scrollUp, scrollRight, shuffle
18
- });
19
- });
20
- </script>
21
-
22
-
23
- <style>
24
- #testimonials {
25
- width:630px;
26
- background:#E7E9E6 url(images/bg-testimonials.png) left top repeat-x;
27
- border:1px solid #D8D9D6;
28
- margin:10px 0;
29
- height:220px;
30
- }
31
- #testimonials blockquote{
32
- padding:10px;
33
- width:600px !important;
34
- font-family:Georgia, "Times New Roman", Times, serif;
35
- font-style:italic;
36
- color:#808080;
37
- display:block;
38
- }
39
-
40
- #testimonials blockquote p{
41
- margin: 0 !important;padding: 5px!important;
42
- float:right;
43
- width:195px;
44
-
45
- }
46
- #testimonials blockquote cite {
47
- font-style: normal;
48
- display: block;
49
-
50
- text-transform: uppercase;
51
- font-weight: bold;
52
- font-style:italic;
53
- color: #555;
54
- padding-left:5px;
55
- margin-top:10px;
56
- }
57
- </style>
58
-
59
-
60
-
61
- <?php $testi=$this->ShowTestimonialsRecords(); ?>
62
-
63
- <?php $result = $testi->fetchAll(); ?>
64
- <?php $img=Mage::getBaseUrl();
65
- $imgr=str_replace('/index.php', '', $img); ?>
66
- <div id="testimonials">
67
- <?php foreach($result as $values) { ?>
68
-
69
- <?php $img1= $values['pic']; ?>
70
- <blockquote><?php if($faceimg==1) { ?><img src="<?php echo $imgr.'media/'.$img1 ?>" width="<?php echo $wid; ?>" height="<?php echo $hei; ?>" /><?php } ?><p>
71
- <?php echo $values['message']; ?>
72
- <cite>&ndash;<?php echo $values['name']; ?></cite></p></blockquote>
73
- <?php } ?>
74
- </div><!--end testimonials-->
75
- <?php } ?>
76
- <?php } else {
77
- echo "For enable testimonials go to admin->system->configuration->shweta testimonials->setting->enable->yes";
78
- }
79
- ?>
80
-
81
-
1
+ <?php $enab=$this->getTestimonialsEnabled();
2
+ if($enab==1) { ?>
3
+ <?php $view=$this->getTestimonialsView();
4
+ if($view==2) { ?>
5
+ <?php $wid=$this->getTestimonialsImageWidth(); ?>
6
+ <?php $hei=$this->getTestimonialsImageHeight(); ?>
7
+ <?php $faceimg=$this->getTestimonialsImages(); ?>
8
+
9
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
10
+ <!-- include Cycle plugin -->
11
+
12
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('jquery.cycle.all.latest.js') ?>"></script>
13
+ <script type="text/javascript">
14
+ $(document).ready(function() {
15
+ $('#testimonials')
16
+ .cycle({
17
+ fx: 'fade', // choose your transition type, ex: fade, scrollUp, scrollRight, shuffle
18
+ });
19
+ });
20
+ </script>
21
+
22
+
23
+ <style>
24
+ #testimonials {
25
+ width:630px;
26
+ background:#E7E9E6 url(images/bg-testimonials.png) left top repeat-x;
27
+ border:1px solid #D8D9D6;
28
+ margin:10px 0;
29
+ height:220px;
30
+ }
31
+ #testimonials blockquote{
32
+ padding:10px;
33
+ width:600px !important;
34
+ font-family:Georgia, "Times New Roman", Times, serif;
35
+ font-style:italic;
36
+ color:#808080;
37
+ display:block;
38
+ }
39
+
40
+ #testimonials blockquote p{
41
+ margin: 0 !important;padding: 5px!important;
42
+ float:right;
43
+ width:195px;
44
+
45
+ }
46
+ #testimonials blockquote cite {
47
+ font-style: normal;
48
+ display: block;
49
+
50
+ text-transform: uppercase;
51
+ font-weight: bold;
52
+ font-style:italic;
53
+ color: #555;
54
+ padding-left:5px;
55
+ margin-top:10px;
56
+ }
57
+ </style>
58
+
59
+
60
+
61
+ <?php $testi=$this->ShowTestimonialsRecords(); ?>
62
+
63
+ <?php $result = $testi->fetchAll(); ?>
64
+ <?php $img=Mage::getBaseUrl();
65
+ $imgr=str_replace('/index.php', '', $img); ?>
66
+ <div id="testimonials">
67
+ <?php foreach($result as $values) { ?>
68
+
69
+ <?php $img1= $values['pic']; ?>
70
+ <blockquote><?php if($faceimg==1) { ?><img src="<?php echo $imgr.'media/'.$img1 ?>" width="<?php echo $wid; ?>" height="<?php echo $hei; ?>" /><?php } ?><p>
71
+ <?php echo $values['message']; ?>
72
+ <cite>&ndash;<?php echo $values['name']; ?></cite></p></blockquote>
73
+ <?php } ?>
74
+ </div><!--end testimonials-->
75
+ <?php } ?>
76
+ <?php } else {
77
+ echo "For enable testimonials go to admin->system->configuration->shweta testimonials->setting->enable->yes";
78
+ }
79
+ ?>
80
+
81
+
app/design/frontend/base/default/template/testimonials/left.phtml CHANGED
@@ -1,81 +1,81 @@
1
- <?php $enab=$this->getTestimonialsEnabled();
2
- if($enab==1) { ?>
3
- <?php $view=$this->getTestimonialsView();
4
- if($view==1) { ?>
5
- <?php $wid=$this->getTestimonialsImageWidth(); ?>
6
- <?php $hei=$this->getTestimonialsImageHeight(); ?>
7
- <?php $faceimg=$this->getTestimonialsImages(); ?>
8
-
9
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
10
- <!-- include Cycle plugin -->
11
-
12
- <script type="text/javascript" src="<?php echo $this->getJsUrl('jquery.cycle.all.latest.js') ?>"></script>
13
- <script type="text/javascript">
14
- $(document).ready(function() {
15
- $('#testimonials')
16
- .cycle({
17
- fx: 'fade', // choose your transition type, ex: fade, scrollUp, scrollRight, shuffle
18
- });
19
- });
20
- </script>
21
-
22
-
23
- <style>
24
- #testimonials {
25
- width:195px;
26
- background:#E7E9E6 url(images/bg-testimonials.png) left top repeat-x;
27
- border:1px solid #D8D9D6;
28
- margin:10px 0;
29
- height:150px;
30
-
31
- }
32
- #testimonials blockquote{
33
- padding:10px;
34
- width:180px !important;
35
- font-family:Georgia, "Times New Roman", Times, serif;
36
- font-style:italic;
37
- color:#808080;
38
- display:block;
39
- }
40
-
41
- #testimonials blockquote p{
42
- margin: 0 !important;padding: 5px!important;
43
- float:right;
44
- width:100px;
45
-
46
- }
47
- #testimonials blockquote cite {
48
- font-style: normal;
49
- display: block;
50
-
51
- text-transform: uppercase;
52
- font-weight: bold;
53
- font-style:italic;
54
- color: #555;
55
- padding-left:5px;
56
- margin-top:10px;
57
- }
58
- </style>
59
-
60
-
61
-
62
- <?php $testi=$this->ShowTestimonialsRecords(); ?>
63
-
64
- <?php $result = $testi->fetchAll(); ?>
65
- <?php $img=Mage::getBaseUrl();
66
- $imgr=str_replace('/index.php', '', $img); ?>
67
- <div id="testimonials">
68
- <?php foreach($result as $values) { ?>
69
- <?php $img1= $values['pic']; ?>
70
- <blockquote><?php if($faceimg==1) { ?><img src="<?php echo $imgr.'media/'.$img1 ?>" width="<?php echo $wid; ?>" height="<?php echo $hei; ?>" /><?php } ?><p>
71
- <?php echo $values['message']; ?>
72
- <cite>&ndash;<?php echo $values['name']; ?></cite></p></blockquote>
73
- <?php } ?>
74
- </div><!--end testimonials-->
75
- <?php } ?>
76
- <?php } else {
77
- echo "For enable testimonials go to admin->system->configuration->shweta testimonials->setting->enable->yes";
78
- }
79
- ?>
80
-
81
-
1
+ <?php $enab=$this->getTestimonialsEnabled();
2
+ if($enab==1) { ?>
3
+ <?php $view=$this->getTestimonialsView();
4
+ if($view==1) { ?>
5
+ <?php $wid=$this->getTestimonialsImageWidth(); ?>
6
+ <?php $hei=$this->getTestimonialsImageHeight(); ?>
7
+ <?php $faceimg=$this->getTestimonialsImages(); ?>
8
+
9
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
10
+ <!-- include Cycle plugin -->
11
+
12
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('jquery.cycle.all.latest.js') ?>"></script>
13
+ <script type="text/javascript">
14
+ $(document).ready(function() {
15
+ $('#testimonials')
16
+ .cycle({
17
+ fx: 'fade', // choose your transition type, ex: fade, scrollUp, scrollRight, shuffle
18
+ });
19
+ });
20
+ </script>
21
+
22
+
23
+ <style>
24
+ #testimonials {
25
+ width:195px;
26
+ background:#E7E9E6 url(images/bg-testimonials.png) left top repeat-x;
27
+ border:1px solid #D8D9D6;
28
+ margin:10px 0;
29
+ height:150px;
30
+
31
+ }
32
+ #testimonials blockquote{
33
+ padding:10px;
34
+ width:180px !important;
35
+ font-family:Georgia, "Times New Roman", Times, serif;
36
+ font-style:italic;
37
+ color:#808080;
38
+ display:block;
39
+ }
40
+
41
+ #testimonials blockquote p{
42
+ margin: 0 !important;padding: 5px!important;
43
+ float:right;
44
+ width:100px;
45
+
46
+ }
47
+ #testimonials blockquote cite {
48
+ font-style: normal;
49
+ display: block;
50
+
51
+ text-transform: uppercase;
52
+ font-weight: bold;
53
+ font-style:italic;
54
+ color: #555;
55
+ padding-left:5px;
56
+ margin-top:10px;
57
+ }
58
+ </style>
59
+
60
+
61
+
62
+ <?php $testi=$this->ShowTestimonialsRecords(); ?>
63
+
64
+ <?php $result = $testi->fetchAll(); ?>
65
+ <?php $img=Mage::getBaseUrl();
66
+ $imgr=str_replace('/index.php', '', $img); ?>
67
+ <div id="testimonials">
68
+ <?php foreach($result as $values) { ?>
69
+ <?php $img1= $values['pic']; ?>
70
+ <blockquote><?php if($faceimg==1) { ?><img src="<?php echo $imgr.'media/'.$img1 ?>" width="<?php echo $wid; ?>" height="<?php echo $hei; ?>" /><?php } ?><p>
71
+ <?php echo $values['message']; ?>
72
+ <cite>&ndash;<?php echo $values['name']; ?></cite></p></blockquote>
73
+ <?php } ?>
74
+ </div><!--end testimonials-->
75
+ <?php } ?>
76
+ <?php } else {
77
+ echo "For enable testimonials go to admin->system->configuration->shweta testimonials->setting->enable->yes";
78
+ }
79
+ ?>
80
+
81
+
app/design/frontend/base/default/template/testimonials/testimonials.phtml CHANGED
@@ -1,59 +1,59 @@
1
- <?php $funres=$this->ShowCustomRecords(); ?>
2
-
3
- <?php $result = $funres->fetchAll(); ?>
4
- <table cellspacing="0" class="data-table" id="data-table">
5
- <tr>
6
- <th><?php echo $this->__('Id') ?></th>
7
- <th><?php echo $this->__('pic') ?></th>
8
- <th><?php echo $this->__('name') ?></th>
9
- <th><?php echo $this->__('message') ?></th>
10
- </tr>
11
- <?php
12
- foreach($result as $values)
13
- {
14
- echo '<tr>';
15
- echo '<td>'.$values['id'].'</td>';
16
- echo '<td>'.$values['pic'].'</td>';
17
- echo '<td>'.$values['name'].'</td>';
18
- echo '<td>'.$values['message'].'</td>';
19
- echo '</tr>';
20
- }
21
- ?>
22
- </table>
23
-
24
- <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
25
- <?php $_datasets = $this->getDatasets(); ?>
26
- <div class="page-head">
27
- <h3><?php echo $this->__('Testimonials') ?></h3>
28
- </div>
29
- <?php echo $this->getPagerHtml(); ?>
30
- <?php // if($_datasets->getSize()): ?>
31
- <table cellspacing="0" class="data-table" id="data-table">
32
- <thead>
33
- <tr>
34
- <th><?php echo $this->__('Id') ?></th>
35
-
36
- <th><?php echo $this->__('pic') ?></th>
37
- <th><?php echo $this->__('name') ?></th>
38
- <th><?php echo $this->__('message') ?></th>
39
- <th> &nbsp; </th>
40
- </tr>
41
- </thead>
42
- <tbody>
43
- <?php foreach ($_datasets as $_dataset): ?>
44
- <tr>
45
- <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getId() ?></td>
46
-
47
- <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getData('pic') ?></td>
48
- <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getData('name') ?></td>
49
- <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getData('message') ?></td>
50
- <td valign="middle" style="vertical-align:middle;"><a href="#" ><?php echo($this->__('View')) ?></a></td>
51
- </tr>
52
- <?php endforeach; ?>
53
- </tbody>
54
- </table>
55
- <script type="text/javascript">decorateTable('data-table')</script>
56
- <?php echo $this->getPagerHtml(); ?>
57
- <?php // else: ?>
58
- <p><?php // echo $this->__('You have submited no data.'); ?></p>
59
- <?php // endif ?>
1
+ <?php $funres=$this->ShowCustomRecords(); ?>
2
+
3
+ <?php $result = $funres->fetchAll(); ?>
4
+ <table cellspacing="0" class="data-table" id="data-table">
5
+ <tr>
6
+ <th><?php echo $this->__('Id') ?></th>
7
+ <th><?php echo $this->__('pic') ?></th>
8
+ <th><?php echo $this->__('name') ?></th>
9
+ <th><?php echo $this->__('message') ?></th>
10
+ </tr>
11
+ <?php
12
+ foreach($result as $values)
13
+ {
14
+ echo '<tr>';
15
+ echo '<td>'.$values['id'].'</td>';
16
+ echo '<td>'.$values['pic'].'</td>';
17
+ echo '<td>'.$values['name'].'</td>';
18
+ echo '<td>'.$values['message'].'</td>';
19
+ echo '</tr>';
20
+ }
21
+ ?>
22
+ </table>
23
+
24
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
25
+ <?php $_datasets = $this->getDatasets(); ?>
26
+ <div class="page-head">
27
+ <h3><?php echo $this->__('Testimonials') ?></h3>
28
+ </div>
29
+ <?php echo $this->getPagerHtml(); ?>
30
+ <?php // if($_datasets->getSize()): ?>
31
+ <table cellspacing="0" class="data-table" id="data-table">
32
+ <thead>
33
+ <tr>
34
+ <th><?php echo $this->__('Id') ?></th>
35
+
36
+ <th><?php echo $this->__('pic') ?></th>
37
+ <th><?php echo $this->__('name') ?></th>
38
+ <th><?php echo $this->__('message') ?></th>
39
+ <th> &nbsp; </th>
40
+ </tr>
41
+ </thead>
42
+ <tbody>
43
+ <?php foreach ($_datasets as $_dataset): ?>
44
+ <tr>
45
+ <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getId() ?></td>
46
+
47
+ <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getData('pic') ?></td>
48
+ <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getData('name') ?></td>
49
+ <td valign="middle" style="vertical-align:middle;"><?php echo $_dataset->getData('message') ?></td>
50
+ <td valign="middle" style="vertical-align:middle;"><a href="#" ><?php echo($this->__('View')) ?></a></td>
51
+ </tr>
52
+ <?php endforeach; ?>
53
+ </tbody>
54
+ </table>
55
+ <script type="text/javascript">decorateTable('data-table')</script>
56
+ <?php echo $this->getPagerHtml(); ?>
57
+ <?php // else: ?>
58
+ <p><?php // echo $this->__('You have submited no data.'); ?></p>
59
+ <?php // endif ?>
app/etc/modules/Shweta_Testimonials.xml CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Shweta_Testimonials>
5
- <active>true</active>
6
- <codePool>local</codePool>
7
- <version>0.1.0</version>
8
- </Shweta_Testimonials>
9
- </modules>
10
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Shweta_Testimonials>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <version>0.1.0</version>
8
+ </Shweta_Testimonials>
9
+ </modules>
10
  </config>
js/jquery.cycle.all.latest.js CHANGED
@@ -1,1331 +1,1331 @@
1
- /*!
2
- * jQuery Cycle Plugin (with Transition Definitions)
3
- * Examples and documentation at: http://jquery.malsup.com/cycle/
4
- * Copyright (c) 2007-2010 M. Alsup
5
- * Version: 2.88 (08-JUN-2010)
6
- * Dual licensed under the MIT and GPL licenses.
7
- * http://jquery.malsup.com/license.html
8
- * Requires: jQuery v1.2.6 or later
9
- */
10
- ;(function($) {
11
-
12
- var ver = '2.88';
13
-
14
- // if $.support is not defined (pre jQuery 1.3) add what I need
15
- if ($.support == undefined) {
16
- $.support = {
17
- opacity: !($.browser.msie)
18
- };
19
- }
20
-
21
- function debug(s) {
22
- if ($.fn.cycle.debug)
23
- log(s);
24
- }
25
- function log() {
26
- if (window.console && window.console.log)
27
- window.console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
28
- };
29
-
30
- // the options arg can be...
31
- // a number - indicates an immediate transition should occur to the given slide index
32
- // a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
33
- // an object - properties to control the slideshow
34
- //
35
- // the arg2 arg can be...
36
- // the name of an fx (only used in conjunction with a numeric value for 'options')
37
- // the value true (only used in first arg == 'resume') and indicates
38
- // that the resume should occur immediately (not wait for next timeout)
39
-
40
- $.fn.cycle = function(options, arg2) {
41
- var o = { s: this.selector, c: this.context };
42
-
43
- // in 1.3+ we can fix mistakes with the ready state
44
- if (this.length === 0 && options != 'stop') {
45
- if (!$.isReady && o.s) {
46
- log('DOM not ready, queuing slideshow');
47
- $(function() {
48
- $(o.s,o.c).cycle(options,arg2);
49
- });
50
- return this;
51
- }
52
- // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
53
- log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
54
- return this;
55
- }
56
-
57
- // iterate the matched nodeset
58
- return this.each(function() {
59
- var opts = handleArguments(this, options, arg2);
60
- if (opts === false)
61
- return;
62
-
63
- opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
64
-
65
- // stop existing slideshow for this container (if there is one)
66
- if (this.cycleTimeout)
67
- clearTimeout(this.cycleTimeout);
68
- this.cycleTimeout = this.cyclePause = 0;
69
-
70
- var $cont = $(this);
71
- var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
72
- var els = $slides.get();
73
- if (els.length < 2) {
74
- log('terminating; too few slides: ' + els.length);
75
- return;
76
- }
77
-
78
- var opts2 = buildOptions($cont, $slides, els, opts, o);
79
- if (opts2 === false)
80
- return;
81
-
82
- var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.rev);
83
-
84
- // if it's an auto slideshow, kick it off
85
- if (startTime) {
86
- startTime += (opts2.delay || 0);
87
- if (startTime < 10)
88
- startTime = 10;
89
- debug('first timeout: ' + startTime);
90
- this.cycleTimeout = setTimeout(function(){go(els,opts2,0,(!opts2.rev && !opts.backwards))}, startTime);
91
- }
92
- });
93
- };
94
-
95
- // process the args that were passed to the plugin fn
96
- function handleArguments(cont, options, arg2) {
97
- if (cont.cycleStop == undefined)
98
- cont.cycleStop = 0;
99
- if (options === undefined || options === null)
100
- options = {};
101
- if (options.constructor == String) {
102
- switch(options) {
103
- case 'destroy':
104
- case 'stop':
105
- var opts = $(cont).data('cycle.opts');
106
- if (!opts)
107
- return false;
108
- cont.cycleStop++; // callbacks look for change
109
- if (cont.cycleTimeout)
110
- clearTimeout(cont.cycleTimeout);
111
- cont.cycleTimeout = 0;
112
- $(cont).removeData('cycle.opts');
113
- if (options == 'destroy')
114
- destroy(opts);
115
- return false;
116
- case 'toggle':
117
- cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
118
- checkInstantResume(cont.cyclePause, arg2, cont);
119
- return false;
120
- case 'pause':
121
- cont.cyclePause = 1;
122
- return false;
123
- case 'resume':
124
- cont.cyclePause = 0;
125
- checkInstantResume(false, arg2, cont);
126
- return false;
127
- case 'prev':
128
- case 'next':
129
- var opts = $(cont).data('cycle.opts');
130
- if (!opts) {
131
- log('options not found, "prev/next" ignored');
132
- return false;
133
- }
134
- $.fn.cycle[options](opts);
135
- return false;
136
- default:
137
- options = { fx: options };
138
- };
139
- return options;
140
- }
141
- else if (options.constructor == Number) {
142
- // go to the requested slide
143
- var num = options;
144
- options = $(cont).data('cycle.opts');
145
- if (!options) {
146
- log('options not found, can not advance slide');
147
- return false;
148
- }
149
- if (num < 0 || num >= options.elements.length) {
150
- log('invalid slide index: ' + num);
151
- return false;
152
- }
153
- options.nextSlide = num;
154
- if (cont.cycleTimeout) {
155
- clearTimeout(cont.cycleTimeout);
156
- cont.cycleTimeout = 0;
157
- }
158
- if (typeof arg2 == 'string')
159
- options.oneTimeFx = arg2;
160
- go(options.elements, options, 1, num >= options.currSlide);
161
- return false;
162
- }
163
- return options;
164
-
165
- function checkInstantResume(isPaused, arg2, cont) {
166
- if (!isPaused && arg2 === true) { // resume now!
167
- var options = $(cont).data('cycle.opts');
168
- if (!options) {
169
- log('options not found, can not resume');
170
- return false;
171
- }
172
- if (cont.cycleTimeout) {
173
- clearTimeout(cont.cycleTimeout);
174
- cont.cycleTimeout = 0;
175
- }
176
- go(options.elements, options, 1, (!opts.rev && !opts.backwards));
177
- }
178
- }
179
- };
180
-
181
- function removeFilter(el, opts) {
182
- if (!$.support.opacity && opts.cleartype && el.style.filter) {
183
- try { el.style.removeAttribute('filter'); }
184
- catch(smother) {} // handle old opera versions
185
- }
186
- };
187
-
188
- // unbind event handlers
189
- function destroy(opts) {
190
- if (opts.next)
191
- $(opts.next).unbind(opts.prevNextEvent);
192
- if (opts.prev)
193
- $(opts.prev).unbind(opts.prevNextEvent);
194
-
195
- if (opts.pager || opts.pagerAnchorBuilder)
196
- $.each(opts.pagerAnchors || [], function() {
197
- this.unbind().remove();
198
- });
199
- opts.pagerAnchors = null;
200
- if (opts.destroy) // callback
201
- opts.destroy(opts);
202
- };
203
-
204
- // one-time initialization
205
- function buildOptions($cont, $slides, els, options, o) {
206
- // support metadata plugin (v1.0 and v2.0)
207
- var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
208
- if (opts.autostop)
209
- opts.countdown = opts.autostopCount || els.length;
210
-
211
- var cont = $cont[0];
212
- $cont.data('cycle.opts', opts);
213
- opts.$cont = $cont;
214
- opts.stopCount = cont.cycleStop;
215
- opts.elements = els;
216
- opts.before = opts.before ? [opts.before] : [];
217
- opts.after = opts.after ? [opts.after] : [];
218
- opts.after.unshift(function(){ opts.busy=0; });
219
-
220
- // push some after callbacks
221
- if (!$.support.opacity && opts.cleartype)
222
- opts.after.push(function() { removeFilter(this, opts); });
223
- if (opts.continuous)
224
- opts.after.push(function() { go(els,opts,0,(!opts.rev && !opts.backwards)); });
225
-
226
- saveOriginalOpts(opts);
227
-
228
- // clearType corrections
229
- if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
230
- clearTypeFix($slides);
231
-
232
- // container requires non-static position so that slides can be position within
233
- if ($cont.css('position') == 'static')
234
- $cont.css('position', 'relative');
235
- if (opts.width)
236
- $cont.width(opts.width);
237
- if (opts.height && opts.height != 'auto')
238
- $cont.height(opts.height);
239
-
240
- if (opts.startingSlide)
241
- opts.startingSlide = parseInt(opts.startingSlide);
242
- else if (opts.backwards)
243
- opts.startingSlide = els.length - 1;
244
-
245
- // if random, mix up the slide array
246
- if (opts.random) {
247
- opts.randomMap = [];
248
- for (var i = 0; i < els.length; i++)
249
- opts.randomMap.push(i);
250
- opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
251
- opts.randomIndex = 1;
252
- opts.startingSlide = opts.randomMap[1];
253
- }
254
- else if (opts.startingSlide >= els.length)
255
- opts.startingSlide = 0; // catch bogus input
256
- opts.currSlide = opts.startingSlide || 0;
257
- var first = opts.startingSlide;
258
-
259
- // set position and zIndex on all the slides
260
- $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
261
- var z;
262
- if (opts.backwards)
263
- z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
264
- else
265
- z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
266
- $(this).css('z-index', z)
267
- });
268
-
269
- // make sure first slide is visible
270
- $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
271
- removeFilter(els[first], opts);
272
-
273
- // stretch slides
274
- if (opts.fit && opts.width)
275
- $slides.width(opts.width);
276
- if (opts.fit && opts.height && opts.height != 'auto')
277
- $slides.height(opts.height);
278
-
279
- // stretch container
280
- var reshape = opts.containerResize && !$cont.innerHeight();
281
- if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
282
- var maxw = 0, maxh = 0;
283
- for(var j=0; j < els.length; j++) {
284
- var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
285
- if (!w) w = e.offsetWidth || e.width || $e.attr('width')
286
- if (!h) h = e.offsetHeight || e.height || $e.attr('height');
287
- maxw = w > maxw ? w : maxw;
288
- maxh = h > maxh ? h : maxh;
289
- }
290
- if (maxw > 0 && maxh > 0)
291
- $cont.css({});
292
- }
293
-
294
- if (opts.pause)
295
- $cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});
296
-
297
- if (supportMultiTransitions(opts) === false)
298
- return false;
299
-
300
- // apparently a lot of people use image slideshows without height/width attributes on the images.
301
- // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
302
- var requeue = false;
303
- options.requeueAttempts = options.requeueAttempts || 0;
304
- $slides.each(function() {
305
- // try to get height/width of each slide
306
- var $el = $(this);
307
- this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
308
- this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
309
-
310
- if ( $el.is('img') ) {
311
- // sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when
312
- // an image is being downloaded and the markup did not include sizing info (height/width attributes);
313
- // there seems to be some "default" sizes used in this situation
314
- var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
315
- var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
316
- var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
317
- var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
318
- // don't requeue for images that are still loading but have a valid size
319
- if (loadingIE || loadingFF || loadingOp || loadingOther) {
320
- if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
321
- log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
322
- setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
323
- requeue = true;
324
- return false; // break each loop
325
- }
326
- else {
327
- log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
328
- }
329
- }
330
- }
331
- return true;
332
- });
333
-
334
- if (requeue)
335
- return false;
336
-
337
- opts.cssBefore = opts.cssBefore || {};
338
- opts.animIn = opts.animIn || {};
339
- opts.animOut = opts.animOut || {};
340
-
341
- $slides.not(':eq('+first+')').css(opts.cssBefore);
342
- if (opts.cssFirst)
343
- $($slides[first]).css(opts.cssFirst);
344
-
345
- if (opts.timeout) {
346
- opts.timeout = parseInt(opts.timeout);
347
- // ensure that timeout and speed settings are sane
348
- if (opts.speed.constructor == String)
349
- opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed);
350
- if (!opts.sync)
351
- opts.speed = opts.speed / 2;
352
-
353
- var buffer = opts.fx == 'shuffle' ? 500 : 250;
354
- while((opts.timeout - opts.speed) < buffer) // sanitize timeout
355
- opts.timeout += opts.speed;
356
- }
357
- if (opts.easing)
358
- opts.easeIn = opts.easeOut = opts.easing;
359
- if (!opts.speedIn)
360
- opts.speedIn = opts.speed;
361
- if (!opts.speedOut)
362
- opts.speedOut = opts.speed;
363
-
364
- opts.slideCount = els.length;
365
- opts.currSlide = opts.lastSlide = first;
366
- if (opts.random) {
367
- if (++opts.randomIndex == els.length)
368
- opts.randomIndex = 0;
369
- opts.nextSlide = opts.randomMap[opts.randomIndex];
370
- }
371
- else if (opts.backwards)
372
- opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1;
373
- else
374
- opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
375
-
376
- // run transition init fn
377
- if (!opts.multiFx) {
378
- var init = $.fn.cycle.transitions[opts.fx];
379
- if ($.isFunction(init))
380
- init($cont, $slides, opts);
381
- else if (opts.fx != 'custom' && !opts.multiFx) {
382
- log('unknown transition: ' + opts.fx,'; slideshow terminating');
383
- return false;
384
- }
385
- }
386
-
387
- // fire artificial events
388
- var e0 = $slides[first];
389
- if (opts.before.length)
390
- opts.before[0].apply(e0, [e0, e0, opts, true]);
391
- if (opts.after.length > 1)
392
- opts.after[1].apply(e0, [e0, e0, opts, true]);
393
-
394
- if (opts.next)
395
- $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1)});
396
- if (opts.prev)
397
- $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1)});
398
- if (opts.pager || opts.pagerAnchorBuilder)
399
- buildPager(els,opts);
400
-
401
- exposeAddSlide(opts, els);
402
-
403
- return opts;
404
- };
405
-
406
- // save off original opts so we can restore after clearing state
407
- function saveOriginalOpts(opts) {
408
- opts.original = { before: [], after: [] };
409
- opts.original.cssBefore = $.extend({}, opts.cssBefore);
410
- opts.original.cssAfter = $.extend({}, opts.cssAfter);
411
- opts.original.animIn = $.extend({}, opts.animIn);
412
- opts.original.animOut = $.extend({}, opts.animOut);
413
- $.each(opts.before, function() { opts.original.before.push(this); });
414
- $.each(opts.after, function() { opts.original.after.push(this); });
415
- };
416
-
417
- function supportMultiTransitions(opts) {
418
- var i, tx, txs = $.fn.cycle.transitions;
419
- // look for multiple effects
420
- if (opts.fx.indexOf(',') > 0) {
421
- opts.multiFx = true;
422
- opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
423
- // discard any bogus effect names
424
- for (i=0; i < opts.fxs.length; i++) {
425
- var fx = opts.fxs[i];
426
- tx = txs[fx];
427
- if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
428
- log('discarding unknown transition: ',fx);
429
- opts.fxs.splice(i,1);
430
- i--;
431
- }
432
- }
433
- // if we have an empty list then we threw everything away!
434
- if (!opts.fxs.length) {
435
- log('No valid transitions named; slideshow terminating.');
436
- return false;
437
- }
438
- }
439
- else if (opts.fx == 'all') { // auto-gen the list of transitions
440
- opts.multiFx = true;
441
- opts.fxs = [];
442
- for (p in txs) {
443
- tx = txs[p];
444
- if (txs.hasOwnProperty(p) && $.isFunction(tx))
445
- opts.fxs.push(p);
446
- }
447
- }
448
- if (opts.multiFx && opts.randomizeEffects) {
449
- // munge the fxs array to make effect selection random
450
- var r1 = Math.floor(Math.random() * 20) + 30;
451
- for (i = 0; i < r1; i++) {
452
- var r2 = Math.floor(Math.random() * opts.fxs.length);
453
- opts.fxs.push(opts.fxs.splice(r2,1)[0]);
454
- }
455
- debug('randomized fx sequence: ',opts.fxs);
456
- }
457
- return true;
458
- };
459
-
460
- // provide a mechanism for adding slides after the slideshow has started
461
- function exposeAddSlide(opts, els) {
462
- opts.addSlide = function(newSlide, prepend) {
463
- var $s = $(newSlide), s = $s[0];
464
- if (!opts.autostopCount)
465
- opts.countdown++;
466
- els[prepend?'unshift':'push'](s);
467
- if (opts.els)
468
- opts.els[prepend?'unshift':'push'](s); // shuffle needs this
469
- opts.slideCount = els.length;
470
-
471
- $s.css('position','absolute');
472
- $s[prepend?'prependTo':'appendTo'](opts.$cont);
473
-
474
- if (prepend) {
475
- opts.currSlide++;
476
- opts.nextSlide++;
477
- }
478
-
479
- if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
480
- clearTypeFix($s);
481
-
482
- if (opts.fit && opts.width)
483
- $s.width(opts.width);
484
- if (opts.fit && opts.height && opts.height != 'auto')
485
- $slides.height(opts.height);
486
- s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
487
- s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
488
-
489
- $s.css(opts.cssBefore);
490
-
491
- if (opts.pager || opts.pagerAnchorBuilder)
492
- $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
493
-
494
- if ($.isFunction(opts.onAddSlide))
495
- opts.onAddSlide($s);
496
- else
497
- $s.hide(); // default behavior
498
- };
499
- }
500
-
501
- // reset internal state; we do this on every pass in order to support multiple effects
502
- $.fn.cycle.resetState = function(opts, fx) {
503
- fx = fx || opts.fx;
504
- opts.before = []; opts.after = [];
505
- opts.cssBefore = $.extend({}, opts.original.cssBefore);
506
- opts.cssAfter = $.extend({}, opts.original.cssAfter);
507
- opts.animIn = $.extend({}, opts.original.animIn);
508
- opts.animOut = $.extend({}, opts.original.animOut);
509
- opts.fxFn = null;
510
- $.each(opts.original.before, function() { opts.before.push(this); });
511
- $.each(opts.original.after, function() { opts.after.push(this); });
512
-
513
- // re-init
514
- var init = $.fn.cycle.transitions[fx];
515
- if ($.isFunction(init))
516
- init(opts.$cont, $(opts.elements), opts);
517
- };
518
-
519
- // this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
520
- function go(els, opts, manual, fwd) {
521
- // opts.busy is true if we're in the middle of an animation
522
- if (manual && opts.busy && opts.manualTrump) {
523
- // let manual transitions requests trump active ones
524
- debug('manualTrump in go(), stopping active transition');
525
- $(els).stop(true,true);
526
- opts.busy = false;
527
- }
528
- // don't begin another timeout-based transition if there is one active
529
- if (opts.busy) {
530
- debug('transition active, ignoring new tx request');
531
- return;
532
- }
533
-
534
- var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
535
-
536
- // stop cycling if we have an outstanding stop request
537
- if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
538
- return;
539
-
540
- // check to see if we should stop cycling based on autostop options
541
- if (!manual && !p.cyclePause && !opts.bounce &&
542
- ((opts.autostop && (--opts.countdown <= 0)) ||
543
- (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
544
- if (opts.end)
545
- opts.end(opts);
546
- return;
547
- }
548
-
549
- // if slideshow is paused, only transition on a manual trigger
550
- var changed = false;
551
- if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
552
- changed = true;
553
- var fx = opts.fx;
554
- // keep trying to get the slide size if we don't have it yet
555
- curr.cycleH = curr.cycleH || $(curr).height();
556
- curr.cycleW = curr.cycleW || $(curr).width();
557
- next.cycleH = next.cycleH || $(next).height();
558
- next.cycleW = next.cycleW || $(next).width();
559
-
560
- // support multiple transition types
561
- if (opts.multiFx) {
562
- if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length)
563
- opts.lastFx = 0;
564
- fx = opts.fxs[opts.lastFx];
565
- opts.currFx = fx;
566
- }
567
-
568
- // one-time fx overrides apply to: $('div').cycle(3,'zoom');
569
- if (opts.oneTimeFx) {
570
- fx = opts.oneTimeFx;
571
- opts.oneTimeFx = null;
572
- }
573
-
574
- $.fn.cycle.resetState(opts, fx);
575
-
576
- // run the before callbacks
577
- if (opts.before.length)
578
- $.each(opts.before, function(i,o) {
579
- if (p.cycleStop != opts.stopCount) return;
580
- o.apply(next, [curr, next, opts, fwd]);
581
- });
582
-
583
- // stage the after callacks
584
- var after = function() {
585
- $.each(opts.after, function(i,o) {
586
- if (p.cycleStop != opts.stopCount) return;
587
- o.apply(next, [curr, next, opts, fwd]);
588
- });
589
- };
590
-
591
- debug('tx firing; currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
592
-
593
- // get ready to perform the transition
594
- opts.busy = 1;
595
- if (opts.fxFn) // fx function provided?
596
- opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
597
- else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
598
- $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
599
- else
600
- $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
601
- }
602
-
603
- if (changed || opts.nextSlide == opts.currSlide) {
604
- // calculate the next slide
605
- opts.lastSlide = opts.currSlide;
606
- if (opts.random) {
607
- opts.currSlide = opts.nextSlide;
608
- if (++opts.randomIndex == els.length)
609
- opts.randomIndex = 0;
610
- opts.nextSlide = opts.randomMap[opts.randomIndex];
611
- if (opts.nextSlide == opts.currSlide)
612
- opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
613
- }
614
- else if (opts.backwards) {
615
- var roll = (opts.nextSlide - 1) < 0;
616
- if (roll && opts.bounce) {
617
- opts.backwards = !opts.backwards;
618
- opts.nextSlide = 1;
619
- opts.currSlide = 0;
620
- }
621
- else {
622
- opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
623
- opts.currSlide = roll ? 0 : opts.nextSlide+1;
624
- }
625
- }
626
- else { // sequence
627
- var roll = (opts.nextSlide + 1) == els.length;
628
- if (roll && opts.bounce) {
629
- opts.backwards = !opts.backwards;
630
- opts.nextSlide = els.length-2;
631
- opts.currSlide = els.length-1;
632
- }
633
- else {
634
- opts.nextSlide = roll ? 0 : opts.nextSlide+1;
635
- opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
636
- }
637
- }
638
- }
639
- if (changed && opts.pager)
640
- opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
641
-
642
- // stage the next transition
643
- var ms = 0;
644
- if (opts.timeout && !opts.continuous)
645
- ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
646
- else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
647
- ms = 10;
648
- if (ms > 0)
649
- p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, (!opts.rev && !opts.backwards)) }, ms);
650
- };
651
-
652
- // invoked after transition
653
- $.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
654
- $(pager).each(function() {
655
- $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
656
- });
657
- };
658
-
659
- // calculate timeout value for current transition
660
- function getTimeout(curr, next, opts, fwd) {
661
- if (opts.timeoutFn) {
662
- // call user provided calc fn
663
- var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
664
- while ((t - opts.speed) < 250) // sanitize timeout
665
- t += opts.speed;
666
- debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
667
- if (t !== false)
668
- return t;
669
- }
670
- return opts.timeout;
671
- };
672
-
673
- // expose next/prev function, caller must pass in state
674
- $.fn.cycle.next = function(opts) { advance(opts, opts.rev?-1:1); };
675
- $.fn.cycle.prev = function(opts) { advance(opts, opts.rev?1:-1);};
676
-
677
- // advance slide forward or back
678
- function advance(opts, val) {
679
- var els = opts.elements;
680
- var p = opts.$cont[0], timeout = p.cycleTimeout;
681
- if (timeout) {
682
- clearTimeout(timeout);
683
- p.cycleTimeout = 0;
684
- }
685
- if (opts.random && val < 0) {
686
- // move back to the previously display slide
687
- opts.randomIndex--;
688
- if (--opts.randomIndex == -2)
689
- opts.randomIndex = els.length-2;
690
- else if (opts.randomIndex == -1)
691
- opts.randomIndex = els.length-1;
692
- opts.nextSlide = opts.randomMap[opts.randomIndex];
693
- }
694
- else if (opts.random) {
695
- opts.nextSlide = opts.randomMap[opts.randomIndex];
696
- }
697
- else {
698
- opts.nextSlide = opts.currSlide + val;
699
- if (opts.nextSlide < 0) {
700
- if (opts.nowrap) return false;
701
- opts.nextSlide = els.length - 1;
702
- }
703
- else if (opts.nextSlide >= els.length) {
704
- if (opts.nowrap) return false;
705
- opts.nextSlide = 0;
706
- }
707
- }
708
-
709
- var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
710
- if ($.isFunction(cb))
711
- cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
712
- go(els, opts, 1, val>=0);
713
- return false;
714
- };
715
-
716
- function buildPager(els, opts) {
717
- var $p = $(opts.pager);
718
- $.each(els, function(i,o) {
719
- $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
720
- });
721
- opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
722
- };
723
-
724
- $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
725
- var a;
726
- if ($.isFunction(opts.pagerAnchorBuilder)) {
727
- a = opts.pagerAnchorBuilder(i,el);
728
- debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
729
- }
730
- else
731
- a = '<a href="#">'+(i+1)+'</a>';
732
-
733
- if (!a)
734
- return;
735
- var $a = $(a);
736
- // don't reparent if anchor is in the dom
737
- if ($a.parents('body').length === 0) {
738
- var arr = [];
739
- if ($p.length > 1) {
740
- $p.each(function() {
741
- var $clone = $a.clone(true);
742
- $(this).append($clone);
743
- arr.push($clone[0]);
744
- });
745
- $a = $(arr);
746
- }
747
- else {
748
- $a.appendTo($p);
749
- }
750
- }
751
-
752
- opts.pagerAnchors = opts.pagerAnchors || [];
753
- opts.pagerAnchors.push($a);
754
- $a.bind(opts.pagerEvent, function(e) {
755
- e.preventDefault();
756
- opts.nextSlide = i;
757
- var p = opts.$cont[0], timeout = p.cycleTimeout;
758
- if (timeout) {
759
- clearTimeout(timeout);
760
- p.cycleTimeout = 0;
761
- }
762
- var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
763
- if ($.isFunction(cb))
764
- cb(opts.nextSlide, els[opts.nextSlide]);
765
- go(els,opts,1,opts.currSlide < i); // trigger the trans
766
- // return false; // <== allow bubble
767
- });
768
-
769
- if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
770
- $a.bind('click.cycle', function(){return false;}); // suppress click
771
-
772
- if (opts.pauseOnPagerHover)
773
- $a.hover(function() { opts.$cont[0].cyclePause++; }, function() { opts.$cont[0].cyclePause--; } );
774
- };
775
-
776
- // helper fn to calculate the number of slides between the current and the next
777
- $.fn.cycle.hopsFromLast = function(opts, fwd) {
778
- var hops, l = opts.lastSlide, c = opts.currSlide;
779
- if (fwd)
780
- hops = c > l ? c - l : opts.slideCount - l;
781
- else
782
- hops = c < l ? l - c : l + opts.slideCount - c;
783
- return hops;
784
- };
785
-
786
- // fix clearType problems in ie6 by setting an explicit bg color
787
- // (otherwise text slides look horrible during a fade transition)
788
- function clearTypeFix($slides) {
789
- debug('applying clearType background-color hack');
790
- function hex(s) {
791
- s = parseInt(s).toString(16);
792
- return s.length < 2 ? '0'+s : s;
793
- };
794
- function getBg(e) {
795
- for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
796
- var v = $.css(e,'background-color');
797
- if (v.indexOf('rgb') >= 0 ) {
798
- var rgb = v.match(/\d+/g);
799
- return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
800
- }
801
- if (v && v != 'transparent')
802
- return v;
803
- }
804
- return '#ffffff';
805
- };
806
- $slides.each(function() { $(this).css('background-color', getBg(this)); });
807
- };
808
-
809
- // reset common props before the next transition
810
- $.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
811
- $(opts.elements).not(curr).hide();
812
- opts.cssBefore.opacity = 1;
813
- opts.cssBefore.display = 'block';
814
- if (w !== false && next.cycleW > 0)
815
- opts.cssBefore.width = next.cycleW;
816
- if (h !== false && next.cycleH > 0)
817
- opts.cssBefore.height = next.cycleH;
818
- opts.cssAfter = opts.cssAfter || {};
819
- opts.cssAfter.display = 'none';
820
- $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
821
- $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
822
- };
823
-
824
- // the actual fn for effecting a transition
825
- $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
826
- var $l = $(curr), $n = $(next);
827
- var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
828
- $n.css(opts.cssBefore);
829
- if (speedOverride) {
830
- if (typeof speedOverride == 'number')
831
- speedIn = speedOut = speedOverride;
832
- else
833
- speedIn = speedOut = 1;
834
- easeIn = easeOut = null;
835
- }
836
- var fn = function() {$n.animate(opts.animIn, speedIn, easeIn, cb)};
837
- $l.animate(opts.animOut, speedOut, easeOut, function() {
838
- if (opts.cssAfter) $l.css(opts.cssAfter);
839
- if (!opts.sync) fn();
840
- });
841
- if (opts.sync) fn();
842
- };
843
-
844
- // transition definitions - only fade is defined here, transition pack defines the rest
845
- $.fn.cycle.transitions = {
846
- fade: function($cont, $slides, opts) {
847
- $slides.not(':eq('+opts.currSlide+')').css('opacity',0);
848
- opts.before.push(function(curr,next,opts) {
849
- $.fn.cycle.commonReset(curr,next,opts);
850
- opts.cssBefore.opacity = 0;
851
- });
852
- opts.animIn = { opacity: 1 };
853
- opts.animOut = { opacity: 0 };
854
- opts.cssBefore = { top: 0, left: 0 };
855
- }
856
- };
857
-
858
- $.fn.cycle.ver = function() { return ver; };
859
-
860
- // override these globally if you like (they are all optional)
861
- $.fn.cycle.defaults = {
862
- fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
863
- timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
864
- timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
865
- continuous: 0, // true to start next transition immediately after current one completes
866
- speed: 1000, // speed of the transition (any valid fx speed value)
867
- speedIn: null, // speed of the 'in' transition
868
- speedOut: null, // speed of the 'out' transition
869
- next: null, // selector for element to use as event trigger for next slide
870
- prev: null, // selector for element to use as event trigger for previous slide
871
- // prevNextClick: null, // @deprecated; please use onPrevNextEvent instead
872
- onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
873
- prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide
874
- pager: null, // selector for element to use as pager container
875
- //pagerClick null, // @deprecated; please use onPagerEvent instead
876
- onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
877
- pagerEvent: 'click.cycle', // name of event which drives the pager navigation
878
- allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
879
- pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
880
- before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
881
- after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
882
- end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
883
- easing: null, // easing method for both in and out transitions
884
- easeIn: null, // easing for "in" transition
885
- easeOut: null, // easing for "out" transition
886
- shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
887
- animIn: null, // properties that define how the slide animates in
888
- animOut: null, // properties that define how the slide animates out
889
- cssBefore: null, // properties that define the initial state of the slide before transitioning in
890
- cssAfter: null, // properties that defined the state of the slide after transitioning out
891
- fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
892
- height: 'auto', // container height
893
- startingSlide: 0, // zero-based index of the first slide to be displayed
894
- sync: 1, // true if in/out transitions should occur simultaneously
895
- random: 0, // true for random, false for sequence (not applicable to shuffle fx)
896
- fit: 0, // force slides to fit container
897
- containerResize: 1, // resize container to fit largest slide
898
- pause: 0, // true to enable "pause on hover"
899
- pauseOnPagerHover: 0, // true to pause when hovering over pager link
900
- autostop: 0, // true to end slideshow after X transitions (where X == slide count)
901
- autostopCount: 0, // number of transitions (optionally used with autostop to define X)
902
- delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
903
- slideExpr: null, // expression for selecting slides (if something other than all children is required)
904
- cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
905
- cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
906
- nowrap: 0, // true to prevent slideshow from wrapping
907
- fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
908
- randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
909
- rev: 0, // causes animations to transition in reverse
910
- manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
911
- requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
912
- requeueTimeout: 250, // ms delay for requeue
913
- activePagerClass: 'activeSlide', // class name used for the active pager link
914
- updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
915
- backwards: false // true to start slideshow at last slide and move backwards through the stack
916
- };
917
-
918
- })(jQuery);
919
-
920
-
921
- /*!
922
- * jQuery Cycle Plugin Transition Definitions
923
- * This script is a plugin for the jQuery Cycle Plugin
924
- * Examples and documentation at: http://malsup.com/jquery/cycle/
925
- * Copyright (c) 2007-2010 M. Alsup
926
- * Version: 2.72
927
- * Dual licensed under the MIT and GPL licenses:
928
- * http://www.opensource.org/licenses/mit-license.php
929
- * http://www.gnu.org/licenses/gpl.html
930
- */
931
- (function($) {
932
-
933
- //
934
- // These functions define one-time slide initialization for the named
935
- // transitions. To save file size feel free to remove any of these that you
936
- // don't need.
937
- //
938
- $.fn.cycle.transitions.none = function($cont, $slides, opts) {
939
- opts.fxFn = function(curr,next,opts,after){
940
- $(next).show();
941
- $(curr).hide();
942
- after();
943
- };
944
- }
945
-
946
- // scrollUp/Down/Left/Right
947
- $.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
948
- $cont.css('overflow','hidden');
949
- opts.before.push($.fn.cycle.commonReset);
950
- var h = $cont.height();
951
- opts.cssBefore ={ top: h, left: 0 };
952
- opts.cssFirst = { top: 0 };
953
- opts.animIn = { top: 0 };
954
- opts.animOut = { top: -h };
955
- };
956
- $.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
957
- $cont.css('overflow','hidden');
958
- opts.before.push($.fn.cycle.commonReset);
959
- var h = $cont.height();
960
- opts.cssFirst = { top: 0 };
961
- opts.cssBefore= { top: -h, left: 0 };
962
- opts.animIn = { top: 0 };
963
- opts.animOut = { top: h };
964
- };
965
- $.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
966
- $cont.css('overflow','hidden');
967
- opts.before.push($.fn.cycle.commonReset);
968
- var w = $cont.width();
969
- opts.cssFirst = { left: 0 };
970
- opts.cssBefore= { left: w, top: 0 };
971
- opts.animIn = { left: 0 };
972
- opts.animOut = { left: 0-w };
973
- };
974
- $.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
975
- $cont.css('overflow','hidden');
976
- opts.before.push($.fn.cycle.commonReset);
977
- var w = $cont.width();
978
- opts.cssFirst = { left: 0 };
979
- opts.cssBefore= { left: -w, top: 0 };
980
- opts.animIn = { left: 0 };
981
- opts.animOut = { left: w };
982
- };
983
- $.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
984
- $cont.css('overflow','hidden').width();
985
- opts.before.push(function(curr, next, opts, fwd) {
986
- $.fn.cycle.commonReset(curr,next,opts);
987
- opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
988
- opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
989
- });
990
- opts.cssFirst = { left: 0 };
991
- opts.cssBefore= { top: 0 };
992
- opts.animIn = { left: 0 };
993
- opts.animOut = { top: 0 };
994
- };
995
- $.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
996
- $cont.css('overflow','hidden');
997
- opts.before.push(function(curr, next, opts, fwd) {
998
- $.fn.cycle.commonReset(curr,next,opts);
999
- opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
1000
- opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
1001
- });
1002
- opts.cssFirst = { top: 0 };
1003
- opts.cssBefore= { left: 0 };
1004
- opts.animIn = { top: 0 };
1005
- opts.animOut = { left: 0 };
1006
- };
1007
-
1008
- // slideX/slideY
1009
- $.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
1010
- opts.before.push(function(curr, next, opts) {
1011
- $(opts.elements).not(curr).hide();
1012
- $.fn.cycle.commonReset(curr,next,opts,false,true);
1013
- opts.animIn.width = next.cycleW;
1014
- });
1015
- opts.cssBefore = { left: 0, top: 0, width: 0 };
1016
- opts.animIn = { width: 'show' };
1017
- opts.animOut = { width: 0 };
1018
- };
1019
- $.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
1020
- opts.before.push(function(curr, next, opts) {
1021
- $(opts.elements).not(curr).hide();
1022
- $.fn.cycle.commonReset(curr,next,opts,true,false);
1023
- opts.animIn.height = next.cycleH;
1024
- });
1025
- opts.cssBefore = { left: 0, top: 0, height: 0 };
1026
- opts.animIn = { height: 'show' };
1027
- opts.animOut = { height: 0 };
1028
- };
1029
-
1030
- // shuffle
1031
- $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
1032
- var i, w = $cont.css('overflow', 'visible').width();
1033
- $slides.css({left: 0, top: 0});
1034
- opts.before.push(function(curr,next,opts) {
1035
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1036
- });
1037
- // only adjust speed once!
1038
- if (!opts.speedAdjusted) {
1039
- opts.speed = opts.speed / 2; // shuffle has 2 transitions
1040
- opts.speedAdjusted = true;
1041
- }
1042
- opts.random = 0;
1043
- opts.shuffle = opts.shuffle || {left:-w, top:15};
1044
- opts.els = [];
1045
- for (i=0; i < $slides.length; i++)
1046
- opts.els.push($slides[i]);
1047
-
1048
- for (i=0; i < opts.currSlide; i++)
1049
- opts.els.push(opts.els.shift());
1050
-
1051
- // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
1052
- opts.fxFn = function(curr, next, opts, cb, fwd) {
1053
- var $el = fwd ? $(curr) : $(next);
1054
- $(next).css(opts.cssBefore);
1055
- var count = opts.slideCount;
1056
- $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
1057
- var hops = $.fn.cycle.hopsFromLast(opts, fwd);
1058
- for (var k=0; k < hops; k++)
1059
- fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
1060
- if (fwd) {
1061
- for (var i=0, len=opts.els.length; i < len; i++)
1062
- $(opts.els[i]).css('z-index', len-i+count);
1063
- }
1064
- else {
1065
- var z = $(curr).css('z-index');
1066
- $el.css('z-index', parseInt(z)+1+count);
1067
- }
1068
- $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
1069
- $(fwd ? this : curr).hide();
1070
- if (cb) cb();
1071
- });
1072
- });
1073
- };
1074
- opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 };
1075
- };
1076
-
1077
- // turnUp/Down/Left/Right
1078
- $.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
1079
- opts.before.push(function(curr, next, opts) {
1080
- $.fn.cycle.commonReset(curr,next,opts,true,false);
1081
- opts.cssBefore.top = next.cycleH;
1082
- opts.animIn.height = next.cycleH;
1083
- });
1084
- opts.cssFirst = { top: 0 };
1085
- opts.cssBefore = { left: 0, height: 0 };
1086
- opts.animIn = { top: 0 };
1087
- opts.animOut = { height: 0 };
1088
- };
1089
- $.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
1090
- opts.before.push(function(curr, next, opts) {
1091
- $.fn.cycle.commonReset(curr,next,opts,true,false);
1092
- opts.animIn.height = next.cycleH;
1093
- opts.animOut.top = curr.cycleH;
1094
- });
1095
- opts.cssFirst = { top: 0 };
1096
- opts.cssBefore = { left: 0, top: 0, height: 0 };
1097
- opts.animOut = { height: 0 };
1098
- };
1099
- $.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
1100
- opts.before.push(function(curr, next, opts) {
1101
- $.fn.cycle.commonReset(curr,next,opts,false,true);
1102
- opts.cssBefore.left = next.cycleW;
1103
- opts.animIn.width = next.cycleW;
1104
- });
1105
- opts.cssBefore = { top: 0, width: 0 };
1106
- opts.animIn = { left: 0 };
1107
- opts.animOut = { width: 0 };
1108
- };
1109
- $.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
1110
- opts.before.push(function(curr, next, opts) {
1111
- $.fn.cycle.commonReset(curr,next,opts,false,true);
1112
- opts.animIn.width = next.cycleW;
1113
- opts.animOut.left = curr.cycleW;
1114
- });
1115
- opts.cssBefore = { top: 0, left: 0, width: 0 };
1116
- opts.animIn = { left: 0 };
1117
- opts.animOut = { width: 0 };
1118
- };
1119
-
1120
- // zoom
1121
- $.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
1122
- opts.before.push(function(curr, next, opts) {
1123
- $.fn.cycle.commonReset(curr,next,opts,false,false,true);
1124
- opts.cssBefore.top = next.cycleH/2;
1125
- opts.cssBefore.left = next.cycleW/2;
1126
- opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
1127
- opts.animOut = { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 };
1128
- });
1129
- opts.cssFirst = { top:0, left: 0 };
1130
- opts.cssBefore = { width: 0, height: 0 };
1131
- };
1132
-
1133
- // fadeZoom
1134
- $.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
1135
- opts.before.push(function(curr, next, opts) {
1136
- $.fn.cycle.commonReset(curr,next,opts,false,false);
1137
- opts.cssBefore.left = next.cycleW/2;
1138
- opts.cssBefore.top = next.cycleH/2;
1139
- opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
1140
- });
1141
- opts.cssBefore = { width: 0, height: 0 };
1142
- opts.animOut = { opacity: 0 };
1143
- };
1144
-
1145
- // blindX
1146
- $.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
1147
- var w = $cont.css('overflow','hidden').width();
1148
- opts.before.push(function(curr, next, opts) {
1149
- $.fn.cycle.commonReset(curr,next,opts);
1150
- opts.animIn.width = next.cycleW;
1151
- opts.animOut.left = curr.cycleW;
1152
- });
1153
- opts.cssBefore = { left: w, top: 0 };
1154
- opts.animIn = { left: 0 };
1155
- opts.animOut = { left: w };
1156
- };
1157
- // blindY
1158
- $.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
1159
- var h = $cont.css('overflow','hidden').height();
1160
- opts.before.push(function(curr, next, opts) {
1161
- $.fn.cycle.commonReset(curr,next,opts);
1162
- opts.animIn.height = next.cycleH;
1163
- opts.animOut.top = curr.cycleH;
1164
- });
1165
- opts.cssBefore = { top: h, left: 0 };
1166
- opts.animIn = { top: 0 };
1167
- opts.animOut = { top: h };
1168
- };
1169
- // blindZ
1170
- $.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
1171
- var h = $cont.css('overflow','hidden').height();
1172
- var w = $cont.width();
1173
- opts.before.push(function(curr, next, opts) {
1174
- $.fn.cycle.commonReset(curr,next,opts);
1175
- opts.animIn.height = next.cycleH;
1176
- opts.animOut.top = curr.cycleH;
1177
- });
1178
- opts.cssBefore = { top: h, left: w };
1179
- opts.animIn = { top: 0, left: 0 };
1180
- opts.animOut = { top: h, left: w };
1181
- };
1182
-
1183
- // growX - grow horizontally from centered 0 width
1184
- $.fn.cycle.transitions.growX = function($cont, $slides, opts) {
1185
- opts.before.push(function(curr, next, opts) {
1186
- $.fn.cycle.commonReset(curr,next,opts,false,true);
1187
- opts.cssBefore.left = this.cycleW/2;
1188
- opts.animIn = { left: 0, width: this.cycleW };
1189
- opts.animOut = { left: 0 };
1190
- });
1191
- opts.cssBefore = { width: 0, top: 0 };
1192
- };
1193
- // growY - grow vertically from centered 0 height
1194
- $.fn.cycle.transitions.growY = function($cont, $slides, opts) {
1195
- opts.before.push(function(curr, next, opts) {
1196
- $.fn.cycle.commonReset(curr,next,opts,true,false);
1197
- opts.cssBefore.top = this.cycleH/2;
1198
- opts.animIn = { top: 0, height: this.cycleH };
1199
- opts.animOut = { top: 0 };
1200
- });
1201
- opts.cssBefore = { height: 0, left: 0 };
1202
- };
1203
-
1204
- // curtainX - squeeze in both edges horizontally
1205
- $.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
1206
- opts.before.push(function(curr, next, opts) {
1207
- $.fn.cycle.commonReset(curr,next,opts,false,true,true);
1208
- opts.cssBefore.left = next.cycleW/2;
1209
- opts.animIn = { left: 0, width: this.cycleW };
1210
- opts.animOut = { left: curr.cycleW/2, width: 0 };
1211
- });
1212
- opts.cssBefore = { top: 0, width: 0 };
1213
- };
1214
- // curtainY - squeeze in both edges vertically
1215
- $.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
1216
- opts.before.push(function(curr, next, opts) {
1217
- $.fn.cycle.commonReset(curr,next,opts,true,false,true);
1218
- opts.cssBefore.top = next.cycleH/2;
1219
- opts.animIn = { top: 0, height: next.cycleH };
1220
- opts.animOut = { top: curr.cycleH/2, height: 0 };
1221
- });
1222
- opts.cssBefore = { left: 0, height: 0 };
1223
- };
1224
-
1225
- // cover - curr slide covered by next slide
1226
- $.fn.cycle.transitions.cover = function($cont, $slides, opts) {
1227
- var d = opts.direction || 'left';
1228
- var w = $cont.css('overflow','hidden').width();
1229
- var h = $cont.height();
1230
- opts.before.push(function(curr, next, opts) {
1231
- $.fn.cycle.commonReset(curr,next,opts);
1232
- if (d == 'right')
1233
- opts.cssBefore.left = -w;
1234
- else if (d == 'up')
1235
- opts.cssBefore.top = h;
1236
- else if (d == 'down')
1237
- opts.cssBefore.top = -h;
1238
- else
1239
- opts.cssBefore.left = w;
1240
- });
1241
- opts.animIn = { left: 0, top: 0};
1242
- opts.animOut = { opacity: 1 };
1243
- opts.cssBefore = { top: 0, left: 0 };
1244
- };
1245
-
1246
- // uncover - curr slide moves off next slide
1247
- $.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
1248
- var d = opts.direction || 'left';
1249
- var w = $cont.css('overflow','hidden').width();
1250
- var h = $cont.height();
1251
- opts.before.push(function(curr, next, opts) {
1252
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1253
- if (d == 'right')
1254
- opts.animOut.left = w;
1255
- else if (d == 'up')
1256
- opts.animOut.top = -h;
1257
- else if (d == 'down')
1258
- opts.animOut.top = h;
1259
- else
1260
- opts.animOut.left = -w;
1261
- });
1262
- opts.animIn = { left: 0, top: 0 };
1263
- opts.animOut = { opacity: 1 };
1264
- opts.cssBefore = { top: 0, left: 0 };
1265
- };
1266
-
1267
- // toss - move top slide and fade away
1268
- $.fn.cycle.transitions.toss = function($cont, $slides, opts) {
1269
- var w = $cont.css('overflow','visible').width();
1270
- var h = $cont.height();
1271
- opts.before.push(function(curr, next, opts) {
1272
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1273
- // provide default toss settings if animOut not provided
1274
- if (!opts.animOut.left && !opts.animOut.top)
1275
- opts.animOut = { left: w*2, top: -h/2, opacity: 0 };
1276
- else
1277
- opts.animOut.opacity = 0;
1278
- });
1279
- opts.cssBefore = { left: 0, top: 0 };
1280
- opts.animIn = { left: 0 };
1281
- };
1282
-
1283
- // wipe - clip animation
1284
- $.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
1285
- var w = $cont.css('overflow','hidden').width();
1286
- var h = $cont.height();
1287
- opts.cssBefore = opts.cssBefore || {};
1288
- var clip;
1289
- if (opts.clip) {
1290
- if (/l2r/.test(opts.clip))
1291
- clip = 'rect(0px 0px '+h+'px 0px)';
1292
- else if (/r2l/.test(opts.clip))
1293
- clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
1294
- else if (/t2b/.test(opts.clip))
1295
- clip = 'rect(0px '+w+'px 0px 0px)';
1296
- else if (/b2t/.test(opts.clip))
1297
- clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
1298
- else if (/zoom/.test(opts.clip)) {
1299
- var top = parseInt(h/2);
1300
- var left = parseInt(w/2);
1301
- clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
1302
- }
1303
- }
1304
-
1305
- opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
1306
-
1307
- var d = opts.cssBefore.clip.match(/(\d+)/g);
1308
- var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]);
1309
-
1310
- opts.before.push(function(curr, next, opts) {
1311
- if (curr == next) return;
1312
- var $curr = $(curr), $next = $(next);
1313
- $.fn.cycle.commonReset(curr,next,opts,true,true,false);
1314
- opts.cssAfter.display = 'block';
1315
-
1316
- var step = 1, count = parseInt((opts.speedIn / 13)) - 1;
1317
- (function f() {
1318
- var tt = t ? t - parseInt(step * (t/count)) : 0;
1319
- var ll = l ? l - parseInt(step * (l/count)) : 0;
1320
- var bb = b < h ? b + parseInt(step * ((h-b)/count || 1)) : h;
1321
- var rr = r < w ? r + parseInt(step * ((w-r)/count || 1)) : w;
1322
- $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
1323
- (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
1324
- })();
1325
- });
1326
- opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 };
1327
- opts.animIn = { left: 0 };
1328
- opts.animOut = { left: 0 };
1329
- };
1330
-
1331
- })(jQuery);
1
+ /*!
2
+ * jQuery Cycle Plugin (with Transition Definitions)
3
+ * Examples and documentation at: http://jquery.malsup.com/cycle/
4
+ * Copyright (c) 2007-2010 M. Alsup
5
+ * Version: 2.88 (08-JUN-2010)
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://jquery.malsup.com/license.html
8
+ * Requires: jQuery v1.2.6 or later
9
+ */
10
+ ;(function($) {
11
+
12
+ var ver = '2.88';
13
+
14
+ // if $.support is not defined (pre jQuery 1.3) add what I need
15
+ if ($.support == undefined) {
16
+ $.support = {
17
+ opacity: !($.browser.msie)
18
+ };
19
+ }
20
+
21
+ function debug(s) {
22
+ if ($.fn.cycle.debug)
23
+ log(s);
24
+ }
25
+ function log() {
26
+ if (window.console && window.console.log)
27
+ window.console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
28
+ };
29
+
30
+ // the options arg can be...
31
+ // a number - indicates an immediate transition should occur to the given slide index
32
+ // a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
33
+ // an object - properties to control the slideshow
34
+ //
35
+ // the arg2 arg can be...
36
+ // the name of an fx (only used in conjunction with a numeric value for 'options')
37
+ // the value true (only used in first arg == 'resume') and indicates
38
+ // that the resume should occur immediately (not wait for next timeout)
39
+
40
+ $.fn.cycle = function(options, arg2) {
41
+ var o = { s: this.selector, c: this.context };
42
+
43
+ // in 1.3+ we can fix mistakes with the ready state
44
+ if (this.length === 0 && options != 'stop') {
45
+ if (!$.isReady && o.s) {
46
+ log('DOM not ready, queuing slideshow');
47
+ $(function() {
48
+ $(o.s,o.c).cycle(options,arg2);
49
+ });
50
+ return this;
51
+ }
52
+ // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
53
+ log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
54
+ return this;
55
+ }
56
+
57
+ // iterate the matched nodeset
58
+ return this.each(function() {
59
+ var opts = handleArguments(this, options, arg2);
60
+ if (opts === false)
61
+ return;
62
+
63
+ opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
64
+
65
+ // stop existing slideshow for this container (if there is one)
66
+ if (this.cycleTimeout)
67
+ clearTimeout(this.cycleTimeout);
68
+ this.cycleTimeout = this.cyclePause = 0;
69
+
70
+ var $cont = $(this);
71
+ var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
72
+ var els = $slides.get();
73
+ if (els.length < 2) {
74
+ log('terminating; too few slides: ' + els.length);
75
+ return;
76
+ }
77
+
78
+ var opts2 = buildOptions($cont, $slides, els, opts, o);
79
+ if (opts2 === false)
80
+ return;
81
+
82
+ var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.rev);
83
+
84
+ // if it's an auto slideshow, kick it off
85
+ if (startTime) {
86
+ startTime += (opts2.delay || 0);
87
+ if (startTime < 10)
88
+ startTime = 10;
89
+ debug('first timeout: ' + startTime);
90
+ this.cycleTimeout = setTimeout(function(){go(els,opts2,0,(!opts2.rev && !opts.backwards))}, startTime);
91
+ }
92
+ });
93
+ };
94
+
95
+ // process the args that were passed to the plugin fn
96
+ function handleArguments(cont, options, arg2) {
97
+ if (cont.cycleStop == undefined)
98
+ cont.cycleStop = 0;
99
+ if (options === undefined || options === null)
100
+ options = {};
101
+ if (options.constructor == String) {
102
+ switch(options) {
103
+ case 'destroy':
104
+ case 'stop':
105
+ var opts = $(cont).data('cycle.opts');
106
+ if (!opts)
107
+ return false;
108
+ cont.cycleStop++; // callbacks look for change
109
+ if (cont.cycleTimeout)
110
+ clearTimeout(cont.cycleTimeout);
111
+ cont.cycleTimeout = 0;
112
+ $(cont).removeData('cycle.opts');
113
+ if (options == 'destroy')
114
+ destroy(opts);
115
+ return false;
116
+ case 'toggle':
117
+ cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
118
+ checkInstantResume(cont.cyclePause, arg2, cont);
119
+ return false;
120
+ case 'pause':
121
+ cont.cyclePause = 1;
122
+ return false;
123
+ case 'resume':
124
+ cont.cyclePause = 0;
125
+ checkInstantResume(false, arg2, cont);
126
+ return false;
127
+ case 'prev':
128
+ case 'next':
129
+ var opts = $(cont).data('cycle.opts');
130
+ if (!opts) {
131
+ log('options not found, "prev/next" ignored');
132
+ return false;
133
+ }
134
+ $.fn.cycle[options](opts);
135
+ return false;
136
+ default:
137
+ options = { fx: options };
138
+ };
139
+ return options;
140
+ }
141
+ else if (options.constructor == Number) {
142
+ // go to the requested slide
143
+ var num = options;
144
+ options = $(cont).data('cycle.opts');
145
+ if (!options) {
146
+ log('options not found, can not advance slide');
147
+ return false;
148
+ }
149
+ if (num < 0 || num >= options.elements.length) {
150
+ log('invalid slide index: ' + num);
151
+ return false;
152
+ }
153
+ options.nextSlide = num;
154
+ if (cont.cycleTimeout) {
155
+ clearTimeout(cont.cycleTimeout);
156
+ cont.cycleTimeout = 0;
157
+ }
158
+ if (typeof arg2 == 'string')
159
+ options.oneTimeFx = arg2;
160
+ go(options.elements, options, 1, num >= options.currSlide);
161
+ return false;
162
+ }
163
+ return options;
164
+
165
+ function checkInstantResume(isPaused, arg2, cont) {
166
+ if (!isPaused && arg2 === true) { // resume now!
167
+ var options = $(cont).data('cycle.opts');
168
+ if (!options) {
169
+ log('options not found, can not resume');
170
+ return false;
171
+ }
172
+ if (cont.cycleTimeout) {
173
+ clearTimeout(cont.cycleTimeout);
174
+ cont.cycleTimeout = 0;
175
+ }
176
+ go(options.elements, options, 1, (!opts.rev && !opts.backwards));
177
+ }
178
+ }
179
+ };
180
+
181
+ function removeFilter(el, opts) {
182
+ if (!$.support.opacity && opts.cleartype && el.style.filter) {
183
+ try { el.style.removeAttribute('filter'); }
184
+ catch(smother) {} // handle old opera versions
185
+ }
186
+ };
187
+
188
+ // unbind event handlers
189
+ function destroy(opts) {
190
+ if (opts.next)
191
+ $(opts.next).unbind(opts.prevNextEvent);
192
+ if (opts.prev)
193
+ $(opts.prev).unbind(opts.prevNextEvent);
194
+
195
+ if (opts.pager || opts.pagerAnchorBuilder)
196
+ $.each(opts.pagerAnchors || [], function() {
197
+ this.unbind().remove();
198
+ });
199
+ opts.pagerAnchors = null;
200
+ if (opts.destroy) // callback
201
+ opts.destroy(opts);
202
+ };
203
+
204
+ // one-time initialization
205
+ function buildOptions($cont, $slides, els, options, o) {
206
+ // support metadata plugin (v1.0 and v2.0)
207
+ var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
208
+ if (opts.autostop)
209
+ opts.countdown = opts.autostopCount || els.length;
210
+
211
+ var cont = $cont[0];
212
+ $cont.data('cycle.opts', opts);
213
+ opts.$cont = $cont;
214
+ opts.stopCount = cont.cycleStop;
215
+ opts.elements = els;
216
+ opts.before = opts.before ? [opts.before] : [];
217
+ opts.after = opts.after ? [opts.after] : [];
218
+ opts.after.unshift(function(){ opts.busy=0; });
219
+
220
+ // push some after callbacks
221
+ if (!$.support.opacity && opts.cleartype)
222
+ opts.after.push(function() { removeFilter(this, opts); });
223
+ if (opts.continuous)
224
+ opts.after.push(function() { go(els,opts,0,(!opts.rev && !opts.backwards)); });
225
+
226
+ saveOriginalOpts(opts);
227
+
228
+ // clearType corrections
229
+ if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
230
+ clearTypeFix($slides);
231
+
232
+ // container requires non-static position so that slides can be position within
233
+ if ($cont.css('position') == 'static')
234
+ $cont.css('position', 'relative');
235
+ if (opts.width)
236
+ $cont.width(opts.width);
237
+ if (opts.height && opts.height != 'auto')
238
+ $cont.height(opts.height);
239
+
240
+ if (opts.startingSlide)
241
+ opts.startingSlide = parseInt(opts.startingSlide);
242
+ else if (opts.backwards)
243
+ opts.startingSlide = els.length - 1;
244
+
245
+ // if random, mix up the slide array
246
+ if (opts.random) {
247
+ opts.randomMap = [];
248
+ for (var i = 0; i < els.length; i++)
249
+ opts.randomMap.push(i);
250
+ opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
251
+ opts.randomIndex = 1;
252
+ opts.startingSlide = opts.randomMap[1];
253
+ }
254
+ else if (opts.startingSlide >= els.length)
255
+ opts.startingSlide = 0; // catch bogus input
256
+ opts.currSlide = opts.startingSlide || 0;
257
+ var first = opts.startingSlide;
258
+
259
+ // set position and zIndex on all the slides
260
+ $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
261
+ var z;
262
+ if (opts.backwards)
263
+ z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
264
+ else
265
+ z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
266
+ $(this).css('z-index', z)
267
+ });
268
+
269
+ // make sure first slide is visible
270
+ $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
271
+ removeFilter(els[first], opts);
272
+
273
+ // stretch slides
274
+ if (opts.fit && opts.width)
275
+ $slides.width(opts.width);
276
+ if (opts.fit && opts.height && opts.height != 'auto')
277
+ $slides.height(opts.height);
278
+
279
+ // stretch container
280
+ var reshape = opts.containerResize && !$cont.innerHeight();
281
+ if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
282
+ var maxw = 0, maxh = 0;
283
+ for(var j=0; j < els.length; j++) {
284
+ var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
285
+ if (!w) w = e.offsetWidth || e.width || $e.attr('width')
286
+ if (!h) h = e.offsetHeight || e.height || $e.attr('height');
287
+ maxw = w > maxw ? w : maxw;
288
+ maxh = h > maxh ? h : maxh;
289
+ }
290
+ if (maxw > 0 && maxh > 0)
291
+ $cont.css({});
292
+ }
293
+
294
+ if (opts.pause)
295
+ $cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});
296
+
297
+ if (supportMultiTransitions(opts) === false)
298
+ return false;
299
+
300
+ // apparently a lot of people use image slideshows without height/width attributes on the images.
301
+ // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
302
+ var requeue = false;
303
+ options.requeueAttempts = options.requeueAttempts || 0;
304
+ $slides.each(function() {
305
+ // try to get height/width of each slide
306
+ var $el = $(this);
307
+ this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
308
+ this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
309
+
310
+ if ( $el.is('img') ) {
311
+ // sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when
312
+ // an image is being downloaded and the markup did not include sizing info (height/width attributes);
313
+ // there seems to be some "default" sizes used in this situation
314
+ var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
315
+ var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
316
+ var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
317
+ var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
318
+ // don't requeue for images that are still loading but have a valid size
319
+ if (loadingIE || loadingFF || loadingOp || loadingOther) {
320
+ if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
321
+ log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
322
+ setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
323
+ requeue = true;
324
+ return false; // break each loop
325
+ }
326
+ else {
327
+ log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
328
+ }
329
+ }
330
+ }
331
+ return true;
332
+ });
333
+
334
+ if (requeue)
335
+ return false;
336
+
337
+ opts.cssBefore = opts.cssBefore || {};
338
+ opts.animIn = opts.animIn || {};
339
+ opts.animOut = opts.animOut || {};
340
+
341
+ $slides.not(':eq('+first+')').css(opts.cssBefore);
342
+ if (opts.cssFirst)
343
+ $($slides[first]).css(opts.cssFirst);
344
+
345
+ if (opts.timeout) {
346
+ opts.timeout = parseInt(opts.timeout);
347
+ // ensure that timeout and speed settings are sane
348
+ if (opts.speed.constructor == String)
349
+ opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed);
350
+ if (!opts.sync)
351
+ opts.speed = opts.speed / 2;
352
+
353
+ var buffer = opts.fx == 'shuffle' ? 500 : 250;
354
+ while((opts.timeout - opts.speed) < buffer) // sanitize timeout
355
+ opts.timeout += opts.speed;
356
+ }
357
+ if (opts.easing)
358
+ opts.easeIn = opts.easeOut = opts.easing;
359
+ if (!opts.speedIn)
360
+ opts.speedIn = opts.speed;
361
+ if (!opts.speedOut)
362
+ opts.speedOut = opts.speed;
363
+
364
+ opts.slideCount = els.length;
365
+ opts.currSlide = opts.lastSlide = first;
366
+ if (opts.random) {
367
+ if (++opts.randomIndex == els.length)
368
+ opts.randomIndex = 0;
369
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
370
+ }
371
+ else if (opts.backwards)
372
+ opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1;
373
+ else
374
+ opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
375
+
376
+ // run transition init fn
377
+ if (!opts.multiFx) {
378
+ var init = $.fn.cycle.transitions[opts.fx];
379
+ if ($.isFunction(init))
380
+ init($cont, $slides, opts);
381
+ else if (opts.fx != 'custom' && !opts.multiFx) {
382
+ log('unknown transition: ' + opts.fx,'; slideshow terminating');
383
+ return false;
384
+ }
385
+ }
386
+
387
+ // fire artificial events
388
+ var e0 = $slides[first];
389
+ if (opts.before.length)
390
+ opts.before[0].apply(e0, [e0, e0, opts, true]);
391
+ if (opts.after.length > 1)
392
+ opts.after[1].apply(e0, [e0, e0, opts, true]);
393
+
394
+ if (opts.next)
395
+ $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1)});
396
+ if (opts.prev)
397
+ $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1)});
398
+ if (opts.pager || opts.pagerAnchorBuilder)
399
+ buildPager(els,opts);
400
+
401
+ exposeAddSlide(opts, els);
402
+
403
+ return opts;
404
+ };
405
+
406
+ // save off original opts so we can restore after clearing state
407
+ function saveOriginalOpts(opts) {
408
+ opts.original = { before: [], after: [] };
409
+ opts.original.cssBefore = $.extend({}, opts.cssBefore);
410
+ opts.original.cssAfter = $.extend({}, opts.cssAfter);
411
+ opts.original.animIn = $.extend({}, opts.animIn);
412
+ opts.original.animOut = $.extend({}, opts.animOut);
413
+ $.each(opts.before, function() { opts.original.before.push(this); });
414
+ $.each(opts.after, function() { opts.original.after.push(this); });
415
+ };
416
+
417
+ function supportMultiTransitions(opts) {
418
+ var i, tx, txs = $.fn.cycle.transitions;
419
+ // look for multiple effects
420
+ if (opts.fx.indexOf(',') > 0) {
421
+ opts.multiFx = true;
422
+ opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
423
+ // discard any bogus effect names
424
+ for (i=0; i < opts.fxs.length; i++) {
425
+ var fx = opts.fxs[i];
426
+ tx = txs[fx];
427
+ if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
428
+ log('discarding unknown transition: ',fx);
429
+ opts.fxs.splice(i,1);
430
+ i--;
431
+ }
432
+ }
433
+ // if we have an empty list then we threw everything away!
434
+ if (!opts.fxs.length) {
435
+ log('No valid transitions named; slideshow terminating.');
436
+ return false;
437
+ }
438
+ }
439
+ else if (opts.fx == 'all') { // auto-gen the list of transitions
440
+ opts.multiFx = true;
441
+ opts.fxs = [];
442
+ for (p in txs) {
443
+ tx = txs[p];
444
+ if (txs.hasOwnProperty(p) && $.isFunction(tx))
445
+ opts.fxs.push(p);
446
+ }
447
+ }
448
+ if (opts.multiFx && opts.randomizeEffects) {
449
+ // munge the fxs array to make effect selection random
450
+ var r1 = Math.floor(Math.random() * 20) + 30;
451
+ for (i = 0; i < r1; i++) {
452
+ var r2 = Math.floor(Math.random() * opts.fxs.length);
453
+ opts.fxs.push(opts.fxs.splice(r2,1)[0]);
454
+ }
455
+ debug('randomized fx sequence: ',opts.fxs);
456
+ }
457
+ return true;
458
+ };
459
+
460
+ // provide a mechanism for adding slides after the slideshow has started
461
+ function exposeAddSlide(opts, els) {
462
+ opts.addSlide = function(newSlide, prepend) {
463
+ var $s = $(newSlide), s = $s[0];
464
+ if (!opts.autostopCount)
465
+ opts.countdown++;
466
+ els[prepend?'unshift':'push'](s);
467
+ if (opts.els)
468
+ opts.els[prepend?'unshift':'push'](s); // shuffle needs this
469
+ opts.slideCount = els.length;
470
+
471
+ $s.css('position','absolute');
472
+ $s[prepend?'prependTo':'appendTo'](opts.$cont);
473
+
474
+ if (prepend) {
475
+ opts.currSlide++;
476
+ opts.nextSlide++;
477
+ }
478
+
479
+ if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
480
+ clearTypeFix($s);
481
+
482
+ if (opts.fit && opts.width)
483
+ $s.width(opts.width);
484
+ if (opts.fit && opts.height && opts.height != 'auto')
485
+ $slides.height(opts.height);
486
+ s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
487
+ s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
488
+
489
+ $s.css(opts.cssBefore);
490
+
491
+ if (opts.pager || opts.pagerAnchorBuilder)
492
+ $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
493
+
494
+ if ($.isFunction(opts.onAddSlide))
495
+ opts.onAddSlide($s);
496
+ else
497
+ $s.hide(); // default behavior
498
+ };
499
+ }
500
+
501
+ // reset internal state; we do this on every pass in order to support multiple effects
502
+ $.fn.cycle.resetState = function(opts, fx) {
503
+ fx = fx || opts.fx;
504
+ opts.before = []; opts.after = [];
505
+ opts.cssBefore = $.extend({}, opts.original.cssBefore);
506
+ opts.cssAfter = $.extend({}, opts.original.cssAfter);
507
+ opts.animIn = $.extend({}, opts.original.animIn);
508
+ opts.animOut = $.extend({}, opts.original.animOut);
509
+ opts.fxFn = null;
510
+ $.each(opts.original.before, function() { opts.before.push(this); });
511
+ $.each(opts.original.after, function() { opts.after.push(this); });
512
+
513
+ // re-init
514
+ var init = $.fn.cycle.transitions[fx];
515
+ if ($.isFunction(init))
516
+ init(opts.$cont, $(opts.elements), opts);
517
+ };
518
+
519
+ // this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
520
+ function go(els, opts, manual, fwd) {
521
+ // opts.busy is true if we're in the middle of an animation
522
+ if (manual && opts.busy && opts.manualTrump) {
523
+ // let manual transitions requests trump active ones
524
+ debug('manualTrump in go(), stopping active transition');
525
+ $(els).stop(true,true);
526
+ opts.busy = false;
527
+ }
528
+ // don't begin another timeout-based transition if there is one active
529
+ if (opts.busy) {
530
+ debug('transition active, ignoring new tx request');
531
+ return;
532
+ }
533
+
534
+ var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
535
+
536
+ // stop cycling if we have an outstanding stop request
537
+ if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
538
+ return;
539
+
540
+ // check to see if we should stop cycling based on autostop options
541
+ if (!manual && !p.cyclePause && !opts.bounce &&
542
+ ((opts.autostop && (--opts.countdown <= 0)) ||
543
+ (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
544
+ if (opts.end)
545
+ opts.end(opts);
546
+ return;
547
+ }
548
+
549
+ // if slideshow is paused, only transition on a manual trigger
550
+ var changed = false;
551
+ if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
552
+ changed = true;
553
+ var fx = opts.fx;
554
+ // keep trying to get the slide size if we don't have it yet
555
+ curr.cycleH = curr.cycleH || $(curr).height();
556
+ curr.cycleW = curr.cycleW || $(curr).width();
557
+ next.cycleH = next.cycleH || $(next).height();
558
+ next.cycleW = next.cycleW || $(next).width();
559
+
560
+ // support multiple transition types
561
+ if (opts.multiFx) {
562
+ if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length)
563
+ opts.lastFx = 0;
564
+ fx = opts.fxs[opts.lastFx];
565
+ opts.currFx = fx;
566
+ }
567
+
568
+ // one-time fx overrides apply to: $('div').cycle(3,'zoom');
569
+ if (opts.oneTimeFx) {
570
+ fx = opts.oneTimeFx;
571
+ opts.oneTimeFx = null;
572
+ }
573
+
574
+ $.fn.cycle.resetState(opts, fx);
575
+
576
+ // run the before callbacks
577
+ if (opts.before.length)
578
+ $.each(opts.before, function(i,o) {
579
+ if (p.cycleStop != opts.stopCount) return;
580
+ o.apply(next, [curr, next, opts, fwd]);
581
+ });
582
+
583
+ // stage the after callacks
584
+ var after = function() {
585
+ $.each(opts.after, function(i,o) {
586
+ if (p.cycleStop != opts.stopCount) return;
587
+ o.apply(next, [curr, next, opts, fwd]);
588
+ });
589
+ };
590
+
591
+ debug('tx firing; currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
592
+
593
+ // get ready to perform the transition
594
+ opts.busy = 1;
595
+ if (opts.fxFn) // fx function provided?
596
+ opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
597
+ else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
598
+ $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
599
+ else
600
+ $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
601
+ }
602
+
603
+ if (changed || opts.nextSlide == opts.currSlide) {
604
+ // calculate the next slide
605
+ opts.lastSlide = opts.currSlide;
606
+ if (opts.random) {
607
+ opts.currSlide = opts.nextSlide;
608
+ if (++opts.randomIndex == els.length)
609
+ opts.randomIndex = 0;
610
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
611
+ if (opts.nextSlide == opts.currSlide)
612
+ opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
613
+ }
614
+ else if (opts.backwards) {
615
+ var roll = (opts.nextSlide - 1) < 0;
616
+ if (roll && opts.bounce) {
617
+ opts.backwards = !opts.backwards;
618
+ opts.nextSlide = 1;
619
+ opts.currSlide = 0;
620
+ }
621
+ else {
622
+ opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
623
+ opts.currSlide = roll ? 0 : opts.nextSlide+1;
624
+ }
625
+ }
626
+ else { // sequence
627
+ var roll = (opts.nextSlide + 1) == els.length;
628
+ if (roll && opts.bounce) {
629
+ opts.backwards = !opts.backwards;
630
+ opts.nextSlide = els.length-2;
631
+ opts.currSlide = els.length-1;
632
+ }
633
+ else {
634
+ opts.nextSlide = roll ? 0 : opts.nextSlide+1;
635
+ opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
636
+ }
637
+ }
638
+ }
639
+ if (changed && opts.pager)
640
+ opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
641
+
642
+ // stage the next transition
643
+ var ms = 0;
644
+ if (opts.timeout && !opts.continuous)
645
+ ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
646
+ else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
647
+ ms = 10;
648
+ if (ms > 0)
649
+ p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, (!opts.rev && !opts.backwards)) }, ms);
650
+ };
651
+
652
+ // invoked after transition
653
+ $.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
654
+ $(pager).each(function() {
655
+ $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
656
+ });
657
+ };
658
+
659
+ // calculate timeout value for current transition
660
+ function getTimeout(curr, next, opts, fwd) {
661
+ if (opts.timeoutFn) {
662
+ // call user provided calc fn
663
+ var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
664
+ while ((t - opts.speed) < 250) // sanitize timeout
665
+ t += opts.speed;
666
+ debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
667
+ if (t !== false)
668
+ return t;
669
+ }
670
+ return opts.timeout;
671
+ };
672
+
673
+ // expose next/prev function, caller must pass in state
674
+ $.fn.cycle.next = function(opts) { advance(opts, opts.rev?-1:1); };
675
+ $.fn.cycle.prev = function(opts) { advance(opts, opts.rev?1:-1);};
676
+
677
+ // advance slide forward or back
678
+ function advance(opts, val) {
679
+ var els = opts.elements;
680
+ var p = opts.$cont[0], timeout = p.cycleTimeout;
681
+ if (timeout) {
682
+ clearTimeout(timeout);
683
+ p.cycleTimeout = 0;
684
+ }
685
+ if (opts.random && val < 0) {
686
+ // move back to the previously display slide
687
+ opts.randomIndex--;
688
+ if (--opts.randomIndex == -2)
689
+ opts.randomIndex = els.length-2;
690
+ else if (opts.randomIndex == -1)
691
+ opts.randomIndex = els.length-1;
692
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
693
+ }
694
+ else if (opts.random) {
695
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
696
+ }
697
+ else {
698
+ opts.nextSlide = opts.currSlide + val;
699
+ if (opts.nextSlide < 0) {
700
+ if (opts.nowrap) return false;
701
+ opts.nextSlide = els.length - 1;
702
+ }
703
+ else if (opts.nextSlide >= els.length) {
704
+ if (opts.nowrap) return false;
705
+ opts.nextSlide = 0;
706
+ }
707
+ }
708
+
709
+ var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
710
+ if ($.isFunction(cb))
711
+ cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
712
+ go(els, opts, 1, val>=0);
713
+ return false;
714
+ };
715
+
716
+ function buildPager(els, opts) {
717
+ var $p = $(opts.pager);
718
+ $.each(els, function(i,o) {
719
+ $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
720
+ });
721
+ opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
722
+ };
723
+
724
+ $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
725
+ var a;
726
+ if ($.isFunction(opts.pagerAnchorBuilder)) {
727
+ a = opts.pagerAnchorBuilder(i,el);
728
+ debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
729
+ }
730
+ else
731
+ a = '<a href="#">'+(i+1)+'</a>';
732
+
733
+ if (!a)
734
+ return;
735
+ var $a = $(a);
736
+ // don't reparent if anchor is in the dom
737
+ if ($a.parents('body').length === 0) {
738
+ var arr = [];
739
+ if ($p.length > 1) {
740
+ $p.each(function() {
741
+ var $clone = $a.clone(true);
742
+ $(this).append($clone);
743
+ arr.push($clone[0]);
744
+ });
745
+ $a = $(arr);
746
+ }
747
+ else {
748
+ $a.appendTo($p);
749
+ }
750
+ }
751
+
752
+ opts.pagerAnchors = opts.pagerAnchors || [];
753
+ opts.pagerAnchors.push($a);
754
+ $a.bind(opts.pagerEvent, function(e) {
755
+ e.preventDefault();
756
+ opts.nextSlide = i;
757
+ var p = opts.$cont[0], timeout = p.cycleTimeout;
758
+ if (timeout) {
759
+ clearTimeout(timeout);
760
+ p.cycleTimeout = 0;
761
+ }
762
+ var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
763
+ if ($.isFunction(cb))
764
+ cb(opts.nextSlide, els[opts.nextSlide]);
765
+ go(els,opts,1,opts.currSlide < i); // trigger the trans
766
+ // return false; // <== allow bubble
767
+ });
768
+
769
+ if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
770
+ $a.bind('click.cycle', function(){return false;}); // suppress click
771
+
772
+ if (opts.pauseOnPagerHover)
773
+ $a.hover(function() { opts.$cont[0].cyclePause++; }, function() { opts.$cont[0].cyclePause--; } );
774
+ };
775
+
776
+ // helper fn to calculate the number of slides between the current and the next
777
+ $.fn.cycle.hopsFromLast = function(opts, fwd) {
778
+ var hops, l = opts.lastSlide, c = opts.currSlide;
779
+ if (fwd)
780
+ hops = c > l ? c - l : opts.slideCount - l;
781
+ else
782
+ hops = c < l ? l - c : l + opts.slideCount - c;
783
+ return hops;
784
+ };
785
+
786
+ // fix clearType problems in ie6 by setting an explicit bg color
787
+ // (otherwise text slides look horrible during a fade transition)
788
+ function clearTypeFix($slides) {
789
+ debug('applying clearType background-color hack');
790
+ function hex(s) {
791
+ s = parseInt(s).toString(16);
792
+ return s.length < 2 ? '0'+s : s;
793
+ };
794
+ function getBg(e) {
795
+ for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
796
+ var v = $.css(e,'background-color');
797
+ if (v.indexOf('rgb') >= 0 ) {
798
+ var rgb = v.match(/\d+/g);
799
+ return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
800
+ }
801
+ if (v && v != 'transparent')
802
+ return v;
803
+ }
804
+ return '#ffffff';
805
+ };
806
+ $slides.each(function() { $(this).css('background-color', getBg(this)); });
807
+ };
808
+
809
+ // reset common props before the next transition
810
+ $.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
811
+ $(opts.elements).not(curr).hide();
812
+ opts.cssBefore.opacity = 1;
813
+ opts.cssBefore.display = 'block';
814
+ if (w !== false && next.cycleW > 0)
815
+ opts.cssBefore.width = next.cycleW;
816
+ if (h !== false && next.cycleH > 0)
817
+ opts.cssBefore.height = next.cycleH;
818
+ opts.cssAfter = opts.cssAfter || {};
819
+ opts.cssAfter.display = 'none';
820
+ $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
821
+ $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
822
+ };
823
+
824
+ // the actual fn for effecting a transition
825
+ $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
826
+ var $l = $(curr), $n = $(next);
827
+ var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
828
+ $n.css(opts.cssBefore);
829
+ if (speedOverride) {
830
+ if (typeof speedOverride == 'number')
831
+ speedIn = speedOut = speedOverride;
832
+ else
833
+ speedIn = speedOut = 1;
834
+ easeIn = easeOut = null;
835
+ }
836
+ var fn = function() {$n.animate(opts.animIn, speedIn, easeIn, cb)};
837
+ $l.animate(opts.animOut, speedOut, easeOut, function() {
838
+ if (opts.cssAfter) $l.css(opts.cssAfter);
839
+ if (!opts.sync) fn();
840
+ });
841
+ if (opts.sync) fn();
842
+ };
843
+
844
+ // transition definitions - only fade is defined here, transition pack defines the rest
845
+ $.fn.cycle.transitions = {
846
+ fade: function($cont, $slides, opts) {
847
+ $slides.not(':eq('+opts.currSlide+')').css('opacity',0);
848
+ opts.before.push(function(curr,next,opts) {
849
+ $.fn.cycle.commonReset(curr,next,opts);
850
+ opts.cssBefore.opacity = 0;
851
+ });
852
+ opts.animIn = { opacity: 1 };
853
+ opts.animOut = { opacity: 0 };
854
+ opts.cssBefore = { top: 0, left: 0 };
855
+ }
856
+ };
857
+
858
+ $.fn.cycle.ver = function() { return ver; };
859
+
860
+ // override these globally if you like (they are all optional)
861
+ $.fn.cycle.defaults = {
862
+ fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
863
+ timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
864
+ timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
865
+ continuous: 0, // true to start next transition immediately after current one completes
866
+ speed: 1000, // speed of the transition (any valid fx speed value)
867
+ speedIn: null, // speed of the 'in' transition
868
+ speedOut: null, // speed of the 'out' transition
869
+ next: null, // selector for element to use as event trigger for next slide
870
+ prev: null, // selector for element to use as event trigger for previous slide
871
+ // prevNextClick: null, // @deprecated; please use onPrevNextEvent instead
872
+ onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
873
+ prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide
874
+ pager: null, // selector for element to use as pager container
875
+ //pagerClick null, // @deprecated; please use onPagerEvent instead
876
+ onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
877
+ pagerEvent: 'click.cycle', // name of event which drives the pager navigation
878
+ allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
879
+ pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
880
+ before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
881
+ after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
882
+ end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
883
+ easing: null, // easing method for both in and out transitions
884
+ easeIn: null, // easing for "in" transition
885
+ easeOut: null, // easing for "out" transition
886
+ shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
887
+ animIn: null, // properties that define how the slide animates in
888
+ animOut: null, // properties that define how the slide animates out
889
+ cssBefore: null, // properties that define the initial state of the slide before transitioning in
890
+ cssAfter: null, // properties that defined the state of the slide after transitioning out
891
+ fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
892
+ height: 'auto', // container height
893
+ startingSlide: 0, // zero-based index of the first slide to be displayed
894
+ sync: 1, // true if in/out transitions should occur simultaneously
895
+ random: 0, // true for random, false for sequence (not applicable to shuffle fx)
896
+ fit: 0, // force slides to fit container
897
+ containerResize: 1, // resize container to fit largest slide
898
+ pause: 0, // true to enable "pause on hover"
899
+ pauseOnPagerHover: 0, // true to pause when hovering over pager link
900
+ autostop: 0, // true to end slideshow after X transitions (where X == slide count)
901
+ autostopCount: 0, // number of transitions (optionally used with autostop to define X)
902
+ delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
903
+ slideExpr: null, // expression for selecting slides (if something other than all children is required)
904
+ cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
905
+ cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
906
+ nowrap: 0, // true to prevent slideshow from wrapping
907
+ fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
908
+ randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
909
+ rev: 0, // causes animations to transition in reverse
910
+ manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
911
+ requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
912
+ requeueTimeout: 250, // ms delay for requeue
913
+ activePagerClass: 'activeSlide', // class name used for the active pager link
914
+ updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
915
+ backwards: false // true to start slideshow at last slide and move backwards through the stack
916
+ };
917
+
918
+ })(jQuery);
919
+
920
+
921
+ /*!
922
+ * jQuery Cycle Plugin Transition Definitions
923
+ * This script is a plugin for the jQuery Cycle Plugin
924
+ * Examples and documentation at: http://malsup.com/jquery/cycle/
925
+ * Copyright (c) 2007-2010 M. Alsup
926
+ * Version: 2.72
927
+ * Dual licensed under the MIT and GPL licenses:
928
+ * http://www.opensource.org/licenses/mit-license.php
929
+ * http://www.gnu.org/licenses/gpl.html
930
+ */
931
+ (function($) {
932
+
933
+ //
934
+ // These functions define one-time slide initialization for the named
935
+ // transitions. To save file size feel free to remove any of these that you
936
+ // don't need.
937
+ //
938
+ $.fn.cycle.transitions.none = function($cont, $slides, opts) {
939
+ opts.fxFn = function(curr,next,opts,after){
940
+ $(next).show();
941
+ $(curr).hide();
942
+ after();
943
+ };
944
+ }
945
+
946
+ // scrollUp/Down/Left/Right
947
+ $.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
948
+ $cont.css('overflow','hidden');
949
+ opts.before.push($.fn.cycle.commonReset);
950
+ var h = $cont.height();
951
+ opts.cssBefore ={ top: h, left: 0 };
952
+ opts.cssFirst = { top: 0 };
953
+ opts.animIn = { top: 0 };
954
+ opts.animOut = { top: -h };
955
+ };
956
+ $.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
957
+ $cont.css('overflow','hidden');
958
+ opts.before.push($.fn.cycle.commonReset);
959
+ var h = $cont.height();
960
+ opts.cssFirst = { top: 0 };
961
+ opts.cssBefore= { top: -h, left: 0 };
962
+ opts.animIn = { top: 0 };
963
+ opts.animOut = { top: h };
964
+ };
965
+ $.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
966
+ $cont.css('overflow','hidden');
967
+ opts.before.push($.fn.cycle.commonReset);
968
+ var w = $cont.width();
969
+ opts.cssFirst = { left: 0 };
970
+ opts.cssBefore= { left: w, top: 0 };
971
+ opts.animIn = { left: 0 };
972
+ opts.animOut = { left: 0-w };
973
+ };
974
+ $.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
975
+ $cont.css('overflow','hidden');
976
+ opts.before.push($.fn.cycle.commonReset);
977
+ var w = $cont.width();
978
+ opts.cssFirst = { left: 0 };
979
+ opts.cssBefore= { left: -w, top: 0 };
980
+ opts.animIn = { left: 0 };
981
+ opts.animOut = { left: w };
982
+ };
983
+ $.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
984
+ $cont.css('overflow','hidden').width();
985
+ opts.before.push(function(curr, next, opts, fwd) {
986
+ $.fn.cycle.commonReset(curr,next,opts);
987
+ opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
988
+ opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
989
+ });
990
+ opts.cssFirst = { left: 0 };
991
+ opts.cssBefore= { top: 0 };
992
+ opts.animIn = { left: 0 };
993
+ opts.animOut = { top: 0 };
994
+ };
995
+ $.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
996
+ $cont.css('overflow','hidden');
997
+ opts.before.push(function(curr, next, opts, fwd) {
998
+ $.fn.cycle.commonReset(curr,next,opts);
999
+ opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
1000
+ opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
1001
+ });
1002
+ opts.cssFirst = { top: 0 };
1003
+ opts.cssBefore= { left: 0 };
1004
+ opts.animIn = { top: 0 };
1005
+ opts.animOut = { left: 0 };
1006
+ };
1007
+
1008
+ // slideX/slideY
1009
+ $.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
1010
+ opts.before.push(function(curr, next, opts) {
1011
+ $(opts.elements).not(curr).hide();
1012
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1013
+ opts.animIn.width = next.cycleW;
1014
+ });
1015
+ opts.cssBefore = { left: 0, top: 0, width: 0 };
1016
+ opts.animIn = { width: 'show' };
1017
+ opts.animOut = { width: 0 };
1018
+ };
1019
+ $.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
1020
+ opts.before.push(function(curr, next, opts) {
1021
+ $(opts.elements).not(curr).hide();
1022
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1023
+ opts.animIn.height = next.cycleH;
1024
+ });
1025
+ opts.cssBefore = { left: 0, top: 0, height: 0 };
1026
+ opts.animIn = { height: 'show' };
1027
+ opts.animOut = { height: 0 };
1028
+ };
1029
+
1030
+ // shuffle
1031
+ $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
1032
+ var i, w = $cont.css('overflow', 'visible').width();
1033
+ $slides.css({left: 0, top: 0});
1034
+ opts.before.push(function(curr,next,opts) {
1035
+ $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1036
+ });
1037
+ // only adjust speed once!
1038
+ if (!opts.speedAdjusted) {
1039
+ opts.speed = opts.speed / 2; // shuffle has 2 transitions
1040
+ opts.speedAdjusted = true;
1041
+ }
1042
+ opts.random = 0;
1043
+ opts.shuffle = opts.shuffle || {left:-w, top:15};
1044
+ opts.els = [];
1045
+ for (i=0; i < $slides.length; i++)
1046
+ opts.els.push($slides[i]);
1047
+
1048
+ for (i=0; i < opts.currSlide; i++)
1049
+ opts.els.push(opts.els.shift());
1050
+
1051
+ // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
1052
+ opts.fxFn = function(curr, next, opts, cb, fwd) {
1053
+ var $el = fwd ? $(curr) : $(next);
1054
+ $(next).css(opts.cssBefore);
1055
+ var count = opts.slideCount;
1056
+ $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
1057
+ var hops = $.fn.cycle.hopsFromLast(opts, fwd);
1058
+ for (var k=0; k < hops; k++)
1059
+ fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
1060
+ if (fwd) {
1061
+ for (var i=0, len=opts.els.length; i < len; i++)
1062
+ $(opts.els[i]).css('z-index', len-i+count);
1063
+ }
1064
+ else {
1065
+ var z = $(curr).css('z-index');
1066
+ $el.css('z-index', parseInt(z)+1+count);
1067
+ }
1068
+ $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
1069
+ $(fwd ? this : curr).hide();
1070
+ if (cb) cb();
1071
+ });
1072
+ });
1073
+ };
1074
+ opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 };
1075
+ };
1076
+
1077
+ // turnUp/Down/Left/Right
1078
+ $.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
1079
+ opts.before.push(function(curr, next, opts) {
1080
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1081
+ opts.cssBefore.top = next.cycleH;
1082
+ opts.animIn.height = next.cycleH;
1083
+ });
1084
+ opts.cssFirst = { top: 0 };
1085
+ opts.cssBefore = { left: 0, height: 0 };
1086
+ opts.animIn = { top: 0 };
1087
+ opts.animOut = { height: 0 };
1088
+ };
1089
+ $.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
1090
+ opts.before.push(function(curr, next, opts) {
1091
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1092
+ opts.animIn.height = next.cycleH;
1093
+ opts.animOut.top = curr.cycleH;
1094
+ });
1095
+ opts.cssFirst = { top: 0 };
1096
+ opts.cssBefore = { left: 0, top: 0, height: 0 };
1097
+ opts.animOut = { height: 0 };
1098
+ };
1099
+ $.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
1100
+ opts.before.push(function(curr, next, opts) {
1101
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1102
+ opts.cssBefore.left = next.cycleW;
1103
+ opts.animIn.width = next.cycleW;
1104
+ });
1105
+ opts.cssBefore = { top: 0, width: 0 };
1106
+ opts.animIn = { left: 0 };
1107
+ opts.animOut = { width: 0 };
1108
+ };
1109
+ $.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
1110
+ opts.before.push(function(curr, next, opts) {
1111
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1112
+ opts.animIn.width = next.cycleW;
1113
+ opts.animOut.left = curr.cycleW;
1114
+ });
1115
+ opts.cssBefore = { top: 0, left: 0, width: 0 };
1116
+ opts.animIn = { left: 0 };
1117
+ opts.animOut = { width: 0 };
1118
+ };
1119
+
1120
+ // zoom
1121
+ $.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
1122
+ opts.before.push(function(curr, next, opts) {
1123
+ $.fn.cycle.commonReset(curr,next,opts,false,false,true);
1124
+ opts.cssBefore.top = next.cycleH/2;
1125
+ opts.cssBefore.left = next.cycleW/2;
1126
+ opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
1127
+ opts.animOut = { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 };
1128
+ });
1129
+ opts.cssFirst = { top:0, left: 0 };
1130
+ opts.cssBefore = { width: 0, height: 0 };
1131
+ };
1132
+
1133
+ // fadeZoom
1134
+ $.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
1135
+ opts.before.push(function(curr, next, opts) {
1136
+ $.fn.cycle.commonReset(curr,next,opts,false,false);
1137
+ opts.cssBefore.left = next.cycleW/2;
1138
+ opts.cssBefore.top = next.cycleH/2;
1139
+ opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
1140
+ });
1141
+ opts.cssBefore = { width: 0, height: 0 };
1142
+ opts.animOut = { opacity: 0 };
1143
+ };
1144
+
1145
+ // blindX
1146
+ $.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
1147
+ var w = $cont.css('overflow','hidden').width();
1148
+ opts.before.push(function(curr, next, opts) {
1149
+ $.fn.cycle.commonReset(curr,next,opts);
1150
+ opts.animIn.width = next.cycleW;
1151
+ opts.animOut.left = curr.cycleW;
1152
+ });
1153
+ opts.cssBefore = { left: w, top: 0 };
1154
+ opts.animIn = { left: 0 };
1155
+ opts.animOut = { left: w };
1156
+ };
1157
+ // blindY
1158
+ $.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
1159
+ var h = $cont.css('overflow','hidden').height();
1160
+ opts.before.push(function(curr, next, opts) {
1161
+ $.fn.cycle.commonReset(curr,next,opts);
1162
+ opts.animIn.height = next.cycleH;
1163
+ opts.animOut.top = curr.cycleH;
1164
+ });
1165
+ opts.cssBefore = { top: h, left: 0 };
1166
+ opts.animIn = { top: 0 };
1167
+ opts.animOut = { top: h };
1168
+ };
1169
+ // blindZ
1170
+ $.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
1171
+ var h = $cont.css('overflow','hidden').height();
1172
+ var w = $cont.width();
1173
+ opts.before.push(function(curr, next, opts) {
1174
+ $.fn.cycle.commonReset(curr,next,opts);
1175
+ opts.animIn.height = next.cycleH;
1176
+ opts.animOut.top = curr.cycleH;
1177
+ });
1178
+ opts.cssBefore = { top: h, left: w };
1179
+ opts.animIn = { top: 0, left: 0 };
1180
+ opts.animOut = { top: h, left: w };
1181
+ };
1182
+
1183
+ // growX - grow horizontally from centered 0 width
1184
+ $.fn.cycle.transitions.growX = function($cont, $slides, opts) {
1185
+ opts.before.push(function(curr, next, opts) {
1186
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1187
+ opts.cssBefore.left = this.cycleW/2;
1188
+ opts.animIn = { left: 0, width: this.cycleW };
1189
+ opts.animOut = { left: 0 };
1190
+ });
1191
+ opts.cssBefore = { width: 0, top: 0 };
1192
+ };
1193
+ // growY - grow vertically from centered 0 height
1194
+ $.fn.cycle.transitions.growY = function($cont, $slides, opts) {
1195
+ opts.before.push(function(curr, next, opts) {
1196
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1197
+ opts.cssBefore.top = this.cycleH/2;
1198
+ opts.animIn = { top: 0, height: this.cycleH };
1199
+ opts.animOut = { top: 0 };
1200
+ });
1201
+ opts.cssBefore = { height: 0, left: 0 };
1202
+ };
1203
+
1204
+ // curtainX - squeeze in both edges horizontally
1205
+ $.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
1206
+ opts.before.push(function(curr, next, opts) {
1207
+ $.fn.cycle.commonReset(curr,next,opts,false,true,true);
1208
+ opts.cssBefore.left = next.cycleW/2;
1209
+ opts.animIn = { left: 0, width: this.cycleW };
1210
+ opts.animOut = { left: curr.cycleW/2, width: 0 };
1211
+ });
1212
+ opts.cssBefore = { top: 0, width: 0 };
1213
+ };
1214
+ // curtainY - squeeze in both edges vertically
1215
+ $.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
1216
+ opts.before.push(function(curr, next, opts) {
1217
+ $.fn.cycle.commonReset(curr,next,opts,true,false,true);
1218
+ opts.cssBefore.top = next.cycleH/2;
1219
+ opts.animIn = { top: 0, height: next.cycleH };
1220
+ opts.animOut = { top: curr.cycleH/2, height: 0 };
1221
+ });
1222
+ opts.cssBefore = { left: 0, height: 0 };
1223
+ };
1224
+
1225
+ // cover - curr slide covered by next slide
1226
+ $.fn.cycle.transitions.cover = function($cont, $slides, opts) {
1227
+ var d = opts.direction || 'left';
1228
+ var w = $cont.css('overflow','hidden').width();
1229
+ var h = $cont.height();
1230
+ opts.before.push(function(curr, next, opts) {
1231
+ $.fn.cycle.commonReset(curr,next,opts);
1232
+ if (d == 'right')
1233
+ opts.cssBefore.left = -w;
1234
+ else if (d == 'up')
1235
+ opts.cssBefore.top = h;
1236
+ else if (d == 'down')
1237
+ opts.cssBefore.top = -h;
1238
+ else
1239
+ opts.cssBefore.left = w;
1240
+ });
1241
+ opts.animIn = { left: 0, top: 0};
1242
+ opts.animOut = { opacity: 1 };
1243
+ opts.cssBefore = { top: 0, left: 0 };
1244
+ };
1245
+
1246
+ // uncover - curr slide moves off next slide
1247
+ $.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
1248
+ var d = opts.direction || 'left';
1249
+ var w = $cont.css('overflow','hidden').width();
1250
+ var h = $cont.height();
1251
+ opts.before.push(function(curr, next, opts) {
1252
+ $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1253
+ if (d == 'right')
1254
+ opts.animOut.left = w;
1255
+ else if (d == 'up')
1256
+ opts.animOut.top = -h;
1257
+ else if (d == 'down')
1258
+ opts.animOut.top = h;
1259
+ else
1260
+ opts.animOut.left = -w;
1261
+ });
1262
+ opts.animIn = { left: 0, top: 0 };
1263
+ opts.animOut = { opacity: 1 };
1264
+ opts.cssBefore = { top: 0, left: 0 };
1265
+ };
1266
+
1267
+ // toss - move top slide and fade away
1268
+ $.fn.cycle.transitions.toss = function($cont, $slides, opts) {
1269
+ var w = $cont.css('overflow','visible').width();
1270
+ var h = $cont.height();
1271
+ opts.before.push(function(curr, next, opts) {
1272
+ $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1273
+ // provide default toss settings if animOut not provided
1274
+ if (!opts.animOut.left && !opts.animOut.top)
1275
+ opts.animOut = { left: w*2, top: -h/2, opacity: 0 };
1276
+ else
1277
+ opts.animOut.opacity = 0;
1278
+ });
1279
+ opts.cssBefore = { left: 0, top: 0 };
1280
+ opts.animIn = { left: 0 };
1281
+ };
1282
+
1283
+ // wipe - clip animation
1284
+ $.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
1285
+ var w = $cont.css('overflow','hidden').width();
1286
+ var h = $cont.height();
1287
+ opts.cssBefore = opts.cssBefore || {};
1288
+ var clip;
1289
+ if (opts.clip) {
1290
+ if (/l2r/.test(opts.clip))
1291
+ clip = 'rect(0px 0px '+h+'px 0px)';
1292
+ else if (/r2l/.test(opts.clip))
1293
+ clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
1294
+ else if (/t2b/.test(opts.clip))
1295
+ clip = 'rect(0px '+w+'px 0px 0px)';
1296
+ else if (/b2t/.test(opts.clip))
1297
+ clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
1298
+ else if (/zoom/.test(opts.clip)) {
1299
+ var top = parseInt(h/2);
1300
+ var left = parseInt(w/2);
1301
+ clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
1302
+ }
1303
+ }
1304
+
1305
+ opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
1306
+
1307
+ var d = opts.cssBefore.clip.match(/(\d+)/g);
1308
+ var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]);
1309
+
1310
+ opts.before.push(function(curr, next, opts) {
1311
+ if (curr == next) return;
1312
+ var $curr = $(curr), $next = $(next);
1313
+ $.fn.cycle.commonReset(curr,next,opts,true,true,false);
1314
+ opts.cssAfter.display = 'block';
1315
+
1316
+ var step = 1, count = parseInt((opts.speedIn / 13)) - 1;
1317
+ (function f() {
1318
+ var tt = t ? t - parseInt(step * (t/count)) : 0;
1319
+ var ll = l ? l - parseInt(step * (l/count)) : 0;
1320
+ var bb = b < h ? b + parseInt(step * ((h-b)/count || 1)) : h;
1321
+ var rr = r < w ? r + parseInt(step * ((w-r)/count || 1)) : w;
1322
+ $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
1323
+ (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
1324
+ })();
1325
+ });
1326
+ opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 };
1327
+ opts.animIn = { left: 0 };
1328
+ opts.animOut = { left: 0 };
1329
+ };
1330
+
1331
+ })(jQuery);
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>shweta_testimonials</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
@@ -10,11 +10,11 @@
10
  <description>This is a extension which load all the testimonials with autor face, name and their respective messages. Its have a option to show it in left part of middle part of any cms page. There are very easy to customize the size and other option via backend-configuration. just make a cms page and this line to call the testimonials page:&#xD;
11
  &#xD;
12
  {{block type="core/template" template="testimonials/index.phtml"}}</description>
13
- <notes>Please fix the small errors if any. </notes>
14
  <authors><author><name>Shweta Agarwal</name><user>Shweta02</user><email>shweta@ptiwebtech.com</email></author></authors>
15
  <date>2013-05-28</date>
16
- <time>11:08:29</time>
17
- <contents><target name="magelocal"><dir name="Shweta"><dir name="Testimonials"><dir name="Block"><dir name="Adminhtml"><dir name="Testimonials"><dir name="Edit"><file name="Form.php" hash="fa7cf1cfc4d1d84f827af571672834fc"/><dir name="Tab"><file name="Form.php" hash="2f07284497d50caa739956fba6b62ebc"/></dir><file name="Tabs.php" hash="9e321cd2c0b3e0bb5b68e7402a2a80ac"/></dir><file name="Edit.php" hash="5e8bea46a5c2f92fbb3312bf7bf23758"/><file name="Grid.php" hash="7571009cf5f89092b0b2c89733770fdb"/></dir><file name="Testimonials.php" hash="172bb5e89611cbe42f29151992a0716c"/><file name="Testimonialsbackend.php" hash="0ea4ff50b820957f4720cab1be05de0c"/></dir><file name="Index.php" hash="a3e061305d8da87bc007e26cb749339c"/><file name="Left.php" hash="04ac9ee393f8bf0deb9edb2f3d94d8aa"/><file name="Testimonials.php" hash="85707d9ce975e5be0587e21638258c90"/></dir><dir name="Helper"><file name="Data.php" hash="8dd50b7a987acdff2fdd05c1c3c7af79"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Testimonials"><file name="Collection.php" hash="db32d1636a5ab25c44aeef384b01821a"/></dir><file name="Testimonials.php" hash="7bc911dde6d9f55f36a60babf780e57c"/></dir><file name="Testimonials.php" hash="c57a7f2be0a87e9002b2d927796bf402"/><file name="words.php" hash="a25ceb32fa091228330c0d2892ba2045"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="TestimonialsController.php" hash="5d19f3e2a4c99d6bb0881fec55d3d104"/><file name="TestimonialsbackendController.php" hash="86b95e7c3a6d8689ca28c49f2d11829f"/></dir><file name="IndexController.php" hash="09e3dbc65a6a5f0c94c17cf112815ef7"/><file name="TestimonialsController.php" hash="2895042a6bb47d91299313aae8a2eafa"/></dir><dir name="etc"><file name="10.5.13config.xml" hash="c3678b022f4ccb3f10fc7809f968162f"/><file name="10.5.13system.xml" hash="b48f1a18e99dc7daaf6cc7e59f7b55ec"/><file name="13.5.13config.xml" hash="4bd62a5af92399172be75540ef0c3832"/><file name="13.5.13system.xml" hash="b20e874826523368c43f946dc7e19d39"/><file name="9.5.13config.xml" hash="aad913a3b942a0e89fde5eaa40088fc1"/><file name="adminhtml.xml" hash="d9c2602cfcf0925f23aa1fecad7effc3"/><file name="config.xml" hash="43281d4bddf82d822c21c7a39d0ff2c6"/><file name="system.xml" hash="50701396bc75b3e31a5f99438d2858f3"/></dir><dir name="sql"><dir name="testimonials_setup"><file name="mysql4-install-0.1.0.php" hash="6976906c89d4f8ac92ab09ef8ceeadbd"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shweta_Testimonials.xml" hash="e8a1f424b968879aa58bf155d1d35d66"/></dir></target><target name="mage"><dir name="js"><file name="jquery.cycle.all.latest.js" hash="95a4d61ec0f5eb1803b2a68a251d04b5"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="testimonials.xml" hash="264e64c2a6ed88f26b20f413e926a77b"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="testimonials.xml" hash="0c7d394a997375633ffd4e8b25674776"/></dir><dir name="template"><dir name="testimonials"><file name="index.phtml" hash="de3ebe95777af67f7cadcd4f5c0da842"/><file name="left.phtml" hash="53a00ec7f987993de1e692158f17f00a"/><file name="testimonials.phtml" hash="541c59e64026927f2578b4a0c9a4965a"/></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>shweta_testimonials</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
10
  <description>This is a extension which load all the testimonials with autor face, name and their respective messages. Its have a option to show it in left part of middle part of any cms page. There are very easy to customize the size and other option via backend-configuration. just make a cms page and this line to call the testimonials page:&#xD;
11
  &#xD;
12
  {{block type="core/template" template="testimonials/index.phtml"}}</description>
13
+ <notes>please fix the small errors if any. </notes>
14
  <authors><author><name>Shweta Agarwal</name><user>Shweta02</user><email>shweta@ptiwebtech.com</email></author></authors>
15
  <date>2013-05-28</date>
16
+ <time>12:29:46</time>
17
+ <contents><target name="magelocal"><dir name="Shweta"><dir name="Testimonials"><dir name="Block"><dir name="Adminhtml"><dir name="Testimonials"><dir name="Edit"><file name="Form.php" hash="4e496a4775cfb064cdc024deb1b0dc58"/><dir name="Tab"><file name="Form.php" hash="b1cf269d2c841664a61fa8c4a0afae89"/></dir><file name="Tabs.php" hash="9bc48280f127bd1900f91851ef755cf6"/></dir><file name="Edit.php" hash="c537d2b8d8d43dc71f91bfb1eb521a09"/><file name="Grid.php" hash="1c63c65c9230b3be1c3f53dfd0584e05"/></dir><file name="Testimonials.php" hash="77fdb24f77c5ef9f84cc0d59925cb9a4"/><file name="Testimonialsbackend.php" hash="9c07a2925e5531d45b505f6dad7914fa"/></dir><file name="Index.php" hash="3a00c5af6bb13345855b03eeb4dc404b"/><file name="Left.php" hash="44f013f945f62627b4e0706a83910251"/><file name="Testimonials.php" hash="b94550af04a81003f980a3382984c468"/></dir><dir name="Helper"><file name="Data.php" hash="ce447570a3c07003f45ba0889ea48952"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Testimonials"><file name="Collection.php" hash="b3f010279232d53b7c310c9e9110ffb4"/></dir><file name="Testimonials.php" hash="a57e615ddd1c5ed212e846ddaae0ff83"/></dir><file name="Testimonials.php" hash="1b56bfa4b3d272d166c6797c3b08a458"/><file name="Words.php" hash="cd7fb8114e25f8b450ea5e6426883f1b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="TestimonialsController.php" hash="f54fac3a8644a67b8ce55fe6b79ea28c"/><file name="TestimonialsbackendController.php" hash="ce310f83add6b6091aa7bf1121b65fb6"/></dir><file name="IndexController.php" hash="b83ddc5bbef509343031c2c49d3f7028"/><file name="TestimonialsController.php" hash="20cdd0f8e41ab0794a0b8a31849fad65"/></dir><dir name="etc"><file name="10.5.13config.xml" hash="734c4afd313c7875157fb4ab350c6853"/><file name="10.5.13system.xml" hash="aa7f4f6769b7ced72a9dee5cc52606fd"/><file name="13.5.13config.xml" hash="26c20e3c693b886f4bfc03e11bdbb655"/><file name="13.5.13system.xml" hash="b6a140104e6a360845a5cf81e9fc14df"/><file name="9.5.13config.xml" hash="5539a9747780f6d94e43d2b15afa9e13"/><file name="adminhtml.xml" hash="5448c6c16af0b03f41290b52898ac8c6"/><file name="config.xml" hash="c2148b0220faeffb3dedf106939d1ac6"/><file name="system.xml" hash="7da9a4e6fba75dbc190a0c12c1a01d67"/></dir><dir name="sql"><dir name="testimonials_setup"><file name="mysql4-install-0.1.0.php" hash="4d82d3963771231be811fae7d713f7ee"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shweta_Testimonials.xml" hash="825bd69fdb147df29b64c67d744d4947"/></dir></target><target name="mage"><dir name="js"><file name="jquery.cycle.all.latest.js" hash="bdf1d5e7985affb77387457533c3be38"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="testimonials.xml" hash="2312373195072ae3c658f1cc9e796ab1"/></dir><dir name="template"><dir name="testimonials"><file name="testimonialsbackend.phtml" hash="13ea583f6474cdce6c0c9b289b652ffe"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="testimonials.xml" hash="d90fcd77a4a4de1f27987282ffa33bc9"/></dir><dir name="template"><dir name="testimonials"><file name="index.phtml" hash="4cf4306cadb35cafad0041408490908e"/><file name="left.phtml" hash="3ed43bb1e14e0a8153bec76cf7d0ef2b"/><file name="testimonials.phtml" hash="3b04fb3cd8fa6f6aa91315008d400235"/></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>