Skip to content

Commit

Permalink
2.4.0 - Library updates and general improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
anibalsanchez committed Jun 10, 2019
1 parent e3a2cfd commit a8297e7
Show file tree
Hide file tree
Showing 27 changed files with 7,271 additions and 9,300 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RELEASE_VERSION=1.0.0
LICENSE=GNU General Public License version 2 or later; see LICENSE.txt
LICENSE_CODE=GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html

AUTHOR=Andrea Gentil - Anibal Sanchez
AUTHOR=Extly, CB
AUTHOR_URL=https://www.extly.com
AUTHOR_EMAIL=[email protected]

Expand Down
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RELEASE_VERSION=1.0.0
LICENSE=GNU General Public License version 2 or later; see LICENSE.txt
LICENSE_CODE=GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html

AUTHOR=Andrea Gentil - Anibal Sanchez
AUTHOR=Extly, CB
AUTHOR_URL=https://www.extly.com
[email protected]

Expand Down
27 changes: 27 additions & 0 deletions build/rename-and-replace_once.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# A handy bash script to be executed only once on the extension-specific directories

## Replace
test -d component && build/replace_once_folder.sh component
test -d file && build/replace_once_folder.sh file
test -d library && build/replace_once_folder.sh library
test -d modules && build/replace_once_folder.sh modules
test -d package && build/replace_once_folder.sh package
test -d plugins && build/replace_once_folder.sh plugins
test -d template && build/replace_once_folder.sh template

test -d build/templates && build/replace_once_folder.sh build/templates
test -d build/translations && build/replace_once_folder.sh build/translations

## Rename
test -d component && build/rename_once_folder.sh component
test -d file && build/rename_once_folder.sh file
test -d library && build/rename_once_folder.sh library
test -d modules && build/rename_once_folder.sh modules
test -d package && build/rename_once_folder.sh package
test -d plugins && build/rename_once_folder.sh plugins
test -d template && build/rename_once_folder.sh template

test -d build/templates && build/rename_once_folder.sh build/templates
test -d build/translations && build/rename_once_folder.sh build/translations
2 changes: 1 addition & 1 deletion build/rename_once_folder.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# A handy bash script to be execute only once on the extension-specific directories
# A handy bash script to be executed only once on the extension-specific directories

EXTENSION_NAME="XT Twilio for Joomla"
EXTENSION_ALIAS="xttwilio"
Expand Down
13 changes: 0 additions & 13 deletions build/replace_once.sh

This file was deleted.

2 changes: 1 addition & 1 deletion build/replace_once_folder.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# A handy bash script to be execute only once on the extension-specific directories
# A handy bash script to be executed only once on the extension-specific directories

EXTENSION_NAME="XT Twilio for Joomla"
EXTENSION_ALIAS="xttwilio"
Expand Down
33 changes: 33 additions & 0 deletions build/templates/modules/admin/mod_foo/mod_foo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.8" client="administrator" method="upgrade">
<name>mod_[EXTENSION_ALIAS]</name>
<version>[RELEASE_VERSION]</version>
<creationDate>[DATE]</creationDate>

[MANIFEST_COPYRIGHT]

<description>MOD_[TRANSLATION_KEY]_XML_DESCRIPTION</description>
<files>
<filename module="mod_[EXTENSION_ALIAS]">mod_[EXTENSION_ALIAS].php</filename>
<folder>tmpl</folder>
<filename>mod_[EXTENSION_ALIAS].xml</filename>
</files>
<languages>
<language tag="en-GB">language/en-GB/en-GB.mod_[EXTENSION_ALIAS].ini</language>
<language tag="en-GB">language/en-GB/en-GB.mod_[EXTENSION_ALIAS].sys.ini</language>
</languages>
<!-- Update servers -->
<updateservers>
<server type="extension" priority="1" name="[EXTENSION_NAME]">[EXTENSION_CDN]/update-mod_[EXTENSION_ALIAS].xml</server>
</updateservers>
<config>
<fields name="params">
<fieldset name="basic">
<field name="domain" type="url" label="MOD_[TRANSLATION_KEY]_URL_LABEL" description="MOD_[TRANSLATION_KEY]_URL_DESCRIPTION" hint="https://www.example.com" filter="url" validate="url" />
</fieldset>
<fieldset name="advanced">
<field name="moduleclass_sfx" type="text" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
</fieldset>
</fields>
</config>
</extension>
4 changes: 2 additions & 2 deletions component/foo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension type="component" version="3.8.0" method="upgrade">
<name>com_foo</name>
<version>1.0.0</version>
<creationDate>2018-11-24</creationDate>
<creationDate>2019-06-10</creationDate>

<author>Andrea Gentil - Anibal Sanchez</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.extly.com</authorUrl>
<copyright>Copyright (c)2007-2018 Andrea Gentil - Anibal Sanchez All rights reserved.</copyright>
<copyright>Copyright (c)2007-2019 Andrea Gentil - Anibal Sanchez All rights reserved.</copyright>
<license>GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html</license>

