Module refers to the part of the CMS "Interactive" and can be installed optionally.
The module allows users to ask questions on the site, and administrator to publish the answers to these questions with the possibility of sending a response to the e-mail user, ask questions.
Module "Question-Answer" can be attached to the various pages of the site. If the module is attached to a few pages in the administrative part of the module there is a special filter "Site section" with the possibility of filtering the output (a list of questions, categories and settings) as belonging to the page.
The module consists of two parts: the category of questions and answers and questions.
The list of questions are displayed with priority novelty.
Questions have the following characteristics.
Categories of questions can have an unlimited number of subcategories. If necessary, the category can not be used. To do this, disable the "Use category" in the module settings.
All nested categories and questions are deleted When you delete a category.
Categories have the following characteristics.
Для работы с модулем «Question-Answer» служат следующие шаблонные теги:
show_block – shows latest questionson all pages, except the questions page, when the list of the same questions as in the function is shown.
Атрибуты:
— count – number of displayed questions (by default 3);
— site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. You can indicate negative value, then the questions from the indicated section will be excluded. By default all pages are selected;
— cat_id – categories of questions, if "Use categories" is checked in the module settings. Category identifiers are enumerated comma-separated. You can indicate negative value, then the questions from the indicated category will be excluded. You can indicate current value, then the questions from the current (opened) category or all categories, if neither of them is opened, will be shown. By default the category is not taken into account, all questions are shown.;
— sort – sorting questions: date – by date (by default), rand – randomly;
— often – frequently asked question : true – выводятся только вопросы с пометкой "Frequently Asked Question", по умолчанию пометка "Frequently Asked Question" игнорируется;
— only_module – show the block only on the page to which "Question-Answer" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;
— tag – tag attached to the questions;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/faq/views/faq.view.show_block_template.php; default - file modules/faq/views/faq.view.show_block.php).
Формат даты задается в настройках модуля.
Example:
<insert name="show_block" module="faq">
выведет 3 последниx активных вопроса сайта с ответами
<insert name="show_block" module="faq" count="5">
выведет в ячейке таблицы 5 последних активных вопросов сайта с ответами
<insert name="show_block" module="faq" often="1">
выведет часто задаваемые вопросы
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
show_block_rel – shows similar questions on the page of the question. By default the connection between questions are one-sided, this can be changed by checking the option "Link back to parent in the block of similar questions" in module settings.
Атрибуты:
— count – number of displayed questions (by default 3);
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/faq/views/faq.view.show_block_rel_template.php; default - file modules/faq/views/faq.view.show_block_rel.php).
Формат даты задается в настройках модуля.
Example:
<insert name="show_block_rel" module="faq">
выведет 3 вопроса, прикрепленные к текущему вопросу
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
show_form – выводит форму добавления вопроса. Для правильной работы тега должна существовать страница, к которой прикреплен модуль Вопрос-Ответ.
Атрибуты:
— site_id – page, which is attached to the module, one page is selected by default;
— cat_id – категория вопросов (id категории, по умолчанию выбирается одна категория), если в настройках модуля отмечено «Использовать категории»;
— only_module – show the block only on the page to which "Question-Answer" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/faq/views/faq.view.form_template.php; default - file modules/faq/views/faq.view.form.php).
Example:
<insert name="show_form" module="faq">
выведет форму добавления вопроса
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
{faq} – Вопросы и ответы
{faq_category} – Категории вопросов и ответов
{faq_category_parents} – Parents relations of категорий вопросов и ответов
{faq_category_rel} – Связи вопросов и ответов с категориями
{faq_counter} – Счетчик вопросов и ответов
{faq_rel} – Связи похожих вопросов и ответов
The module is located in the folder modules / faq and arranged classically.
modules/faq/admin/faq.admin.php – Editing questions;
modules/faq/admin/faq.admin.category.php – Editing questions categories;
modules/faq/admin/faq.admin.config.php – Module settings;
modules/faq/admin/faq.admin.count.php – Количество неотвеченных сообщений из формы вопрос-ответ для меню административной панели;
modules/faq/admin/faq.admin.counter.php – Viewings statistics;
modules/faq/admin/faq.admin.dashboard.php – Вопросы-ответы для событий;
modules/faq/admin/faq.admin.menu.php – Map of links for "Menu on the website" module;
modules/faq/faq.php – Controller;
modules/faq/faq.action.php – Обработка запроса при отправки сообщения из формы;
modules/faq/faq.install.php – Module installation;
modules/faq/faq.model.php – Model;
modules/faq/faq.search.php – Settings for search indexing for "Search" module;
modules/faq/faq.sitemap.php – Map of links for "Site map" module;
modules/faq/views/faq.view.first_page.php – Template of the first page of the module, if the settings module checked "Use category";
modules/faq/views/faq.view.form.php – Template of adding question form;
modules/faq/views/faq.view.id.php – Template of question page;
modules/faq/views/faq.view.list.php – Template of questions and answers list;
modules/faq/views/faq.view.rows.php – Шаблон списка вопросов и ответов;
modules/faq/views/faq.view.rows_block.php – Шаблон блока вопросов и ответов;
modules/faq/views/faq.view.rows_block_rel.php – Шаблон блока похожих вопросов и ответов;
modules/faq/views/faq.view.show_block.php – Template of questions and answers block;
modules/faq/views/faq.view.show_block_rel.php – Template of similar questions and answers block.