Updated with JCB v2.10.0

This commit is contained in:
Llewellyn van der Merwe 2019-08-14 04:00:02 +02:00
parent 5a2519f8cc
commit fe2a157145
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
129 changed files with 524 additions and 259 deletions

View File

@ -12,14 +12,14 @@ Just a basic Questions & Answers.
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Questions and Answers](https://www.vdm.io/)
+ *First Build*: 30th January, 2017
+ *Last Build*: 12th June, 2019
+ *Last Build*: 14th August, 2019
+ *Version*: 1.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
# Component Number
+ *Line count*: **29039**
+ *Line count*: **29308**
+ *File count*: **201**
+ *Folder count*: **62**

View File

@ -12,14 +12,14 @@ Just a basic Questions & Answers.
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Questions and Answers](https://www.vdm.io/)
+ *First Build*: 30th January, 2017
+ *Last Build*: 12th June, 2019
+ *Last Build*: 14th August, 2019
+ *Version*: 1.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
# Component Number
+ *Line count*: **29039**
+ *Line count*: **29308**
+ *File count*: **201**
+ *Folder count*: **62**

View File

@ -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 admin.css

View File

@ -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 dashboard.css

View File

@ -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.css

View File

@ -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_documents.css

View File

@ -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

View File

@ -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

View File

@ -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 admin.js

View File

@ -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

View File

@ -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
@ -50,7 +50,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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 batch_.php

View File

@ -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
@ -2631,38 +2631,42 @@ abstract class QuestionsanswersHelper
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'Questionsanswers', $config = array())
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $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

View File

@ -93,14 +93,14 @@ COM_QUESTIONSANSWERS_DATE="Date"
COM_QUESTIONSANSWERS_DOES_NOT_HAVE_A_VALID_FILE_TYPE="Does not have a valid file type."
COM_QUESTIONSANSWERS_DOWNLOAD="Download"
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_S="Edit %s"
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_EXPORT_FAILED="Export Failed"
COM_QUESTIONSANSWERS_HELP_DOCUMENT="Help Document"
COM_QUESTIONSANSWERS_HELP_DOCUMENTS="Help Documents"
@ -203,7 +203,7 @@ COM_QUESTIONSANSWERS_HELP_DOCUMENT_TITLE_MESSAGE="Error! Please add title here."
COM_QUESTIONSANSWERS_HELP_DOCUMENT_TYPE="Type"
COM_QUESTIONSANSWERS_HELP_DOCUMENT_TYPE_DESCRIPTION="Select the help type."
COM_QUESTIONSANSWERS_HELP_DOCUMENT_TYPE_LABEL="Type"
COM_QUESTIONSANSWERS_HELP_DOCUMENT_URL="Url"
COM_QUESTIONSANSWERS_HELP_DOCUMENT_URL="URL"
COM_QUESTIONSANSWERS_HELP_DOCUMENT_URL_DESCRIPTION="Enter url"
COM_QUESTIONSANSWERS_HELP_DOCUMENT_URL_HINT="http://www.example.com"
COM_QUESTIONSANSWERS_HELP_DOCUMENT_URL_LABEL="URL"
@ -213,7 +213,7 @@ COM_QUESTIONSANSWERS_HELP_DOCUMENT_VERSION_LABEL="Revision"
COM_QUESTIONSANSWERS_HELP_MANAGER="Help"
COM_QUESTIONSANSWERS_IMPORT_CONTINUE="Continue"
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_IMPORT_ERROR="Import error."
COM_QUESTIONSANSWERS_IMPORT_FAILED="Import Failed"
COM_QUESTIONSANSWERS_IMPORT_FILE_COLUMNS="File Columns"
@ -324,8 +324,7 @@ COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_SUBMENU_DESC="Allows the users in thi
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="
<div id='uikittwo-answer-documents-uploader' style='display:none'>
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_ANSWER_DOCUMENTS_UPLOADER_DESCRIPTION="<div id='uikittwo-answer-documents-uploader' style='display:none'>
<div id='uikittwo-upload-drop-answer-documents' class='uk-placeholder uk-text-center'>
<br /><br />
<i class='uk-icon-cloud-upload uk-icon-medium uk-text-muted uk-margin-small-right'></i>
@ -360,8 +359,7 @@ 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_ID="Id"
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_MAIN_IMAGE="Main Image"
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_MAIN_IMAGE_UPLOADER_DESCRIPTION="
<div id='uikittwo-main-image-uploader' style='display:none'>
COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_MAIN_IMAGE_UPLOADER_DESCRIPTION="<div id='uikittwo-main-image-uploader' style='display:none'>
<div id='uikittwo-upload-drop-main-image' class='uk-placeholder uk-text-center'>
<br /><br />
<i class='uk-icon-cloud-upload uk-icon-medium uk-text-muted uk-margin-small-right'></i>
@ -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."

View File

@ -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."
COM_QUESTIONSANSWERS_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."

View File

@ -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

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -44,3 +56,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -43,3 +55,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -43,3 +55,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -46,3 +58,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -44,3 +56,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -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

View File

@ -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();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
}
}
}

View File

@ -176,7 +176,6 @@
height="300 px"
buttons="false"
filter="safehtml"
required="true"
/>
<!-- Article Field. Type: Articles. (custom) -->
<field

View File

@ -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

View File

@ -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
@ -33,6 +33,38 @@ use Joomla\Registry\Registry;
*/
class QuestionsanswersModelHelp_document extends JModelAdmin
{
/**
* The tab layout fields array.
*
* @var array
*/
protected $tabLayoutFields = array(
'details' => 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

View File

@ -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

View File

@ -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

View File

@ -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
@ -33,6 +33,29 @@ use Joomla\Registry\Registry;
*/
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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_QUESTIONSANSWERS</name>
<creationDate>12th June, 2019</creationDate>
<creationDate>14th August, 2019</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>
@ -53,9 +53,7 @@
<filename>index.html</filename>
<filename>router.php</filename>
<filename>questionsanswers.php</filename>
<filename>questionsanswers.php</filename>
<filename>router.php</filename>
<filename>controller.php</filename>
<folder>assets</folder>
<folder>helpers</folder>
<folder>controllers</folder>
@ -81,11 +79,6 @@
<filename>controller.php</filename>
<filename>index.html</filename>
<filename>questionsanswers.php</filename>
<filename>access.xml</filename>
<filename>config.xml</filename>
<filename>controller.php</filename>
<filename>questionsanswers.php</filename>
<filename>README.txt</filename>
<filename>README.txt</filename>
<folder>assets</folder>
<folder>controllers</folder>

View File

@ -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
</a>';
}
// do any updates needed
if ($type == 'update')
if ($type === 'update')
{
// Get The Database object
@ -553,5 +565,6 @@ class com_questionsanswersInstallerScript
</a>
<h3>Upgrade to Version 1.0.2 Was Successful! Let us know if anything is not working as expected.</h3>';
}
return true;
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More