Skip to content

Commit

Permalink
Make the simpleschema library and EB helper install with the plugin. …
Browse files Browse the repository at this point in the history
…Thanks @shantanutekdi
  • Loading branch information
coolbung committed Sep 16, 2014
1 parent a4fdc81 commit 191b665
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
6 changes: 4 additions & 2 deletions easyblog/easyblog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
<copyright>Techjoomla</copyright>
<license>GNU General Public License v2</license>
<description>Easyblog APIs</description>

<scriptfile>script.php</scriptfile>
<files>
<filename plugin="easyblog">easyblog.php</filename>
<folder>easyblog</folder>
<folder>easyblog</folder>
<folder>components</folder>
<folder>libraries</folder>
</files>
</extension>
24 changes: 24 additions & 0 deletions easyblog/script.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

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

//Script class
class plgapieasyblogInstallerScript
{
public function postflight($type, $parent)
{
//If type is install
if ($type == 'install')
{
//Move library file to Joomla libraries and delete it from plugin
JFolder::move(JPATH_SITE.'/plugins/api/easyblog/libraries/simpleschema', JPATH_SITE.'/libraries/simpleschema');
JFolder::delete(JPATH_SITE.'/plugins/api/easyblog/libraries');

//Move helper file to easyblog helpers and delete it from plugin
JFile::move(JPATH_SITE.'/plugins/api/easyblog/components/com_easyblog/helpers/simpleschema.php', JPATH_SITE.'/components/com_easyblog/helpers/simpleschema.php');
JFolder::delete(JPATH_SITE.'/plugins/api/easyblog/components');
}
return true;
}
}

0 comments on commit 191b665

Please sign in to comment.