Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Commit 2755089

Browse files
committed
Allow plugin to work in frontend.
Version 1.3.3 Fixes #3
1 parent dd52141 commit 2755089

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Automatic Intro Image needs IMagick php module to be installed and enabled on yo
88
See https://github.com/mattiaverga/JAutomaticIntroImage/wiki for more help.
99

1010
## Changelog
11+
### v1.3.3
12+
* Fix: allow plugin to work in frontend
13+
1114
### v1.3.1
1215
* Add support for Joomla extension updater
1316

automaticintroimage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class plgContentAutomaticIntroImage extends JPlugin
2222
*
2323
* @param string $context The context of the content being passed to the
2424
plugin.
25-
* @param mixed $article A reference to the JTableContent object that is
25+
* @param mixed $article The JTableContent object that is
2626
being saved which holds the article data.
2727
* @param boolean $isNew A boolean which is set to true if the content
2828
is about to be created.
@@ -32,7 +32,7 @@ class plgContentAutomaticIntroImage extends JPlugin
3232
public function onContentBeforeSave($context, $article, $isNew)
3333
{
3434
// Check if we're saving an article
35-
$allowed_contexts = array('com_content.article');
35+
$allowed_contexts = array('com_content.article','com_content.form');
3636

3737
if (!in_array($context, $allowed_contexts))
3838
{

automaticintroimage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<copyright>Copyright (C) 2017 Mattia Verga. All rights reserved.</copyright>
77
<license>GNU General Public License version 3 or later.</license>
88
<authorEmail>mattia.verga@tiscali.it</authorEmail>
9-
<version>1.3.2</version>
9+
<version>1.3.3</version>
1010
<description>PLG_CONTENT_AUTOMATICINTROIMAGE_XML_DESCRIPTION</description>
1111
<files>
1212
<filename plugin="automaticintroimage">automaticintroimage.php</filename>

manifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<element>automaticintroimage</element>
77
<type>plugin</type>
88
<folder>content</folder>
9-
<version>1.3.2</version>
9+
<version>1.3.3</version>
1010
<client>site</client>
11-
<infourl title="Automatic Intro Image plugin">https://github.com/mattiaverga/JAutomaticIntroImage/releases/tag/1.3.2</infourl>
11+
<infourl title="Automatic Intro Image plugin">https://github.com/mattiaverga/JAutomaticIntroImage/releases/tag/1.3.3</infourl>
1212
<downloads>
13-
<downloadurl type="full" format="zip">https://github.com/mattiaverga/JAutomaticIntroImage/archive/1.3.2.zip</downloadurl>
13+
<downloadurl type="full" format="zip">https://github.com/mattiaverga/JAutomaticIntroImage/archive/1.3.3.zip</downloadurl>
1414
</downloads>
1515
<targetplatform name="joomla" version="3.[456789]" />
1616
</update>

0 commit comments

Comments
 (0)