Skip to content

Commit 191b665

Browse files
committed
Make the simpleschema library and EB helper install with the plugin. Thanks @shantanutekdi
1 parent a4fdc81 commit 191b665

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

easyblog/easyblog.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
<copyright>Techjoomla</copyright>
1010
<license>GNU General Public License v2</license>
1111
<description>Easyblog APIs</description>
12-
12+
<scriptfile>script.php</scriptfile>
1313
<files>
1414
<filename plugin="easyblog">easyblog.php</filename>
15-
<folder>easyblog</folder>
15+
<folder>easyblog</folder>
16+
<folder>components</folder>
17+
<folder>libraries</folder>
1618
</files>
1719
</extension>

easyblog/script.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
// No direct access to this file
4+
defined('_JEXEC') or die('Restricted access');
5+
6+
//Script class
7+
class plgapieasyblogInstallerScript
8+
{
9+
public function postflight($type, $parent)
10+
{
11+
//If type is install
12+
if ($type == 'install')
13+
{
14+
//Move library file to Joomla libraries and delete it from plugin
15+
JFolder::move(JPATH_SITE.'/plugins/api/easyblog/libraries/simpleschema', JPATH_SITE.'/libraries/simpleschema');
16+
JFolder::delete(JPATH_SITE.'/plugins/api/easyblog/libraries');
17+
18+
//Move helper file to easyblog helpers and delete it from plugin
19+
JFile::move(JPATH_SITE.'/plugins/api/easyblog/components/com_easyblog/helpers/simpleschema.php', JPATH_SITE.'/components/com_easyblog/helpers/simpleschema.php');
20+
JFolder::delete(JPATH_SITE.'/plugins/api/easyblog/components');
21+
}
22+
return true;
23+
}
24+
}

0 commit comments

Comments
 (0)