Updated with JCB v2.9.14

This commit is contained in:
Llewellyn van der Merwe 2019-04-04 13:57:56 +02:00
parent aa78275365
commit 1e24b97741
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
125 changed files with 343 additions and 384 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*: 27th December, 2018
+ *Last Build*: 4th April, 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*: **29049**
+ *Line count*: **29008**
+ *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*: 27th December, 2018
+ *Last Build*: 4th April, 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*: **29049**
+ *Line count*: **29008**
+ *File count*: **201**
+ *Folder count*: **62**

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage admin.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage dashboard.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_documents.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage admin.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.json.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage download.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_documents.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage headercheck.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
@ -459,6 +459,32 @@ abstract class QuestionsanswersHelper
return date('jS \o\f F Y',$date);
}
/**
* get date based in period past
*/
public static function fancyDynamicDate($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
// older then year
$lastyear = date("Y", strtotime("-1 year"));
$tragetyear = date("Y", $date);
if ($tragetyear <= $lastyear)
{
return date('m/d/y', $date);
}
// same day
$yesterday = strtotime("-1 day");
if ($date > $yesterday)
{
return date('g:i A', $date);
}
// just month day
return date('M j', $date);
}
/**
* Change to nice fancy day time and date
*/

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage batchselection.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_above.php
@ -28,14 +28,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'title',
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?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; ?>
</div>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php
@ -32,16 +32,14 @@ $fields = $displayData->get('fields') ?: array(
'content'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?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; ?>
</div>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_left.php
@ -38,20 +38,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?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; ?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_right.php
@ -36,20 +36,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?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; ?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php
@ -28,13 +28,18 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?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; ?>
</div>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php
@ -26,7 +26,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -38,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?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; ?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage publlshing.php
@ -26,7 +26,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -39,20 +38,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?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; ?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php
@ -35,16 +35,14 @@ $fields = $displayData->get('fields') ?: array(
'answer_documents_uploader'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?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; ?>
</div>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_rightside.php
@ -34,20 +34,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?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; ?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php
@ -28,14 +28,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'main_image',
'answer_documents'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?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; ?>
</div>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php
@ -26,7 +26,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -44,20 +43,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?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; ?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.php
@ -197,7 +197,7 @@ class QuestionsanswersModelAjax extends JModelList
{
QuestionsanswersHelper::resizeImage($this->fileName, $this->fileFormat, $this->target, $this->folderPath, $this->fullPath);
}
// Get the basic encription.
// Get the basic encryption.
$basickey = QuestionsanswersHelper::getCryptKey('basic');
$basic = null;
// set link options
@ -430,8 +430,8 @@ class QuestionsanswersModelAjax extends JModelList
protected function _getPackageFromUpload()
{
// Get the uploaded file information
$app = JFactory::getApplication();
$input = $app->input;
$app = JFactory::getApplication();
$input = $app->input;
// See JInputFiles::get.
$userfiles = $input->files->get('files', null, 'array');
@ -465,9 +465,9 @@ class QuestionsanswersModelAjax extends JModelList
}
// Build the appropriate paths
$config = JFactory::getConfig();
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
$tmp_src = $userfile['tmp_name'];
$config = JFactory::getConfig();
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
$tmp_src = $userfile['tmp_name'];
// Move uploaded file
jimport('joomla.filesystem.file');
@ -537,12 +537,12 @@ class QuestionsanswersModelAjax extends JModelList
}
}
$config = JFactory::getConfig();
$config = JFactory::getConfig();
// set Package Name
$check['packagename'] = $archivename;
$check['packagename'] = $archivename;
// set directory
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
return $check;
}
@ -559,8 +559,8 @@ class QuestionsanswersModelAjax extends JModelList
{
jimport('joomla.filesystem.file');
$config = JFactory::getConfig();
$package = $config->get('tmp_path'). '/' .$package;
$config = JFactory::getConfig();
$package = $config->get('tmp_path'). '/' .$package;
// Is the package file a valid file?
if (is_file($package))

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage adminviewfolderlist.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage articles.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage siteviewfolderlist.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.js

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_documents.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php
@ -78,7 +78,7 @@ class QuestionsanswersModelQuestion_and_answer extends JModelAdmin
else
{
$id = 0;
}
}
// set the id and view name to session
if ($vdm = QuestionsanswersHelper::get('question_and_answer__'.$id))
{
@ -153,7 +153,7 @@ class QuestionsanswersModelQuestion_and_answer extends JModelAdmin
else
{
$id = $item->id;
}
}
// set the id and view name to session
if ($vdm = QuestionsanswersHelper::get('question_and_answer__'.$id))
{

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php

View File

@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `#__questionsanswers_question_and_answer` (
`catid` INT(11) NOT NULL DEFAULT 0,
`main_image` TEXT NOT NULL,
`question` TEXT NOT NULL,
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -18,9 +18,9 @@ CREATE TABLE IF NOT EXISTS `#__questionsanswers_question_and_answer` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -45,7 +45,7 @@ CREATE TABLE IF NOT EXISTS `#__questionsanswers_help_document` (
`title` CHAR(64) NOT NULL DEFAULT '',
`type` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js
@ -27,19 +27,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('help_document, some values are not acceptable.','Some values are unacceptable'));

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_body.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_foot.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_head.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_toolbar.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js
@ -27,19 +27,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('question_and_answer, some values are not acceptable.','Some values are unacceptable'));

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_body.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_foot.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_head.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_toolbar.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_main.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage default_vdm.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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>27th December, 2018</creationDate>
<creationDate>4th April, 2019</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage script.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage category.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage downloads.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage site.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage site.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.json.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage download.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage category.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 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 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage headercheck.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
@ -459,6 +459,32 @@ abstract class QuestionsanswersHelper
return date('jS \o\f F Y',$date);
}
/**
* get date based in period past
*/
public static function fancyDynamicDate($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
// older then year
$lastyear = date("Y", strtotime("-1 year"));
$tragetyear = date("Y", $date);
if ($tragetyear <= $lastyear)
{
return date('m/d/y', $date);
}
// same day
$yesterday = strtotime("-1 day");
if ($date > $yesterday)
{
return date('g:i A', $date);
}
// just month day
return date('M j', $date);
}
/**
* Change to nice fancy day time and date
*/

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 27th December, 2018
@build 4th April, 2019
@created 30th January, 2017
@package Questions and Answers
@subpackage route.php

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