@@ -413,7 +411,7 @@ COM_QUESTIONSANSWERS_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
COM_QUESTIONSANSWERS_THE_README_IS_LOADING="The readme is loading"
COM_QUESTIONSANSWERS_TRASHED="Trashed"
COM_QUESTIONSANSWERS_USE_BATCH="Use Batch"
-COM_QUESTIONSANSWERS_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
+COM_QUESTIONSANSWERS_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
COM_QUESTIONSANSWERS_VERSION="Version"
COM_QUESTIONSANSWERS_WARNING_IMPORT_FILE_ERROR="Warning, import file error."
COM_QUESTIONSANSWERS_WARNING_IMPORT_UPLOAD_ERROR="Warning, import upload error."
diff --git a/admin/language/en-GB/en-GB.com_questionsanswers.sys.ini b/admin/language/en-GB/en-GB.com_questionsanswers.sys.ini
index 4b05e8d..f655083 100644
--- a/admin/language/en-GB/en-GB.com_questionsanswers.sys.ini
+++ b/admin/language/en-GB/en-GB.com_questionsanswers.sys.ini
@@ -1,13 +1,13 @@
COM_QUESTIONSANSWERS="Questions and Answers"
COM_QUESTIONSANSWERS_CONFIGURATION="Questions and Answers Configuration"
COM_QUESTIONSANSWERS_EDIT_CREATED_BY="Edit Created By"
-COM_QUESTIONSANSWERS_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by."
+COM_QUESTIONSANSWERS_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by."
COM_QUESTIONSANSWERS_EDIT_CREATED_DATE="Edit Created Date"
-COM_QUESTIONSANSWERS_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date."
+COM_QUESTIONSANSWERS_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date."
COM_QUESTIONSANSWERS_EDIT_VERSIONS="Edit Version"
-COM_QUESTIONSANSWERS_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions."
+COM_QUESTIONSANSWERS_EDIT_VERSIONS_DESC="Allows users in this group to edit versions."
COM_QUESTIONSANSWERS_EXPORT_DATA="Export Data"
-COM_QUESTIONSANSWERS_EXPORT_DATA_DESC=" Allows users in this group to export data."
+COM_QUESTIONSANSWERS_EXPORT_DATA_DESC="Allows users in this group to export data."
COM_QUESTIONSANSWERS_HELP_DOCUMENTS_ACCESS="Help Documents Access"
COM_QUESTIONSANSWERS_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents"
COM_QUESTIONSANSWERS_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
@@ -33,7 +33,7 @@ COM_QUESTIONSANSWERS_HELP_DOCUMENTS_IMPORT_DESC="Allows the users in this group
COM_QUESTIONSANSWERS_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu"
COM_QUESTIONSANSWERS_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to submenu of help document"
COM_QUESTIONSANSWERS_IMPORT_DATA="Import Data"
-COM_QUESTIONSANSWERS_IMPORT_DATA_DESC=" Allows users in this group to import data."
+COM_QUESTIONSANSWERS_IMPORT_DATA_DESC="Allows users in this group to import data."
COM_QUESTIONSANSWERS_MENU="Questions and Answers"
COM_QUESTIONSANSWERS_MENU_CATEGORY_DESC="Questions and answers category"
COM_QUESTIONSANSWERS_MENU_CATEGORY_OPTION="Q&A Category"
@@ -86,4 +86,4 @@ COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_IMPORT_DESC="Allows the users in this
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_SUBMENU="Questions And Answers Submenu"
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_SUBMENU_DESC="Allows the users in this group to submenu of question and answer"
COM_QUESTIONSANSWERS_USE_BATCH="Use Batch"
-COM_QUESTIONSANSWERS_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
\ No newline at end of file
+COM_QUESTIONSANSWERS_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
\ No newline at end of file
diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php
index 5cf56c5..e512288 100644
--- a/admin/layouts/batchselection.php
+++ b/admin/layouts/batchselection.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage batchselection.php
diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php
index 3d4b5ec..6be42ec 100644
--- a/admin/layouts/help_document/details_above.php
+++ b/admin/layouts/help_document/details_above.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_above.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'alias'
);
@@ -36,6 +47,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
+
diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php
index d7c9be2..5b06daf 100644
--- a/admin/layouts/help_document/details_fullwidth.php
+++ b/admin/layouts/help_document/details_fullwidth.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php
@@ -26,15 +26,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'content'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
@@ -43,3 +55,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php
index f409d98..e09b2f9 100644
--- a/admin/layouts/help_document/details_left.php
+++ b/admin/layouts/help_document/details_left.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_left.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'target',
'groups',
'location',
@@ -39,9 +50,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php
index ebd2a94..6d297b8 100644
--- a/admin/layouts/help_document/details_right.php
+++ b/admin/layouts/help_document/details_right.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_right.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'type',
'url',
'article'
@@ -37,9 +48,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php
index 7d54fca..5583047 100644
--- a/admin/layouts/help_document/details_under.php
+++ b/admin/layouts/help_document/details_under.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php
@@ -26,15 +26,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
+
diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php
index d78b0f4..7658902 100644
--- a/admin/layouts/help_document/publishing.php
+++ b/admin/layouts/help_document/publishing.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'created',
'created_by',
'modified',
@@ -38,9 +49,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php
index cb94447..84f7dae 100644
--- a/admin/layouts/help_document/publlshing.php
+++ b/admin/layouts/help_document/publlshing.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage publlshing.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'published',
'ordering',
'version',
@@ -39,9 +50,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/layouts/question_and_answer/details_fullwidth.php b/admin/layouts/question_and_answer/details_fullwidth.php
index 4624c78..3892eeb 100644
--- a/admin/layouts/question_and_answer/details_fullwidth.php
+++ b/admin/layouts/question_and_answer/details_fullwidth.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'question',
'main_image_uploader',
'answer',
@@ -38,6 +49,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
@@ -46,3 +58,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/layouts/question_and_answer/details_rightside.php b/admin/layouts/question_and_answer/details_rightside.php
index ba80c10..0e7b1de 100644
--- a/admin/layouts/question_and_answer/details_rightside.php
+++ b/admin/layouts/question_and_answer/details_rightside.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_rightside.php
@@ -26,18 +26,31 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'catid'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/layouts/question_and_answer/details_under.php b/admin/layouts/question_and_answer/details_under.php
index 6ad881e..a882a97 100644
--- a/admin/layouts/question_and_answer/details_under.php
+++ b/admin/layouts/question_and_answer/details_under.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'main_image',
'answer_documents'
);
@@ -36,6 +47,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
+
diff --git a/admin/layouts/question_and_answer/metadata.php b/admin/layouts/question_and_answer/metadata.php
index d5bc02d..81612f7 100644
--- a/admin/layouts/question_and_answer/metadata.php
+++ b/admin/layouts/question_and_answer/metadata.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage metadata.php
diff --git a/admin/layouts/question_and_answer/publishing.php b/admin/layouts/question_and_answer/publishing.php
index bd6aba2..5910a0b 100644
--- a/admin/layouts/question_and_answer/publishing.php
+++ b/admin/layouts/question_and_answer/publishing.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'created',
'created_by',
'modified',
@@ -44,9 +55,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/admin/models/ajax.php b/admin/models/ajax.php
index 16f2807..3882b4d 100644
--- a/admin/models/ajax.php
+++ b/admin/models/ajax.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.php
diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php
index af5537b..6f76b17 100644
--- a/admin/models/fields/adminviewfolderlist.php
+++ b/admin/models/fields/adminviewfolderlist.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage adminviewfolderlist.php
diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php
index 39c654d..517cc53 100644
--- a/admin/models/fields/articles.php
+++ b/admin/models/fields/articles.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage articles.php
diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php
index 6c18020..acc165e 100644
--- a/admin/models/fields/siteviewfolderlist.php
+++ b/admin/models/fields/siteviewfolderlist.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage siteviewfolderlist.php
diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js
index a841c93..2d7fb98 100644
--- a/admin/models/forms/help_document.js
+++ b/admin/models/forms/help_document.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.js
@@ -27,8 +27,7 @@ jform_vvvvvvvvvv_required = false;
jform_vvvvvvwvvw_required = false;
jform_vvvvvvxvvx_required = false;
jform_vvvvvvyvvy_required = false;
-jform_vvvvvvzvvz_required = false;
-jform_vvvvvwavwa_required = false;
+jform_vvvvvwavvz_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -248,28 +247,10 @@ function vvvvvvz(type_vvvvvvz)
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
- // add required attribute to content field
- if (jform_vvvvvvzvvz_required)
- {
- updateFieldRequired('content',0);
- jQuery('#jform_content').prop('required','required');
- jQuery('#jform_content').attr('aria-required',true);
- jQuery('#jform_content').addClass('required');
- jform_vvvvvvzvvz_required = false;
- }
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
- // remove required attribute from content field
- if (!jform_vvvvvvzvvz_required)
- {
- updateFieldRequired('content',1);
- jQuery('#jform_content').removeAttr('required');
- jQuery('#jform_content').removeAttr('aria-required');
- jQuery('#jform_content').removeClass('required');
- jform_vvvvvvzvvz_required = true;
- }
}
}
@@ -292,26 +273,26 @@ function vvvvvwa(target_vvvvvwa)
{
jQuery('#jform_groups').closest('.control-group').show();
// add required attribute to groups field
- if (jform_vvvvvwavwa_required)
+ if (jform_vvvvvwavvz_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
- jform_vvvvvwavwa_required = false;
+ jform_vvvvvwavvz_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
// remove required attribute from groups field
- if (!jform_vvvvvwavwa_required)
+ if (!jform_vvvvvwavvz_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
- jform_vvvvvwavwa_required = true;
+ jform_vvvvvwavvz_required = true;
}
}
}
diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml
index ed4f813..653aa50 100644
--- a/admin/models/forms/help_document.xml
+++ b/admin/models/forms/help_document.xml
@@ -176,7 +176,6 @@
height="300 px"
buttons="false"
filter="safehtml"
- required="true"
/>
array(
+ 'left' => array(
+ 'target',
+ 'groups',
+ 'location',
+ 'admin_view',
+ 'site_view'
+ ),
+ 'right' => array(
+ 'type',
+ 'url',
+ 'article'
+ ),
+ 'fullwidth' => array(
+ 'content'
+ ),
+ 'above' => array(
+ 'title',
+ 'alias'
+ ),
+ 'under' => array(
+ 'not_required'
+ )
+ )
+ );
+
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_QUESTIONSANSWERS';
-
+
/**
* The type alias for this content type.
*
diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php
index eeef691..baa7c9d 100644
--- a/admin/models/help_documents.php
+++ b/admin/models/help_documents.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_documents.php
diff --git a/admin/models/import.php b/admin/models/import.php
index 5afb26d..d40c9cd 100644
--- a/admin/models/import.php
+++ b/admin/models/import.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage import.php
diff --git a/admin/models/question_and_answer.php b/admin/models/question_and_answer.php
index 3bd5601..af942ba 100644
--- a/admin/models/question_and_answer.php
+++ b/admin/models/question_and_answer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php
@@ -32,13 +32,36 @@ use Joomla\Registry\Registry;
* Questionsanswers Question_and_answer Model
*/
class QuestionsanswersModelQuestion_and_answer extends JModelAdmin
-{
+{
+ /**
+ * The tab layout fields array.
+ *
+ * @var array
+ */
+ protected $tabLayoutFields = array(
+ 'details' => array(
+ 'fullwidth' => array(
+ 'question',
+ 'main_image_uploader',
+ 'answer',
+ 'answer_documents_uploader'
+ ),
+ 'under' => array(
+ 'main_image',
+ 'answer_documents'
+ ),
+ 'rightside' => array(
+ 'catid'
+ )
+ )
+ );
+
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_QUESTIONSANSWERS';
-
+
/**
* The type alias for this content type.
*
diff --git a/admin/models/questions_and_answers.php b/admin/models/questions_and_answers.php
index 0f986f6..9a95126 100644
--- a/admin/models/questions_and_answers.php
+++ b/admin/models/questions_and_answers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.php
diff --git a/admin/models/questionsanswers.php b/admin/models/questionsanswers.php
index bacf49a..703d740 100644
--- a/admin/models/questionsanswers.php
+++ b/admin/models/questionsanswers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
diff --git a/admin/questionsanswers.php b/admin/questionsanswers.php
index 79bc200..bf14500 100644
--- a/admin/questionsanswers.php
+++ b/admin/questionsanswers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php
index dbda3d9..559713e 100644
--- a/admin/tables/help_document.php
+++ b/admin/tables/help_document.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.php
diff --git a/admin/tables/question_and_answer.php b/admin/tables/question_and_answer.php
index 326bf74..d580ccb 100644
--- a/admin/tables/question_and_answer.php
+++ b/admin/tables/question_and_answer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php
diff --git a/admin/views/help_document/submitbutton.js b/admin/views/help_document/submitbutton.js
index e5d13d4..8e08183 100644
--- a/admin/views/help_document/submitbutton.js
+++ b/admin/views/help_document/submitbutton.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js
diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php
index 6723d9c..15f1c58 100644
--- a/admin/views/help_document/tmpl/edit.php
+++ b/admin/views/help_document/tmpl/edit.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php
diff --git a/admin/views/help_document/view.html.php b/admin/views/help_document/view.html.php
index c73cb16..6d3d5a3 100644
--- a/admin/views/help_document/view.html.php
+++ b/admin/views/help_document/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/admin/views/help_documents/tmpl/default.php b/admin/views/help_documents/tmpl/default.php
index 3da4df5..c7c2934 100644
--- a/admin/views/help_documents/tmpl/default.php
+++ b/admin/views/help_documents/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/admin/views/help_documents/tmpl/default_batch_body.php b/admin/views/help_documents/tmpl/default_batch_body.php
index f17270b..eec56df 100644
--- a/admin/views/help_documents/tmpl/default_batch_body.php
+++ b/admin/views/help_documents/tmpl/default_batch_body.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_body.php
diff --git a/admin/views/help_documents/tmpl/default_batch_footer.php b/admin/views/help_documents/tmpl/default_batch_footer.php
index f2c8628..a5b32c2 100644
--- a/admin/views/help_documents/tmpl/default_batch_footer.php
+++ b/admin/views/help_documents/tmpl/default_batch_footer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_footer.php
diff --git a/admin/views/help_documents/tmpl/default_body.php b/admin/views/help_documents/tmpl/default_body.php
index 04073a7..56467bf 100644
--- a/admin/views/help_documents/tmpl/default_body.php
+++ b/admin/views/help_documents/tmpl/default_body.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_body.php
diff --git a/admin/views/help_documents/tmpl/default_foot.php b/admin/views/help_documents/tmpl/default_foot.php
index dd41531..cf19fe4 100644
--- a/admin/views/help_documents/tmpl/default_foot.php
+++ b/admin/views/help_documents/tmpl/default_foot.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_foot.php
diff --git a/admin/views/help_documents/tmpl/default_head.php b/admin/views/help_documents/tmpl/default_head.php
index 592d219..4e96829 100644
--- a/admin/views/help_documents/tmpl/default_head.php
+++ b/admin/views/help_documents/tmpl/default_head.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_head.php
diff --git a/admin/views/help_documents/tmpl/default_toolbar.php b/admin/views/help_documents/tmpl/default_toolbar.php
index cff7f0e..0906d17 100644
--- a/admin/views/help_documents/tmpl/default_toolbar.php
+++ b/admin/views/help_documents/tmpl/default_toolbar.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_toolbar.php
diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php
index c4ac1b7..a109424 100644
--- a/admin/views/help_documents/view.html.php
+++ b/admin/views/help_documents/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php
index 296d8c0..60558d1 100644
--- a/admin/views/import/tmpl/default.php
+++ b/admin/views/import/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php
index 75e8af2..1216c25 100644
--- a/admin/views/import/view.html.php
+++ b/admin/views/import/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/admin/views/question_and_answer/submitbutton.js b/admin/views/question_and_answer/submitbutton.js
index d65e39a..1883963 100644
--- a/admin/views/question_and_answer/submitbutton.js
+++ b/admin/views/question_and_answer/submitbutton.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js
diff --git a/admin/views/question_and_answer/tmpl/edit.php b/admin/views/question_and_answer/tmpl/edit.php
index 7f8f627..7dc0a8a 100644
--- a/admin/views/question_and_answer/tmpl/edit.php
+++ b/admin/views/question_and_answer/tmpl/edit.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php
diff --git a/admin/views/question_and_answer/view.html.php b/admin/views/question_and_answer/view.html.php
index 23ee0fb..5184438 100644
--- a/admin/views/question_and_answer/view.html.php
+++ b/admin/views/question_and_answer/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/admin/views/questions_and_answers/tmpl/default.php b/admin/views/questions_and_answers/tmpl/default.php
index 6169fb8..648c0f5 100644
--- a/admin/views/questions_and_answers/tmpl/default.php
+++ b/admin/views/questions_and_answers/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/admin/views/questions_and_answers/tmpl/default_batch_body.php b/admin/views/questions_and_answers/tmpl/default_batch_body.php
index a99c3ca..782cfcc 100644
--- a/admin/views/questions_and_answers/tmpl/default_batch_body.php
+++ b/admin/views/questions_and_answers/tmpl/default_batch_body.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_body.php
diff --git a/admin/views/questions_and_answers/tmpl/default_batch_footer.php b/admin/views/questions_and_answers/tmpl/default_batch_footer.php
index b405b43..fe15c26 100644
--- a/admin/views/questions_and_answers/tmpl/default_batch_footer.php
+++ b/admin/views/questions_and_answers/tmpl/default_batch_footer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_footer.php
diff --git a/admin/views/questions_and_answers/tmpl/default_body.php b/admin/views/questions_and_answers/tmpl/default_body.php
index 790b37f..3a1769d 100644
--- a/admin/views/questions_and_answers/tmpl/default_body.php
+++ b/admin/views/questions_and_answers/tmpl/default_body.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_body.php
diff --git a/admin/views/questions_and_answers/tmpl/default_foot.php b/admin/views/questions_and_answers/tmpl/default_foot.php
index c43589f..87bf1a1 100644
--- a/admin/views/questions_and_answers/tmpl/default_foot.php
+++ b/admin/views/questions_and_answers/tmpl/default_foot.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_foot.php
diff --git a/admin/views/questions_and_answers/tmpl/default_head.php b/admin/views/questions_and_answers/tmpl/default_head.php
index e683cb7..14cf3cc 100644
--- a/admin/views/questions_and_answers/tmpl/default_head.php
+++ b/admin/views/questions_and_answers/tmpl/default_head.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_head.php
diff --git a/admin/views/questions_and_answers/tmpl/default_toolbar.php b/admin/views/questions_and_answers/tmpl/default_toolbar.php
index f783cd2..a0a514d 100644
--- a/admin/views/questions_and_answers/tmpl/default_toolbar.php
+++ b/admin/views/questions_and_answers/tmpl/default_toolbar.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_toolbar.php
diff --git a/admin/views/questions_and_answers/view.html.php b/admin/views/questions_and_answers/view.html.php
index af0b045..717d5d1 100644
--- a/admin/views/questions_and_answers/view.html.php
+++ b/admin/views/questions_and_answers/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/admin/views/questionsanswers/tmpl/default.php b/admin/views/questionsanswers/tmpl/default.php
index 5fd258f..a519eaa 100644
--- a/admin/views/questionsanswers/tmpl/default.php
+++ b/admin/views/questionsanswers/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/admin/views/questionsanswers/tmpl/default_main.php b/admin/views/questionsanswers/tmpl/default_main.php
index f38ccbe..15d2609 100644
--- a/admin/views/questionsanswers/tmpl/default_main.php
+++ b/admin/views/questionsanswers/tmpl/default_main.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_main.php
diff --git a/admin/views/questionsanswers/tmpl/default_readme_information.php b/admin/views/questionsanswers/tmpl/default_readme_information.php
index e3f35bb..0c3c196 100644
--- a/admin/views/questionsanswers/tmpl/default_readme_information.php
+++ b/admin/views/questionsanswers/tmpl/default_readme_information.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_readme_information.php
diff --git a/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php b/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php
index 1375b4f..1874ebe 100644
--- a/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php
+++ b/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_vast_development_method_notice_board.php
diff --git a/admin/views/questionsanswers/tmpl/default_vdm.php b/admin/views/questionsanswers/tmpl/default_vdm.php
index acab1ea..b289fba 100644
--- a/admin/views/questionsanswers/tmpl/default_vdm.php
+++ b/admin/views/questionsanswers/tmpl/default_vdm.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_vdm.php
diff --git a/admin/views/questionsanswers/view.html.php b/admin/views/questionsanswers/view.html.php
index 8812264..a5524fe 100644
--- a/admin/views/questionsanswers/view.html.php
+++ b/admin/views/questionsanswers/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/media/css/A4.print.css b/media/css/A4.print.css
index db4bb60..7eb3d7a 100644
--- a/media/css/A4.print.css
+++ b/media/css/A4.print.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage A4.print.css
diff --git a/questionsanswers.xml b/questionsanswers.xml
index 9f12a58..0e35a65 100644
--- a/questionsanswers.xml
+++ b/questionsanswers.xml
@@ -1,7 +1,7 @@
COM_QUESTIONSANSWERS
- 12th June, 2019
+ 14th August, 2019
Llewellyn van der Merwe
joomla@vdm.io
https://www.vdm.io/
@@ -53,9 +53,7 @@
index.html
router.php
questionsanswers.php
- questionsanswers.php
- router.php
- controller.php
+ router.php
assets
helpers
controllers
@@ -81,11 +79,6 @@
controller.php
index.html
questionsanswers.php
- access.xml
- config.xml
- controller.php
- questionsanswers.php
- README.txt
README.txt
assets
controllers
diff --git a/script.php b/script.php
index 82b9ac2..808317d 100644
--- a/script.php
+++ b/script.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage script.php
@@ -34,21 +34,27 @@ JHTML::_('behavior.modal');
class com_questionsanswersInstallerScript
{
/**
- * method to install the component
+ * Constructor
*
- * @return void
+ * @param JAdapterInstance $parent The object responsible for running this script
*/
- function install($parent)
- {
-
- }
+ public function __construct(JAdapterInstance $parent) {}
/**
- * method to uninstall the component
+ * Called on installation
*
- * @return void
+ * @param JAdapterInstance $parent The object responsible for running this script
+ *
+ * @return boolean True on success
*/
- function uninstall($parent)
+ public function install(JAdapterInstance $parent) {}
+
+ /**
+ * Called on uninstallation
+ *
+ * @param JAdapterInstance $parent The object responsible for running this script
+ */
+ public function uninstall(JAdapterInstance $parent)
{
// Get Application object
$app = JFactory::getApplication();
@@ -342,57 +348,63 @@ class com_questionsanswersInstallerScript
}
/**
- * method to update the component
+ * Called on update
*
- * @return void
+ * @param JAdapterInstance $parent The object responsible for running this script
+ *
+ * @return boolean True on success
*/
- function update($parent)
- {
-
- }
+ public function update(JAdapterInstance $parent){}
/**
- * method to run before an install/update/uninstall method
+ * Called before any type of action
*
- * @return void
+ * @param string $type Which action is happening (install|uninstall|discover_install|update)
+ * @param JAdapterInstance $parent The object responsible for running this script
+ *
+ * @return boolean True on success
*/
- function preflight($type, $parent)
+ public function preflight($type, JAdapterInstance $parent)
{
// get application
$app = JFactory::getApplication();
- // is redundant ...hmmm
- if ($type == 'uninstall')
+ // is redundant or so it seems ...hmmm let me know if it works again
+ if ($type === 'uninstall')
{
return true;
}
// the default for both install and update
$jversion = new JVersion();
- if (!$jversion->isCompatible('3.6.0'))
+ if (!$jversion->isCompatible('3.8.0'))
{
- $app->enqueueMessage('Please upgrade to at least Joomla! 3.6.0 before continuing!', 'error');
+ $app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error');
return false;
}
// do any updates needed
- if ($type == 'update')
+ if ($type === 'update')
{
}
// do any install needed
- if ($type == 'install')
+ if ($type === 'install')
{
}
+ return true;
}
/**
- * method to run after an install/update/uninstall method
+ * Called after any type of action
*
- * @return void
+ * @param string $type Which action is happening (install|uninstall|discover_install|update)
+ * @param JAdapterInstance $parent The object responsible for running this script
+ *
+ * @return boolean True on success
*/
- function postflight($type, $parent)
+ public function postflight($type, JAdapterInstance $parent)
{
// get application
$app = JFactory::getApplication();
// set the default component settings
- if ($type == 'install')
+ if ($type === 'install')
{
// Get The Database object
@@ -454,7 +466,7 @@ class com_questionsanswersInstallerScript
';
}
// do any updates needed
- if ($type == 'update')
+ if ($type === 'update')
{
// Get The Database object
@@ -553,5 +565,6 @@ class com_questionsanswersInstallerScript
Upgrade to Version 1.0.2 Was Successful! Let us know if anything is not working as expected.
';
}
+ return true;
}
}
diff --git a/site/assets/css/category.css b/site/assets/css/category.css
index 8d26b87..df3427f 100644
--- a/site/assets/css/category.css
+++ b/site/assets/css/category.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage category.css
diff --git a/site/assets/css/downloads.css b/site/assets/css/downloads.css
index 7421c70..64a5d1d 100644
--- a/site/assets/css/downloads.css
+++ b/site/assets/css/downloads.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage downloads.css
diff --git a/site/assets/css/question_and_answer.css b/site/assets/css/question_and_answer.css
index 995b04e..572e22e 100644
--- a/site/assets/css/question_and_answer.css
+++ b/site/assets/css/question_and_answer.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.css
diff --git a/site/assets/css/questions_and_answers.css b/site/assets/css/questions_and_answers.css
index 6383bcc..dae4371 100644
--- a/site/assets/css/questions_and_answers.css
+++ b/site/assets/css/questions_and_answers.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.css
diff --git a/site/assets/css/site.css b/site/assets/css/site.css
index 57235c7..52cc8bf 100644
--- a/site/assets/css/site.css
+++ b/site/assets/css/site.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage site.css
diff --git a/site/assets/js/site.js b/site/assets/js/site.js
index aa80057..1b888fc 100644
--- a/site/assets/js/site.js
+++ b/site/assets/js/site.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage site.js
diff --git a/site/controller.php b/site/controller.php
index 2937fe7..841daf3 100644
--- a/site/controller.php
+++ b/site/controller.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage controller.php
diff --git a/site/controllers/ajax.json.php b/site/controllers/ajax.json.php
index f6d0464..cfd0026 100644
--- a/site/controllers/ajax.json.php
+++ b/site/controllers/ajax.json.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.json.php
@@ -54,7 +54,7 @@ class QuestionsanswersControllerAjax extends JControllerLegacy
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
- if($token == $call_token)
+ if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
$task = $this->getTask();
switch($task)
diff --git a/site/controllers/download.php b/site/controllers/download.php
index 39cce51..aab7916 100644
--- a/site/controllers/download.php
+++ b/site/controllers/download.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage download.php
diff --git a/site/controllers/help.php b/site/controllers/help.php
index df382d5..811a23d 100644
--- a/site/controllers/help.php
+++ b/site/controllers/help.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help.php
diff --git a/site/controllers/question_and_answer.php b/site/controllers/question_and_answer.php
index a34b9a6..8af4222 100644
--- a/site/controllers/question_and_answer.php
+++ b/site/controllers/question_and_answer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php
diff --git a/site/helpers/category.php b/site/helpers/category.php
index bb6781c..1f1fdc0 100644
--- a/site/helpers/category.php
+++ b/site/helpers/category.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage category.php
diff --git a/site/helpers/categoryquestions_and_answers.php b/site/helpers/categoryquestions_and_answers.php
index e5cf6bf..99a865d 100644
--- a/site/helpers/categoryquestions_and_answers.php
+++ b/site/helpers/categoryquestions_and_answers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage categoryquestions_and_answers.php
diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php
index 28883c4..62e74e1 100644
--- a/site/helpers/headercheck.php
+++ b/site/helpers/headercheck.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage headercheck.php
diff --git a/site/helpers/questionsanswers.php b/site/helpers/questionsanswers.php
index d606145..99d59ec 100644
--- a/site/helpers/questionsanswers.php
+++ b/site/helpers/questionsanswers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
@@ -1985,38 +1985,42 @@ abstract class QuestionsanswersHelper
/**
* Get any component's model
**/
- public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = 'Questionsanswers', $config = array())
+ public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = 'Questionsanswers', $config = array())
{
// fix the name
$name = self::safeString($name);
- // full path
- $fullPath = $path . '/models';
- // set prefix
- $prefix = $component.'Model';
+ // full path to models
+ $fullPathModels = $path . '/models';
// load the model file
- JModelLegacy::addIncludePath($fullPath, $prefix);
+ JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
+ // make sure the table path is loaded
+ if (!isset($config['table_path']) || !self::checkString($config['table_path']))
+ {
+ // This is the JCB default path to tables in Joomla 3.x
+ $config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
+ }
// get instance
- $model = JModelLegacy::getInstance($name, $prefix, $config);
+ $model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
- $filePath = $path.'/'.$name.'.php';
- $fullPath = $fullPath.'/'.$name.'.php';
+ $filePath = $path . '/' . $name . '.php';
+ $fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
{
// get the file
require_once $filePath;
}
- elseif (JFile::exists($fullPath))
+ elseif (JFile::exists($fullPathModel))
{
// get the file
- require_once $fullPath;
+ require_once $fullPathModel;
}
// build class names
- $modelClass = $prefix.$name;
+ $modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model
diff --git a/site/helpers/route.php b/site/helpers/route.php
index 40899e6..5239fb0 100644
--- a/site/helpers/route.php
+++ b/site/helpers/route.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage route.php
diff --git a/site/language/en-GB/en-GB.com_questionsanswers.ini b/site/language/en-GB/en-GB.com_questionsanswers.ini
index 8480f3f..aefdeb6 100644
--- a/site/language/en-GB/en-GB.com_questionsanswers.ini
+++ b/site/language/en-GB/en-GB.com_questionsanswers.ini
@@ -1,5 +1,5 @@
COM_CONTENT_FIELD_MODIFIED_DESC="The last date this item was modified."
-COM_QUESTIONSANSWERS="Questions And Answers"
+COM_QUESTIONSANSWERS="Questions and Answers"
COM_QUESTIONSANSWERS_ADD_ONE_OF_THESE_PLACEHOLDERS_IN_TEXT_FOR_CUSTOM_DOWNLOAD_PLACEMENT="Add one of these placeholders in text for custom download placement"
COM_QUESTIONSANSWERS_ALLOWED_DOCUMENT_FORMATS_ARE_NOT_SET_IN_THE_GLOBAL_SETTINGS_PLEASE_NOTIFY_YOUR_SYSTEM_ADMINISTRATOR="Allowed document formats are not set in the global settings, please notify your system administrator."
COM_QUESTIONSANSWERS_ALLOWED_IMAGE_FORMATS_ARE_NOT_SET_IN_THE_GLOBAL_SETTINGS_PLEASE_NOTIFY_YOUR_SYSTEM_ADMINISTRATOR="Allowed image formats are not set in the global settings, please notify your system administrator."
@@ -27,7 +27,7 @@ COM_QUESTIONSANSWERS_NO_QUESTIONS_FOUND="No questions found."
COM_QUESTIONSANSWERS_OR="or"
COM_QUESTIONSANSWERS_PROPORTIONALLY="proportionally"
COM_QUESTIONSANSWERS_QUESTIONS="Questions"
-COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS="Questions and Answers"
+COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS="Questions and answers"
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_BATCH_OPTIONS="Batch process the selected Questions and Answers"
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_BATCH_TIP="All changes will be applied to all selected Questions and Answers"
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_DESC="Questions and answers"
@@ -52,8 +52,7 @@ COM_QUESTIONSANSWERS_QUESTIONS_ANSWERS="Questions & Answers"
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER="Question and Answer"
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_ANSWER="Answer"
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_ANSWER_DOCUMENTS="Answer Documents"
-COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_ANSWER_DOCUMENTS_UPLOADER_DESCRIPTION="
-
+COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_ANSWER_DOCUMENTS_UPLOADER_DESCRIPTION="
@@ -87,8 +86,7 @@ COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_DETAILS="Details"
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_EDIT="Editing the Question and Answer"
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_ERROR_UNIQUE_ALIAS="Another Question and Answer has the same alias."
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_MAIN_IMAGE="Main Image"
-COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_MAIN_IMAGE_UPLOADER_DESCRIPTION="
-
+COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_MAIN_IMAGE_UPLOADER_DESCRIPTION="
diff --git a/site/language/en-GB/en-GB.com_questionsanswers.sys.ini b/site/language/en-GB/en-GB.com_questionsanswers.sys.ini
index 6c2fac5..f28f0a0 100644
--- a/site/language/en-GB/en-GB.com_questionsanswers.sys.ini
+++ b/site/language/en-GB/en-GB.com_questionsanswers.sys.ini
@@ -1,3 +1,3 @@
-COM_QUESTIONSANSWERS="Questions And Answers"
+COM_QUESTIONSANSWERS="Questions and Answers"
COM_QUESTIONSANSWERS_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_QUESTIONSANSWERS_NO_ACCESS_GRANTED="No Access Granted!"
\ No newline at end of file
diff --git a/site/layouts/question_and_answer/details_fullwidth.php b/site/layouts/question_and_answer/details_fullwidth.php
index 4624c78..3892eeb 100644
--- a/site/layouts/question_and_answer/details_fullwidth.php
+++ b/site/layouts/question_and_answer/details_fullwidth.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'question',
'main_image_uploader',
'answer',
@@ -38,6 +49,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
@@ -46,3 +58,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/site/layouts/question_and_answer/details_rightside.php b/site/layouts/question_and_answer/details_rightside.php
index ba80c10..0e7b1de 100644
--- a/site/layouts/question_and_answer/details_rightside.php
+++ b/site/layouts/question_and_answer/details_rightside.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_rightside.php
@@ -26,18 +26,31 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'catid'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/site/layouts/question_and_answer/details_under.php b/site/layouts/question_and_answer/details_under.php
index 6ad881e..a882a97 100644
--- a/site/layouts/question_and_answer/details_under.php
+++ b/site/layouts/question_and_answer/details_under.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'main_image',
'answer_documents'
);
@@ -36,6 +47,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
+
diff --git a/site/layouts/question_and_answer/metadata.php b/site/layouts/question_and_answer/metadata.php
index d5bc02d..81612f7 100644
--- a/site/layouts/question_and_answer/metadata.php
+++ b/site/layouts/question_and_answer/metadata.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage metadata.php
diff --git a/site/layouts/question_and_answer/publishing.php b/site/layouts/question_and_answer/publishing.php
index bd6aba2..5910a0b 100644
--- a/site/layouts/question_and_answer/publishing.php
+++ b/site/layouts/question_and_answer/publishing.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php
@@ -26,9 +26,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+// get the form
$form = $displayData->getForm();
-$fields = $displayData->get('fields') ?: array(
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
'created',
'created_by',
'modified',
@@ -44,9 +55,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
+
setFieldAttribute($field, 'type', 'hidden'); ?>
renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
diff --git a/site/models/ajax.php b/site/models/ajax.php
index 6794a85..78afd7f 100644
--- a/site/models/ajax.php
+++ b/site/models/ajax.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.php
diff --git a/site/models/category.php b/site/models/category.php
index 8fb161c..92789b5 100644
--- a/site/models/category.php
+++ b/site/models/category.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage category.php
diff --git a/site/models/downloads.php b/site/models/downloads.php
index 9f3d2dd..ba8648e 100644
--- a/site/models/downloads.php
+++ b/site/models/downloads.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage downloads.php
diff --git a/site/models/forms/question_and_answer.js b/site/models/forms/question_and_answer.js
index a1f0f4d..d55d6de 100644
--- a/site/models/forms/question_and_answer.js
+++ b/site/models/forms/question_and_answer.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.js
diff --git a/site/models/question_and_answer.php b/site/models/question_and_answer.php
index 3bd5601..af942ba 100644
--- a/site/models/question_and_answer.php
+++ b/site/models/question_and_answer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php
@@ -32,13 +32,36 @@ use Joomla\Registry\Registry;
* Questionsanswers Question_and_answer Model
*/
class QuestionsanswersModelQuestion_and_answer extends JModelAdmin
-{
+{
+ /**
+ * The tab layout fields array.
+ *
+ * @var array
+ */
+ protected $tabLayoutFields = array(
+ 'details' => array(
+ 'fullwidth' => array(
+ 'question',
+ 'main_image_uploader',
+ 'answer',
+ 'answer_documents_uploader'
+ ),
+ 'under' => array(
+ 'main_image',
+ 'answer_documents'
+ ),
+ 'rightside' => array(
+ 'catid'
+ )
+ )
+ );
+
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_QUESTIONSANSWERS';
-
+
/**
* The type alias for this content type.
*
diff --git a/site/models/questions_and_answers.php b/site/models/questions_and_answers.php
index 177c252..891c44f 100644
--- a/site/models/questions_and_answers.php
+++ b/site/models/questions_and_answers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.php
diff --git a/site/questionsanswers.php b/site/questionsanswers.php
index ffaf4d6..898d5b9 100644
--- a/site/questionsanswers.php
+++ b/site/questionsanswers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
diff --git a/site/router.php b/site/router.php
index 1ad5450..b3b9150 100644
--- a/site/router.php
+++ b/site/router.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage router.php
@@ -204,6 +204,8 @@ class QuestionsanswersRouter extends JComponentRouterBase
{
$getTable = '#__categories';
$query->from($db->quoteName($getTable));
+ // we need this to target the components categories (TODO will keep an eye on this)
+ $query->where($db->quoteName('extension') . ' LIKE '. $db->quote((string)'com_' . $main . '%'));
}
else
{
diff --git a/site/views/category/tmpl/default.php b/site/views/category/tmpl/default.php
index bcc904c..c979d24 100644
--- a/site/views/category/tmpl/default.php
+++ b/site/views/category/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/site/views/category/tmpl/default_qna-table.php b/site/views/category/tmpl/default_qna-table.php
index 72886a7..0547844 100644
--- a/site/views/category/tmpl/default_qna-table.php
+++ b/site/views/category/tmpl/default_qna-table.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_qna-table.php
diff --git a/site/views/category/view.html.php b/site/views/category/view.html.php
index 388d929..45052cb 100644
--- a/site/views/category/view.html.php
+++ b/site/views/category/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/site/views/downloads/tmpl/default.php b/site/views/downloads/tmpl/default.php
index 102d7d4..420191b 100644
--- a/site/views/downloads/tmpl/default.php
+++ b/site/views/downloads/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/site/views/downloads/tmpl/default_qna-downloads-table.php b/site/views/downloads/tmpl/default_qna-downloads-table.php
index 77c62ba..22a41f2 100644
--- a/site/views/downloads/tmpl/default_qna-downloads-table.php
+++ b/site/views/downloads/tmpl/default_qna-downloads-table.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_qna-downloads-table.php
diff --git a/site/views/downloads/view.html.php b/site/views/downloads/view.html.php
index 48b1d5e..fb26eac 100644
--- a/site/views/downloads/view.html.php
+++ b/site/views/downloads/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/site/views/question_and_answer/submitbutton.js b/site/views/question_and_answer/submitbutton.js
index d65e39a..1883963 100644
--- a/site/views/question_and_answer/submitbutton.js
+++ b/site/views/question_and_answer/submitbutton.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js
diff --git a/site/views/question_and_answer/tmpl/edit.php b/site/views/question_and_answer/tmpl/edit.php
index 6044055..5b068d3 100644
--- a/site/views/question_and_answer/tmpl/edit.php
+++ b/site/views/question_and_answer/tmpl/edit.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php
diff --git a/site/views/question_and_answer/view.html.php b/site/views/question_and_answer/view.html.php
index 6a3287e..4b73d6f 100644
--- a/site/views/question_and_answer/view.html.php
+++ b/site/views/question_and_answer/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/site/views/questions_and_answers/tmpl/default.php b/site/views/questions_and_answers/tmpl/default.php
index bcc904c..c979d24 100644
--- a/site/views/questions_and_answers/tmpl/default.php
+++ b/site/views/questions_and_answers/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/site/views/questions_and_answers/tmpl/default_qna-table.php b/site/views/questions_and_answers/tmpl/default_qna-table.php
index 58d5dc6..0af7537 100644
--- a/site/views/questions_and_answers/tmpl/default_qna-table.php
+++ b/site/views/questions_and_answers/tmpl/default_qna-table.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_qna-table.php
diff --git a/site/views/questions_and_answers/view.html.php b/site/views/questions_and_answers/view.html.php
index 385d6e3..835cd03 100644
--- a/site/views/questions_and_answers/view.html.php
+++ b/site/views/questions_and_answers/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 12th June, 2019
+ @build 14th August, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php