Version Notes
FAQ Ask Questions stable version 1.0.0
Download this release
Release Info
Developer | Fontis |
Extension | faqaskquestions |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Category.php +12 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit.php +53 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit/Form.php +19 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit/Tab/Form.php +96 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit/Tabs.php +24 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Grid.php +138 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Faq.php +12 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit.php +53 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit/Form.php +19 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit/Tab/Form.php +135 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit/Tabs.php +24 -0
- app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Grid.php +174 -0
- app/code/community/DCKAP/Faq/Block/Faq.php +162 -0
- app/code/community/DCKAP/Faq/Helper/Data.php +6 -0
- app/code/community/DCKAP/Faq/Model/Category.php +9 -0
- app/code/community/DCKAP/Faq/Model/Faq.php +9 -0
- app/code/community/DCKAP/Faq/Model/Mysql4/Category.php +8 -0
- app/code/community/DCKAP/Faq/Model/Mysql4/Category/Collection.php +23 -0
- app/code/community/DCKAP/Faq/Model/Mysql4/Faq.php +8 -0
- app/code/community/DCKAP/Faq/Model/Mysql4/Faq/Collection.php +23 -0
- app/code/community/DCKAP/Faq/Model/Status.php +15 -0
- app/code/community/DCKAP/Faq/controllers/Adminhtml/CategoryController.php +168 -0
- app/code/community/DCKAP/Faq/controllers/Adminhtml/FaqController.php +193 -0
- app/code/community/DCKAP/Faq/controllers/IndexController.php +108 -0
- app/code/community/DCKAP/Faq/etc/config.xml +206 -0
- app/code/community/DCKAP/Faq/etc/system.xml +241 -0
- app/code/community/DCKAP/Faq/sql/faq_setup/mysql4-install-0.1.0.php +38 -0
- app/design/adminhtml/default/default/layout/faq.xml +20 -0
- app/design/frontend/base/default/layout/faq.xml +31 -0
- app/design/frontend/base/default/template/faq/faq.phtml +313 -0
- app/etc/modules/DCKAP_Faq.xml +10 -0
- app/locale/en_US/template/email/faq_notification.html +15 -0
- package.xml +18 -0
- skin/frontend/base/default/faq/css/dckap_faq.css +382 -0
- skin/frontend/base/default/faq/images/down.png +0 -0
- skin/frontend/base/default/faq/images/faq-logo.jpg +0 -0
- skin/frontend/base/default/faq/images/loading.gif +0 -0
- skin/frontend/base/default/faq/images/search.png +0 -0
app/code/community/DCKAP/Faq/Block/Adminhtml/Category.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Block_Adminhtml_Category extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
$this->_controller = 'adminhtml_category';
|
7 |
+
$this->_blockGroup = 'faq';
|
8 |
+
$this->_headerText = Mage::helper('faq')->__('Category Manager');
|
9 |
+
$this->_addButtonLabel = Mage::helper('faq')->__('Add Category');
|
10 |
+
parent::__construct();
|
11 |
+
}
|
12 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Category_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
|
9 |
+
$this->_objectId = 'id';
|
10 |
+
$this->_blockGroup = 'faq';
|
11 |
+
$this->_controller = 'adminhtml_category';
|
12 |
+
|
13 |
+
$this->_updateButton('save', 'label', Mage::helper('faq')->__('Save Category'));
|
14 |
+
$this->_updateButton('delete', 'label', Mage::helper('faq')->__('Delete Category'));
|
15 |
+
|
16 |
+
$this->_addButton('saveandcontinue', array(
|
17 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
18 |
+
'onclick' => 'saveAndContinueEdit()',
|
19 |
+
'class' => 'save',
|
20 |
+
), -100);
|
21 |
+
|
22 |
+
$this->_formScripts[] = "
|
23 |
+
function toggleEditor() {
|
24 |
+
if (tinyMCE.getInstanceById('faq_content') == null) {
|
25 |
+
tinyMCE.execCommand('mceAddControl', false, 'faq_content');
|
26 |
+
} else {
|
27 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'faq_content');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
function saveAndContinueEdit(){
|
32 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
33 |
+
}
|
34 |
+
";
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getHeaderText()
|
38 |
+
{
|
39 |
+
if( Mage::registry('category_data') && Mage::registry('category_data')->getId() ) {
|
40 |
+
return Mage::helper('faq')->__("Edit category '%s'", $this->htmlEscape(Mage::registry('category_data')->getName()));
|
41 |
+
} else {
|
42 |
+
return Mage::helper('faq')->__('Add Category');
|
43 |
+
}
|
44 |
+
}
|
45 |
+
protected function _prepareLayout()
|
46 |
+
{
|
47 |
+
|
48 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
49 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
50 |
+
}
|
51 |
+
parent::_prepareLayout();
|
52 |
+
}
|
53 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Category_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form(array(
|
8 |
+
'id' => 'edit_form',
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Category_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form();
|
8 |
+
$this->setForm($form);
|
9 |
+
$form->setHtmlIdPrefix('faq');
|
10 |
+
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')
|
11 |
+
->getConfig(array('tab_id' => 'form_section'));
|
12 |
+
$wysiwygConfig["files_browser_window_url"] =
|
13 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index');
|
14 |
+
$wysiwygConfig["directives_url"] =
|
15 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
|
16 |
+
$wysiwygConfig["directives_url_quoted"] =
|
17 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
|
18 |
+
$wysiwygConfig["widget_window_url"] =
|
19 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index');
|
20 |
+
$wysiwygConfig["files_browser_window_width"] =
|
21 |
+
(int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width');
|
22 |
+
$wysiwygConfig["files_browser_window_height"] =
|
23 |
+
(int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height');
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
$fieldset = $form->addFieldset('faq_form', array('legend'=>Mage::helper('faq')->__('Category information')));
|
29 |
+
$fieldset->addField('name', 'editor', array(
|
30 |
+
'name' => 'name',
|
31 |
+
'label' => Mage::helper('faq')->__('Category Name'),
|
32 |
+
'title' => Mage::helper('faq')->__('Category Name'),
|
33 |
+
'style' => 'width:500px; height:100px;',
|
34 |
+
'wysiwyg' => false,
|
35 |
+
'required' => true,
|
36 |
+
|
37 |
+
));
|
38 |
+
|
39 |
+
$fieldset->addField('description', 'editor', array(
|
40 |
+
'name' => 'description',
|
41 |
+
'label' => Mage::helper('faq')->__('Category Description'),
|
42 |
+
'title' => Mage::helper('faq')->__('Category Description'),
|
43 |
+
'style' => 'width:700px; ',
|
44 |
+
|
45 |
+
'wysiwyg' => false,
|
46 |
+
'required' => false,
|
47 |
+
'note' => Mage::helper('faq')->__('Maximum 100 Characters allowed'),
|
48 |
+
));
|
49 |
+
|
50 |
+
|
51 |
+
$fieldset->addField('status', 'select', array(
|
52 |
+
'name' => 'status',
|
53 |
+
'label' => Mage::helper('faq')->__('Status'),
|
54 |
+
'title' => Mage::helper('faq')->__('Status'),
|
55 |
+
'values' => array(
|
56 |
+
array(
|
57 |
+
'value' => 1,
|
58 |
+
'label' => Mage::helper('faq')->__('Enabled'),
|
59 |
+
),
|
60 |
+
|
61 |
+
array(
|
62 |
+
'value' => 2,
|
63 |
+
'label' => Mage::helper('faq')->__('Disabled'),
|
64 |
+
),
|
65 |
+
),
|
66 |
+
));
|
67 |
+
|
68 |
+
$fieldset->addField('priority', 'text',
|
69 |
+
array(
|
70 |
+
'name' => 'priority',
|
71 |
+
'label' => Mage::helper('faq')->__('Priority'),
|
72 |
+
'class' => 'validate-not-negative-number',
|
73 |
+
'required' => false,
|
74 |
+
'note' => Mage::helper('faq')->__('Ascending order priority'),
|
75 |
+
)
|
76 |
+
);
|
77 |
+
$fieldset->addField('store_id', 'multiselect', array(
|
78 |
+
'name' => 'stores[]',
|
79 |
+
'label' => Mage::helper('faq')->__('Store View'),
|
80 |
+
'title' => Mage::helper('faq')->__('Store View'),
|
81 |
+
'required' => true,
|
82 |
+
'values' => Mage::getSingleton('adminhtml/system_store')
|
83 |
+
->getStoreValuesForForm(false, true),
|
84 |
+
));
|
85 |
+
|
86 |
+
|
87 |
+
if ( Mage::getSingleton('adminhtml/session')->getCategoryData() ) {
|
88 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getCategoryData());
|
89 |
+
Mage::getSingleton('adminhtml/session')->setCategoryData(null);
|
90 |
+
}
|
91 |
+
elseif(Mage::registry('category_data')) {
|
92 |
+
$form->setValues(Mage::registry('category_data')->getData());
|
93 |
+
}
|
94 |
+
return parent::_prepareForm();
|
95 |
+
}
|
96 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Edit/Tabs.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Category_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('faq_tabs');
|
10 |
+
$this->setDestElementId('edit_form');
|
11 |
+
$this->setTitle(Mage::helper('faq')->__('Category Information'));
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('faq')->__('Category Information'),
|
18 |
+
'title' => Mage::helper('faq')->__('Category Information'),
|
19 |
+
'content' => $this->getLayout()->createBlock('faq/adminhtml_category_edit_tab_form')->toHtml(),
|
20 |
+
));
|
21 |
+
|
22 |
+
return parent::_beforeToHtml();
|
23 |
+
}
|
24 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Category/Grid.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Category_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('categoryGrid');
|
9 |
+
$this->setDefaultSort('cat_id');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('faq/category')->getCollection();
|
18 |
+
$this->setCollection($collection);
|
19 |
+
return parent::_prepareCollection();
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _prepareColumns()
|
23 |
+
{
|
24 |
+
$this->addColumn('cat_id', array(
|
25 |
+
'header' => Mage::helper('faq')->__('Category ID'),
|
26 |
+
'align' =>'right',
|
27 |
+
'width' => '50px',
|
28 |
+
'index' => 'cat_id',
|
29 |
+
));
|
30 |
+
|
31 |
+
$this->addColumn('name', array(
|
32 |
+
'header' => Mage::helper('faq')->__('Name'),
|
33 |
+
'align' =>'left',
|
34 |
+
'index' => 'name',
|
35 |
+
));
|
36 |
+
$this->addColumn('description', array(
|
37 |
+
'header' => Mage::helper('faq')->__('Description'),
|
38 |
+
'align' =>'left',
|
39 |
+
'index' => 'description',
|
40 |
+
));
|
41 |
+
|
42 |
+
$this->addColumn('status', array(
|
43 |
+
'header' => Mage::helper('faq')->__('Status'),
|
44 |
+
'align' => 'left',
|
45 |
+
'width' => '80px',
|
46 |
+
'index' => 'status',
|
47 |
+
'type' => 'options',
|
48 |
+
'options' => array(
|
49 |
+
1 => 'Enabled',
|
50 |
+
2 => 'Disabled',
|
51 |
+
),
|
52 |
+
));
|
53 |
+
|
54 |
+
$this->addColumn('priority',
|
55 |
+
array(
|
56 |
+
'header' => Mage::helper('faq')->__('Priority'),
|
57 |
+
'width' => '50px',
|
58 |
+
'index' => 'priority'
|
59 |
+
)
|
60 |
+
);
|
61 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
62 |
+
$this->addColumn('store_id', array(
|
63 |
+
'header' => Mage::helper('faq')->__('Store View'),
|
64 |
+
'index' => 'store_id',
|
65 |
+
'type' => 'store',
|
66 |
+
'store_all' => true,
|
67 |
+
'store_view' => true,
|
68 |
+
'sortable' => true,
|
69 |
+
'filter_condition_callback' => array($this,
|
70 |
+
'_filterStoreCondition'),
|
71 |
+
) );
|
72 |
+
}
|
73 |
+
|
74 |
+
$this->addColumn('action',
|
75 |
+
array(
|
76 |
+
'header' => Mage::helper('faq')->__('Action'),
|
77 |
+
'width' => '100',
|
78 |
+
'type' => 'action',
|
79 |
+
'getter' => 'getId',
|
80 |
+
'actions' => array(
|
81 |
+
array(
|
82 |
+
'caption' => Mage::helper('faq')->__('Edit'),
|
83 |
+
'url' => array('base'=> '*/*/edit'),
|
84 |
+
'field' => 'id'
|
85 |
+
)
|
86 |
+
),
|
87 |
+
'filter' => false,
|
88 |
+
'sortable' => false,
|
89 |
+
'index' => 'stores',
|
90 |
+
'is_system' => true,
|
91 |
+
));
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
return parent::_prepareColumns();
|
96 |
+
}
|
97 |
+
protected function _filterStoreCondition($collection, $column){
|
98 |
+
if (!$value = $column->getFilter()->getValue()) {
|
99 |
+
return;
|
100 |
+
}
|
101 |
+
$this->getCollection()->addStoreFilter($value);
|
102 |
+
}
|
103 |
+
|
104 |
+
protected function _prepareMassaction()
|
105 |
+
{
|
106 |
+
$this->setMassactionIdField('cat_id');
|
107 |
+
$this->getMassactionBlock()->setFormFieldName('faq');
|
108 |
+
|
109 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
110 |
+
'label' => Mage::helper('faq')->__('Delete'),
|
111 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
112 |
+
'confirm' => Mage::helper('faq')->__('Are you sure?')
|
113 |
+
));
|
114 |
+
$statuses = Mage::getSingleton('faq/status')->getOptionArray();
|
115 |
+
|
116 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
117 |
+
$this->getMassactionBlock()->addItem('status', array(
|
118 |
+
'label'=> Mage::helper('faq')->__('Change status'),
|
119 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
120 |
+
'additional' => array(
|
121 |
+
'visibility' => array(
|
122 |
+
'name' => 'status',
|
123 |
+
'type' => 'select',
|
124 |
+
'class' => 'required-entry',
|
125 |
+
'label' => Mage::helper('faq')->__('Status'),
|
126 |
+
'values' => $statuses
|
127 |
+
)
|
128 |
+
)
|
129 |
+
));
|
130 |
+
return $this;
|
131 |
+
}
|
132 |
+
|
133 |
+
public function getRowUrl($row)
|
134 |
+
{
|
135 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
136 |
+
}
|
137 |
+
|
138 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Faq.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Block_Adminhtml_Faq extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
$this->_controller = 'adminhtml_faq';
|
7 |
+
$this->_blockGroup = 'faq';
|
8 |
+
$this->_headerText = Mage::helper('faq')->__('FAQ\'s Manager');
|
9 |
+
$this->_addButtonLabel = Mage::helper('faq')->__('Add item');
|
10 |
+
parent::__construct();
|
11 |
+
}
|
12 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Faq_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
|
9 |
+
$this->_objectId = 'id';
|
10 |
+
$this->_blockGroup = 'faq';
|
11 |
+
$this->_controller = 'adminhtml_faq';
|
12 |
+
|
13 |
+
$this->_updateButton('save', 'label', Mage::helper('faq')->__('Save Item'));
|
14 |
+
$this->_updateButton('delete', 'label', Mage::helper('faq')->__('Delete Item'));
|
15 |
+
|
16 |
+
$this->_addButton('saveandcontinue', array(
|
17 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
18 |
+
'onclick' => 'saveAndContinueEdit()',
|
19 |
+
'class' => 'save',
|
20 |
+
), -100);
|
21 |
+
|
22 |
+
$this->_formScripts[] = "
|
23 |
+
function toggleEditor() {
|
24 |
+
if (tinyMCE.getInstanceById('faq_content') == null) {
|
25 |
+
tinyMCE.execCommand('mceAddControl', false, 'faq_content');
|
26 |
+
} else {
|
27 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'faq_content');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
function saveAndContinueEdit(){
|
32 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
33 |
+
}
|
34 |
+
";
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getHeaderText()
|
38 |
+
{
|
39 |
+
if( Mage::registry('faq_data') && Mage::registry('faq_data')->getId() ) {
|
40 |
+
return Mage::helper('faq')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('faq_data')->getId()));
|
41 |
+
} else {
|
42 |
+
return Mage::helper('faq')->__('Add Item');
|
43 |
+
}
|
44 |
+
}
|
45 |
+
protected function _prepareLayout()
|
46 |
+
{
|
47 |
+
|
48 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
49 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
50 |
+
}
|
51 |
+
parent::_prepareLayout();
|
52 |
+
}
|
53 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Faq_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form(array(
|
8 |
+
'id' => 'edit_form',
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Faq_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form();
|
8 |
+
$this->setForm($form);
|
9 |
+
$form->setHtmlIdPrefix('faq');
|
10 |
+
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')
|
11 |
+
->getConfig(array('tab_id' => 'form_section'));
|
12 |
+
$wysiwygConfig["files_browser_window_url"] =
|
13 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index');
|
14 |
+
$wysiwygConfig["directives_url"] =
|
15 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
|
16 |
+
$wysiwygConfig["directives_url_quoted"] =
|
17 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
|
18 |
+
$wysiwygConfig["widget_window_url"] =
|
19 |
+
Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index');
|
20 |
+
$wysiwygConfig["files_browser_window_width"] =
|
21 |
+
(int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width');
|
22 |
+
$wysiwygConfig["files_browser_window_height"] =
|
23 |
+
(int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height');
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
$fieldset = $form->addFieldset('faq_form', array('legend'=>Mage::helper('faq')->__('FAQ\'s information')));
|
28 |
+
if(Mage::getStoreConfig('faq/faq_group/category_enabled')){
|
29 |
+
$model = Mage::getModel('faq/category')->getCollection();
|
30 |
+
|
31 |
+
$categoryvalues[] = array(
|
32 |
+
'value' => '0',
|
33 |
+
'label' => '--',
|
34 |
+
);
|
35 |
+
foreach ($model as $category) {
|
36 |
+
$categoryvalues[] = array(
|
37 |
+
'value' => $category->getId(),
|
38 |
+
'label' => Mage::helper('faq')->__($category->getName()),
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
$fieldset->addField('category', 'select', array(
|
43 |
+
'name' => 'category',
|
44 |
+
'label' => Mage::helper('faq')->__('Category'),
|
45 |
+
'title' => Mage::helper('faq')->__('Category'),
|
46 |
+
'values' => $categoryvalues
|
47 |
+
));
|
48 |
+
}
|
49 |
+
$fieldset->addField('question', 'editor', array(
|
50 |
+
'name' => 'question',
|
51 |
+
'label' => Mage::helper('faq')->__('Question'),
|
52 |
+
'title' => Mage::helper('faq')->__('Question'),
|
53 |
+
'style' => 'width:500px; height:100px;',
|
54 |
+
'wysiwyg' => false,
|
55 |
+
'required' => true,
|
56 |
+
));
|
57 |
+
|
58 |
+
$fieldset->addField('answer', 'editor', array(
|
59 |
+
'name' => 'answer',
|
60 |
+
'label' => Mage::helper('faq')->__('Answer'),
|
61 |
+
'title' => Mage::helper('faq')->__('Answer'),
|
62 |
+
'style' => 'width:700px; ',
|
63 |
+
|
64 |
+
'wysiwyg' => true,
|
65 |
+
'required' => true,
|
66 |
+
'state' => 'html',
|
67 |
+
'config' => $wysiwygConfig,
|
68 |
+
));
|
69 |
+
|
70 |
+
$fieldset->addField('status', 'select', array(
|
71 |
+
'name' => 'status',
|
72 |
+
'label' => Mage::helper('faq')->__('Status'),
|
73 |
+
'title' => Mage::helper('faq')->__('Status'),
|
74 |
+
'values' => array(
|
75 |
+
array(
|
76 |
+
'value' => 1,
|
77 |
+
'label' => Mage::helper('faq')->__('Enabled'),
|
78 |
+
),
|
79 |
+
array(
|
80 |
+
'value' => 2,
|
81 |
+
'label' => Mage::helper('faq')->__('Disabled'),
|
82 |
+
),
|
83 |
+
),
|
84 |
+
));
|
85 |
+
|
86 |
+
if(!Mage::getStoreConfig('faq/faq_group/viewsorter')){
|
87 |
+
$fieldset->addField('priority', 'text',
|
88 |
+
array(
|
89 |
+
'name' => 'priority',
|
90 |
+
'label' => Mage::helper('faq')->__('Priority'),
|
91 |
+
'class' => 'validate-not-negative-number',
|
92 |
+
'required' => false,
|
93 |
+
'note' => Mage::helper('faq')->__('Ascending order priority'),
|
94 |
+
)
|
95 |
+
);
|
96 |
+
}
|
97 |
+
|
98 |
+
$fieldset->addField('store_id', 'multiselect', array(
|
99 |
+
'name' => 'stores[]',
|
100 |
+
'label' => Mage::helper('faq')->__('Store View'),
|
101 |
+
'title' => Mage::helper('faq')->__('Store View'),
|
102 |
+
'required' => true,
|
103 |
+
'values' => Mage::getSingleton('adminhtml/system_store')
|
104 |
+
->getStoreValuesForForm(false, true),
|
105 |
+
));
|
106 |
+
if(Mage::registry('faq_data')->getCustomerId()){
|
107 |
+
$fieldset->addField('customer_name', 'label',
|
108 |
+
array(
|
109 |
+
'name' => 'customer_name',
|
110 |
+
'label' => Mage::helper('faq')->__('Customer Name'),
|
111 |
+
)
|
112 |
+
);
|
113 |
+
$fieldset->addField('customer_id', 'label',
|
114 |
+
array(
|
115 |
+
'name' => 'customer_id',
|
116 |
+
'label' => Mage::helper('faq')->__('Customer ID'),
|
117 |
+
)
|
118 |
+
);
|
119 |
+
$fieldset->addField('customer_email', 'label',
|
120 |
+
array(
|
121 |
+
'name' => 'customer_email',
|
122 |
+
'label' => Mage::helper('faq')->__('Customer Email'),
|
123 |
+
)
|
124 |
+
);
|
125 |
+
}
|
126 |
+
if ( Mage::getSingleton('adminhtml/session')->getFaqData() ) {
|
127 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getFaqData());
|
128 |
+
Mage::getSingleton('adminhtml/session')->setFaqData(null);
|
129 |
+
}
|
130 |
+
elseif(Mage::registry('faq_data')) {
|
131 |
+
$form->setValues(Mage::registry('faq_data')->getData());
|
132 |
+
}
|
133 |
+
return parent::_prepareForm();
|
134 |
+
}
|
135 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Edit/Tabs.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Faq_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('faq_tabs');
|
10 |
+
$this->setDestElementId('edit_form');
|
11 |
+
$this->setTitle(Mage::helper('faq')->__('FAQ\'s Information'));
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('faq')->__('FAQ\'s Information'),
|
18 |
+
'title' => Mage::helper('faq')->__('FAQ\'s Information'),
|
19 |
+
'content' => $this->getLayout()->createBlock('faq/adminhtml_faq_edit_tab_form')->toHtml(),
|
20 |
+
));
|
21 |
+
|
22 |
+
return parent::_beforeToHtml();
|
23 |
+
}
|
24 |
+
}
|
app/code/community/DCKAP/Faq/Block/Adminhtml/Faq/Grid.php
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Block_Adminhtml_Faq_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('faqGrid');
|
9 |
+
$this->setDefaultSort('question_id');
|
10 |
+
$this->setDefaultDir('DESC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('faq/faq')->getCollection();
|
18 |
+
$this->setCollection($collection);
|
19 |
+
return parent::_prepareCollection();
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _prepareColumns()
|
23 |
+
{
|
24 |
+
$this->addColumn('question_id', array(
|
25 |
+
'header' => Mage::helper('faq')->__('Question_ID'),
|
26 |
+
'align' =>'right',
|
27 |
+
'width' => '50px',
|
28 |
+
'index' => 'question_id',
|
29 |
+
));
|
30 |
+
|
31 |
+
$this->addColumn('question', array(
|
32 |
+
'header' => Mage::helper('faq')->__('Question'),
|
33 |
+
'align' =>'left',
|
34 |
+
'index' => 'question',
|
35 |
+
));
|
36 |
+
|
37 |
+
$this->addColumn('answer', array(
|
38 |
+
'header' => Mage::helper('faq')->__('Answer'),
|
39 |
+
'align' =>'left',
|
40 |
+
'index' => 'answer',
|
41 |
+
));
|
42 |
+
if(Mage::getStoreConfig('faq/faq_group/category_enabled')){
|
43 |
+
$categoryvalues = Mage::getModel('faq/category')->getCollection();
|
44 |
+
foreach ($categoryvalues as $category) {
|
45 |
+
$valuess[$category->getId()] = $category->getName();
|
46 |
+
}
|
47 |
+
$this->addColumn('category', array(
|
48 |
+
'header' => Mage::helper('faq')->__('Category'),
|
49 |
+
'align' => 'left',
|
50 |
+
'width' => '80px',
|
51 |
+
'index' => 'category',
|
52 |
+
'type' => 'options',
|
53 |
+
'options' => $valuess,
|
54 |
+
));
|
55 |
+
}
|
56 |
+
$this->addColumn('status', array(
|
57 |
+
'header' => Mage::helper('faq')->__('Status'),
|
58 |
+
'align' => 'left',
|
59 |
+
'width' => '80px',
|
60 |
+
'index' => 'status',
|
61 |
+
'type' => 'options',
|
62 |
+
'options' => array(
|
63 |
+
1 => 'Enabled',
|
64 |
+
2 => 'Disabled',
|
65 |
+
),
|
66 |
+
));
|
67 |
+
$this->addColumn('byuser', array(
|
68 |
+
'header' => Mage::helper('faq')->__('User/Admin'),
|
69 |
+
'align' => 'left',
|
70 |
+
'width' => '80px',
|
71 |
+
'index' => 'byuser',
|
72 |
+
'type' => 'options',
|
73 |
+
'options' => array(
|
74 |
+
0 => 'Admin',
|
75 |
+
1 => 'Guest',
|
76 |
+
2 => 'Customer',
|
77 |
+
),
|
78 |
+
));
|
79 |
+
$this->addColumn('customer_name',
|
80 |
+
array(
|
81 |
+
'header' => Mage::helper('faq')->__('Customer Name'),
|
82 |
+
'width' => '50px',
|
83 |
+
'index' => 'customer_name'
|
84 |
+
)
|
85 |
+
);
|
86 |
+
if(!Mage::getStoreConfig('faq/faq_group/viewsorter')){
|
87 |
+
$this->addColumn('priority',
|
88 |
+
array(
|
89 |
+
'header' => Mage::helper('faq')->__('Priority'),
|
90 |
+
'width' => '50px',
|
91 |
+
'index' => 'priority'
|
92 |
+
)
|
93 |
+
);
|
94 |
+
}
|
95 |
+
|
96 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
97 |
+
$this->addColumn('store_id', array(
|
98 |
+
'header' => Mage::helper('faq')->__('Store View'),
|
99 |
+
'index' => 'store_id',
|
100 |
+
'type' => 'store',
|
101 |
+
'store_all' => true,
|
102 |
+
'store_view' => true,
|
103 |
+
'sortable' => true,
|
104 |
+
'filter_condition_callback' => array($this,
|
105 |
+
'_filterStoreCondition'),
|
106 |
+
) );
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
$this->addColumn('action',
|
111 |
+
array(
|
112 |
+
'header' => Mage::helper('faq')->__('Action'),
|
113 |
+
'width' => '100',
|
114 |
+
'type' => 'action',
|
115 |
+
'getter' => 'getId',
|
116 |
+
'actions' => array(
|
117 |
+
array(
|
118 |
+
'caption' => Mage::helper('faq')->__('Edit'),
|
119 |
+
'url' => array('base'=> '*/*/edit'),
|
120 |
+
'field' => 'id'
|
121 |
+
)
|
122 |
+
),
|
123 |
+
'filter' => false,
|
124 |
+
'sortable' => false,
|
125 |
+
'index' => 'stores',
|
126 |
+
'is_system' => true,
|
127 |
+
));
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
return parent::_prepareColumns();
|
132 |
+
}
|
133 |
+
protected function _filterStoreCondition($collection, $column){
|
134 |
+
if (!$value = $column->getFilter()->getValue()) {
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
$this->getCollection()->addStoreFilter($value);
|
138 |
+
}
|
139 |
+
|
140 |
+
protected function _prepareMassaction()
|
141 |
+
{
|
142 |
+
$this->setMassactionIdField('question_id');
|
143 |
+
$this->getMassactionBlock()->setFormFieldName('faq');
|
144 |
+
|
145 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
146 |
+
'label' => Mage::helper('faq')->__('Delete'),
|
147 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
148 |
+
'confirm' => Mage::helper('faq')->__('Are you sure?')
|
149 |
+
));
|
150 |
+
$statuses = Mage::getSingleton('faq/status')->getOptionArray();
|
151 |
+
|
152 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
153 |
+
$this->getMassactionBlock()->addItem('status', array(
|
154 |
+
'label'=> Mage::helper('faq')->__('Change status'),
|
155 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
156 |
+
'additional' => array(
|
157 |
+
'visibility' => array(
|
158 |
+
'name' => 'status',
|
159 |
+
'type' => 'select',
|
160 |
+
'class' => 'required-entry',
|
161 |
+
'label' => Mage::helper('faq')->__('Status'),
|
162 |
+
'values' => $statuses
|
163 |
+
)
|
164 |
+
)
|
165 |
+
));
|
166 |
+
return $this;
|
167 |
+
}
|
168 |
+
|
169 |
+
public function getRowUrl($row)
|
170 |
+
{
|
171 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
172 |
+
}
|
173 |
+
|
174 |
+
}
|
app/code/community/DCKAP/Faq/Block/Faq.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Block_Faq extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
private $_itemPerPage;
|
5 |
+
private $_pageFrame = 8;
|
6 |
+
private $_curPage = 1;
|
7 |
+
|
8 |
+
public function _construct()
|
9 |
+
{
|
10 |
+
parent::_construct();
|
11 |
+
$this->_itemPerPage = Mage::getStoreConfig('faq/faq_group/faq_text');
|
12 |
+
|
13 |
+
}
|
14 |
+
public function getFaq($keyword = null)
|
15 |
+
{
|
16 |
+
$currentStore = Mage::app()->getStore(true)->getId();
|
17 |
+
$collection = Mage::getModel('faq/faq')->getCollection();
|
18 |
+
|
19 |
+
$collection->addFieldToSelect('question_id')
|
20 |
+
->addFieldToSelect('question')
|
21 |
+
->addFieldToSelect('answer')
|
22 |
+
->addFieldToFilter('answer', array('neq' => '' ))
|
23 |
+
->addFieldToSelect('store_id')
|
24 |
+
->addFieldToFilter('status',array('eq'=>1))
|
25 |
+
->addFieldToFilter(
|
26 |
+
array('store_id','store_set','store_id','store_set' ),
|
27 |
+
array(
|
28 |
+
array('eq'=>Mage::app()->getStore(true)->getId()),
|
29 |
+
array('like'=>'%,'.$currentStore.',%'),
|
30 |
+
array('eq'=>'0'),
|
31 |
+
array('like'=>'%,0,%')
|
32 |
+
)
|
33 |
+
);
|
34 |
+
if(!Mage::getStoreConfig('faq/faq_group/viewsorter')){
|
35 |
+
$collection->setOrder('priority','ASC');
|
36 |
+
}else{
|
37 |
+
$collection->setOrder('views','DESC');
|
38 |
+
}
|
39 |
+
if($keyword){
|
40 |
+
$collection->addFieldToFilter(
|
41 |
+
array('question','answer' ),
|
42 |
+
array(
|
43 |
+
array('like'=>'%'.$keyword.'%'),
|
44 |
+
array('like'=>'%'.$keyword.'%')
|
45 |
+
)
|
46 |
+
);
|
47 |
+
}
|
48 |
+
if(Mage::getStoreConfig('faq/faq_group/category_enabled')){
|
49 |
+
if($this->getRequest()->getParam('category')){
|
50 |
+
$collection->addFieldtoFilter('category',$this->getRequest()->getParam('category'));
|
51 |
+
}
|
52 |
+
}
|
53 |
+
return $collection;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getCategories()
|
57 |
+
{
|
58 |
+
$currentStore= Mage::app()->getStore(true)->getId();
|
59 |
+
$collection = Mage::getModel('faq/faq')->getCollection();
|
60 |
+
|
61 |
+
$collection = Mage::getModel('faq/category')->getCollection()->setOrder('priority','ASC');
|
62 |
+
$collection->addFieldToFilter(
|
63 |
+
array('store_id','store_set','store_id','store_set' ),
|
64 |
+
array(
|
65 |
+
array('eq'=>$currentStore),
|
66 |
+
array('like'=>'%,'.$currentStore.',%'),
|
67 |
+
array('eq'=>'0'),
|
68 |
+
array('like'=>'%,0,%')
|
69 |
+
)
|
70 |
+
);
|
71 |
+
$collection->addFieldToFilter('status',array('eq'=>1));
|
72 |
+
return $collection;
|
73 |
+
}
|
74 |
+
public function getCurrentPage()
|
75 |
+
{
|
76 |
+
return $this->getRequest()->getParam('p');
|
77 |
+
}
|
78 |
+
|
79 |
+
public function getCollection($collection = 'null')
|
80 |
+
{
|
81 |
+
|
82 |
+
if($collection != 'null'){
|
83 |
+
$page = $this->getRequest()->getParam('p');
|
84 |
+
if($page) $this->_curPage = $page;
|
85 |
+
|
86 |
+
$collection->setCurPage($this->_curPage);
|
87 |
+
$collection->setPageSize($this->_itemPerPage);
|
88 |
+
return $collection;
|
89 |
+
}
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
public function getPagerHtml($collection = 'null')
|
94 |
+
{
|
95 |
+
$html = false;
|
96 |
+
if($collection == 'null') return;
|
97 |
+
|
98 |
+
|
99 |
+
if($collection->count() > $this->_itemPerPage)
|
100 |
+
{
|
101 |
+
$curPage = $this->getRequest()->getParam('p');
|
102 |
+
$pager = (int)($collection->count() / $this->_itemPerPage);
|
103 |
+
$count = ($collection->count() % $this->_itemPerPage == 0) ? $pager : $pager + 1 ;
|
104 |
+
$url = $this->getPagerUrl();
|
105 |
+
$start = 1;
|
106 |
+
$end = $this->_pageFrame;
|
107 |
+
$category = $this->getRequest()->getParam('category');
|
108 |
+
$keyword = $this->getRequest()->getParam('keyword');
|
109 |
+
$slash = "?";
|
110 |
+
if($category || $keyword){
|
111 |
+
$slash = "&";
|
112 |
+
}
|
113 |
+
|
114 |
+
$html .= '<ol>';
|
115 |
+
if(isset($curPage) && $curPage != 1){
|
116 |
+
$start = $curPage - 1;
|
117 |
+
$end = $start + $this->_pageFrame;
|
118 |
+
}else{
|
119 |
+
$end = $start + $this->_pageFrame;
|
120 |
+
}
|
121 |
+
if($end > $count){
|
122 |
+
$start = $count - ($this->_pageFrame-1);
|
123 |
+
}else{
|
124 |
+
$count = $end-1;
|
125 |
+
}
|
126 |
+
|
127 |
+
for($i = $start; $i<=$count; $i++)
|
128 |
+
{
|
129 |
+
if($i >= 1){
|
130 |
+
if($curPage){
|
131 |
+
$html .= ($curPage == $i) ? '<li class="current">'. $i .'</li>' : '<li><a href="'.$url.$slash.'p='.$i.'">'. $i .'</a></li>';
|
132 |
+
}else{
|
133 |
+
$html .= ($i == 1) ? '<li class="current">'. $i .'</li>' : '<li><a href="'.$url.$slash.'p='.$i.'">'. $i .'</a></li>';
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
$html .= '</ol>';
|
140 |
+
}
|
141 |
+
|
142 |
+
return $html;
|
143 |
+
}
|
144 |
+
|
145 |
+
public function getPagerUrl()
|
146 |
+
{
|
147 |
+
$cur_url = mage::helper('core/url')->getCurrentUrl();
|
148 |
+
$category = $this->getRequest()->getParam('category');
|
149 |
+
$keyword = $this->getRequest()->getParam('keyword');
|
150 |
+
$new_url = preg_replace('/\?p=.*/', '', $cur_url);
|
151 |
+
if($category){
|
152 |
+
$new_url = preg_replace('/\&p=.*/', '', $cur_url);
|
153 |
+
}
|
154 |
+
if($keyword){
|
155 |
+
$new_url = preg_replace('/\&p=.*/', '', $cur_url);
|
156 |
+
}
|
157 |
+
return $new_url;
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
+
}
|
162 |
+
?>
|
app/code/community/DCKAP/Faq/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
6 |
+
?>
|
app/code/community/DCKAP/Faq/Model/Category.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Model_Category extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('faq/category');
|
8 |
+
}
|
9 |
+
}
|
app/code/community/DCKAP/Faq/Model/Faq.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Model_Faq extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('faq/faq');
|
8 |
+
}
|
9 |
+
}
|
app/code/community/DCKAP/Faq/Model/Mysql4/Category.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Model_Mysql4_Category extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('faq/category','cat_id');
|
7 |
+
}
|
8 |
+
}
|
app/code/community/DCKAP/Faq/Model/Mysql4/Category/Collection.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Model_Mysql4_Category_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('faq/category');
|
8 |
+
}
|
9 |
+
public function addStoreFilter($store, $withAdmin = true) {
|
10 |
+
|
11 |
+
if ($store instanceof Mage_Core_Model_Store) {
|
12 |
+
$store = array($store->getId());
|
13 |
+
}
|
14 |
+
|
15 |
+
if (!is_array($store)) {
|
16 |
+
$store = array($store);
|
17 |
+
}
|
18 |
+
|
19 |
+
$this->addFilter('store_id', array('in' => $store));
|
20 |
+
|
21 |
+
return $this;
|
22 |
+
}
|
23 |
+
}
|
app/code/community/DCKAP/Faq/Model/Mysql4/Faq.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Model_Mysql4_Faq extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('faq/faq','question_id');
|
7 |
+
}
|
8 |
+
}
|
app/code/community/DCKAP/Faq/Model/Mysql4/Faq/Collection.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_Model_Mysql4_Faq_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('faq/faq');
|
8 |
+
}
|
9 |
+
public function addStoreFilter($store, $withAdmin = true) {
|
10 |
+
|
11 |
+
if ($store instanceof Mage_Core_Model_Store) {
|
12 |
+
$store = array($store->getId());
|
13 |
+
}
|
14 |
+
|
15 |
+
if (!is_array($store)) {
|
16 |
+
$store = array($store);
|
17 |
+
}
|
18 |
+
|
19 |
+
$this->addFilter('store_id', array('in' => $store));
|
20 |
+
|
21 |
+
return $this;
|
22 |
+
}
|
23 |
+
}
|
app/code/community/DCKAP/Faq/Model/Status.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Model_Status extends Varien_Object
|
4 |
+
{
|
5 |
+
const STATUS_ENABLED = 1;
|
6 |
+
const STATUS_DISABLED = 2;
|
7 |
+
|
8 |
+
static public function getOptionArray()
|
9 |
+
{
|
10 |
+
return array(
|
11 |
+
self::STATUS_ENABLED => Mage::helper('faq')->__('Enabled'),
|
12 |
+
self::STATUS_DISABLED => Mage::helper('faq')->__('Disabled')
|
13 |
+
);
|
14 |
+
}
|
15 |
+
}
|
app/code/community/DCKAP/Faq/controllers/Adminhtml/CategoryController.php
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Adminhtml_CategoryController extends Mage_Adminhtml_Controller_action
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _initAction() {
|
7 |
+
$this->loadLayout()
|
8 |
+
->_setActiveMenu('faq/categoryitems')
|
9 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
10 |
+
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function indexAction() {
|
15 |
+
$faqEnable= Mage::getStoreConfig('faq/faq_group/faq_select');
|
16 |
+
if($faqEnable && Mage::getStoreConfig('faq/faq_group/category_enabled')){
|
17 |
+
$this->_initAction()
|
18 |
+
->renderLayout();
|
19 |
+
}
|
20 |
+
else{
|
21 |
+
$this->_redirect('adminhtml/dashboard/index');
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
public function editAction() {
|
26 |
+
$id = $this->getRequest()->getParam('id');
|
27 |
+
$model = Mage::getModel('faq/category')->load($id);
|
28 |
+
|
29 |
+
if ($model->getId() || $id == 0) {
|
30 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
31 |
+
$data1["store_set"]=",".$data["store_id"].",";
|
32 |
+
if (!empty($data)) {
|
33 |
+
$model->setData($data);
|
34 |
+
$model->setData($data1);
|
35 |
+
}
|
36 |
+
Mage::register('category_data', $model);
|
37 |
+
|
38 |
+
$this->loadLayout();
|
39 |
+
$this->_setActiveMenu('faq/categoryitems');
|
40 |
+
|
41 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
42 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
|
43 |
+
|
44 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
45 |
+
|
46 |
+
$this->_addContent($this->getLayout()->createBlock('faq/adminhtml_category_edit'))
|
47 |
+
->_addLeft($this->getLayout()->createBlock('faq/adminhtml_category_edit_tabs'));
|
48 |
+
|
49 |
+
$this->renderLayout();
|
50 |
+
} else {
|
51 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Item does not exist'));
|
52 |
+
$this->_redirect('*/*/');
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
public function newAction() {
|
57 |
+
$this->_forward('edit');
|
58 |
+
}
|
59 |
+
|
60 |
+
public function saveAction() {
|
61 |
+
if ($data = $this->getRequest()->getPost()) {
|
62 |
+
|
63 |
+
|
64 |
+
if(isset($data['stores'])) {
|
65 |
+
if(in_array('0',$data['stores'])){
|
66 |
+
$data['store_id'] = '0';
|
67 |
+
}
|
68 |
+
else{
|
69 |
+
$data['store_id'] = implode(",", $data['stores']);
|
70 |
+
}
|
71 |
+
unset($data['stores']);
|
72 |
+
}
|
73 |
+
$data["store_set"]=",".$data["store_id"].",";
|
74 |
+
$model = Mage::getModel('faq/category');
|
75 |
+
|
76 |
+
$model->setData($data)
|
77 |
+
->setId($this->getRequest()->getParam('id'));
|
78 |
+
|
79 |
+
|
80 |
+
try {
|
81 |
+
|
82 |
+
$model->save();
|
83 |
+
|
84 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('faq')->__('Item was successfully saved'));
|
85 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
86 |
+
|
87 |
+
if ($this->getRequest()->getParam('back')) {
|
88 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
$this->_redirect('*/*/');
|
92 |
+
return;
|
93 |
+
} catch (Exception $e) {
|
94 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
95 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
96 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Unable to find item to save'));
|
101 |
+
$this->_redirect('*/*/');
|
102 |
+
}
|
103 |
+
|
104 |
+
public function deleteAction() {
|
105 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
106 |
+
try {
|
107 |
+
$model = Mage::getModel('faq/category');
|
108 |
+
|
109 |
+
$model->setId($this->getRequest()->getParam('id'))
|
110 |
+
->delete();
|
111 |
+
|
112 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
113 |
+
$this->_redirect('*/*/');
|
114 |
+
} catch (Exception $e) {
|
115 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
116 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
117 |
+
}
|
118 |
+
}
|
119 |
+
$this->_redirect('*/*/');
|
120 |
+
}
|
121 |
+
|
122 |
+
public function massDeleteAction() {
|
123 |
+
$questionIds = $this->getRequest()->getParam('faq');
|
124 |
+
if(!is_array($questionIds)) {
|
125 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
126 |
+
} else {
|
127 |
+
try {
|
128 |
+
foreach ($questionIds as $questionId) {
|
129 |
+
$question = Mage::getModel('faq/category')->load($questionId);
|
130 |
+
$question->delete();
|
131 |
+
}
|
132 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
133 |
+
Mage::helper('adminhtml')->__(
|
134 |
+
'Total of %d record(s) were successfully deleted', count($questionIds)
|
135 |
+
)
|
136 |
+
);
|
137 |
+
} catch (Exception $e) {
|
138 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
139 |
+
}
|
140 |
+
}
|
141 |
+
$this->_redirect('*/*/index');
|
142 |
+
}
|
143 |
+
|
144 |
+
public function massStatusAction()
|
145 |
+
{
|
146 |
+
$questionIds = $this->getRequest()->getParam('faq');
|
147 |
+
if(!is_array($questionIds)) {
|
148 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
149 |
+
} else {
|
150 |
+
try {
|
151 |
+
foreach ($questionIds as $questionId) {
|
152 |
+
$question = Mage::getSingleton('faq/category')
|
153 |
+
->load($questionId)
|
154 |
+
->setStatus($this->getRequest()->getParam('status'))
|
155 |
+
->setIsMassupdate(true)
|
156 |
+
->save();
|
157 |
+
}
|
158 |
+
$this->_getSession()->addSuccess(
|
159 |
+
$this->__('Total of %d record(s) were successfully updated', count($questionIds))
|
160 |
+
);
|
161 |
+
} catch (Exception $e) {
|
162 |
+
$this->_getSession()->addError($e->getMessage());
|
163 |
+
}
|
164 |
+
}
|
165 |
+
$this->_redirect('*/*/index');
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
app/code/community/DCKAP/Faq/controllers/Adminhtml/FaqController.php
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DCKAP_Faq_Adminhtml_FaqController extends Mage_Adminhtml_Controller_action
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _initAction() {
|
7 |
+
$this->loadLayout()
|
8 |
+
->_setActiveMenu('faq/items')
|
9 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
10 |
+
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function indexAction() {
|
15 |
+
$faqEnable= Mage::getStoreConfig('faq/faq_group/faq_select');
|
16 |
+
if($faqEnable){
|
17 |
+
$this->_initAction()
|
18 |
+
->renderLayout();
|
19 |
+
}
|
20 |
+
else{
|
21 |
+
$this->_redirect('adminhtml/dashboard/index');
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
public function editAction() {
|
26 |
+
$id = $this->getRequest()->getParam('id');
|
27 |
+
$model = Mage::getModel('faq/faq')->load($id);
|
28 |
+
|
29 |
+
if ($model->getId() || $id == 0) {
|
30 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
31 |
+
$data1["store_set"]=",".$data["store_id"].",";
|
32 |
+
if (!empty($data)) {
|
33 |
+
$model->setData($data);
|
34 |
+
$model->setData($data1);
|
35 |
+
}
|
36 |
+
Mage::register('faq_data', $model);
|
37 |
+
|
38 |
+
$this->loadLayout();
|
39 |
+
$this->_setActiveMenu('faq/items');
|
40 |
+
|
41 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
42 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
|
43 |
+
|
44 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
45 |
+
|
46 |
+
$this->_addContent($this->getLayout()->createBlock('faq/adminhtml_faq_edit'))
|
47 |
+
->_addLeft($this->getLayout()->createBlock('faq/adminhtml_faq_edit_tabs'));
|
48 |
+
|
49 |
+
$this->renderLayout();
|
50 |
+
} else {
|
51 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Item does not exist'));
|
52 |
+
$this->_redirect('*/*/');
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
public function newAction() {
|
57 |
+
$this->_forward('edit');
|
58 |
+
}
|
59 |
+
|
60 |
+
public function saveAction() {
|
61 |
+
if ($data = $this->getRequest()->getPost()) {
|
62 |
+
|
63 |
+
|
64 |
+
if(isset($data['stores'])) {
|
65 |
+
if(in_array('0',$data['stores'])){
|
66 |
+
$data['store_id'] = '0';
|
67 |
+
}
|
68 |
+
else{
|
69 |
+
$data['store_id'] = implode(",", $data['stores']);
|
70 |
+
}
|
71 |
+
unset($data['stores']);
|
72 |
+
}
|
73 |
+
$data["store_set"]=",".$data["store_id"].",";
|
74 |
+
$customerData = Mage::getModel('faq/faq')->load($this->getRequest()->getParam('id'));
|
75 |
+
|
76 |
+
if(Mage::getStoreConfig('faq/notifications/mail_enable') && !$customerData->getNotified() && $customerData->getCustomerEmail() && $data['status']){
|
77 |
+
$email = Mage::getModel('core/email_template')->loadDefault(Mage::getStoreConfig('faq/notifications/emailtemplate'));
|
78 |
+
|
79 |
+
$question = $data["question"];
|
80 |
+
$receiver = $customerData->getCustomerName();
|
81 |
+
$sendto = $customerData->getCustomerEmail();
|
82 |
+
|
83 |
+
$email->setTemplateSubject(Mage::getStoreConfig('faq/notifications/mail_subject'));
|
84 |
+
$email->setSenderName(Mage::getStoreConfig('faq/notifications/mail_sendername'));
|
85 |
+
$email->setSenderEmail(Mage::getStoreConfig('faq/notifications/mail_sendermail'));
|
86 |
+
$faqurl = str_replace("/index.php", "", Mage::getBaseUrl())."index.php/faq";
|
87 |
+
$data1 = array('question' => $question,'faq_url' => $faqurl,'receiver' => $receiver);
|
88 |
+
$notified = $email->send($sendto, $receiver, $data);
|
89 |
+
}
|
90 |
+
|
91 |
+
$model = Mage::getModel('faq/faq');
|
92 |
+
if($notified){
|
93 |
+
$data['notified'] = 1;
|
94 |
+
}
|
95 |
+
|
96 |
+
$model->setData($data)
|
97 |
+
->setId($this->getRequest()->getParam('id'));
|
98 |
+
|
99 |
+
try {
|
100 |
+
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
101 |
+
$model->setCreatedTime(now())
|
102 |
+
->setUpdateTime(now());
|
103 |
+
} else {
|
104 |
+
$model->setUpdateTime(now());
|
105 |
+
}
|
106 |
+
|
107 |
+
$model->save();
|
108 |
+
|
109 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('faq')->__('Item was successfully saved'));
|
110 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
111 |
+
|
112 |
+
if ($this->getRequest()->getParam('back')) {
|
113 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
114 |
+
return;
|
115 |
+
}
|
116 |
+
$this->_redirect('*/*/');
|
117 |
+
return;
|
118 |
+
} catch (Exception $e) {
|
119 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
120 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
121 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
122 |
+
return;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Unable to find item to save'));
|
126 |
+
$this->_redirect('*/*/');
|
127 |
+
}
|
128 |
+
|
129 |
+
public function deleteAction() {
|
130 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
131 |
+
try {
|
132 |
+
$model = Mage::getModel('faq/faq');
|
133 |
+
|
134 |
+
$model->setId($this->getRequest()->getParam('id'))
|
135 |
+
->delete();
|
136 |
+
|
137 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
138 |
+
$this->_redirect('*/*/');
|
139 |
+
} catch (Exception $e) {
|
140 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
141 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
142 |
+
}
|
143 |
+
}
|
144 |
+
$this->_redirect('*/*/');
|
145 |
+
}
|
146 |
+
|
147 |
+
public function massDeleteAction() {
|
148 |
+
$questionIds = $this->getRequest()->getParam('faq');
|
149 |
+
if(!is_array($questionIds)) {
|
150 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
151 |
+
} else {
|
152 |
+
try {
|
153 |
+
foreach ($questionIds as $questionId) {
|
154 |
+
$question = Mage::getModel('faq/faq')->load($questionId);
|
155 |
+
$question->delete();
|
156 |
+
}
|
157 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
158 |
+
Mage::helper('adminhtml')->__(
|
159 |
+
'Total of %d record(s) were successfully deleted', count($questionIds)
|
160 |
+
)
|
161 |
+
);
|
162 |
+
} catch (Exception $e) {
|
163 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
164 |
+
}
|
165 |
+
}
|
166 |
+
$this->_redirect('*/*/index');
|
167 |
+
}
|
168 |
+
|
169 |
+
public function massStatusAction()
|
170 |
+
{
|
171 |
+
$questionIds = $this->getRequest()->getParam('faq');
|
172 |
+
if(!is_array($questionIds)) {
|
173 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
174 |
+
} else {
|
175 |
+
try {
|
176 |
+
foreach ($questionIds as $questionId) {
|
177 |
+
$question = Mage::getSingleton('faq/faq')
|
178 |
+
->load($questionId)
|
179 |
+
->setStatus($this->getRequest()->getParam('status'))
|
180 |
+
->setIsMassupdate(true)
|
181 |
+
->save();
|
182 |
+
}
|
183 |
+
$this->_getSession()->addSuccess(
|
184 |
+
$this->__('Total of %d record(s) were successfully updated', count($questionIds))
|
185 |
+
);
|
186 |
+
} catch (Exception $e) {
|
187 |
+
$this->_getSession()->addError($e->getMessage());
|
188 |
+
}
|
189 |
+
}
|
190 |
+
$this->_redirect('*/*/index');
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
app/code/community/DCKAP/Faq/controllers/IndexController.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class DCKAP_Faq_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
private static $_signupUrl = "https://www.google.com/recaptcha/admin";
|
5 |
+
private static $_siteVerifyUrl =
|
6 |
+
"https://www.google.com/recaptcha/api/siteverify?";
|
7 |
+
private $_secret;
|
8 |
+
private static $_version = "php_1.0";
|
9 |
+
|
10 |
+
public function indexAction()
|
11 |
+
{
|
12 |
+
$faqEnable= Mage::getStoreConfig('faq/faq_group/faq_select');
|
13 |
+
if($faqEnable){
|
14 |
+
$this->_title(Mage::helper('faq')->__("Frequently Asked Questions"));
|
15 |
+
$this->loadLayout();
|
16 |
+
$this->renderLayout();
|
17 |
+
}
|
18 |
+
else{
|
19 |
+
$this->norouteAction();
|
20 |
+
}
|
21 |
+
}
|
22 |
+
public function clickAction()
|
23 |
+
{
|
24 |
+
$id = $this->getRequest()->getParam('id');
|
25 |
+
$model = Mage::getModel('faq/faq')->load($id);
|
26 |
+
if($model->getViews()){
|
27 |
+
$views = $model->getViews() + 1;
|
28 |
+
}else{
|
29 |
+
$views = 1;
|
30 |
+
}
|
31 |
+
$model->setViews($views);
|
32 |
+
$model->save();
|
33 |
+
}
|
34 |
+
public function proceedAction()
|
35 |
+
{
|
36 |
+
$pass = 0;
|
37 |
+
$question = $this->getRequest()->getParam('question');
|
38 |
+
$category = $this->getRequest()->getParam('category');
|
39 |
+
|
40 |
+
if(Mage::getStoreConfig('faq/faq_recaptcha/faq_recaptchaselect')) {
|
41 |
+
|
42 |
+
$captcha = $this->getRequest()->getParam('g-recaptcha-response');
|
43 |
+
$secret = Mage::getStoreConfig('faq/faq_recaptcha/faq_secretkey');
|
44 |
+
|
45 |
+
$response = null;
|
46 |
+
|
47 |
+
$path = self::$_siteVerifyUrl;
|
48 |
+
$data = array (
|
49 |
+
'secret' => $secret,
|
50 |
+
'remoteip' => $_SERVER["REMOTE_ADDR"],
|
51 |
+
'v' => self::$_version,
|
52 |
+
'response' => $captcha
|
53 |
+
);
|
54 |
+
$req = "";
|
55 |
+
foreach ($data as $key => $value) {
|
56 |
+
$req .= $key . '=' . urlencode(stripslashes($value)) . '&';
|
57 |
+
}
|
58 |
+
// Cut the last '&'
|
59 |
+
$req = substr($req, 0, strlen($req)-1);
|
60 |
+
$response = file_get_contents($path . $req);
|
61 |
+
|
62 |
+
$answers = json_decode($response, true);
|
63 |
+
}else{
|
64 |
+
$pass = 1;
|
65 |
+
}
|
66 |
+
if (trim($answers ['success']) == true || $pass == 1) {
|
67 |
+
date_default_timezone_set('<?php echo Mage::getStoreConfig("general/locale/timezone"); ?>');
|
68 |
+
$time = date("Y-m-d H:i:s");
|
69 |
+
$ucustomer = 1;$cname="";$cemail="";$customerID="";
|
70 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
71 |
+
$ucustomer = 2;
|
72 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
73 |
+
$customerData = Mage::getModel('customer/customer')->load($customer->getId());
|
74 |
+
$customerID = $customerData->getId();
|
75 |
+
$cname = $customerData->getFirstname() . ' ' . $customerData->getLastname();
|
76 |
+
$cemail = $customerData->getEmail();
|
77 |
+
}
|
78 |
+
if($this->getRequest()->getParam('guest-email')){
|
79 |
+
$cname = $this->getRequest()->getParam('guest-name');
|
80 |
+
$cemail = $this->getRequest()->getParam('guest-email');
|
81 |
+
}
|
82 |
+
|
83 |
+
try{
|
84 |
+
$model = Mage::getModel('faq/faq');
|
85 |
+
$model->setQuestion($question);
|
86 |
+
$model->setStatus(2);
|
87 |
+
$model->setStoreSet("");
|
88 |
+
$model->setByuser($ucustomer);
|
89 |
+
$model->setCustomerId($customerID);
|
90 |
+
$model->setCustomerName($cname);
|
91 |
+
$model->setCustomerEmail($cemail);
|
92 |
+
$model->setCategory($category);
|
93 |
+
$model->setStoreId(Mage::app()->getStore(true)->getId());
|
94 |
+
$model->setCreatedTime($time);
|
95 |
+
$model->setUpdateTime($time);
|
96 |
+
$model->save();
|
97 |
+
Mage::getModel('adminnotification/inbox')->addNotice("DCKAP FAQ: New Question(ID:".$model->getId().") is added by a guest user at ".$time.".","New Question is added by a unknown guest user. Please review and update the question with answer.");
|
98 |
+
echo 1;
|
99 |
+
}
|
100 |
+
catch(Exception $e){
|
101 |
+
echo $e;
|
102 |
+
}
|
103 |
+
} else {
|
104 |
+
echo 2;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
app/code/community/DCKAP/Faq/etc/config.xml
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<DCKAP_Faq>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</DCKAP_Faq>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<faq>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>DCKAP_Faq</module>
|
14 |
+
<frontName>faq</frontName>
|
15 |
+
</args>
|
16 |
+
</faq>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<faq>
|
21 |
+
<file>faq.xml</file>
|
22 |
+
</faq>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<faq>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>DCKAP_Faq</module>
|
32 |
+
<frontName>faq</frontName>
|
33 |
+
</args>
|
34 |
+
</faq>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<adminhtml>
|
38 |
+
<menu>
|
39 |
+
<dckap module="faq">
|
40 |
+
<title>DCKAP</title>
|
41 |
+
<sort_order>60</sort_order>
|
42 |
+
<children>
|
43 |
+
<faq translate="title" module="faq">
|
44 |
+
<title>FAQ's Manager</title>
|
45 |
+
<sort_order>0</sort_order>
|
46 |
+
<depends>
|
47 |
+
<config>faq/faq_group/faq_select</config>
|
48 |
+
</depends>
|
49 |
+
<children>
|
50 |
+
<items translate="title" module="faq">
|
51 |
+
<title>Manage FAQ's</title>
|
52 |
+
<sort_order>0</sort_order>
|
53 |
+
<action>faq/adminhtml_faq</action>
|
54 |
+
</items>
|
55 |
+
<categoryitems translate="title" module="faq">
|
56 |
+
<title>Manage Categories</title>
|
57 |
+
<sort_order>1</sort_order>
|
58 |
+
<action>faq/adminhtml_category</action>
|
59 |
+
<depends>
|
60 |
+
<config>faq/faq_group/category_enabled</config>
|
61 |
+
</depends>
|
62 |
+
</categoryitems>
|
63 |
+
<settings translate="title" module="faq">
|
64 |
+
<title>Settings</title>
|
65 |
+
<sort_order>2</sort_order>
|
66 |
+
<action>adminhtml/system_config/edit/section/faq/</action>
|
67 |
+
</settings>
|
68 |
+
</children>
|
69 |
+
</faq>
|
70 |
+
</children>
|
71 |
+
</dckap>
|
72 |
+
</menu>
|
73 |
+
<acl>
|
74 |
+
<resources>
|
75 |
+
<admin>
|
76 |
+
<children>
|
77 |
+
<system>
|
78 |
+
<children>
|
79 |
+
<config>
|
80 |
+
<children>
|
81 |
+
<faq>
|
82 |
+
<title>Faq - All</title>
|
83 |
+
</faq>
|
84 |
+
</children>
|
85 |
+
</config>
|
86 |
+
</children>
|
87 |
+
</system>
|
88 |
+
<dckap translate="title" module="faq">
|
89 |
+
<title>Faq</title>
|
90 |
+
<sort_order>10</sort_order>
|
91 |
+
<children>
|
92 |
+
<faq translate="title" module="faq">
|
93 |
+
<title>FAQ's Manager</title>
|
94 |
+
<sort_order>0</sort_order>
|
95 |
+
<children>
|
96 |
+
<items translate="title" module="faq">
|
97 |
+
<title>Manage FAQ'settings</title>
|
98 |
+
<sort_order>0</sort_order>
|
99 |
+
<action>faq/adminhtml_faq</action>
|
100 |
+
</items>
|
101 |
+
<categoryitems translate="title" module="faq">
|
102 |
+
<title>Manage Categories</title>
|
103 |
+
<sort_order>1</sort_order>
|
104 |
+
<action>faq/adminhtml_category</action>
|
105 |
+
|
106 |
+
</categoryitems>
|
107 |
+
<settings translate="title" module="faq">
|
108 |
+
<title>Settings</title>
|
109 |
+
<sort_order>2</sort_order>
|
110 |
+
<action>adminhtml/system_config/edit/section/faq/</action>
|
111 |
+
</settings>
|
112 |
+
</children>
|
113 |
+
</faq>
|
114 |
+
</children>
|
115 |
+
</dckap>
|
116 |
+
</children>
|
117 |
+
</admin>
|
118 |
+
</resources>
|
119 |
+
</acl>
|
120 |
+
<layout>
|
121 |
+
<updates>
|
122 |
+
<faq>
|
123 |
+
<file>faq.xml</file>
|
124 |
+
</faq>
|
125 |
+
</updates>
|
126 |
+
</layout>
|
127 |
+
</adminhtml>
|
128 |
+
<global>
|
129 |
+
<models>
|
130 |
+
<faq>
|
131 |
+
<class>DCKAP_Faq_Model</class>
|
132 |
+
<resourceModel>faq_mysql4</resourceModel>
|
133 |
+
</faq>
|
134 |
+
<faq_mysql4>
|
135 |
+
<class>DCKAP_Faq_Model_Mysql4</class>
|
136 |
+
<entities>
|
137 |
+
<faq>
|
138 |
+
<table>dckap_faq</table>
|
139 |
+
</faq>
|
140 |
+
<category>
|
141 |
+
<table>dckap_category</table>
|
142 |
+
</category>
|
143 |
+
</entities>
|
144 |
+
</faq_mysql4>
|
145 |
+
</models>
|
146 |
+
<resources>
|
147 |
+
<faq_setup>
|
148 |
+
<setup>
|
149 |
+
<module>DCKAP_Faq</module>
|
150 |
+
</setup>
|
151 |
+
<connection>
|
152 |
+
<use>core_setup</use>
|
153 |
+
</connection>
|
154 |
+
</faq_setup>
|
155 |
+
<faq_write>
|
156 |
+
<connection>
|
157 |
+
<use>core_write</use>
|
158 |
+
</connection>
|
159 |
+
</faq_write>
|
160 |
+
<faq_read>
|
161 |
+
<connection>
|
162 |
+
<use>core_read</use>
|
163 |
+
</connection>
|
164 |
+
</faq_read>
|
165 |
+
</resources>
|
166 |
+
<template>
|
167 |
+
<email>
|
168 |
+
<faq_notifications_emailtemplate>
|
169 |
+
<label>Customer/Guest Notification</label>
|
170 |
+
<file>faq_notification.html</file>
|
171 |
+
<type>html</type>
|
172 |
+
</faq_notifications_emailtemplate>
|
173 |
+
</email>
|
174 |
+
</template>
|
175 |
+
<blocks>
|
176 |
+
<faq>
|
177 |
+
<class>DCKAP_Faq_Block</class>
|
178 |
+
</faq>
|
179 |
+
</blocks>
|
180 |
+
<helpers>
|
181 |
+
<faq>
|
182 |
+
<class>DCKAP_Faq_Helper</class>
|
183 |
+
</faq>
|
184 |
+
</helpers>
|
185 |
+
</global>
|
186 |
+
<default>
|
187 |
+
<faq>
|
188 |
+
<faq_group>
|
189 |
+
<faq_select>1</faq_select>
|
190 |
+
<category_enabled>0</category_enabled>
|
191 |
+
<viewsorter>0</viewsorter>
|
192 |
+
<faq_text>5</faq_text>
|
193 |
+
</faq_group>
|
194 |
+
<faq_recaptcha>
|
195 |
+
<faq_user>0</faq_user>
|
196 |
+
<faq_customer>0</faq_customer>
|
197 |
+
<faq_text>Is the question that you are looking for, not here? No need to worry. Ask your questions here.</faq_text>
|
198 |
+
<faq_btnlabel>Ask new Question</faq_btnlabel>
|
199 |
+
</faq_recaptcha>
|
200 |
+
<notifications>
|
201 |
+
<emailtemplate>faq_notifications_emailtemplate</emailtemplate>
|
202 |
+
<mail_subject>Your question is answered</mail_subject>
|
203 |
+
</notifications>
|
204 |
+
</faq>
|
205 |
+
</default>
|
206 |
+
</config>
|
app/code/community/DCKAP/Faq/etc/system.xml
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<dckap translate="label" module="faq">
|
5 |
+
<label>DCKAP</label>
|
6 |
+
<sort_order>100</sort_order>
|
7 |
+
</dckap>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<faq translate="label" module="faq">
|
11 |
+
<label>FAQ's Manager</label>
|
12 |
+
<tab>dckap</tab>
|
13 |
+
<sort_order>10</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 |
+
<faq_group translate="label" module="faq">
|
19 |
+
<label>General</label>
|
20 |
+
<frontend_type>text</frontend_type>
|
21 |
+
<sort_order>100</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 |
+
<faq_select translate="label">
|
27 |
+
<label>Enabled</label>
|
28 |
+
<frontend_type>select</frontend_type>
|
29 |
+
<sort_order>90</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
34 |
+
</faq_select>
|
35 |
+
<category_enabled translate="label">
|
36 |
+
<label>Enable Category Mode</label>
|
37 |
+
<frontend_type>select</frontend_type>
|
38 |
+
<sort_order>91</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
43 |
+
<depends>
|
44 |
+
<faq_select>1</faq_select>
|
45 |
+
</depends>
|
46 |
+
<comment>Allows to group the questions and answers.</comment>
|
47 |
+
</category_enabled>
|
48 |
+
<description translate="label">
|
49 |
+
<label>Description</label>
|
50 |
+
<frontend_type>textarea</frontend_type>
|
51 |
+
<sort_order>92</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>1</show_in_website>
|
54 |
+
<show_in_store>1</show_in_store>
|
55 |
+
<depends>
|
56 |
+
<faq_select>1</faq_select>
|
57 |
+
</depends>
|
58 |
+
<comment>This is general description and will be displayed in FAQ homepage.</comment>
|
59 |
+
</description>
|
60 |
+
<viewsorter translate="label">
|
61 |
+
<label>Sort questions by number of views / clicks</label>
|
62 |
+
<frontend_type>select</frontend_type>
|
63 |
+
<sort_order>94</sort_order>
|
64 |
+
<show_in_default>1</show_in_default>
|
65 |
+
<show_in_website>1</show_in_website>
|
66 |
+
<show_in_store>1</show_in_store>
|
67 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
68 |
+
<depends>
|
69 |
+
<faq_select>1</faq_select>
|
70 |
+
</depends>
|
71 |
+
<comment>If No selected, It will sorted by given Priority.</comment>
|
72 |
+
</viewsorter>
|
73 |
+
<faq_text translate="label">
|
74 |
+
<label>Pagination List</label>
|
75 |
+
<frontend_type>text</frontend_type>
|
76 |
+
<sort_order>95</sort_order>
|
77 |
+
<show_in_default>1</show_in_default>
|
78 |
+
<show_in_website>1</show_in_website>
|
79 |
+
<show_in_store>1</show_in_store>
|
80 |
+
<depends>
|
81 |
+
<faq_select>1</faq_select>
|
82 |
+
</depends>
|
83 |
+
<comment>By default, 5 will be taken for pagination.</comment>
|
84 |
+
</faq_text>
|
85 |
+
|
86 |
+
</fields>
|
87 |
+
</faq_group>
|
88 |
+
<faq_recaptcha translate="label" module="faq">
|
89 |
+
<label>User Questions and Google reCaptcha</label>
|
90 |
+
<frontend_type>text</frontend_type>
|
91 |
+
<sort_order>101</sort_order>
|
92 |
+
<show_in_default>1</show_in_default>
|
93 |
+
<show_in_website>1</show_in_website>
|
94 |
+
<show_in_store>1</show_in_store>
|
95 |
+
<fields>
|
96 |
+
<faq_user translate="label">
|
97 |
+
<label>Enable User to ask questions from frontend</label>
|
98 |
+
<frontend_type>select</frontend_type>
|
99 |
+
<sort_order>90</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
104 |
+
</faq_user>
|
105 |
+
<faq_customer translate="label">
|
106 |
+
<label>Allow only loggedin customers to ask questions</label>
|
107 |
+
<frontend_type>select</frontend_type>
|
108 |
+
<sort_order>90</sort_order>
|
109 |
+
<show_in_default>1</show_in_default>
|
110 |
+
<show_in_website>1</show_in_website>
|
111 |
+
<show_in_store>1</show_in_store>
|
112 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
113 |
+
</faq_customer>
|
114 |
+
<faq_text translate="label">
|
115 |
+
<label>Description to ask new question</label>
|
116 |
+
<frontend_type>textarea</frontend_type>
|
117 |
+
<sort_order>91</sort_order>
|
118 |
+
<show_in_default>1</show_in_default>
|
119 |
+
<show_in_website>1</show_in_website>
|
120 |
+
<show_in_store>1</show_in_store>
|
121 |
+
<depends>
|
122 |
+
<faq_user>1</faq_user>
|
123 |
+
</depends>
|
124 |
+
</faq_text>
|
125 |
+
<faq_btnlabel translate="label">
|
126 |
+
<label>Ask question button label</label>
|
127 |
+
<frontend_type>text</frontend_type>
|
128 |
+
<sort_order>92</sort_order>
|
129 |
+
<show_in_default>1</show_in_default>
|
130 |
+
<show_in_website>1</show_in_website>
|
131 |
+
<show_in_store>1</show_in_store>
|
132 |
+
<depends>
|
133 |
+
<faq_user>1</faq_user>
|
134 |
+
</depends>
|
135 |
+
</faq_btnlabel>
|
136 |
+
<faq_recaptchaselect translate="label">
|
137 |
+
<label>Enable captcha</label>
|
138 |
+
<frontend_type>select</frontend_type>
|
139 |
+
<sort_order>100</sort_order>
|
140 |
+
<show_in_default>1</show_in_default>
|
141 |
+
<show_in_website>1</show_in_website>
|
142 |
+
<show_in_store>1</show_in_store>
|
143 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
144 |
+
<depends>
|
145 |
+
<faq_user>1</faq_user>
|
146 |
+
</depends>
|
147 |
+
</faq_recaptchaselect>
|
148 |
+
<faq_sitekey translate="label">
|
149 |
+
<label>Site Key</label>
|
150 |
+
<frontend_type>text</frontend_type>
|
151 |
+
<sort_order>110</sort_order>
|
152 |
+
<show_in_default>1</show_in_default>
|
153 |
+
<show_in_website>1</show_in_website>
|
154 |
+
<show_in_store>1</show_in_store>
|
155 |
+
<depends>
|
156 |
+
<faq_user>1</faq_user>
|
157 |
+
<faq_recaptchaselect>1</faq_recaptchaselect>
|
158 |
+
</depends>
|
159 |
+
</faq_sitekey>
|
160 |
+
<faq_secretkey translate="label">
|
161 |
+
<label>Secret Key</label>
|
162 |
+
<frontend_type>text</frontend_type>
|
163 |
+
<sort_order>111</sort_order>
|
164 |
+
<show_in_default>1</show_in_default>
|
165 |
+
<show_in_website>1</show_in_website>
|
166 |
+
<show_in_store>1</show_in_store>
|
167 |
+
<depends>
|
168 |
+
<faq_user>1</faq_user>
|
169 |
+
<faq_recaptchaselect>1</faq_recaptchaselect>
|
170 |
+
</depends>
|
171 |
+
</faq_secretkey>
|
172 |
+
</fields>
|
173 |
+
</faq_recaptcha>
|
174 |
+
<notifications translate="label" module="faq">
|
175 |
+
<label>Email Notifications</label>
|
176 |
+
<frontend_type>text</frontend_type>
|
177 |
+
<sort_order>102</sort_order>
|
178 |
+
<show_in_default>1</show_in_default>
|
179 |
+
<show_in_website>1</show_in_website>
|
180 |
+
<show_in_store>1</show_in_store>
|
181 |
+
<fields>
|
182 |
+
<mail_enable translate="label">
|
183 |
+
<label>Send Mail to Customer/Guest if the question is answered.</label>
|
184 |
+
<frontend_type>select</frontend_type>
|
185 |
+
<sort_order>90</sort_order>
|
186 |
+
<show_in_default>1</show_in_default>
|
187 |
+
<show_in_website>1</show_in_website>
|
188 |
+
<show_in_store>1</show_in_store>
|
189 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
190 |
+
</mail_enable>
|
191 |
+
<emailtemplate translate="label">
|
192 |
+
<label>Email Template</label>
|
193 |
+
<frontend_type>select</frontend_type>
|
194 |
+
<sort_order>91</sort_order>
|
195 |
+
<show_in_default>1</show_in_default>
|
196 |
+
<show_in_website>1</show_in_website>
|
197 |
+
<show_in_store>1</show_in_store>
|
198 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
199 |
+
<depends>
|
200 |
+
<mail_enable>1</mail_enable>
|
201 |
+
</depends>
|
202 |
+
</emailtemplate>
|
203 |
+
<mail_subject translate="label">
|
204 |
+
<label>Subject</label>
|
205 |
+
<frontend_type>text</frontend_type>
|
206 |
+
<sort_order>92</sort_order>
|
207 |
+
<show_in_default>1</show_in_default>
|
208 |
+
<show_in_website>1</show_in_website>
|
209 |
+
<show_in_store>1</show_in_store>
|
210 |
+
<depends>
|
211 |
+
<mail_enable>1</mail_enable>
|
212 |
+
</depends>
|
213 |
+
</mail_subject>
|
214 |
+
<mail_sendername translate="label">
|
215 |
+
<label>Sender Name</label>
|
216 |
+
<frontend_type>text</frontend_type>
|
217 |
+
<sort_order>93</sort_order>
|
218 |
+
<show_in_default>1</show_in_default>
|
219 |
+
<show_in_website>1</show_in_website>
|
220 |
+
<show_in_store>1</show_in_store>
|
221 |
+
<depends>
|
222 |
+
<mail_enable>1</mail_enable>
|
223 |
+
</depends>
|
224 |
+
</mail_sendername>
|
225 |
+
<mail_sendermail translate="label">
|
226 |
+
<label>Sender Mail ID</label>
|
227 |
+
<frontend_type>text</frontend_type>
|
228 |
+
<sort_order>94</sort_order>
|
229 |
+
<show_in_default>1</show_in_default>
|
230 |
+
<show_in_website>1</show_in_website>
|
231 |
+
<show_in_store>1</show_in_store>
|
232 |
+
<depends>
|
233 |
+
<mail_enable>1</mail_enable>
|
234 |
+
</depends>
|
235 |
+
</mail_sendermail>
|
236 |
+
</fields>
|
237 |
+
</notifications>
|
238 |
+
</groups>
|
239 |
+
</faq>
|
240 |
+
</sections>
|
241 |
+
</config>
|
app/code/community/DCKAP/Faq/sql/faq_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer=$this;
|
3 |
+
$installer->startSetup();
|
4 |
+
$installer->run("
|
5 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/faq')};
|
6 |
+
CREATE TABLE {$this->getTable('faq/faq')} (
|
7 |
+
`question_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
8 |
+
`category` varchar(11) NOT NULL,
|
9 |
+
`question` varchar(1000) NOT NULL DEFAULT '',
|
10 |
+
`answer` varchar(10000) NOT NULL DEFAULT '',
|
11 |
+
`status` smallint(6) NOT NULL DEFAULT '0',
|
12 |
+
`priority` int(10) DEFAULT '0',
|
13 |
+
`byuser` int(1) NOT NULL DEFAULT '0',
|
14 |
+
`customer_id` varchar(15) NOT NULL,
|
15 |
+
`customer_name` varchar(100) NOT NULL,
|
16 |
+
`customer_email` varchar(100) NOT NULL,
|
17 |
+
`notified` int(1) NOT NULL,
|
18 |
+
`store_id` varchar(30) NOT NULL DEFAULT '0',
|
19 |
+
`store_set` varchar(30) NOT NULL DEFAULT '0',
|
20 |
+
`created_time` datetime DEFAULT NULL,
|
21 |
+
`update_time` datetime DEFAULT NULL,
|
22 |
+
`views` varchar(1000) NOT NULL,
|
23 |
+
PRIMARY KEY (`question_id`)
|
24 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
25 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/category')};
|
26 |
+
CREATE TABLE {$this->getTable('faq/category')} (
|
27 |
+
`cat_id` int(11) NOT NULL AUTO_INCREMENT,
|
28 |
+
`name` varchar(100) NOT NULL,
|
29 |
+
`description` varchar(1000) NOT NULL,
|
30 |
+
`status` smallint(6) NOT NULL DEFAULT '0',
|
31 |
+
`priority` int(10) NOT NULL DEFAULT '0',
|
32 |
+
`store_id` varchar(30) NOT NULL,
|
33 |
+
`store_set` varchar(30) NOT NULL,
|
34 |
+
PRIMARY KEY (`cat_id`)
|
35 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
36 |
+
");
|
37 |
+
$installer->endSetup();
|
38 |
+
?>
|
app/design/adminhtml/default/default/layout/faq.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<layout version="0.1.0">
|
4 |
+
<faq_adminhtml_faq_index>
|
5 |
+
<reference name="content">
|
6 |
+
<block type="faq/adminhtml_faq" name="faq" />
|
7 |
+
</reference>
|
8 |
+
</faq_adminhtml_faq_index>
|
9 |
+
<faq_adminhtml_category_index>
|
10 |
+
<reference name="content">
|
11 |
+
<block type="faq/adminhtml_category" name="category" />
|
12 |
+
</reference>
|
13 |
+
</faq_adminhtml_category_index>
|
14 |
+
<faq_adminhtml_faq_edit>
|
15 |
+
<update handle="editor"/>
|
16 |
+
</faq_adminhtml_faq_edit>
|
17 |
+
<faq_adminhtml_category_edit>
|
18 |
+
<update handle="editor"/>
|
19 |
+
</faq_adminhtml_category_edit>
|
20 |
+
</layout>
|
app/design/frontend/base/default/layout/faq.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<faq_index_index>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addItem"><type>skin_css</type><name>faq/css/dckap_faq.css</name><params/></action>
|
6 |
+
<block type="core/text" name="jquery">
|
7 |
+
<action method="setText"><text><![CDATA[<script src="https://www.google.com/recaptcha/api.js"></script>]]></text></action>
|
8 |
+
</block>
|
9 |
+
</reference>
|
10 |
+
<reference name="root">
|
11 |
+
<action method="setTemplate">
|
12 |
+
<template>page/1column.phtml</template>
|
13 |
+
</action>
|
14 |
+
</reference>
|
15 |
+
<reference name="content">
|
16 |
+
<block type="faq/faq" name="faq" template="faq/faq.phtml" />
|
17 |
+
</reference>
|
18 |
+
</faq_index_index>
|
19 |
+
<default>
|
20 |
+
<reference name="footer_links">
|
21 |
+
<action method="addLink" translate="label title" ifconfig="faq/faq_group/faq_select">
|
22 |
+
<label>faq</label>
|
23 |
+
<url>faq</url>
|
24 |
+
<prepare>Frequently Asked Questions</prepare>
|
25 |
+
<title>faq</title>
|
26 |
+
</action>
|
27 |
+
</reference>
|
28 |
+
</default>
|
29 |
+
</layout>
|
30 |
+
|
31 |
+
|
app/design/frontend/base/default/template/faq/faq.phtml
ADDED
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="dckap_faq">
|
2 |
+
<div class="page-title">
|
3 |
+
<h1>
|
4 |
+
<strong>
|
5 |
+
<span>
|
6 |
+
<?php echo $this->__('Frequently Asked Questions') ?>
|
7 |
+
</span>
|
8 |
+
</strong>
|
9 |
+
</h1>
|
10 |
+
<div class="catdescription">
|
11 |
+
<?php if(Mage::getStoreConfig('faq/faq_group/description')){
|
12 |
+
?>
|
13 |
+
<span><?php echo Mage::getStoreConfig('faq/faq_group/description'); ?></span>
|
14 |
+
<?php } ?>
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
<script>
|
18 |
+
jQuery(document).ready(function($){
|
19 |
+
jQuery("h4.dckap_questions").click(function() {
|
20 |
+
var state = true;
|
21 |
+
var questionClass = jQuery(this).attr("id");
|
22 |
+
var answerClass = questionClass.replace('question', 'answer');
|
23 |
+
state = $( "#"+answerClass ).is( ":visible" );
|
24 |
+
jQuery('h4.dckap_questions').removeClass("active");
|
25 |
+
if(!state){
|
26 |
+
jQuery('h6.dckap_answers').hide();
|
27 |
+
jQuery('#'+answerClass).toggle();
|
28 |
+
jQuery('#'+questionClass).addClass("active");
|
29 |
+
var url = "<?php echo Mage::getUrl('faq/index/click'); ?>";
|
30 |
+
var params = 'id='+jQuery(this).data("id");
|
31 |
+
$.ajax({
|
32 |
+
type: "POST",
|
33 |
+
url: url,
|
34 |
+
data: params
|
35 |
+
});
|
36 |
+
}else{
|
37 |
+
jQuery('h6.dckap_answers').hide();
|
38 |
+
}
|
39 |
+
});
|
40 |
+
jQuery("span.asknew").click(function() {
|
41 |
+
jQuery("form#dckap_askform").show();
|
42 |
+
jQuery(this).hide();
|
43 |
+
});
|
44 |
+
$("#dckap_askform").submit(function(){
|
45 |
+
if(!$("#dckapquestion").val()){
|
46 |
+
$(".dckap_response").html("Invalid Question.");
|
47 |
+
$(".dckap_response").css("color","crimson");
|
48 |
+
$(".dckap_response").show();
|
49 |
+
setTimeout(function() { $(".dckap_response").fadeOut(); }, 2000);
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
$(".dckap_overlay").show();
|
53 |
+
var url = $("#dckap_askform #dckap_url").val();
|
54 |
+
|
55 |
+
$.ajax({
|
56 |
+
type: "POST",
|
57 |
+
url: url,
|
58 |
+
data: $("#dckap_askform").serialize(),
|
59 |
+
success: function(data)
|
60 |
+
{
|
61 |
+
if(data == "1"){
|
62 |
+
$(".dckap_response").html("Your question is under review and it will be answered soon.");
|
63 |
+
$(".dckap_response").css("color","green");
|
64 |
+
$("form#dckap_askform").hide();
|
65 |
+
$("#dckapquestion").val('');
|
66 |
+
$("span.asknew").html("Ask another Question");
|
67 |
+
$("span.asknew").show();
|
68 |
+
}else if(data == "2"){
|
69 |
+
$(".dckap_response").html("Invalid Captcha. Please try again.");
|
70 |
+
$(".dckap_response").css("color","crimson");
|
71 |
+
}
|
72 |
+
else{
|
73 |
+
$(".dckap_response").html(data);
|
74 |
+
$(".dckap_response").css("color","crimson");
|
75 |
+
}
|
76 |
+
grecaptcha.reset();
|
77 |
+
setTimeout(function() { $(".dckap_response").fadeOut(); }, 2000);
|
78 |
+
$(".dckap_response").show();
|
79 |
+
$(".dckap_overlay").hide();
|
80 |
+
},
|
81 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
82 |
+
$(".dckap_response").html("Some unknown error occurred. Please try again.");
|
83 |
+
$(".dckap_response").css("color","crimson");
|
84 |
+
grecaptcha.reset();
|
85 |
+
setTimeout(function() { $(".dckap_response").fadeOut(); }, 2000);
|
86 |
+
$(".dckap_response").show();
|
87 |
+
$(".dckap_overlay").hide();
|
88 |
+
}
|
89 |
+
});
|
90 |
+
|
91 |
+
return false;
|
92 |
+
});
|
93 |
+
});
|
94 |
+
</script>
|
95 |
+
<div class="dckap_wrap">
|
96 |
+
<?php if(Mage::getStoreConfig('faq/faq_group/category_enabled')){ ?>
|
97 |
+
<div class="dckap_leftbar">
|
98 |
+
<ul>
|
99 |
+
<?php
|
100 |
+
$categoryvalues = $this->getCategories();
|
101 |
+
$ik = 0;
|
102 |
+
$licount = 3;
|
103 |
+
$lock = 1;
|
104 |
+
?>
|
105 |
+
<li <?php if(!$_REQUEST['category']){ $lock = 0;?>class="active"<?php } ?>><a href="<?php echo Mage::getUrl('faq/*/*'); ?>" <?php if(!$_REQUEST['category']){ ?>onclick="return false"<?php } ?>>ALL FAQ's</a></li>
|
106 |
+
<?php foreach ($categoryvalues as $category) {
|
107 |
+
if($ik < $licount){
|
108 |
+
?>
|
109 |
+
<li <?php if($category->getId()==$_REQUEST['category']) { $lock = 0;?>class="active"<?php } ?>>
|
110 |
+
<a href="<?php echo Mage::getUrl('faq/*/*').'?category='.$category->getId(); ?>" <?php if($category->getId()==$_REQUEST['category']) { ?>onclick="return false"<?php } ?>><?php echo $category->getName(); ?>
|
111 |
+
</a>
|
112 |
+
</li>
|
113 |
+
<?php
|
114 |
+
}
|
115 |
+
$ik++;
|
116 |
+
}
|
117 |
+
if($categoryvalues->count() > $licount){
|
118 |
+
?>
|
119 |
+
<li class="more_menu <?php if($lock){ ?>active<?php } ?>">
|
120 |
+
<a id="more_menu">More <img src="<?php echo $this->getSkinUrl('faq/images/down.png') ?>" width="18"></a>
|
121 |
+
<ul>
|
122 |
+
<?php
|
123 |
+
$ik = 0;
|
124 |
+
foreach ($categoryvalues as $category) {
|
125 |
+
if($ik >= $licount){
|
126 |
+
?>
|
127 |
+
<li <?php if($category->getId()==$_REQUEST['category']) { ?>class="active"<?php } ?>><a href="<?php echo Mage::getUrl('faq/*/*').'?category='.$category->getId(); ?>" <?php if($category->getId()==$_REQUEST['category']) { ?>onclick="return false"<?php } ?>><?php echo $category->getName(); ?></a></li>
|
128 |
+
<?php } $ik++; } ?>
|
129 |
+
|
130 |
+
</ul>
|
131 |
+
</li>
|
132 |
+
<?php } ?>
|
133 |
+
</ul>
|
134 |
+
<div class="faq-search">
|
135 |
+
<form id="faq-searchform" method="GET" action="">
|
136 |
+
<input type="hidden" name="category" value="<?php echo $_REQUEST['category']; ?>" />
|
137 |
+
<input type="text" name="keyword" placeholder="Search here" value="<?php echo $_REQUEST['keyword']; ?>" />
|
138 |
+
<input type="submit" value="" class="btn-searchform">
|
139 |
+
</form>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
<?php }else{ ?>
|
143 |
+
<div class="faq-search">
|
144 |
+
<form id="faq-searchform" method="GET" action="">
|
145 |
+
<input type="hidden" name="category" value="<?php echo $_REQUEST['category']; ?>" />
|
146 |
+
<input type="text" name="keyword" placeholder="Search here" value="<?php echo $_REQUEST['keyword']; ?>" />
|
147 |
+
<input type="submit" value="" class="btn-searchform">
|
148 |
+
</form>
|
149 |
+
</div>
|
150 |
+
<?php } ?>
|
151 |
+
<div style="clear: both;"></div>
|
152 |
+
<div class="dckap_content">
|
153 |
+
<?php
|
154 |
+
if(Mage::getStoreConfig('faq/faq_group/category_enabled')){
|
155 |
+
if($_REQUEST['category']){
|
156 |
+
$currentcat = Mage::getModel('faq/category')->load($_REQUEST['category']);
|
157 |
+
if($currentcat->description){
|
158 |
+
?>
|
159 |
+
<div class="catdescription"><span><?php echo $currentcat->description; ?></span></div>
|
160 |
+
<?php
|
161 |
+
} } }
|
162 |
+
|
163 |
+
$currentPage=1;
|
164 |
+
$_collections = $_REQUEST['keyword'] ? $this->getFaq($_REQUEST['keyword']) : $this->getFaq();
|
165 |
+
$_productCollection = $this->getCollection($_collections);
|
166 |
+
|
167 |
+
$itemPerPage = Mage::getStoreConfig('faq/faq_group/faq_text');
|
168 |
+
$currentPage = $this->getCurrentPage();
|
169 |
+
$i = (!$currentPage || $currentPage == 1) ? 1 : $itemPerPage*($currentPage-1)+1;
|
170 |
+
if($this->getPagerHtml($this->getFaq($_REQUEST['keyword']))) { ?>
|
171 |
+
<div class="pages dckap_pager">
|
172 |
+
<?php echo $this->getPagerHtml($this->getFaq($_REQUEST['keyword']));?>
|
173 |
+
<span><b><?php echo $this->__('PAGE : ');?></b></span>
|
174 |
+
<?php
|
175 |
+
$pcollection = Mage::getModel('faq/faq')->getCollection();
|
176 |
+
if(Mage::getStoreConfig('faq/faq_group/category_enabled')){
|
177 |
+
if($_REQUEST['category']){
|
178 |
+
$pcollection->addFieldtoFilter('category',$_REQUEST['category']);
|
179 |
+
}
|
180 |
+
}
|
181 |
+
$pcollection->addFieldToFilter('answer', array('neq' => '' ));
|
182 |
+
$pcollection->addFieldToFilter(
|
183 |
+
array('store_id','store_set','store_id','store_set' ),
|
184 |
+
array(
|
185 |
+
array('eq'=>Mage::app()->getStore(true)->getId()),
|
186 |
+
array('like'=>'%,'.Mage::app()->getStore(true)->getId().',%'),
|
187 |
+
array('eq'=>'0'),
|
188 |
+
array('like'=>'%,0,%')
|
189 |
+
)
|
190 |
+
);
|
191 |
+
if($_REQUEST['keyword']){
|
192 |
+
$pcollection->addFieldToFilter(
|
193 |
+
array('question','answer' ),
|
194 |
+
array(
|
195 |
+
array('like'=>'%'.$_REQUEST['keyword'].'%'),
|
196 |
+
array('like'=>'%'.$_REQUEST['keyword'].'%')
|
197 |
+
)
|
198 |
+
);
|
199 |
+
}
|
200 |
+
$pcollection->addFieldToFilter('status',array('eq'=>1));
|
201 |
+
?>
|
202 |
+
<span class="totalitems"><b>Total:</b> <?php echo $pcollection->count(); ?> questions</span>
|
203 |
+
</div>
|
204 |
+
<?php } ?>
|
205 |
+
<div style="clear:both"></div>
|
206 |
+
<?php
|
207 |
+
if($_productCollection->count()){
|
208 |
+
foreach($_productCollection as $key)
|
209 |
+
{ ?>
|
210 |
+
<h4 id="<?php echo 'dckap_question'.$i; ?>" data-id="<?php echo $key->getId(); ?>" class="dckap_questions"><?php echo $i."  ".$key->getQuestion(); ?></h4>
|
211 |
+
<h6 id="<?php echo 'dckap_answer'.$i; ?>" class="dckap_answers" style="display:none"><?php
|
212 |
+
$_cmsHelper = Mage::helper('cms');
|
213 |
+
$_process = $_cmsHelper->getBlockTemplateProcessor();
|
214 |
+
echo $_process->filter($key->getAnswer());
|
215 |
+
?></h6>
|
216 |
+
<?php
|
217 |
+
|
218 |
+
$i++;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
else{ ?>
|
222 |
+
<span class="notfound">No questions available.</span>
|
223 |
+
<?php }
|
224 |
+
?>
|
225 |
+
<div style="clear:both"></div>
|
226 |
+
<?php if($this->getPagerHtml($this->getFaq($_REQUEST['keyword']))):?>
|
227 |
+
<div class="pages dckap_pager">
|
228 |
+
<?php echo $this->getPagerHtml($this->getFaq($_REQUEST['keyword']));?>
|
229 |
+
<span><b><?php echo $this->__('PAGE : ');?></b></span>
|
230 |
+
<span class="totalitems"><b>Total:</b> <?php echo $pcollection->count(); ?> questions</span>
|
231 |
+
</div>
|
232 |
+
<?php endif;?>
|
233 |
+
<div style="clear:both"></div>
|
234 |
+
</div>
|
235 |
+
<div style="clear:both"></div>
|
236 |
+
</div>
|
237 |
+
<?php
|
238 |
+
$guestalert = 0;
|
239 |
+
if(Mage::getStoreConfig('faq/faq_recaptcha/faq_customer')){
|
240 |
+
$condition = Mage::getSingleton('customer/session')->isLoggedIn();
|
241 |
+
if(!$condition && Mage::getStoreConfig('faq/faq_recaptcha/faq_user')){ ?>
|
242 |
+
<div class="guest-alert">Please sign in to ask questions.</div>
|
243 |
+
<?php }
|
244 |
+
}else{
|
245 |
+
$condition = true;
|
246 |
+
}
|
247 |
+
if(Mage::getStoreConfig('faq/faq_recaptcha/faq_user') && $condition) { ?>
|
248 |
+
<div class="dckap_new">
|
249 |
+
<h4 class="ask_title"><?php echo Mage::getStoreConfig('faq/faq_recaptcha/faq_text'); ?><br/>
|
250 |
+
<div style="clear:both"></div>
|
251 |
+
<div class="dckap_response"></div>
|
252 |
+
<span class="asknew"><?php echo Mage::getStoreConfig('faq/faq_recaptcha/faq_btnlabel'); ?></span></h4>
|
253 |
+
<div style="clear:both"></div>
|
254 |
+
<form id="dckap_askform" name="addnewquestion" method="POST" action="">
|
255 |
+
<div class="dckap_overlay">
|
256 |
+
<center><img width="40" src="<?php echo $this->getSkinUrl('faq/images/loading.gif') ?>"></center>
|
257 |
+
</div>
|
258 |
+
<?php if(Mage::getStoreConfig('faq/faq_group/category_enabled')){ ?>
|
259 |
+
<div class="fieldset">
|
260 |
+
<span>Category </span>
|
261 |
+
<select name="category">
|
262 |
+
<option value="">Select any</option>
|
263 |
+
<?php foreach ($categoryvalues as $category) { ?>
|
264 |
+
<option value="<?php echo $category->getId(); ?>"><?php echo $category->getName(); ?></option>
|
265 |
+
<?php } ?>
|
266 |
+
</select>
|
267 |
+
</div>
|
268 |
+
<?php } ?>
|
269 |
+
<?php if(!Mage::getSingleton('customer/session')->isLoggedIn()){ ?>
|
270 |
+
<div class="user-info">
|
271 |
+
<div class="fieldset-input">
|
272 |
+
<label>Name*</label>
|
273 |
+
<input type="text" name="guest-name" required />
|
274 |
+
</div>
|
275 |
+
<div class="fieldset-input">
|
276 |
+
<label>Email*</label>
|
277 |
+
<input type="email" name="guest-email" required pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$"/>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
<?php } ?>
|
281 |
+
<div class="fieldset forminput">
|
282 |
+
<label>Question*</label>
|
283 |
+
<textarea id="dckapquestion" required name="question" style="width:440px;height:77px;"></textarea>
|
284 |
+
</div>
|
285 |
+
<?php if(Mage::getStoreConfig('faq/faq_recaptcha/faq_recaptchaselect') && Mage::getStoreConfig('faq/faq_recaptcha/faq_sitekey') && Mage::getStoreConfig('faq/faq_recaptcha/faq_secretkey')){ ?>
|
286 |
+
<center><div class="fieldset recap">
|
287 |
+
<div class="g-recaptcha" data-sitekey="6Leaww0TAAAAAGAJ_5QllWJA5mF1rQNmObOD1TNH"></div>
|
288 |
+
</div></center>
|
289 |
+
<?php } ?>
|
290 |
+
<div class="fieldset">
|
291 |
+
<input type="hidden" value="<?php echo Mage::getUrl('faq/index/proceed'); ?>" id="dckap_url" />
|
292 |
+
<input type="submit"value="Submit" />
|
293 |
+
<input type="reset" value="Reset" />
|
294 |
+
</div>
|
295 |
+
<div style="clear:both"></div>
|
296 |
+
</form>
|
297 |
+
<div style="clear:both"></div>
|
298 |
+
</div>
|
299 |
+
<?php } ?>
|
300 |
+
</div>
|
301 |
+
<script type="text/javascript">
|
302 |
+
jQuery(document).ready(function(){
|
303 |
+
jQuery('.more_menu').on({
|
304 |
+
mouseover: function() {
|
305 |
+
jQuery('.more_menu ul').show();
|
306 |
+
},
|
307 |
+
mouseout: function(){
|
308 |
+
jQuery('.more_menu ul').hide();
|
309 |
+
},
|
310 |
+
|
311 |
+
});
|
312 |
+
});
|
313 |
+
</script>
|
app/etc/modules/DCKAP_Faq.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<DCKAP_Faq>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<version>0.1.0</version>
|
8 |
+
</DCKAP_Faq>
|
9 |
+
</modules>
|
10 |
+
</config>
|
app/locale/en_US/template/email/faq_notification.html
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{template config_path="design/email/header"}}
|
2 |
+
{{inlinecss file="email-inline.css"}}
|
3 |
+
|
4 |
+
<table cellpadding="0" cellspacing="0" border="0">
|
5 |
+
<tr>
|
6 |
+
<td class="action-content">
|
7 |
+
<h1>Hello {{var receiver}},</h1>
|
8 |
+
<p style="font-size: 14px;margin-bottom: 25px;line-height: 1.5;" > We are glad to notify you that the question ( <b>{{var question}}</b> ) posted by you on our website has been answered. And also we added that question with answer into our website frequently asked question's page.
|
9 |
+
<br /><br />To know the answer, kindly check our <a href="{{var faq_url}}">faq page</a>.</p>
|
10 |
+
<p>If you have any questions, please feel free to contact us at <a href="mailto:{{var store_email}}">{{var store_email}}</a> {{depend store_phone}} or by phone at <a href="tel:{{var phone}}">{{var store_phone}}</a>{{/depend}}.</p>
|
11 |
+
</td>
|
12 |
+
</tr>
|
13 |
+
</table>
|
14 |
+
|
15 |
+
{{template config_path="design/email/footer"}}
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>faqaskquestions</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>FAQ - Ask Questions used to manage the Frequently Asked Questions from magento back end and also user can ask their own questions from front end.</summary>
|
10 |
+
<description>FAQ - Ask Questions used to manage the Frequently Asked Questions from magento back end and also user can ask their own questions from front end.once user asked the questions, it will be reviewed by admin and update to FAQ section.</description>
|
11 |
+
<notes>FAQ Ask Questions stable version 1.0.0</notes>
|
12 |
+
<authors><author><name>DCKAP</name><user>magento</user><email>extensions@dckap.com</email></author></authors>
|
13 |
+
<date>2015-12-29</date>
|
14 |
+
<time>07:26:20</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="DCKAP"><dir name="Faq"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="5100426f24dd3d347ac139bd820568cf"/><dir name="Tab"><file name="Form.php" hash="62586ac139c3f72406fc3db853cc5711"/></dir><file name="Tabs.php" hash="ccdb783b2b20bd8f3f5cd89cb22a8fdb"/></dir><file name="Edit.php" hash="55dd66ac90e54c18167495388c79bf01"/><file name="Grid.php" hash="f4480b27dcc18e4506828b04cab65029"/></dir><file name="Category.php" hash="970ea3ec42aebc32e841c19654fb1246"/><dir name="Faq"><dir name="Edit"><file name="Form.php" hash="78ce50012a871ed064fb02562326d887"/><dir name="Tab"><file name="Form.php" hash="e02c913c1b5060e32faf8dae18da6cef"/></dir><file name="Tabs.php" hash="13e5cb3fc754c70ea07a712d2fa80a5a"/></dir><file name="Edit.php" hash="1c615dd028527fc1bc9a29fe98a6a99b"/><file name="Grid.php" hash="8356ff0b7c2831205df2b9ccd30009b1"/></dir><file name="Faq.php" hash="7b38a9c3b608490a5185596d6daef37a"/></dir><file name="Faq.php" hash="59f7c6ac79e32585f7e875288af1c5cb"/></dir><dir name="Helper"><file name="Data.php" hash="d63940886d43e282183371967bfb0933"/></dir><dir name="Model"><file name="Category.php" hash="d0b2ce3765b98d8d03b62e44392c0c96"/><file name="Faq.php" hash="11a92ef3df1c01a22fd59698488305e1"/><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="e1a034e04cd4575d74f43d1953fc50e9"/></dir><file name="Category.php" hash="a43d99a938e3522093f976c7191483f1"/><dir name="Faq"><file name="Collection.php" hash="6ed81dffe0ef1a133fe67d79dc20a1bc"/></dir><file name="Faq.php" hash="f3fe9f805a7c8a5d601a17088513f598"/></dir><file name="Status.php" hash="8ddc01a29c931434b8d30b22229554ac"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategoryController.php" hash="f9b33fc003b36b8df27fc12c49c4e77f"/><file name="FaqController.php" hash="89888e2fa2602bd67e7c0593c7382de8"/></dir><file name="IndexController.php" hash="507eb27d2de62a06b3d8b668b94fe89f"/></dir><dir name="etc"><file name="config.xml" hash="d7f81a4f8c23f39dc6dd245bef100a9f"/><file name="system.xml" hash="c1f435c1b70fbefdb21bb208a5cd4557"/></dir><dir name="sql"><dir name="faq_setup"><file name="mysql4-install-0.1.0.php" hash="84044a7cd221bc98247f5d73b4be87a9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="faq.xml" hash="5a688c80d0906488bd43b5c25944aea0"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="faq.xml" hash="eb3dacac5e556cbd33d5f87ee60cdfde"/></dir><dir name="template"><dir name="faq"><file name="faq.phtml" hash="729b945742b9a83f28125f8bf91dda90"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DCKAP_Faq.xml" hash="84aa184e20be69f668fc6b9875e5160a"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="faq_notification.html" hash="83e76840577a30326278df0319254921"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="faq"><dir name="css"><file name="dckap_faq.css" hash="afac43573d0702564e966b76f1eb2ee2"/></dir><dir name="images"><file name="down.png" hash="67b2ce8412797c81aa1233f7ec0fbf82"/><file name="faq-logo.jpg" hash="ee323cb9d91166da3f6984f761befa91"/><file name="loading.gif" hash="365d3e659634df5d5289f14e1855e714"/><file name="search.png" hash="3b5540ee0c7010b840e5514716f23114"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|
skin/frontend/base/default/faq/css/dckap_faq.css
ADDED
@@ -0,0 +1,382 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.dckap_faq {
|
2 |
+
margin-bottom: 50px;
|
3 |
+
}
|
4 |
+
.dckap_faq .page-title h1{
|
5 |
+
border: none;
|
6 |
+
}
|
7 |
+
.pages.dckap_pager {g
|
8 |
+
width: 100%;
|
9 |
+
}
|
10 |
+
.pages.dckap_pager > span {
|
11 |
+
display: block;
|
12 |
+
float: right;
|
13 |
+
margin-right: 5px;
|
14 |
+
margin-top: 4px;
|
15 |
+
}
|
16 |
+
.pages.dckap_pager > ol {
|
17 |
+
float: right;
|
18 |
+
}
|
19 |
+
|
20 |
+
.dckap_faq .dckap_answers {
|
21 |
+
background: none repeat scroll 0 0 #f7f7f7;
|
22 |
+
border-radius: 2px;
|
23 |
+
font-size: 14px;
|
24 |
+
font-weight: normal;
|
25 |
+
line-height: 1.8;
|
26 |
+
margin-left: 26px;
|
27 |
+
padding: 10px;
|
28 |
+
text-transform: inherit;
|
29 |
+
}
|
30 |
+
.dckap_faq .page-title {
|
31 |
+
color: #39c;
|
32 |
+
font-size: 40px;
|
33 |
+
text-align: center;
|
34 |
+
}
|
35 |
+
.dckap_faq .ask_title {
|
36 |
+
margin-top: 20px;
|
37 |
+
text-transform: inherit;
|
38 |
+
margin-bottom: 20px;
|
39 |
+
}
|
40 |
+
.dckap_new .ask_title .asknew:hover {
|
41 |
+
background: none repeat scroll 0 0 #343434;
|
42 |
+
border-color: #333;
|
43 |
+
}
|
44 |
+
#dckap_askform {
|
45 |
+
margin: 25px 0 0;
|
46 |
+
text-align: center;
|
47 |
+
display: none;
|
48 |
+
}
|
49 |
+
#dckap_askform .fieldset label {
|
50 |
+
display: inline-block;
|
51 |
+
width: 125px;
|
52 |
+
}
|
53 |
+
#dckap_askform .fieldset textarea {
|
54 |
+
border: 1px solid #ccc;
|
55 |
+
}
|
56 |
+
#dckap_askform .fieldset input {
|
57 |
+
border: 1px solid #ccc;
|
58 |
+
padding: 5px 15px;
|
59 |
+
}
|
60 |
+
#dckap_askform .fieldset input:hover {
|
61 |
+
border-color: #888;
|
62 |
+
}
|
63 |
+
.dckap_pager span {
|
64 |
+
color: #444;
|
65 |
+
}
|
66 |
+
.dckap_overlay {
|
67 |
+
background: none repeat scroll 0 0 rgba(255, 255, 255, 0.8);
|
68 |
+
display: none;
|
69 |
+
height: 100%;
|
70 |
+
padding-top: 40px;
|
71 |
+
position: absolute;
|
72 |
+
width: 100%;
|
73 |
+
}
|
74 |
+
.dckap_response {
|
75 |
+
border: 2px solid;
|
76 |
+
display: none;
|
77 |
+
margin-bottom: 15px;
|
78 |
+
margin-top: 15px;
|
79 |
+
padding: 10px;
|
80 |
+
}
|
81 |
+
#dckap_askform .fieldset select {
|
82 |
+
cursor: pointer;
|
83 |
+
font-size: 16px;
|
84 |
+
padding: 3px;
|
85 |
+
width: 443px;
|
86 |
+
}
|
87 |
+
#dckap_askform .fieldset select option {
|
88 |
+
padding: 3px;
|
89 |
+
}
|
90 |
+
#dckap_askform .fieldset > span {
|
91 |
+
font-size: 20px;
|
92 |
+
}
|
93 |
+
#dckap_askform .fieldset.forminput {
|
94 |
+
margin-top: 0px;
|
95 |
+
}
|
96 |
+
.dckap_leftbar a:hover {
|
97 |
+
text-decoration: none;
|
98 |
+
}
|
99 |
+
.pages.dckap_pager a:hover {
|
100 |
+
text-decoration: none;
|
101 |
+
border-color: #777;
|
102 |
+
}
|
103 |
+
.pages.dckap_pager li.current {
|
104 |
+
background: none repeat scroll 0 0 #777;
|
105 |
+
border: 1px solid #777;
|
106 |
+
color: #fff;
|
107 |
+
line-height: 27px;
|
108 |
+
}
|
109 |
+
.pages.dckap_pager a {
|
110 |
+
background: none repeat scroll 0 0 #f2f2f2;
|
111 |
+
border: 1px solid #ddd;
|
112 |
+
color: #000;
|
113 |
+
width: 30px;
|
114 |
+
line-height: 27px;
|
115 |
+
}
|
116 |
+
.dckap_content span.notfound {
|
117 |
+
display: block;
|
118 |
+
margin: 10px 0;
|
119 |
+
}
|
120 |
+
.dckap_wrap a:focus{
|
121 |
+
outline: none;
|
122 |
+
}
|
123 |
+
.pages.dckap_pager .totalitems {
|
124 |
+
color: #444;
|
125 |
+
margin-right: 15px;
|
126 |
+
text-transform: uppercase;
|
127 |
+
}
|
128 |
+
.user-info {
|
129 |
+
clear: both;
|
130 |
+
display: block;
|
131 |
+
width: 100%;
|
132 |
+
}
|
133 |
+
.user-info .fieldset-input {
|
134 |
+
float: left;
|
135 |
+
}
|
136 |
+
.user-info .fieldset-input input {
|
137 |
+
border: 1px solid #ccc;
|
138 |
+
border-radius: 0;
|
139 |
+
height: 40px;
|
140 |
+
margin-right: 5px;
|
141 |
+
width: 300px;
|
142 |
+
}
|
143 |
+
.dckap_faq .page-title h1 strong {
|
144 |
+
font-weight: normal;
|
145 |
+
}
|
146 |
+
.dckap_faq .page-title h1 {
|
147 |
+
border: medium none;
|
148 |
+
color: #000;
|
149 |
+
font-family: Arial;
|
150 |
+
font-size: 44px;
|
151 |
+
font-weight: normal !important;
|
152 |
+
letter-spacing: 2px;
|
153 |
+
margin: 0 auto;
|
154 |
+
padding: 0;
|
155 |
+
}
|
156 |
+
.dckap_faq .page-title .catdescription {
|
157 |
+
color: #555;
|
158 |
+
font-size: 14px;
|
159 |
+
line-height: 2;
|
160 |
+
margin: 0 auto;
|
161 |
+
padding: 10px 0 20px;
|
162 |
+
text-transform: uppercase;
|
163 |
+
}
|
164 |
+
.dckap_faq .dckap_wrap .catdescription {
|
165 |
+
clear: both;
|
166 |
+
color: #555;
|
167 |
+
display: block;
|
168 |
+
font-size: 14px;
|
169 |
+
margin: 0 auto;
|
170 |
+
padding: 15px 0 10px;
|
171 |
+
line-height: 2;
|
172 |
+
}
|
173 |
+
.dckap_faq .dckap_content {
|
174 |
+
border: medium none;
|
175 |
+
float: none;
|
176 |
+
margin: 0 auto;
|
177 |
+
}
|
178 |
+
.dckap_faq .dckap_questions {
|
179 |
+
border-radius: 5px;
|
180 |
+
color: #10827d;
|
181 |
+
cursor: pointer;
|
182 |
+
font-family: arial;
|
183 |
+
font-size: 18px;
|
184 |
+
font-weight: normal;
|
185 |
+
margin: 5px 0 0;
|
186 |
+
padding: 7px;
|
187 |
+
text-transform: inherit;
|
188 |
+
}
|
189 |
+
|
190 |
+
#more_menu > img {
|
191 |
+
float: right;
|
192 |
+
margin-left: 8px;
|
193 |
+
margin-top: 2px;
|
194 |
+
}
|
195 |
+
.dckap_wrap .dckap_leftbar {
|
196 |
+
background: none repeat scroll 0 0 #f2f2f2;
|
197 |
+
border: 1px solid #c3c3c3;
|
198 |
+
margin-bottom: 5px;
|
199 |
+
float: left;
|
200 |
+
padding: 0;
|
201 |
+
width: 100%;
|
202 |
+
}
|
203 |
+
.dckap_wrap .dckap_leftbar li {
|
204 |
+
background: none;
|
205 |
+
height: 40px;
|
206 |
+
padding: 0;
|
207 |
+
float: left;
|
208 |
+
width: auto;
|
209 |
+
}
|
210 |
+
.dckap_wrap .dckap_leftbar li.active > a {
|
211 |
+
color: #A61B1B;
|
212 |
+
}
|
213 |
+
.dckap_wrap .dckap_leftbar a:hover {
|
214 |
+
color: #A61B1B;
|
215 |
+
background: #f2f2f2;
|
216 |
+
}
|
217 |
+
.dckap_wrap .dckap_leftbar li a {
|
218 |
+
border-bottom: medium none;
|
219 |
+
border-right: 1px solid #c3c3c3;
|
220 |
+
color: #000000;
|
221 |
+
cursor: pointer;
|
222 |
+
display: block;
|
223 |
+
font-size: 14px;
|
224 |
+
height: 40px;
|
225 |
+
padding: 10px 30px;
|
226 |
+
position: relative;
|
227 |
+
text-transform: uppercase;
|
228 |
+
width: auto;
|
229 |
+
}
|
230 |
+
.faq-search {
|
231 |
+
float: right;
|
232 |
+
position: relative;
|
233 |
+
}
|
234 |
+
.dckap_faq .guest-alert {
|
235 |
+
font-size: 16px;
|
236 |
+
margin-top: 5px;
|
237 |
+
}
|
238 |
+
#faq-searchform .btn-searchform {
|
239 |
+
background: url("../images/search.png") no-repeat scroll 0 0 / 36px auto rgba(0, 0, 0, 0);
|
240 |
+
border: 0 none;
|
241 |
+
height: 36px;
|
242 |
+
margin-top: 2px;
|
243 |
+
position: absolute;
|
244 |
+
top: 0;
|
245 |
+
right: 2px;
|
246 |
+
width: 36px;
|
247 |
+
}
|
248 |
+
#faq-searchform > input[type="text"] {
|
249 |
+
border: 1px solid #c3c3c3;
|
250 |
+
border-radius: 2px;
|
251 |
+
height: 36px;
|
252 |
+
margin-right: 2px;
|
253 |
+
margin-top: 2px;
|
254 |
+
padding-right: 38px;
|
255 |
+
width: 250px;
|
256 |
+
}
|
257 |
+
.dckap_new {
|
258 |
+
margin: 0 auto;
|
259 |
+
}
|
260 |
+
.dckap_new .ask_title {
|
261 |
+
color: #a61b1b;
|
262 |
+
font-family: arial;
|
263 |
+
font-size: 17px;
|
264 |
+
font-weight: lighter;
|
265 |
+
text-align: center;
|
266 |
+
text-transform: uppercase;
|
267 |
+
}
|
268 |
+
|
269 |
+
.dckap_new #dckap_askform .fieldset span {
|
270 |
+
display: inline-block;
|
271 |
+
font-family: arial;
|
272 |
+
font-size: 12px !important;
|
273 |
+
padding: 9px 0;
|
274 |
+
text-transform: uppercase;
|
275 |
+
width: 125px;
|
276 |
+
}
|
277 |
+
|
278 |
+
#dckap_askform .user-info .fieldset-input > label {
|
279 |
+
display: inline-block;
|
280 |
+
font-family: arial;
|
281 |
+
font-size: 12px;
|
282 |
+
font-weight: normal;
|
283 |
+
padding: 8px 0;
|
284 |
+
text-transform: uppercase;
|
285 |
+
width: 125px;
|
286 |
+
}
|
287 |
+
.user-info .fieldset-input {
|
288 |
+
float: none;
|
289 |
+
margin-bottom: 11px;
|
290 |
+
}
|
291 |
+
#dckap_askform .fieldset {
|
292 |
+
clear: both;
|
293 |
+
float: none;
|
294 |
+
margin-bottom: 13px;
|
295 |
+
}
|
296 |
+
#dckap_askform .fieldset textarea {
|
297 |
+
border: 1px solid #dddddd;
|
298 |
+
}
|
299 |
+
.user-info .fieldset-input input {
|
300 |
+
border: 1px solid #dddddd;
|
301 |
+
height: 35px;
|
302 |
+
width: 440px;
|
303 |
+
}
|
304 |
+
.dckap_faq #dckap_askform .fieldset.recap {
|
305 |
+
margin: 0 auto;
|
306 |
+
}
|
307 |
+
.dckap_new .ask_title .asknew {
|
308 |
+
background: none repeat scroll 0 0 #484847;
|
309 |
+
border: 1px solid;
|
310 |
+
border-radius: 2px;
|
311 |
+
color: #ffffff;
|
312 |
+
cursor: pointer;
|
313 |
+
display: inline-block;
|
314 |
+
font-size: 14px;
|
315 |
+
font-weight: bold;
|
316 |
+
margin-top: 15px;
|
317 |
+
padding: 8px 15px;
|
318 |
+
}
|
319 |
+
.dckap_questions.active {
|
320 |
+
background: none;
|
321 |
+
border: none;
|
322 |
+
}
|
323 |
+
.pages.dckap_pager {
|
324 |
+
background: none repeat scroll 0 0 #f7f7f7;
|
325 |
+
border: 1px solid #c3c3c3;
|
326 |
+
margin: 10px 0;
|
327 |
+
padding: 2px;
|
328 |
+
width: 100%;
|
329 |
+
}
|
330 |
+
#dckap_askform .fieldset input {
|
331 |
+
background: none repeat scroll 0 0 #484847;
|
332 |
+
border: 1px solid #555555;
|
333 |
+
border-radius: 3px;
|
334 |
+
color: #fff;
|
335 |
+
font-size: 16px;
|
336 |
+
margin: 10px 0;
|
337 |
+
padding: 5px 30px;
|
338 |
+
position: relative;
|
339 |
+
text-transform: uppercase;
|
340 |
+
}
|
341 |
+
#dckap_askform .fieldset input:hover {
|
342 |
+
background: none repeat scroll 0 0 #343433;
|
343 |
+
border-color: #333;
|
344 |
+
}
|
345 |
+
#search-box > input {
|
346 |
+
background: #000000 none repeat scroll 0 0;
|
347 |
+
border: medium none;
|
348 |
+
border-radius: 4px;
|
349 |
+
color: #ffffff;
|
350 |
+
float: right;
|
351 |
+
height: 32px;
|
352 |
+
margin-right: 15%;
|
353 |
+
margin-top: 4px;
|
354 |
+
width: 230px;
|
355 |
+
}
|
356 |
+
.pages.dckap_pager > span.totalitems {
|
357 |
+
float: none;
|
358 |
+
margin-left: 10px;
|
359 |
+
}
|
360 |
+
.dckap_faq .more_menu > ul li {
|
361 |
+
background: none repeat scroll 0 0 #f2f2f2;
|
362 |
+
border-left: 1px solid #c3c3c3;
|
363 |
+
clear: left;
|
364 |
+
left: 0;
|
365 |
+
position: relative;
|
366 |
+
width: 180px;
|
367 |
+
}
|
368 |
+
.dckap_faq .more_menu > ul {
|
369 |
+
background: none repeat scroll 0 0 #f2f2f2;
|
370 |
+
display: none;
|
371 |
+
left: -1px;
|
372 |
+
position: relative;
|
373 |
+
top: 0px;
|
374 |
+
width: 123px;
|
375 |
+
}
|
376 |
+
.dckap_faq .more_menu > ul li a {
|
377 |
+
border-top: 1px solid #dddddd;
|
378 |
+
padding: 8px 20px;
|
379 |
+
}
|
380 |
+
.dckap_faq .more_menu > ul li:last-child a {
|
381 |
+
border-bottom: 1px solid #c3c3c3;
|
382 |
+
}
|
skin/frontend/base/default/faq/images/down.png
ADDED
Binary file
|
skin/frontend/base/default/faq/images/faq-logo.jpg
ADDED
Binary file
|
skin/frontend/base/default/faq/images/loading.gif
ADDED
Binary file
|
skin/frontend/base/default/faq/images/search.png
ADDED
Binary file
|