Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Llewellynvdm committed Mar 3, 2022
1 parent 02a60ab commit 2aa520e
Show file tree
Hide file tree
Showing 77 changed files with 340 additions and 282 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 16th August, 2021
+ *Last Build*: 2nd March, 2022
+ *Version*: 2.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

## Build Time :hourglass:

**204 Hours** or **26 Eight Hour Days** (actual time the author saved -
**206 Hours** or **26 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **73073**
+ *File count*: **460**
+ *Folder count*: **93**
+ *Line count*: **73932**
+ *File count*: **472**
+ *Folder count*: **99**

**134 Hours** or **16 Eight Hour Days** (the actual time the author spent)
**136 Hours** or **17 Eight Hour Days** (the actual time the author spent)

> (with the following break down:
> **debugging @51hours** = codingtime / 4;
> **debugging @52hours** = codingtime / 4;
> **planning @29hours** = codingtime / 7;
> **mapping @20hours** = codingtime / 10;
> **mapping @21hours** = codingtime / 10;
> **office @34hours** = codingtime / 6;)
**338 Hours** or **42 Eight Hour Days**
**342 Hours** or **43 Eight Hour Days**
(a total of the realistic time frame for this project)

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **8.4 weeks** or **1.8 months**
Project duration: **8.6 weeks** or **1.8 months**

> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:[email protected])
Expand Down
20 changes: 10 additions & 10 deletions admin/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 16th August, 2021
+ *Last Build*: 2nd March, 2022
+ *Version*: 2.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

## Build Time :hourglass:

**204 Hours** or **26 Eight Hour Days** (actual time the author saved -
**206 Hours** or **26 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)

+ *Line count*: **73073**
+ *File count*: **460**
+ *Folder count*: **93**
+ *Line count*: **73932**
+ *File count*: **472**
+ *Folder count*: **99**

**134 Hours** or **16 Eight Hour Days** (the actual time the author spent)
**136 Hours** or **17 Eight Hour Days** (the actual time the author spent)

> (with the following break down:
> **debugging @51hours** = codingtime / 4;
> **debugging @52hours** = codingtime / 4;
> **planning @29hours** = codingtime / 7;
> **mapping @20hours** = codingtime / 10;
> **mapping @21hours** = codingtime / 10;
> **office @34hours** = codingtime / 6;)

**338 Hours** or **42 Eight Hour Days**
**342 Hours** or **43 Eight Hour Days**
(a total of the realistic time frame for this project)

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)

Project duration: **8.4 weeks** or **1.8 months**
Project duration: **8.6 weeks** or **1.8 months**

> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:[email protected])
Expand Down
18 changes: 9 additions & 9 deletions admin/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
last="50000"
step="10"
/>
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
<!-- Spacer_hr_4 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_4" hr="true" class="spacer_hr_4" />
<field name="autorTitle"
type="spacer"
label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR"
Expand Down Expand Up @@ -393,7 +393,7 @@
<option value="2">
COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER</option>
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_HTML_FIVE_BASIC</option>
COM_SERMONDISTRIBUTOR_CONFIG_HTML_5_BASIC</option>
</field>
</fieldset>
<fieldset
Expand Down Expand Up @@ -917,8 +917,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Spacer_hr_1 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_1" hr="true" class="spacer_hr_1" />
<!-- Preacher_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
Expand Down Expand Up @@ -1352,8 +1352,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Spacer_hr_2 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_2" hr="true" class="spacer_hr_2" />
<!-- Category_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
Expand Down Expand Up @@ -1787,8 +1787,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Spacer_hr_3 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_3" hr="true" class="spacer_hr_3" />
<!-- Series_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
Expand Down
74 changes: 53 additions & 21 deletions admin/controllers/ajax.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ public function __construct($config)
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' );
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
JResponse::setHeader("Access-Control-Allow-Origin", "*");
// get the application
$app = JFactory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
Expand All @@ -50,20 +52,26 @@ public function __construct($config)

public function ajax()
{
// get the user for later use
$user = JFactory::getUser();
// get the input values
$jinput = JFactory::getApplication()->input;
// check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
// get the task
$task = $this->getTask();
switch($task)
{
case 'isNew':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
Expand All @@ -73,7 +81,7 @@ public function ajax()
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
Expand All @@ -88,10 +96,14 @@ public function ajax()
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
Expand All @@ -101,7 +113,6 @@ public function ajax()
case 'isRead':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
Expand All @@ -111,7 +122,7 @@ public function ajax()
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
Expand All @@ -126,10 +137,14 @@ public function ajax()
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
Expand All @@ -139,7 +154,6 @@ public function ajax()
case 'getBuildTable':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idNameValue = $jinput->get('idName', NULL, 'WORD');
$ojectValue = $jinput->get('oject', NULL, 'STRING');
if($idNameValue && $user->id != 0 && $ojectValue)
Expand All @@ -150,7 +164,7 @@ public function ajax()
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
Expand All @@ -165,10 +179,14 @@ public function ajax()
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
Expand All @@ -178,7 +196,6 @@ public function ajax()
case 'getSourceStatus':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
Expand All @@ -188,7 +205,7 @@ public function ajax()
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
Expand All @@ -203,10 +220,14 @@ public function ajax()
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
Expand All @@ -216,7 +237,6 @@ public function ajax()
case 'getCronPath':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$getTypeValue = $jinput->get('getType', NULL, 'WORD');
if($getTypeValue && $user->id != 0)
{
Expand All @@ -226,7 +246,7 @@ public function ajax()
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
Expand All @@ -241,10 +261,14 @@ public function ajax()
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
Expand All @@ -254,7 +278,6 @@ public function ajax()
case 'updateLocalListingExternal':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'INT');
Expand All @@ -267,7 +290,7 @@ public function ajax()
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
Expand All @@ -282,10 +305,14 @@ public function ajax()
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
Expand All @@ -296,10 +323,15 @@ public function ajax()
}
else
{
if($callback = $jinput->get('callback', null, 'CMD'))
// return to a callback function
if($callback)
{
echo $callback."(".json_encode(false).");";
}
elseif($returnRaw)
{
echo json_encode(false);
}
else
{
echo "(".json_encode(false).");";
Expand Down
Loading

0 comments on commit 2aa520e

Please sign in to comment.