diff --git a/README.md b/README.md new file mode 100644 index 0000000..e8a8f26 --- /dev/null +++ b/README.md @@ -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 \ No newline at end of file diff --git a/admin/README.txt b/admin/README.txt new file mode 100644 index 0000000..e8a8f26 --- /dev/null +++ b/admin/README.txt @@ -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 \ No newline at end of file diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index b8ed658..108b5b6 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -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 diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index ce642e6..e248722 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -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 diff --git a/admin/assets/css/greeting.css b/admin/assets/css/greeting.css index 8d4aab7..cb131c3 100644 --- a/admin/assets/css/greeting.css +++ b/admin/assets/css/greeting.css @@ -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 diff --git a/admin/assets/css/greetings.css b/admin/assets/css/greetings.css index 47a015e..c3ac6ce 100644 --- a/admin/assets/css/greetings.css +++ b/admin/assets/css/greetings.css @@ -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 diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index 0278f95..1af0ecc 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -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 diff --git a/admin/controller.php b/admin/controller.php index e488749..7dc05d7 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -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 diff --git a/admin/controllers/greeting.php b/admin/controllers/greeting.php index 0cc39b4..5342e90 100644 --- a/admin/controllers/greeting.php +++ b/admin/controllers/greeting.php @@ -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 diff --git a/admin/controllers/greetings.php b/admin/controllers/greetings.php index 3b45aa3..de2871a 100644 --- a/admin/controllers/greetings.php +++ b/admin/controllers/greetings.php @@ -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 diff --git a/admin/controllers/hello_world.php b/admin/controllers/hello_world.php index dc4d9a0..aa2cd6b 100644 --- a/admin/controllers/hello_world.php +++ b/admin/controllers/hello_world.php @@ -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 diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 1195cf3..892f45a 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -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 diff --git a/admin/hello_world.php b/admin/hello_world.php index 77c5a48..1d32597 100644 --- a/admin/hello_world.php +++ b/admin/hello_world.php @@ -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 diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index 3061d41..4e74a62 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -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 diff --git a/admin/helpers/hello_world.php b/admin/helpers/hello_world.php index 6aaa8bd..da16b59 100644 --- a/admin/helpers/hello_world.php +++ b/admin/helpers/hello_world.php @@ -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,9 +530,19 @@ abstract class Hello_worldHelper $names = array(); foreach ($result as $val) { - if ($name = self::getVar($table, $val, 'id', 'name')) + if ($external) { - $names[] = $name; + 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)) diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index e37818d..e3411e9 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -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 diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 24ac4d6..0032cdf 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -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 diff --git a/admin/layouts/greeting/details_left.php b/admin/layouts/greeting/details_left.php index 4320988..a929786 100644 --- a/admin/layouts/greeting/details_left.php +++ b/admin/layouts/greeting/details_left.php @@ -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 diff --git a/admin/layouts/greeting/metadata.php b/admin/layouts/greeting/metadata.php index 6f99dea..184660e 100644 --- a/admin/layouts/greeting/metadata.php +++ b/admin/layouts/greeting/metadata.php @@ -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 diff --git a/admin/layouts/greeting/publishing.php b/admin/layouts/greeting/publishing.php index 13b6726..b7e3b79 100644 --- a/admin/layouts/greeting/publishing.php +++ b/admin/layouts/greeting/publishing.php @@ -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 diff --git a/admin/models/forms/greeting.js b/admin/models/forms/greeting.js index 0a3b25a..e416ee8 100644 --- a/admin/models/forms/greeting.js +++ b/admin/models/forms/greeting.js @@ -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 diff --git a/admin/models/greeting.php b/admin/models/greeting.php index 995939a..063c540 100644 --- a/admin/models/greeting.php +++ b/admin/models/greeting.php @@ -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 diff --git a/admin/models/greetings.php b/admin/models/greetings.php index 1caa28a..422781f 100644 --- a/admin/models/greetings.php +++ b/admin/models/greetings.php @@ -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 diff --git a/admin/models/hello_world.php b/admin/models/hello_world.php index f48b16d..25b100e 100644 --- a/admin/models/hello_world.php +++ b/admin/models/hello_world.php @@ -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 diff --git a/admin/models/import.php b/admin/models/import.php index 72e89ec..3ac7f07 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -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 diff --git a/admin/tables/greeting.php b/admin/tables/greeting.php index 1180b7a..6c10f1d 100644 --- a/admin/tables/greeting.php +++ b/admin/tables/greeting.php @@ -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 @@ -318,29 +318,16 @@ class Hello_worldTableGreeting extends JTable $asset->loadByName('com_hello_world'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - 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; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; } } diff --git a/admin/views/greeting/submitbutton.js b/admin/views/greeting/submitbutton.js index 5e87d13..0d612f5 100644 --- a/admin/views/greeting/submitbutton.js +++ b/admin/views/greeting/submitbutton.js @@ -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 diff --git a/admin/views/greeting/tmpl/edit.php b/admin/views/greeting/tmpl/edit.php index 2854532..963cdb3 100644 --- a/admin/views/greeting/tmpl/edit.php +++ b/admin/views/greeting/tmpl/edit.php @@ -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 diff --git a/admin/views/greeting/view.html.php b/admin/views/greeting/view.html.php index c648801..f7c5d1b 100644 --- a/admin/views/greeting/view.html.php +++ b/admin/views/greeting/view.html.php @@ -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 diff --git a/admin/views/greetings/tmpl/default.php b/admin/views/greetings/tmpl/default.php index d470b26..d63a713 100644 --- a/admin/views/greetings/tmpl/default.php +++ b/admin/views/greetings/tmpl/default.php @@ -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 diff --git a/admin/views/greetings/tmpl/default_batch_body.php b/admin/views/greetings/tmpl/default_batch_body.php index bb91c6d..562b3d5 100644 --- a/admin/views/greetings/tmpl/default_batch_body.php +++ b/admin/views/greetings/tmpl/default_batch_body.php @@ -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 diff --git a/admin/views/greetings/tmpl/default_batch_footer.php b/admin/views/greetings/tmpl/default_batch_footer.php index d09374a..c1c2260 100644 --- a/admin/views/greetings/tmpl/default_batch_footer.php +++ b/admin/views/greetings/tmpl/default_batch_footer.php @@ -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 diff --git a/admin/views/greetings/tmpl/default_body.php b/admin/views/greetings/tmpl/default_body.php index 319b114..1d070c0 100644 --- a/admin/views/greetings/tmpl/default_body.php +++ b/admin/views/greetings/tmpl/default_body.php @@ -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 diff --git a/admin/views/greetings/tmpl/default_foot.php b/admin/views/greetings/tmpl/default_foot.php index 5f80bfc..de77a3e 100644 --- a/admin/views/greetings/tmpl/default_foot.php +++ b/admin/views/greetings/tmpl/default_foot.php @@ -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 diff --git a/admin/views/greetings/tmpl/default_head.php b/admin/views/greetings/tmpl/default_head.php index 5f627a0..8289ac0 100644 --- a/admin/views/greetings/tmpl/default_head.php +++ b/admin/views/greetings/tmpl/default_head.php @@ -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 diff --git a/admin/views/greetings/tmpl/default_toolbar.php b/admin/views/greetings/tmpl/default_toolbar.php index 3ff5870..71815ed 100644 --- a/admin/views/greetings/tmpl/default_toolbar.php +++ b/admin/views/greetings/tmpl/default_toolbar.php @@ -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 diff --git a/admin/views/greetings/view.html.php b/admin/views/greetings/view.html.php index 8427029..b107343 100644 --- a/admin/views/greetings/view.html.php +++ b/admin/views/greetings/view.html.php @@ -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 diff --git a/admin/views/hello_world/tmpl/default.php b/admin/views/hello_world/tmpl/default.php index f003bc0..59d51de 100644 --- a/admin/views/hello_world/tmpl/default.php +++ b/admin/views/hello_world/tmpl/default.php @@ -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 diff --git a/admin/views/hello_world/tmpl/default_main.php b/admin/views/hello_world/tmpl/default_main.php index faae49d..dcec001 100644 --- a/admin/views/hello_world/tmpl/default_main.php +++ b/admin/views/hello_world/tmpl/default_main.php @@ -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 diff --git a/admin/views/hello_world/tmpl/default_vdm.php b/admin/views/hello_world/tmpl/default_vdm.php index 3648bf4..4731a04 100644 --- a/admin/views/hello_world/tmpl/default_vdm.php +++ b/admin/views/hello_world/tmpl/default_vdm.php @@ -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 diff --git a/admin/views/hello_world/view.html.php b/admin/views/hello_world/view.html.php index 13623bb..3f095e0 100644 --- a/admin/views/hello_world/view.html.php +++ b/admin/views/hello_world/view.html.php @@ -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 diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php index a1d8f90..554ecdc 100644 --- a/admin/views/import/tmpl/default.php +++ b/admin/views/import/tmpl/default.php @@ -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 diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index e4109f3..c470b1d 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/view.html.php @@ -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 diff --git a/hello_world.xml b/hello_world.xml index aac84db..6bef097 100644 --- a/hello_world.xml +++ b/hello_world.xml @@ -1,7 +1,7 @@ COM_HELLO_WORLD - 25th April, 2018 + 5th May, 2018 Llewellyn joomla@vdm.io https://www.vdm.io @@ -77,7 +77,8 @@ config.xml controller.php###WHMCS_ENCRYPT_FILE### index.html - hello_world.php + hello_world.php + README.txt assets controllers helpers @@ -93,5 +94,8 @@ language/en-GB/en-GB.com_hello_world.sys.ini - + + + https://raw.githubusercontent.com/namibia/JCB-Hello-World/master/helloworld_updateserver.xml + \ No newline at end of file diff --git a/script.php b/script.php index 8279d36..f1d3f1e 100644 --- a/script.php +++ b/script.php @@ -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 diff --git a/site/assets/css/greet.css b/site/assets/css/greet.css index 47e6e13..6e86828 100644 --- a/site/assets/css/greet.css +++ b/site/assets/css/greet.css @@ -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 diff --git a/site/assets/css/greeting.css b/site/assets/css/greeting.css index 8d4aab7..cb131c3 100644 --- a/site/assets/css/greeting.css +++ b/site/assets/css/greeting.css @@ -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 diff --git a/site/assets/css/greetings.css b/site/assets/css/greetings.css index 47a015e..c3ac6ce 100644 --- a/site/assets/css/greetings.css +++ b/site/assets/css/greetings.css @@ -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 diff --git a/site/assets/css/site.css b/site/assets/css/site.css index ade9aec..b75e31b 100644 --- a/site/assets/css/site.css +++ b/site/assets/css/site.css @@ -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 diff --git a/site/assets/js/site.js b/site/assets/js/site.js index dc9eed2..798e08d 100644 --- a/site/assets/js/site.js +++ b/site/assets/js/site.js @@ -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 diff --git a/site/controller.php b/site/controller.php index ca36e5d..add65c1 100644 --- a/site/controller.php +++ b/site/controller.php @@ -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 diff --git a/site/controllers/greeting.php b/site/controllers/greeting.php index 9f6d0d7..5aaa218 100644 --- a/site/controllers/greeting.php +++ b/site/controllers/greeting.php @@ -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 diff --git a/site/hello_world.php b/site/hello_world.php index 165057f..515713f 100644 --- a/site/hello_world.php +++ b/site/hello_world.php @@ -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 diff --git a/site/helpers/category.php b/site/helpers/category.php index 98d01c9..df386d9 100644 --- a/site/helpers/category.php +++ b/site/helpers/category.php @@ -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 diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php index 3061d41..4e74a62 100644 --- a/site/helpers/headercheck.php +++ b/site/helpers/headercheck.php @@ -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 diff --git a/site/helpers/hello_world.php b/site/helpers/hello_world.php index 79c28ab..85016ad 100644 --- a/site/helpers/hello_world.php +++ b/site/helpers/hello_world.php @@ -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,9 +48,19 @@ abstract class Hello_worldHelper $names = array(); foreach ($result as $val) { - if ($name = self::getVar($table, $val, 'id', 'name')) + if ($external) { - $names[] = $name; + 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)) diff --git a/site/helpers/route.php b/site/helpers/route.php index cf91d26..7c84ba8 100644 --- a/site/helpers/route.php +++ b/site/helpers/route.php @@ -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 diff --git a/site/layouts/greeting/details_left.php b/site/layouts/greeting/details_left.php index 4320988..a929786 100644 --- a/site/layouts/greeting/details_left.php +++ b/site/layouts/greeting/details_left.php @@ -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 diff --git a/site/layouts/greeting/metadata.php b/site/layouts/greeting/metadata.php index 6f99dea..184660e 100644 --- a/site/layouts/greeting/metadata.php +++ b/site/layouts/greeting/metadata.php @@ -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 diff --git a/site/layouts/greeting/publishing.php b/site/layouts/greeting/publishing.php index 13b6726..b7e3b79 100644 --- a/site/layouts/greeting/publishing.php +++ b/site/layouts/greeting/publishing.php @@ -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 diff --git a/site/models/forms/greeting.js b/site/models/forms/greeting.js index 0a3b25a..e416ee8 100644 --- a/site/models/forms/greeting.js +++ b/site/models/forms/greeting.js @@ -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 diff --git a/site/models/greet.php b/site/models/greet.php index 1cf2516..f627e4a 100644 --- a/site/models/greet.php +++ b/site/models/greet.php @@ -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 diff --git a/site/models/greeting.php b/site/models/greeting.php index 995939a..063c540 100644 --- a/site/models/greeting.php +++ b/site/models/greeting.php @@ -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 diff --git a/site/models/greetings.php b/site/models/greetings.php index c1518da..017f759 100644 --- a/site/models/greetings.php +++ b/site/models/greetings.php @@ -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 diff --git a/site/router.php b/site/router.php index 8073426..357675a 100644 --- a/site/router.php +++ b/site/router.php @@ -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 diff --git a/site/views/greet/tmpl/default.php b/site/views/greet/tmpl/default.php index 7439a2c..d4d9492 100644 --- a/site/views/greet/tmpl/default.php +++ b/site/views/greet/tmpl/default.php @@ -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 diff --git a/site/views/greet/view.html.php b/site/views/greet/view.html.php index 0e018fa..180b984 100644 --- a/site/views/greet/view.html.php +++ b/site/views/greet/view.html.php @@ -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 diff --git a/site/views/greeting/submitbutton.js b/site/views/greeting/submitbutton.js index 5e87d13..0d612f5 100644 --- a/site/views/greeting/submitbutton.js +++ b/site/views/greeting/submitbutton.js @@ -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 diff --git a/site/views/greeting/tmpl/edit.php b/site/views/greeting/tmpl/edit.php index 674dbb8..70a71ac 100644 --- a/site/views/greeting/tmpl/edit.php +++ b/site/views/greeting/tmpl/edit.php @@ -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 diff --git a/site/views/greeting/view.html.php b/site/views/greeting/view.html.php index 43a2c7a..b842916 100644 --- a/site/views/greeting/view.html.php +++ b/site/views/greeting/view.html.php @@ -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 diff --git a/site/views/greetings/tmpl/default.php b/site/views/greetings/tmpl/default.php index 2cba515..4dfe61a 100644 --- a/site/views/greetings/tmpl/default.php +++ b/site/views/greetings/tmpl/default.php @@ -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 diff --git a/site/views/greetings/view.html.php b/site/views/greetings/view.html.php index bb39ead..304db56 100644 --- a/site/views/greetings/view.html.php +++ b/site/views/greetings/view.html.php @@ -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