Skip to content

Commit

Permalink
Merge pull request #108 from techjoomla/release-2.0.0
Browse files Browse the repository at this point in the history
Merge `Release 2.0.0` into `master`
  • Loading branch information
manojLondhe authored Nov 3, 2020
2 parents 43b854f + 346011e commit 689ecf7
Show file tree
Hide file tree
Showing 104 changed files with 7,081 additions and 1,208 deletions.
2 changes: 2 additions & 0 deletions build/bump.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ function usage($command)
$coreXmlFiles = array(
'/src/com_tjnotifications/tjnotifications.xml',
'/src/plugins/actionlog/tjnotification/tjnotification.xml',
'/src/plugins/api/tjnotifications/tjnotifications.xml',
'/src/plugins/privacy/tjnotification/tjnotification.xml',
'/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml',
);

$antJobFile = '/build.xml';
Expand Down
29 changes: 29 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changelog

#### Legend

- Bug Fix (-)
- Feature Addition (+)
- Improvement (^)

### TJNotifications v2.0.0

##### + Features Added:
- #165665 Add support for shortening URLs using TJ URL Shortner plugin for backends like SMS
- #165665 Add new configs for - enable_url_shortening, url_shortening_provider (choosing TJ URL Shortner plugin), url_shortening_enabled_backends
- #165303 Add config for select the phone number field from the TJ-Notifications.
- #165159 Add user plugin for TJNotifications to add/update on profile update/user creation, the SMS subscription in TJNotifications table
- #162264 Add backend list view for subscriptions
- #162263 Add backend form view for subscription
- #162263 Add API plugin for addind/updating subscription
- #159749 SMS notifications support
- #159490 Multilingual Support for notification templates
- #138487 Log sent notifications details in DB table
- #134717 Email notification improvement - add support to set CC and BCC at template level

##### - Bug fixes:
- #164967 Back end >> Notification template's view >> Search tools >> client drop down list must contain standard name of component

##### ^ Improvements:
- #165070 PHP 5.6, 7.4 compatibility changes (for supporting multilingual templates feature)
- #159156 Backend controllers code refactor
18 changes: 18 additions & 0 deletions src/com_tjnotifications/admin/access.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<access component="com_tjnotifications">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
<action name="core.options" title="JACTION_OPTIONS" description="JACTION_OPTIONS_COMPONENT_DESC" />
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" />
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
<action name="core.view" title="JACTION_VIEW" description="JACTION_VIEW_COMPONENT_DESC" />
<action name="core.viewlist" title="JACTION_VIEW_LIST" description="JACTION_VIEW_LIST_DESC" />
<action name="core.emailstatus" title="JACTION_EMAIL_STATUS" description="JACTION_EMAIL_STATUS_DESC" />
<action name="core.usercontrol" title="JACTION_USER_CONTROL" description="JACTION_USER_CONTROL_DESC" />
<action name="core.export" title="JACTION_EXPORT" description="JACTION_EXPORT_COMPONENT_DESC" />
</section>
</access>
43 changes: 43 additions & 0 deletions src/com_tjnotifications/admin/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset name="general" label="COM_TJNOTIFICATIONS_SETTINGS_GENERAL" description="" addfieldpath="/administrator/components/com_tjnotifications/models/fields">
<field name="enable_logs" type="radio" class="btn-group btn-group-yesno" default="0" label="COM_TJNOTIFICATIONS_ALLOW_SAVE_OPTION" description="COM_TJNOTIFICATIONS_APPLICATION_OPTION_DESC">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field name="tjpush_plugin" type="sql" default="" label="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_PUSH_PROVIDER" description="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_PUSH_PROVIDER_DESC" query="SELECT element, name FROM #__extensions WHERE type='plugin' AND folder='tjpush' AND enabled=1" key_field="element" value_field="name" />

<field name="tjsms_plugin" type="sql" default="" label="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_SMS_PLUGIN" description="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_SMS_PLUGIN_DESC" query="SELECT element, name FROM #__extensions WHERE type='plugin' AND folder='tjsms' AND enabled=1" key_field="element" value_field="name" />

<field name="tjwhatsapp_plugin" type="sql" default="" label="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_WHATSAPP_PROVIDER" description="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_WHATSAPP_PROVIDER_DESC" query="SELECT element, name FROM #__extensions WHERE type='plugin' AND folder='tjwhatsapp' AND enabled=1" key_field="element" value_field="name" />