<description>
Expand Down
2 changes: 1 addition & 1 deletion component/media/com_foo/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @license GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html
* @version 1.0.0
* @author Andrea Gentil - Anibal Sanchez, https://www.extly.com
* @updated 2018-11-24
* @updated 2019-06-10
* @link https://www.extly.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion component/media/com_foo/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @license GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html
* @version 1.0.0
* @author Andrea Gentil - Anibal Sanchez, https://www.extly.com
* @updated 2018-11-24
* @updated 2019-06-10
* @link https://www.extly.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion component/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Foo Name
*
* @author Andrea Gentil - Anibal Sanchez <[email protected]>
* @copyright Copyright (c)2007-2018 Andrea Gentil - Anibal Sanchez All rights reserved.
* @copyright Copyright (c)2007-2019 Andrea Gentil - Anibal Sanchez All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @link https://www.extly.com
*/
Expand Down
4 changes: 2 additions & 2 deletions file/foo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension type="file" version="3.8.0" method="upgrade">
<name>file_foo</name>
<version>1.0.0</version>
<creationDate>2018-11-24</creationDate>
<creationDate>2019-06-10</creationDate>

<author>Andrea Gentil - Anibal Sanchez</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.extly.com</authorUrl>
<copyright>Copyright (c)2007-2018 Andrea Gentil - Anibal Sanchez All rights reserved.</copyright>
<copyright>Copyright (c)2007-2019 Andrea Gentil - Anibal Sanchez All rights reserved.</copyright>
<license>GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html</license>

<description><![CDATA[
Expand Down
49 changes: 48 additions & 1 deletion file/foo_cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,51 @@
* @link [AUTHOR_URL]
*/

defined('_JEXEC') or die;
if (version_compare(PHP_VERSION, '5.3.10', '<'))
{
die('Your host needs to use PHP 5.3.10 or higher to run this version of Joomla!');
}

/**
* Constant that is checked in included files to prevent direct access.
* define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
set_time_limit(0);

if (file_exists(__DIR__ . '/defines.php'))
{
include_once __DIR__ . '/defines.php';
}

if (!defined('_JDEFINES'))
{
$path = explode(DIRECTORY_SEPARATOR, __DIR__);
array_pop($path);
$path = implode(DIRECTORY_SEPARATOR, $path);
define('JPATH_BASE', $path);
require_once JPATH_BASE . '/includes/defines.php';
}

require_once JPATH_BASE . '/includes/framework.php';

// Instantiate the application.
$app = JFactory::getApplication('site');
$app->scope = 'com_foo';
$component = 'Foo';

define('JPATH_COMPONENT', JPATH_SITE . '/components/com_foo/');
define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_SITE . '/administrator/components/com_foo/');

require_once JPATH_SITE . '/components/com_foo/defines.php';

JLoader::registerPrefix($component, JPATH_SITE . '/components/com_foo/');
JTable::addIncludePath(JPATH_SITE . '/components/com_foo/tables');

$input = JFactory::getApplication()->input;
$input->set('option', 'com_foo');
$input->set('view', 'extension');

/**
* Ready to process
*/
4 changes: 2 additions & 2 deletions library/lib_foo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<name>Foo Name Library</name>
<libraryname>foo</libraryname>
<version>1.0.0</version>
<creationDate>2018-11-24</creationDate>
<creationDate>2019-06-10</creationDate>

<author>Andrea Gentil - Anibal Sanchez</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.extly.com</authorUrl>
<copyright>Copyright (c)2007-2018 Andrea Gentil - Anibal Sanchez All rights reserved.</copyright>
<copyright>Copyright (c)2007-2019 Andrea Gentil - Anibal Sanchez All rights reserved.</copyright>
<license>GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html</license>

<description>
Expand Down
17 changes: 17 additions & 0 deletions modules/admin/mod_foo/mod_foo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* @package [EXTENSION_NAME]
*
* @author [AUTHOR] <[AUTHOR_EMAIL]>
* @copyright [COPYRIGHT]
* @license [LICENSE]
* @link [AUTHOR_URL]
*/

use Joomla\CMS\Helper\ModuleHelper;

defined('_JEXEC') or die;

$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));

require ModuleHelper::getLayoutPath('mod_foo', $params->get('layout', 'default'));
19 changes: 19 additions & 0 deletions modules/admin/mod_foo/tmpl/default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* @package [EXTENSION_NAME]
*
* @author [AUTHOR] <[AUTHOR_EMAIL]>
* @copyright [COPYRIGHT]
* @license [LICENSE]
* @link [AUTHOR_URL]
*/

defined('_JEXEC') or die;

// Access to module parameters
$domain = $params->get('domain', 'https://www.joomla.org');
?>

<a href="<?php echo $domain; ?>">
<?php echo 'Hello!'; ?>
</a>
Loading

0 comments on commit a8297e7

Please sign in to comment.