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

Commit

Permalink
Allow plugin to work in frontend.
Browse files Browse the repository at this point in the history
Version 1.3.3

Fixes #3
  • Loading branch information
mattiaverga committed Sep 16, 2018
1 parent dd52141 commit 2755089
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Automatic Intro Image needs IMagick php module to be installed and enabled on yo
See https://github.com/mattiaverga/JAutomaticIntroImage/wiki for more help.

## Changelog
### v1.3.3
* Fix: allow plugin to work in frontend

### v1.3.1
* Add support for Joomla extension updater

Expand Down
4 changes: 2 additions & 2 deletions automaticintroimage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class plgContentAutomaticIntroImage extends JPlugin
*
* @param string $context The context of the content being passed to the
plugin.
* @param mixed $article A reference to the JTableContent object that is
* @param mixed $article The JTableContent object that is
being saved which holds the article data.
* @param boolean $isNew A boolean which is set to true if the content
is about to be created.
Expand All @@ -32,7 +32,7 @@ class plgContentAutomaticIntroImage extends JPlugin
public function onContentBeforeSave($context, $article, $isNew)
{
// Check if we're saving an article
$allowed_contexts = array('com_content.article');
$allowed_contexts = array('com_content.article','com_content.form');

if (!in_array($context, $allowed_contexts))
{
Expand Down
2 changes: 1 addition & 1 deletion automaticintroimage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<copyright>Copyright (C) 2017 Mattia Verga. All rights reserved.</copyright>
<license>GNU General Public License version 3 or later.</license>
<authorEmail>[email protected]</authorEmail>
<version>1.3.2</version>
<version>1.3.3</version>
<description>PLG_CONTENT_AUTOMATICINTROIMAGE_XML_DESCRIPTION</description>
<files>
<filename plugin="automaticintroimage">automaticintroimage.php</filename>
Expand Down
6 changes: 3 additions & 3 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<element>automaticintroimage</element>
<type>plugin</type>
<folder>content</folder>
<version>1.3.2</version>
<version>1.3.3</version>
<client>site</client>
<infourl title="Automatic Intro Image plugin">https://github.com/mattiaverga/JAutomaticIntroImage/releases/tag/1.3.2</infourl>
<infourl title="Automatic Intro Image plugin">https://github.com/mattiaverga/JAutomaticIntroImage/releases/tag/1.3.3</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/mattiaverga/JAutomaticIntroImage/archive/1.3.2.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/mattiaverga/JAutomaticIntroImage/archive/1.3.3.zip</downloadurl>
</downloads>
<targetplatform name="joomla" version="3.[456789]" />
</update>
Expand Down

0 comments on commit 2755089

Please sign in to comment.