Update the component to use github as update server

This commit is contained in:
Llewellyn van der Merwe 2018-05-05 15:33:37 +02:00
parent 805de67bba
commit e322eb4666
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
72 changed files with 230 additions and 101 deletions

52
README.md Normal file
View File

@ -0,0 +1,52 @@
# Hello World (1.0.0)
# Build Details
+ *Company*: [VDM](https://www.vdm.io)
+ *Author*: [Llewellyn](mailto:joomla@vdm.io)
+ *Name*: [Hello World](https://www.vdm.io)
+ *First Build*: 20th September, 2017
+ *Last Build*: 5th May, 2018
+ *Version*: 1.0.0
+ *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
**37 Hours** or **5 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> (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*: **13143**
+ *File count*: **137**
+ *Folder count*: **55**
**24 Hours** or **3 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @9hours** = codingtime / 4;
> **planning @5hours** = codingtime / 7;
> **mapping @4hours** = codingtime / 10;
> **office @6hours** = codingtime / 6;)
**61 Hours** or **8 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: **1.6 weeks** or **0.3 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
## Donations
If you want to support this project, please consider donating:
* PayPal: [paypal.me/asseblief](https://www.paypal.me/asseblief)
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218

52
admin/README.txt Normal file
View File

@ -0,0 +1,52 @@
# Hello World (1.0.0)
# Build Details
+ *Company*: [VDM](https://www.vdm.io)
+ *Author*: [Llewellyn](mailto:joomla@vdm.io)
+ *Name*: [Hello World](https://www.vdm.io)
+ *First Build*: 20th September, 2017
+ *Last Build*: 5th May, 2018
+ *Version*: 1.0.0
+ *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
**37 Hours** or **5 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> (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*: **13143**
+ *File count*: **137**
+ *Folder count*: **55**
**24 Hours** or **3 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @9hours** = codingtime / 4;
> **planning @5hours** = codingtime / 7;
> **mapping @4hours** = codingtime / 10;
> **office @6hours** = codingtime / 6;)
**61 Hours** or **8 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: **1.6 weeks** or **0.3 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
## Donations
If you want to support this project, please consider donating:
* PayPal: [paypal.me/asseblief](https://www.paypal.me/asseblief)
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greetings.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage admin.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greetings.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage hello_world.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage hello_world.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage hello_world.php
@ -509,8 +509,15 @@ abstract class Hello_worldHelper
return false;
}
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -523,11 +530,21 @@ abstract class Hello_worldHelper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))
{
return (string) implode($sperator,$names);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage batch_.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage publishing.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greetings.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage hello_world.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.php
@ -321,26 +321,13 @@ class Hello_worldTableGreeting extends JTable
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
* This view does not actually have an alias
*
* @return string
* @return bool
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
return false;
}
}

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_main.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage view.html.php

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_HELLO_WORLD</name>
<creationDate>25th April, 2018</creationDate>
<creationDate>5th May, 2018</creationDate>
<author>Llewellyn</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io</authorUrl>
@ -78,6 +78,7 @@
<filename>controller.php</filename>###WHMCS_ENCRYPT_FILE###
<filename>index.html</filename>
<filename>hello_world.php</filename>
<filename>README.txt</filename>
<folder>assets</folder>
<folder>controllers</folder>
<folder>helpers</folder>
@ -94,4 +95,7 @@
</languages>
</administration>
<updateservers>
<server type="extension" enabled="1" element="com_hello_world" name="Hello World">https://raw.githubusercontent.com/namibia/JCB-Hello-World/master/helloworld_updateserver.xml</server>
</updateservers>
</extension>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage script.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greet.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greetings.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage site.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage site.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage hello_world.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage category.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage hello_world.php
@ -27,8 +27,15 @@ defined('_JEXEC') or die('Restricted access');
abstract class Hello_worldHelper
{
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -41,11 +48,21 @@ abstract class Hello_worldHelper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))
{
return (string) implode($sperator,$names);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage route.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage publishing.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greet.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greeting.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage greetings.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage router.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 25th April, 2018
@build 5th May, 2018
@created 20th September, 2017
@package Hello World
@subpackage view.html.php