update - v1.0.1
This commit is contained in:
parent
d89afa702e
commit
6be463453e
|
@ -8,7 +8,7 @@
|
|||
+ *Author*: [Llewellyn](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Hello World](https://www.vdm.io)
|
||||
+ *First Build*: 20th September, 2017
|
||||
+ *Last Build*: 4th January, 2021
|
||||
+ *Last Build*: 3rd March, 2022
|
||||
+ *Version*: 1.0.1
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *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**,
|
||||
> never making one mistake or taking any coffee break.)
|
||||
|
||||
+ *Line count*: **14632**
|
||||
+ *Line count*: **14630**
|
||||
+ *File count*: **139**
|
||||
+ *Folder count*: **55**
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
+ *Author*: [Llewellyn](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Hello World](https://www.vdm.io)
|
||||
+ *First Build*: 20th September, 2017
|
||||
+ *Last Build*: 4th January, 2021
|
||||
+ *Last Build*: 3rd March, 2022
|
||||
+ *Version*: 1.0.1
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *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**,
|
||||
> never making one mistake or taking any coffee break.)
|
||||
|
||||
+ *Line count*: **14632**
|
||||
+ *Line count*: **14630**
|
||||
+ *File count*: **139**
|
||||
+ *Folder count*: **55**
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage admin.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage dashboard.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greetings.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage admin.js
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage controller.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greetings.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
|
@ -21,6 +21,8 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Hello_world Controller
|
||||
*/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage import.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
|
@ -21,7 +21,7 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
|
||||
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_hello_world'))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage headercheck.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
|
@ -28,6 +28,8 @@ use Joomla\Utilities\ArrayHelper;
|
|||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
|
||||
/**
|
||||
* Hello_world component helper.
|
||||
|
@ -146,7 +148,7 @@ abstract class Hello_worldHelper
|
|||
*/
|
||||
public static function removeFolder($dir, $ignore = false)
|
||||
{
|
||||
if (JFolder::exists($dir))
|
||||
if (Folder::exists($dir))
|
||||
{
|
||||
$it = new RecursiveDirectoryIterator($dir);
|
||||
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
|
@ -176,7 +178,7 @@ abstract class Hello_worldHelper
|
|||
{
|
||||
continue;
|
||||
}
|
||||
JFolder::delete($file_dir);
|
||||
Folder::delete($file_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -195,13 +197,13 @@ abstract class Hello_worldHelper
|
|||
{
|
||||
continue;
|
||||
}
|
||||
JFile::delete($file_dir);
|
||||
File::delete($file_dir);
|
||||
}
|
||||
}
|
||||
// delete the root folder if not ignore found
|
||||
if (!self::checkArray($ignore))
|
||||
{
|
||||
return JFolder::delete($dir);
|
||||
return Folder::delete($dir);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -427,7 +429,7 @@ abstract class Hello_worldHelper
|
|||
/**
|
||||
* 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
|
||||
$user = JFactory::getUser();
|
||||
|
@ -461,7 +463,7 @@ abstract class Hello_worldHelper
|
|||
// Set document properties
|
||||
$spreadsheet->getProperties()
|
||||
->setCreator($creator)
|
||||
->setCompany('Joomla Component Builder')
|
||||
->setCompany('VDM')
|
||||
->setLastModifiedBy($modified)
|
||||
->setTitle($title)
|
||||
->setSubject($subjectTab);
|
||||
|
@ -1078,12 +1080,12 @@ abstract class Hello_worldHelper
|
|||
$filePath = $path . '/' . $name . '.php';
|
||||
$fullPathModel = $fullPathModels . '/' . $name . '.php';
|
||||
// check if it exists
|
||||
if (JFile::exists($filePath))
|
||||
if (File::exists($filePath))
|
||||
{
|
||||
// get the file
|
||||
require_once $filePath;
|
||||
}
|
||||
elseif (JFile::exists($fullPathModel))
|
||||
elseif (File::exists($fullPathModel))
|
||||
{
|
||||
// get the file
|
||||
require_once $fullPathModel;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage batch_.php
|
||||
|
|
|
@ -114,7 +114,6 @@ COM_HELLO_WORLD_GREETING_CREATED_DATE_LABEL="Created Date"
|
|||
COM_HELLO_WORLD_GREETING_DETAILS="Details"
|
||||
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_GREETING="Greeting"
|
||||
COM_HELLO_WORLD_GREETING_GREETING_DESCRIPTION="Enter a greeting"
|
||||
COM_HELLO_WORLD_GREETING_GREETING_HINT="Greeting here!"
|
||||
COM_HELLO_WORLD_GREETING_GREETING_LABEL="Greeting"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage batchselection.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage details_left.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage metadata.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage publishing.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage trashhelper.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.php
|
||||
|
@ -104,12 +104,6 @@ class Hello_worldModelGreeting extends JModelAdmin
|
|||
$registry->loadString($item->metadata);
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
{
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getTagIds($item->id, 'com_hello_world.greeting');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
|
@ -231,7 +225,7 @@ class Hello_worldModelGreeting extends JModelAdmin
|
|||
*/
|
||||
public function getScript()
|
||||
{
|
||||
return 'administrator/components/com_hello_world/models/forms/greeting.js';
|
||||
return 'media/com_hello_world/js/greeting.js';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greetings.php
|
||||
|
@ -110,7 +110,7 @@ class Hello_worldModelGreetings extends JModelList
|
|||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// check in items
|
||||
// Check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
|
@ -361,17 +361,19 @@ class Hello_worldModelGreetings extends JModelList
|
|||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$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();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// Get Yesterdays date
|
||||
// Get Yesterdays date.
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Fields to update.
|
||||
|
@ -386,7 +388,7 @@ class Hello_worldModelGreetings extends JModelList
|
|||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// Check table
|
||||
// Check table.
|
||||
$query->update($db->quoteName('#__hello_world_greeting'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
|
@ -21,6 +21,8 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Hello_world Model
|
||||
*/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage import.php
|
||||
|
@ -21,6 +21,8 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
|
||||
|
@ -231,7 +233,7 @@ class Hello_worldModelImport extends JModelLegacy
|
|||
|
||||
// Move uploaded 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?
|
||||
if (!$p_file)
|
||||
|
@ -409,12 +411,12 @@ class Hello_worldModelImport extends JModelLegacy
|
|||
// Is the package file a valid file?
|
||||
if (is_file($package))
|
||||
{
|
||||
JFile::delete($package);
|
||||
File::delete($package);
|
||||
}
|
||||
elseif (is_file(JPath::clean($package)))
|
||||
{
|
||||
// It might also be just a base filename
|
||||
JFile::delete(JPath::clean($package));
|
||||
File::delete(JPath::clean($package));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `#__hello_world_greeting` (
|
|||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
||||
`greeting` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`params` text NOT NULL,
|
||||
`params` text NULL,
|
||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.php
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage submitbutton.js
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage edit.php
|
||||
|
@ -22,8 +22,7 @@
|
|||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.formvalidator');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage view.html.php
|
||||
|
@ -158,10 +158,10 @@ class Hello_worldViewGreeting extends JViewLegacy
|
|||
}
|
||||
JToolbarHelper::divider();
|
||||
// set help url for this view if found
|
||||
$help_url = Hello_worldHelper::getHelpUrl('greeting');
|
||||
if (Hello_worldHelper::checkString($help_url))
|
||||
$this->help_url = Hello_worldHelper::getHelpUrl('greeting');
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default.php
|
||||
|
@ -21,7 +21,6 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_HELLO_WORLD_FILTER_SELECT_ACCESS') . ' -'));
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_batch_body.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_batch_footer.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_body.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_foot.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_head.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_toolbar.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage view.html.php
|
||||
|
@ -155,10 +155,10 @@ class Hello_worldViewGreetings extends JViewLegacy
|
|||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = Hello_worldHelper::getHelpUrl('greetings');
|
||||
if (Hello_worldHelper::checkString($help_url))
|
||||
$this->help_url = Hello_worldHelper::getHelpUrl('greetings');
|
||||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default.php
|
||||
|
@ -21,7 +21,7 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('behavior.tooltip');
|
||||
|
||||
|
||||
?>
|
||||
<div id="j-main-container">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_main.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default_vdm.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage view.html.php
|
||||
|
@ -21,6 +21,8 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Hello_world View class
|
||||
*/
|
||||
|
@ -64,10 +66,10 @@ class Hello_worldViewHello_world extends JViewLegacy
|
|||
JToolBarHelper::title(JText::_('COM_HELLO_WORLD_DASHBOARD'), 'grid-2');
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = Hello_worldHelper::getHelpUrl('hello_world');
|
||||
if (Hello_worldHelper::checkString($help_url))
|
||||
$this->help_url = Hello_worldHelper::getHelpUrl('hello_world');
|
||||
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'))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage view.html.php
|
||||
|
@ -93,10 +93,10 @@ class Hello_worldViewImport extends JViewLegacy
|
|||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = Hello_worldHelper::getHelpUrl('import');
|
||||
if (Hello_worldHelper::checkString($help_url))
|
||||
$this->help_url = Hello_worldHelper::getHelpUrl('import');
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?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>
|
||||
<creationDate>4th January, 2021</creationDate>
|
||||
<creationDate>3rd March, 2022</creationDate>
|
||||
<author>Llewellyn</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://www.vdm.io</authorUrl>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.js
|
47
script.php
47
script.php
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage script.php
|
||||
|
@ -21,7 +21,10 @@
|
|||
// No direct access to this file
|
||||
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
|
||||
|
@ -33,23 +36,23 @@ class com_hello_worldInstallerScript
|
|||
*
|
||||
* @param JAdapterInstance $parent The object responsible for running this script
|
||||
*/
|
||||
public function __construct(JAdapterInstance $parent) {}
|
||||
public function __construct(ComponentAdapter $parent) {}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public function install(JAdapterInstance $parent) {}
|
||||
public function install(ComponentAdapter $parent) {}
|
||||
|
||||
/**
|
||||
* 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
|
||||
$app = JFactory::getApplication();
|
||||
|
@ -385,21 +388,21 @@ class com_hello_worldInstallerScript
|
|||
/**
|
||||
* 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
|
||||
*/
|
||||
public function update(JAdapterInstance $parent){}
|
||||
public function update(ComponentAdapter $parent){}
|
||||
|
||||
/**
|
||||
* Called before any type of action
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
public function preflight($type, JAdapterInstance $parent)
|
||||
public function preflight($type, ComponentAdapter $parent)
|
||||
{
|
||||
// get application
|
||||
$app = JFactory::getApplication();
|
||||
|
@ -424,12 +427,12 @@ class com_hello_worldInstallerScript
|
|||
{
|
||||
}
|
||||
// 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
|
||||
$this->removeFolder(JPATH_ADMINISTRATOR . '/components/com_hello_world/helpers/PHPExcel');
|
||||
// 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;
|
||||
}
|
||||
|
@ -438,11 +441,11 @@ class com_hello_worldInstallerScript
|
|||
* Called after any type of action
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
public function postflight($type, JAdapterInstance $parent)
|
||||
public function postflight($type, ComponentAdapter $parent)
|
||||
{
|
||||
// get application
|
||||
$app = JFactory::getApplication();
|
||||
|
@ -482,7 +485,7 @@ class com_hello_worldInstallerScript
|
|||
$db->setQuery($query);
|
||||
$allDone = $db->execute();
|
||||
|
||||
// Install the global extenstion params.
|
||||
// Install the global extension params.
|
||||
$query = $db->getQuery(true);
|
||||
// Field to update.
|
||||
$fields = array(
|
||||
|
@ -642,7 +645,7 @@ class com_hello_worldInstallerScript
|
|||
*/
|
||||
protected function removeFolder($dir, $ignore = false)
|
||||
{
|
||||
if (JFolder::exists($dir))
|
||||
if (Folder::exists($dir))
|
||||
{
|
||||
$it = new RecursiveDirectoryIterator($dir);
|
||||
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
|
@ -672,7 +675,7 @@ class com_hello_worldInstallerScript
|
|||
{
|
||||
continue;
|
||||
}
|
||||
JFolder::delete($file_dir);
|
||||
Folder::delete($file_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -691,13 +694,13 @@ class com_hello_worldInstallerScript
|
|||
{
|
||||
continue;
|
||||
}
|
||||
JFile::delete($file_dir);
|
||||
File::delete($file_dir);
|
||||
}
|
||||
}
|
||||
// delete the root folder if not ignore found
|
||||
if (!$this->checkArray($ignore))
|
||||
{
|
||||
return JFolder::delete($dir);
|
||||
return Folder::delete($dir);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -743,7 +746,7 @@ class com_hello_worldInstallerScript
|
|||
$installer = $parent->getParent();
|
||||
$installPath = $installer->getPath('source');
|
||||
// get all the folders
|
||||
$folders = JFolder::folders($installPath);
|
||||
$folders = Folder::folders($installPath);
|
||||
// check if we have folders we may want to copy
|
||||
$doNotCopy = array('media','admin','site'); // Joomla already deals with these
|
||||
if (count((array) $folders) > 1)
|
||||
|
@ -758,7 +761,7 @@ class com_hello_worldInstallerScript
|
|||
// set the destination path
|
||||
$dest = JPATH_ROOT.'/'.$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');
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greet.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greetings.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage site.css
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage site.js
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage controller.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
|
@ -21,7 +21,7 @@
|
|||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
|
||||
|
||||
// Set the component css/js
|
||||
$document = JFactory::getDocument();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage category.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage headercheck.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
|
@ -25,6 +25,8 @@ use Joomla\CMS\Language\Language;
|
|||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
|
||||
/**
|
||||
* Hello_world component helper
|
||||
|
@ -143,7 +145,7 @@ abstract class Hello_worldHelper
|
|||
*/
|
||||
public static function removeFolder($dir, $ignore = false)
|
||||
{
|
||||
if (JFolder::exists($dir))
|
||||
if (Folder::exists($dir))
|
||||
{
|
||||
$it = new RecursiveDirectoryIterator($dir);
|
||||
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
|
@ -173,7 +175,7 @@ abstract class Hello_worldHelper
|
|||
{
|
||||
continue;
|
||||
}
|
||||
JFolder::delete($file_dir);
|
||||
Folder::delete($file_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -192,13 +194,13 @@ abstract class Hello_worldHelper
|
|||
{
|
||||
continue;
|
||||
}
|
||||
JFile::delete($file_dir);
|
||||
File::delete($file_dir);
|
||||
}
|
||||
}
|
||||
// delete the root folder if not ignore found
|
||||
if (!self::checkArray($ignore))
|
||||
{
|
||||
return JFolder::delete($dir);
|
||||
return Folder::delete($dir);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -377,12 +379,12 @@ abstract class Hello_worldHelper
|
|||
$filePath = $path . '/' . $name . '.php';
|
||||
$fullPathModel = $fullPathModels . '/' . $name . '.php';
|
||||
// check if it exists
|
||||
if (JFile::exists($filePath))
|
||||
if (File::exists($filePath))
|
||||
{
|
||||
// get the file
|
||||
require_once $filePath;
|
||||
}
|
||||
elseif (JFile::exists($fullPathModel))
|
||||
elseif (File::exists($fullPathModel))
|
||||
{
|
||||
// get the file
|
||||
require_once $fullPathModel;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage route.php
|
||||
|
|
|
@ -37,7 +37,6 @@ COM_HELLO_WORLD_GREETING_CREATED_DATE_LABEL="Created Date"
|
|||
COM_HELLO_WORLD_GREETING_DETAILS="Details"
|
||||
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_GREETING="Greeting"
|
||||
COM_HELLO_WORLD_GREETING_GREETING_DESCRIPTION="Enter a greeting"
|
||||
COM_HELLO_WORLD_GREETING_GREETING_HINT="Greeting here!"
|
||||
COM_HELLO_WORLD_GREETING_GREETING_LABEL="Greeting"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage details_left.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage metadata.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage publishing.php
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.js
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greet.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.php
|
||||
|
@ -104,12 +104,6 @@ class Hello_worldModelGreeting extends JModelAdmin
|
|||
$registry->loadString($item->metadata);
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
{
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getTagIds($item->id, 'com_hello_world.greeting');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
|
@ -231,7 +225,7 @@ class Hello_worldModelGreeting extends JModelAdmin
|
|||
*/
|
||||
public function getScript()
|
||||
{
|
||||
return 'administrator/components/com_hello_world/models/forms/greeting.js';
|
||||
return 'media/com_hello_world/js/greeting.js';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greetings.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage router.php
|
||||
|
@ -60,7 +60,7 @@ class Hello_worldRouter extends JComponentRouterBase
|
|||
{
|
||||
$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'];
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ class Hello_worldRouter extends JComponentRouterBase
|
|||
$count = count($segments);
|
||||
$vars = array();
|
||||
|
||||
//Handle View and Identifier
|
||||
// Handle View and Identifier
|
||||
switch($segments[0])
|
||||
{
|
||||
case 'greeting':
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage view.html.php
|
||||
|
@ -138,10 +138,10 @@ class Hello_worldViewGreet extends JViewLegacy
|
|||
{
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = Hello_worldHelper::getHelpUrl('greet');
|
||||
if (Hello_worldHelper::checkString($help_url))
|
||||
$this->help_url = Hello_worldHelper::getHelpUrl('greet');
|
||||
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
|
||||
$this->toolbar = JToolbar::getInstance();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage submitbutton.js
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage edit.php
|
||||
|
@ -22,12 +22,9 @@
|
|||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.formvalidator');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('behavior.tabstate');
|
||||
JHtml::_('behavior.calendar');
|
||||
?>
|
||||
<div class="hello_world-greeting">
|
||||
<?php echo $this->toolbar->render(); ?>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage view.html.php
|
||||
|
@ -157,10 +157,10 @@ class Hello_worldViewGreeting extends JViewLegacy
|
|||
}
|
||||
JToolbarHelper::divider();
|
||||
// set help url for this view if found
|
||||
$help_url = Hello_worldHelper::getHelpUrl('greeting');
|
||||
if (Hello_worldHelper::checkString($help_url))
|
||||
$this->help_url = Hello_worldHelper::getHelpUrl('greeting');
|
||||
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
|
||||
$this->toolbar = JToolbar::getInstance();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage default.php
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.1
|
||||
@build 4th January, 2021
|
||||
@build 3rd March, 2022
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage view.html.php
|
||||
|
@ -109,10 +109,10 @@ class Hello_worldViewGreetings extends JViewLegacy
|
|||
{
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = Hello_worldHelper::getHelpUrl('greetings');
|
||||
if (Hello_worldHelper::checkString($help_url))
|
||||
$this->help_url = Hello_worldHelper::getHelpUrl('greetings');
|
||||
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
|
||||
$this->toolbar = JToolbar::getInstance();
|
||||
|
|
Loading…
Reference in New Issue