update - v1.0.1

This commit is contained in:
Llewellyn van der Merwe 2022-03-03 05:59:15 +02:00
parent d89afa702e
commit 6be463453e
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
81 changed files with 9326 additions and 9328 deletions

View File

@ -8,7 +8,7 @@
+ *Author*: [Llewellyn](mailto:joomla@vdm.io) + *Author*: [Llewellyn](mailto:joomla@vdm.io)
+ *Name*: [Hello World](https://www.vdm.io) + *Name*: [Hello World](https://www.vdm.io)
+ *First Build*: 20th September, 2017 + *First Build*: 20th September, 2017
+ *Last Build*: 4th January, 2021 + *Last Build*: 3rd March, 2022
+ *Version*: 1.0.1 + *Version*: 1.0.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,7 @@ 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**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **14632** + *Line count*: **14630**
+ *File count*: **139** + *File count*: **139**
+ *Folder count*: **55** + *Folder count*: **55**

View File

@ -8,7 +8,7 @@
+ *Author*: [Llewellyn](mailto:joomla@vdm.io) + *Author*: [Llewellyn](mailto:joomla@vdm.io)
+ *Name*: [Hello World](https://www.vdm.io) + *Name*: [Hello World](https://www.vdm.io)
+ *First Build*: 20th September, 2017 + *First Build*: 20th September, 2017
+ *Last Build*: 4th January, 2021 + *Last Build*: 3rd March, 2022
+ *Version*: 1.0.1 + *Version*: 1.0.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,7 @@ 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**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **14632** + *Line count*: **14630**
+ *File count*: **139** + *File count*: **139**
+ *Folder count*: **55** + *Folder count*: **55**

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage admin.css @subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage dashboard.css @subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.css @subpackage greeting.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.css @subpackage greetings.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage admin.js @subpackage admin.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage controller.php @subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.php @subpackage greetings.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -21,6 +21,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/** /**
* Hello_world Controller * Hello_world Controller
*/ */

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage import.php @subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -21,7 +21,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Access check. // Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_hello_world')) if (!JFactory::getUser()->authorise('core.manage', 'com_hello_world'))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -28,6 +28,8 @@ use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
/** /**
* Hello_world component helper. * Hello_world component helper.
@ -146,7 +148,7 @@ abstract class Hello_worldHelper
*/ */
public static function removeFolder($dir, $ignore = false) public static function removeFolder($dir, $ignore = false)
{ {
if (JFolder::exists($dir)) if (Folder::exists($dir))
{ {
$it = new RecursiveDirectoryIterator($dir); $it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
@ -176,7 +178,7 @@ abstract class Hello_worldHelper
{ {
continue; continue;
} }
JFolder::delete($file_dir); Folder::delete($file_dir);
} }
else else
{ {
@ -195,13 +197,13 @@ abstract class Hello_worldHelper
{ {
continue; continue;
} }
JFile::delete($file_dir); File::delete($file_dir);
} }
} }
// delete the root folder if not ignore found // delete the root folder if not ignore found
if (!self::checkArray($ignore)) if (!self::checkArray($ignore))
{ {
return JFolder::delete($dir); return Folder::delete($dir);
} }
return true; return true;
} }
@ -427,7 +429,7 @@ abstract class Hello_worldHelper
/** /**
* Prepares the xml document * Prepares the xml document
*/ */
public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'Joomla Component Builder', $description = null, $category = null,$keywords = null, $modified = null) public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'VDM', $description = null, $category = null,$keywords = null, $modified = null)
{ {
// set the user // set the user
$user = JFactory::getUser(); $user = JFactory::getUser();
@ -461,7 +463,7 @@ abstract class Hello_worldHelper
// Set document properties // Set document properties
$spreadsheet->getProperties() $spreadsheet->getProperties()
->setCreator($creator) ->setCreator($creator)
->setCompany('Joomla Component Builder') ->setCompany('VDM')
->setLastModifiedBy($modified) ->setLastModifiedBy($modified)
->setTitle($title) ->setTitle($title)
->setSubject($subjectTab); ->setSubject($subjectTab);
@ -1078,12 +1080,12 @@ abstract class Hello_worldHelper
$filePath = $path . '/' . $name . '.php'; $filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php'; $fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists // check if it exists
if (JFile::exists($filePath)) if (File::exists($filePath))
{ {
// get the file // get the file
require_once $filePath; require_once $filePath;
} }
elseif (JFile::exists($fullPathModel)) elseif (File::exists($fullPathModel))
{ {
// get the file // get the file
require_once $fullPathModel; require_once $fullPathModel;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage batch_.php @subpackage batch_.php

View File

@ -114,7 +114,6 @@ COM_HELLO_WORLD_GREETING_CREATED_DATE_LABEL="Created Date"
COM_HELLO_WORLD_GREETING_DETAILS="Details" COM_HELLO_WORLD_GREETING_DETAILS="Details"
COM_HELLO_WORLD_GREETING_EDIT="Editing the Greeting" COM_HELLO_WORLD_GREETING_EDIT="Editing the Greeting"
COM_HELLO_WORLD_GREETING_ERROR_UNIQUE_ALIAS="Another Greeting has the same alias." COM_HELLO_WORLD_GREETING_ERROR_UNIQUE_ALIAS="Another Greeting has the same alias."
COM_HELLO_WORLD_GREETING_GREETING="Greeting"
COM_HELLO_WORLD_GREETING_GREETING_DESCRIPTION="Enter a greeting" COM_HELLO_WORLD_GREETING_GREETING_DESCRIPTION="Enter a greeting"
COM_HELLO_WORLD_GREETING_GREETING_HINT="Greeting here!" COM_HELLO_WORLD_GREETING_GREETING_HINT="Greeting here!"
COM_HELLO_WORLD_GREETING_GREETING_LABEL="Greeting" COM_HELLO_WORLD_GREETING_GREETING_LABEL="Greeting"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage batchselection.php @subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage details_left.php @subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage metadata.php @subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage publishing.php @subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage trashhelper.php @subpackage trashhelper.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php
@ -104,12 +104,6 @@ class Hello_worldModelGreeting extends JModelAdmin
$registry->loadString($item->metadata); $registry->loadString($item->metadata);
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_hello_world.greeting');
}
} }
return $item; return $item;
@ -231,7 +225,7 @@ class Hello_worldModelGreeting extends JModelAdmin
*/ */
public function getScript() public function getScript()
{ {
return 'administrator/components/com_hello_world/models/forms/greeting.js'; return 'media/com_hello_world/js/greeting.js';
} }
/** /**

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.php @subpackage greetings.php
@ -110,7 +110,7 @@ class Hello_worldModelGreetings extends JModelList
*/ */
public function getItems() public function getItems()
{ {
// check in items // Check in items
$this->checkInNow(); $this->checkInNow();
// load parent items // load parent items
@ -361,17 +361,19 @@ class Hello_worldModelGreetings extends JModelList
// Get a db connection. // Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// reset query // Reset query.
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select('*'); $query->select('*');
$query->from($db->quoteName('#__hello_world_greeting')); $query->from($db->quoteName('#__hello_world_greeting'));
$db->setQuery($query); // Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
// Get Yesterdays date // Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql(); $date = JFactory::getDate()->modify($time)->toSql();
// reset query // Reset query.
$query = $db->getQuery(true); $query = $db->getQuery(true);
// Fields to update. // Fields to update.
@ -386,7 +388,7 @@ class Hello_worldModelGreetings extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\'' $db->quoteName('checked_out_time') . '<\''.$date.'\''
); );
// Check table // Check table.
$query->update($db->quoteName('#__hello_world_greeting'))->set($fields)->where($conditions); $query->update($db->quoteName('#__hello_world_greeting'))->set($fields)->where($conditions);
$db->setQuery($query); $db->setQuery($query);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -21,6 +21,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/** /**
* Hello_world Model * Hello_world Model
*/ */

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage import.php @subpackage import.php
@ -21,6 +21,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\IOFactory;
@ -231,7 +233,7 @@ class Hello_worldModelImport extends JModelLegacy
// Move uploaded file // Move uploaded file
jimport('joomla.filesystem.file'); jimport('joomla.filesystem.file');
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions); $p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded? // Was the package downloaded?
if (!$p_file) if (!$p_file)
@ -409,12 +411,12 @@ class Hello_worldModelImport extends JModelLegacy
// Is the package file a valid file? // Is the package file a valid file?
if (is_file($package)) if (is_file($package))
{ {
JFile::delete($package); File::delete($package);
} }
elseif (is_file(JPath::clean($package))) elseif (is_file(JPath::clean($package)))
{ {
// It might also be just a base filename // It might also be just a base filename
JFile::delete(JPath::clean($package)); File::delete(JPath::clean($package));
} }
} }

