Skip to content

Commit

Permalink
Merge pull request #6 from GannettDigital/RCAP-5848
Browse files Browse the repository at this point in the history
RCAP-5848 Changes to run our plugin without the Behaviour - Background Compatibility plugin
  • Loading branch information
prcorcoran authored May 17, 2024
2 parents 7d21e84 + 2f26984 commit c27b48f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
A Joomla Extension to add LOCALiQ Tracking.

Compatible with Joomla 4.0 or above.
Tested up to: 5.0.3
Stable tag: 2.0.0.0
Tested up to: 5.1
Stable tag: 2.1.0.0
License: GPLv2
License URI: https://opensource.org/licenses/GPL-2.0

Expand All @@ -16,7 +16,7 @@ License URI: https://opensource.org/licenses/GPL-2.0

## Building

$ zip -r v2.0.0.0.zip ./localiq_joomla_30_extension -x *.git*
$ zip -r localiq_plugin_v2.1.0.0.zip ./localiq_joomla_extension -x ./localiq_joomla_extension/.git/\*

## Downloading ##
- Download or copy url to the zip file from here: [Latest Release](https://github.com/reachlocal/localiq_joomla_30_extension/releases/latest)
Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.1'

services:
joomla:
image: joomla:5.0.3
image: joomla:5.1
platform: linux/arm64/v8
restart: always
links:
Expand All @@ -12,10 +12,13 @@ services:
environment:
JOOMLA_DB_HOST: joomladb
JOOMLA_DB_PASSWORD: example
volumes:
- ./php.ini:/usr/local/etc/php/php.ini

joomladb:
image: mysql:8.0
platform: linux/amd64
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
command: mysqld --innodb_use_native_aio=0
2 changes: 2 additions & 0 deletions php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
upload_max_filesize=32M
post_max_size=32M
20 changes: 11 additions & 9 deletions reachedge.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@
# Homepage : www.reachlocal.com #
# Author : ReachLocal, Inc. #
# Email : support@reachlocal.com #
# Version : 1.1.0.0 #
# Version : 2.1.0.0 #
# License : http://www.gnu.org/copyleft/gpl.html GNU/GPL #
######################################################################

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

jimport( 'joomla.plugin.plugin');
jimport( 'joomla.html.parameter');
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Registry\Registry;

class plgSystemReachEdge extends JPlugin
class plgSystemReachEdge extends CMSPlugin
{
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_plugin = JPluginHelper::getPlugin( 'system', 'reachedge' );
$this->_params = new JRegistry( $this->_plugin->params );
$this->_plugin = PluginHelper::importPlugin( 'reachedge' );
$this->_params = new Registry( $this->_plugin->params );
}

/**
Expand Down Expand Up @@ -52,7 +54,7 @@ function reachedge_code_snippet_src($reachlocal_tracking_id) {

function onAfterRender()
{
$mainframe = JFactory::getApplication();
$mainframe = Factory::getApplication();
$reachedge_site_id = $this->params->get('reachedge_site_id', '');
$snippet = $this->reachedge_code_snippet_src($reachedge_site_id);

Expand All @@ -61,7 +63,7 @@ function onAfterRender()
return;
}

$buffer = $mainframe -> getBody();
$buffer = Factory::getApplication() -> getBody();
$reachedge_javascript = "
<script type='text/javascript' src='".$snippet."' async='async'></script>
";
Expand Down
4 changes: 2 additions & 2 deletions reachedge.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="1.1.0.0" type="plugin" group="system">
<extension version="2.1.0.0" type="plugin" group="system">
<name>System - LOCALiQ Tracking Code</name>
<author>ReachLocal, Inc.</author>
<creationDate>January 2015</creationDate>
<copyright>Copyright (C) 2018 ReachLocal. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>support@reachlocal.com</authorEmail>
<authorUrl>reachlocal.com</authorUrl>
<version>1.1.0.0</version>
<version>2.1.0.0</version>
<description>This plugin puts the LOCALiQ tracking code on all Website pages.</description>
<files>
<filename plugin="reachedge">reachedge.php</filename>
Expand Down

0 comments on commit c27b48f

Please sign in to comment.