<field name="mobile_number_source" type="list" default="joomla"
description="COM_TJNOTIFICATIONS_SUBSCRIPTIONS_PHONE_NUMBER_DESC"
label="COM_TJNOTIFICATIONS_SUBSCRIPTIONS_PHONE_NUMBER">
<option value="joomla">COM_TJNOTIFICATIONS_SUBSCRIPTIONS_PHONE_NUMBER_JOOMLA</option>
<option value="easysocial">COM_TJNOTIFICATIONS_SUBSCRIPTIONS_PHONE_NUMBER_EASYSOCIAL</option>
<option value="joomsocial">COM_TJNOTIFICATIONS_SUBSCRIPTIONS_PHONE_NUMBER_JOOMSOCIAL</option>
</field>

<field name="mobile_number_field" type="mobilenumberfields" showon="mobile_number_source:joomla"
label="COM_TJNOTIFICATIONS_SUBSCRIPTIONS_SELECT_PHONE_NUMBER_FIELD" description="COM_TJNOTIFICATIONS_SUBSCRIPTIONS_SELECT_PHONE_NUMBER_FIELD_DESC"
/>

<field name="enable_url_shortening" type="radio" class="btn-group btn-group-yesno" default="0" label="COM_TJNOTIFICATIONS_SETTINGS_URL_SHORTING" description="COM_TJNOTIFICATIONS_SETTINGS_URL_SHORTING_DESC">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field name="url_shortening_provider" type="sql" showon="enable_url_shortening:1"
default="" label="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_URL_SHORTENING_PLUGIN" description="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_URL_SHORTENING_PLUGIN_DESC" query="SELECT element, name FROM #__extensions WHERE type='plugin' AND folder='tjurlshortner' AND enabled=1" key_field="element" value_field="name" />

<field name="url_shortening_enabled_backends" type="tjnotificationsbackends" showon="enable_url_shortening:1" default="sms" multiple="multiple" label="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_BACKEND_SHORTENING" description="COM_TJNOTIFICATIONS_SETTINGS_CHOOSE_BACKEND_SHORTENING_DESC" />

</fieldset>

<fieldset name="permissions" description="JCONFIG_PERMISSIONS_DESC" label="JCONFIG_PERMISSIONS_LABEL">
<field name="rules" type="rules" component="com_tjnotifications" class="inputbox" filter="rules" validate="rules" label="JCONFIG_PERMISSIONS_LABEL" section="component" />
</fieldset>
</config>

16 changes: 9 additions & 7 deletions src/com_tjnotifications/admin/controller.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<?php

/**
* @package Com_Tjnotification
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package Tjnotifications
* @subpackage com_tjnotifications
*
* @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved.
* @license http:/www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// No direct access to this file
defined('_JEXEC') or die;
// No direct access
defined('_JEXEC') or die('Restricted access');

/**
* Notifications controller.
*
* @since 0.0.1
*/

class TjnotificationsController extends JControllerLegacy
class TjnotificationsController extends \Joomla\CMS\MVC\Controller\BaseController
{
/**
* The default view for the display method.
Expand Down
1 change: 1 addition & 0 deletions src/com_tjnotifications/admin/controllers/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

84 changes: 84 additions & 0 deletions src/com_tjnotifications/admin/controllers/log.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php
/**
* @package Tjnotifications
* @subpackage com_tjnotifications
*
* @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved.
* @license http:/www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;

/**
* Log Controller
*
* @since 1.1.0
*/
class TjnotificationsControllerLog extends FormController
{
/**
* The extension for which the subscription apply.
*
* @var string
* @since 1.6
*/
protected $extension;

protected $view_list;

/**
* Constructor
*
* @throws Exception
*/
public function __construct()
{
$this->view_list = 'logs';

// Guess the extension
if (empty($this->extension))
{
$this->extension = Factory::getApplication()->input->getCmd('extension', '');
}

parent::__construct();
}

/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$append = parent::getRedirectToItemAppend($recordId);
$append .= '&extension=' . $this->extension;

return $append;
}

/**
* Gets the URL arguments to append to a list redirect.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToListAppend()
{
$append = parent::getRedirectToListAppend();
$append .= '&extension=' . $this->extension;

return $append;
}
}
39 changes: 39 additions & 0 deletions src/com_tjnotifications/admin/controllers/logs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* @package Tjnotifications
* @subpackage com_tjnotifications
*
* @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved.
* @license http:/www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\MVC\Controller\AdminController;

/**
* Logs controller class.
*
* @since 1.1.0
*/
class TjnotificationsControllerLogs extends AdminController
{
/**
* Proxy for getModel.
*
* @param string $name The name of the model.
* @param string $prefix The prefix for the PHP class name.
* @param array $config Array of configuration parameters.
*
* @return JModelLegacy|boolean
*
* @since 1.1.0
*/
public function getModel($name = 'log', $prefix = 'TjnotificationsModel', $config = array('ignore_request' => true))
{
$model = parent::getModel($name, $prefix, $config);

return $model;
}
}
Loading

0 comments on commit 689ecf7

Please sign in to comment.