View File

@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `#__hello_world_greeting` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`greeting` VARCHAR(255) NOT NULL DEFAULT '', `greeting` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL, `params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0,

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage edit.php @subpackage edit.php
@ -22,8 +22,7 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip'); JHtml::_('behavior.formvalidator');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead $componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -158,10 +158,10 @@ class Hello_worldViewGreeting extends JViewLegacy
} }
JToolbarHelper::divider(); JToolbarHelper::divider();
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('greeting'); $this->help_url = Hello_worldHelper::getHelpUrl('greeting');
if (Hello_worldHelper::checkString($help_url)) if (Hello_worldHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $this->help_url);
} }
} }

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php
@ -21,7 +21,6 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect'); JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init'); JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_HELLO_WORLD_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_HELLO_WORLD_FILTER_SELECT_ACCESS') . ' -'));

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_batch_body.php @subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_batch_footer.php @subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_body.php @subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_foot.php @subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_head.php @subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_toolbar.php @subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -155,10 +155,10 @@ class Hello_worldViewGreetings extends JViewLegacy
} }
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('greetings'); $this->help_url = Hello_worldHelper::getHelpUrl('greetings');
if (Hello_worldHelper::checkString($help_url)) if (Hello_worldHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $this->help_url);
} }
// add the options comp button // add the options comp button

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php
@ -21,7 +21,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
?> ?>
<div id="j-main-container"> <div id="j-main-container">

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_main.php @subpackage default_main.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_vdm.php @subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -21,6 +21,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/** /**
* Hello_world View class * Hello_world View class
*/ */
@ -64,10 +66,10 @@ class Hello_worldViewHello_world extends JViewLegacy
JToolBarHelper::title(JText::_('COM_HELLO_WORLD_DASHBOARD'), 'grid-2'); JToolBarHelper::title(JText::_('COM_HELLO_WORLD_DASHBOARD'), 'grid-2');
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('hello_world'); $this->help_url = Hello_worldHelper::getHelpUrl('hello_world');
if (Hello_worldHelper::checkString($help_url)) if (Hello_worldHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $this->help_url);
} }
if ($canDo->get('core.admin') || $canDo->get('core.options')) if ($canDo->get('core.admin') || $canDo->get('core.options'))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -93,10 +93,10 @@ class Hello_worldViewImport extends JViewLegacy
} }
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('import'); $this->help_url = Hello_worldHelper::getHelpUrl('import');
if (Hello_worldHelper::checkString($help_url)) if (Hello_worldHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $this->help_url);
} }
} }
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="4" method="upgrade">
<name>COM_HELLO_WORLD</name> <name>COM_HELLO_WORLD</name>
<creationDate>4th January, 2021</creationDate> <creationDate>3rd March, 2022</creationDate>
<author>Llewellyn</author> <author>Llewellyn</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io</authorUrl> <authorUrl>https://www.vdm.io</authorUrl>

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.js @subpackage greeting.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage script.php @subpackage script.php
@ -21,7 +21,10 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHTML::_('behavior.modal'); use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Installer\Adapter\ComponentAdapter;
JHTML::_('bootstrap.renderModal');
/** /**
* Script File of Hello_world Component * Script File of Hello_world Component
@ -33,23 +36,23 @@ class com_hello_worldInstallerScript
* *
* @param JAdapterInstance $parent The object responsible for running this script * @param JAdapterInstance $parent The object responsible for running this script
*/ */
public function __construct(JAdapterInstance $parent) {} public function __construct(ComponentAdapter $parent) {}
/** /**
* Called on installation * Called on installation
* *
* @param JAdapterInstance $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
*/ */
public function install(JAdapterInstance $parent) {} public function install(ComponentAdapter $parent) {}
/** /**
* Called on uninstallation * Called on uninstallation
* *
* @param JAdapterInstance $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
*/ */
public function uninstall(JAdapterInstance $parent) public function uninstall(ComponentAdapter $parent)
{ {
// Get Application object // Get Application object
$app = JFactory::getApplication(); $app = JFactory::getApplication();
@ -385,21 +388,21 @@ class com_hello_worldInstallerScript
/** /**
* Called on update * Called on update
* *
* @param JAdapterInstance $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
*/ */
public function update(JAdapterInstance $parent){} public function update(ComponentAdapter $parent){}
/** /**
* Called before any type of action * Called before any type of action
* *
* @param string $type Which action is happening (install|uninstall|discover_install|update) * @param string $type Which action is happening (install|uninstall|discover_install|update)
* @param JAdapterInstance $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
*/ */
public function preflight($type, JAdapterInstance $parent) public function preflight($type, ComponentAdapter $parent)
{ {
// get application // get application
$app = JFactory::getApplication(); $app = JFactory::getApplication();
@ -424,12 +427,12 @@ class com_hello_worldInstallerScript
{ {
} }
// check if the PHPExcel stuff is still around // check if the PHPExcel stuff is still around
if (JFile::exists(JPATH_ADMINISTRATOR . '/components/com_hello_world/helpers/PHPExcel.php')) if (File::exists(JPATH_ADMINISTRATOR . '/components/com_hello_world/helpers/PHPExcel.php'))
{ {
// We need to remove this old PHPExcel folder // We need to remove this old PHPExcel folder
$this->removeFolder(JPATH_ADMINISTRATOR . '/components/com_hello_world/helpers/PHPExcel'); $this->removeFolder(JPATH_ADMINISTRATOR . '/components/com_hello_world/helpers/PHPExcel');
// We need to remove this old PHPExcel file // We need to remove this old PHPExcel file
JFile::delete(JPATH_ADMINISTRATOR . '/components/com_hello_world/helpers/PHPExcel.php'); File::delete(JPATH_ADMINISTRATOR . '/components/com_hello_world/helpers/PHPExcel.php');
} }
return true; return true;
} }
@ -438,11 +441,11 @@ class com_hello_worldInstallerScript
* Called after any type of action * Called after any type of action
* *
* @param string $type Which action is happening (install|uninstall|discover_install|update) * @param string $type Which action is happening (install|uninstall|discover_install|update)
* @param JAdapterInstance $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
*/ */
public function postflight($type, JAdapterInstance $parent) public function postflight($type, ComponentAdapter $parent)
{ {
// get application // get application
$app = JFactory::getApplication(); $app = JFactory::getApplication();
@ -482,7 +485,7 @@ class com_hello_worldInstallerScript
$db->setQuery($query); $db->setQuery($query);
$allDone = $db->execute(); $allDone = $db->execute();
// Install the global extenstion params. // Install the global extension params.
$query = $db->getQuery(true); $query = $db->getQuery(true);
// Field to update. // Field to update.
$fields = array( $fields = array(
@ -642,7 +645,7 @@ class com_hello_worldInstallerScript
*/ */
protected function removeFolder($dir, $ignore = false) protected function removeFolder($dir, $ignore = false)
{ {
if (JFolder::exists($dir)) if (Folder::exists($dir))
{ {
$it = new RecursiveDirectoryIterator($dir); $it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
@ -672,7 +675,7 @@ class com_hello_worldInstallerScript
{ {
continue; continue;
} }
JFolder::delete($file_dir); Folder::delete($file_dir);
} }
else else
{ {
@ -691,13 +694,13 @@ class com_hello_worldInstallerScript
{ {
continue; continue;
} }
JFile::delete($file_dir); File::delete($file_dir);
} }
} }
// delete the root folder if not ignore found // delete the root folder if not ignore found
if (!$this->checkArray($ignore)) if (!$this->checkArray($ignore))
{ {
return JFolder::delete($dir); return Folder::delete($dir);
} }
return true; return true;
} }
@ -743,7 +746,7 @@ class com_hello_worldInstallerScript
$installer = $parent->getParent(); $installer = $parent->getParent();
$installPath = $installer->getPath('source'); $installPath = $installer->getPath('source');
// get all the folders // get all the folders
$folders = JFolder::folders($installPath); $folders = Folder::folders($installPath);
// check if we have folders we may want to copy // check if we have folders we may want to copy
$doNotCopy = array('media','admin','site'); // Joomla already deals with these $doNotCopy = array('media','admin','site'); // Joomla already deals with these
if (count((array) $folders) > 1) if (count((array) $folders) > 1)
@ -758,7 +761,7 @@ class com_hello_worldInstallerScript
// set the destination path // set the destination path
$dest = JPATH_ROOT.'/'.$folder; $dest = JPATH_ROOT.'/'.$folder;
// now try to copy the folder // now try to copy the folder
if (!JFolder::copy($src, $dest, '', true)) if (!Folder::copy($src, $dest, '', true))
{ {
$app->enqueueMessage('Could not copy '.$folder.' folder into place, please make sure destination is writable!', 'error'); $app->enqueueMessage('Could not copy '.$folder.' folder into place, please make sure destination is writable!', 'error');
} }

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greet.css @subpackage greet.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.css @subpackage greeting.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.css @subpackage greetings.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage site.css @subpackage site.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage site.js @subpackage site.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage controller.php @subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -21,7 +21,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Set the component css/js // Set the component css/js
$document = JFactory::getDocument(); $document = JFactory::getDocument();

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage category.php @subpackage category.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -25,6 +25,8 @@ use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry; use Joomla\Registry\Registry;
use Joomla\String\StringHelper; use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
/** /**
* Hello_world component helper * Hello_world component helper
@ -143,7 +145,7 @@ abstract class Hello_worldHelper
*/ */
public static function removeFolder($dir, $ignore = false) public static function removeFolder($dir, $ignore = false)
{ {
if (JFolder::exists($dir)) if (Folder::exists($dir))
{ {
$it = new RecursiveDirectoryIterator($dir); $it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
@ -173,7 +175,7 @@ abstract class Hello_worldHelper
{ {
continue; continue;
} }
JFolder::delete($file_dir); Folder::delete($file_dir);
} }
else else
{ {
@ -192,13 +194,13 @@ abstract class Hello_worldHelper
{ {
continue; continue;
} }
JFile::delete($file_dir); File::delete($file_dir);
} }
} }
// delete the root folder if not ignore found // delete the root folder if not ignore found
if (!self::checkArray($ignore)) if (!self::checkArray($ignore))
{ {
return JFolder::delete($dir); return Folder::delete($dir);
} }
return true; return true;
} }
@ -377,12 +379,12 @@ abstract class Hello_worldHelper
$filePath = $path . '/' . $name . '.php'; $filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php'; $fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists // check if it exists
if (JFile::exists($filePath)) if (File::exists($filePath))
{ {
// get the file // get the file
require_once $filePath; require_once $filePath;
} }
elseif (JFile::exists($fullPathModel)) elseif (File::exists($fullPathModel))
{ {
// get the file // get the file
require_once $fullPathModel; require_once $fullPathModel;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage route.php @subpackage route.php

View File

@ -37,7 +37,6 @@ COM_HELLO_WORLD_GREETING_CREATED_DATE_LABEL="Created Date"
COM_HELLO_WORLD_GREETING_DETAILS="Details" COM_HELLO_WORLD_GREETING_DETAILS="Details"
COM_HELLO_WORLD_GREETING_EDIT="Editing the Greeting" COM_HELLO_WORLD_GREETING_EDIT="Editing the Greeting"
COM_HELLO_WORLD_GREETING_ERROR_UNIQUE_ALIAS="Another Greeting has the same alias." COM_HELLO_WORLD_GREETING_ERROR_UNIQUE_ALIAS="Another Greeting has the same alias."
COM_HELLO_WORLD_GREETING_GREETING="Greeting"
COM_HELLO_WORLD_GREETING_GREETING_DESCRIPTION="Enter a greeting" COM_HELLO_WORLD_GREETING_GREETING_DESCRIPTION="Enter a greeting"
COM_HELLO_WORLD_GREETING_GREETING_HINT="Greeting here!" COM_HELLO_WORLD_GREETING_GREETING_HINT="Greeting here!"
COM_HELLO_WORLD_GREETING_GREETING_LABEL="Greeting" COM_HELLO_WORLD_GREETING_GREETING_LABEL="Greeting"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage details_left.php @subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage metadata.php @subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage publishing.php @subpackage publishing.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.js @subpackage greeting.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greet.php @subpackage greet.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php
@ -104,12 +104,6 @@ class Hello_worldModelGreeting extends JModelAdmin
$registry->loadString($item->metadata); $registry->loadString($item->metadata);
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_hello_world.greeting');
}
} }
return $item; return $item;
@ -231,7 +225,7 @@ class Hello_worldModelGreeting extends JModelAdmin
*/ */
public function getScript() public function getScript()
{ {
return 'administrator/components/com_hello_world/models/forms/greeting.js'; return 'media/com_hello_world/js/greeting.js';
} }
/** /**

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.php @subpackage greetings.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage router.php @subpackage router.php
@ -60,7 +60,7 @@ class Hello_worldRouter extends JComponentRouterBase
{ {
$view = $query['view']; $view = $query['view'];
if (empty($query['Itemid'])) if (empty($query['Itemid']) && !(isset($view) && isset($query['id']) && ($view === 'greeting' || $view === 'greet' || $view === 'greetings')))
{ {
$segments[] = $query['view']; $segments[] = $query['view'];
} }
@ -123,7 +123,7 @@ class Hello_worldRouter extends JComponentRouterBase
$count = count($segments); $count = count($segments);
$vars = array(); $vars = array();
//Handle View and Identifier // Handle View and Identifier
switch($segments[0]) switch($segments[0])
{ {
case 'greeting': case 'greeting':

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -138,10 +138,10 @@ class Hello_worldViewGreet extends JViewLegacy
{ {
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('greet'); $this->help_url = Hello_worldHelper::getHelpUrl('greet');
if (Hello_worldHelper::checkString($help_url)) if (Hello_worldHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = JToolbar::getInstance(); $this->toolbar = JToolbar::getInstance();

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage edit.php @subpackage edit.php
@ -22,12 +22,9 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip'); JHtml::_('behavior.formvalidator');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate');
JHtml::_('behavior.calendar');
?> ?>
<div class="hello_world-greeting"> <div class="hello_world-greeting">
<?php echo $this->toolbar->render(); ?> <?php echo $this->toolbar->render(); ?>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -157,10 +157,10 @@ class Hello_worldViewGreeting extends JViewLegacy
} }
JToolbarHelper::divider(); JToolbarHelper::divider();
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('greeting'); $this->help_url = Hello_worldHelper::getHelpUrl('greeting');
if (Hello_worldHelper::checkString($help_url)) if (Hello_worldHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = JToolbar::getInstance(); $this->toolbar = JToolbar::getInstance();

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.1 @version 1.0.1
@build 4th January, 2021 @build 3rd March, 2022
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -109,10 +109,10 @@ class Hello_worldViewGreetings extends JViewLegacy
{ {
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('greetings'); $this->help_url = Hello_worldHelper::getHelpUrl('greetings');
if (Hello_worldHelper::checkString($help_url)) if (Hello_worldHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_HELLO_WORLD_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = JToolbar::getInstance(); $this->toolbar = JToolbar::getInstance();