How to create a component package and upgrade feature

90 views
Skip to first unread message

fornandakishore

unread,
Dec 18, 2012, 12:23:17 AM12/18/12
to joomla-de...@googlegroups.com
Hello to all,

I have created a custom component and a plugin for that component. Now I want to make that component and plugin as a package so that with one zip installer I need to install both at a time. As well as if I have any code changes later days now I need to show upgrade message and I need to install component and plugin at one click of upgrade button (If you try to install the existing component then we will get an error message saying that component folder is already exists).

1. How to do the component and Plugin as a package with one installer.

2. How to make a component as a upgradable component with out any issues or errors

 
Thanks & Regards

Nanda Kishore. M

Senior PHP Developer

http://php-desk.blogspot.com

Mobile: + 91 98499 71144 


Glenn Arkell

unread,
Dec 18, 2012, 12:28:31 AM12/18/12
to joomla-de...@googlegroups.com
Hi Nanda,

I did this once for Joomla!1.7 some time ago as a training exercise and followed the instructions in the doco.  I think it is here.  http://docs.joomla.org/Making_single_installation_packages_for_Joomla!_1.5,_1.6_and_1.7  Good luck.

Glenn Arkell

unread,
Dec 18, 2012, 12:37:55 AM12/18/12
to joomla-de...@googlegroups.com
Hi Nanda,

Forgot to address item 2 on your list.  Try http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_an_update_server  Cheers


On Tuesday, December 18, 2012 4:23:17 PM UTC+11, Nandu wrote:

fornandakishore

unread,
Dec 18, 2012, 12:44:46 AM12/18/12
to joomla-de...@googlegroups.com
Hello Glenn,

First of all thanks for your reply, seems to me the first link is explaining the creating a single component which installs on 1.5 / 1.6 / 1.7 / 2.5... But here my requirement is I already have a 2.5 custom component with a plugin. Currently I am installing in Joomla one by one through Extension Manager. Now I want to club that code and make a single zip file installer, so that when I select a zip file that need to install both component and plugin at a time.

And for the second point thank you I am going through it now ...

 
Thanks & Regards

Nanda Kishore. M

Senior PHP Developer

http://php-desk.blogspot.com

Mobile: + 91 98499 71144 




--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/5sD0cUNpyW8J.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Youjoomla LLC

unread,
Dec 18, 2012, 1:02:46 AM12/18/12
to joomla-de...@googlegroups.com
You need package manifest , 
download my plugin

 it is packed as package that installs  module and  plugin. There are just few lines 
in xml that you need to change. It is strait forward. extensions folder and line 38 - 41  needs your pack info



   <files folder="extensions">
    <file type="module" id="mod_yj_multimediabox" client="site">Module_Multimediabox30-J17andUP.zip</file>
    <file type="plugin" id="bot_mb" group="system">Plugin_Multimediabox30-J17andUP.zip</file>
  </files>


don't forget to edit lines 3 -14 for pack info 

as being up-gradable you need this in xml of your extension

<extension version="1.6" type="plugin" group="content" method="upgrade">


--
Best Regards
Dan Casky
Youjoomla Customer Service
+1727-388-6653
5044 17th street N
Saint Petersburg ,FL
33714
-------------------------------
Youjoomla LLC
www.youjoomla.com
Professional Joomla Web Design Services

Glenn Arkell

unread,
Dec 18, 2012, 1:28:51 AM12/18/12
to joomla-de...@googlegroups.com
Apologies Nanda, I should have read the article in full rather than relying on the title.  I can't find the article I used.  Dan has help with his package as a guide so good luck with it.  Cheers
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

Eric Fernance

unread,
Dec 18, 2012, 1:43:09 AM12/18/12
to joomla-de...@googlegroups.com
Hi Nanda,

I found the easiest way was to:

1. drop the plugin as a directory inside my component with it's own manifest file etc. as per a normal component

2. in my component manifest file and a install script to be run as part of the component installation, using the below line in the manifest

<scriptfile>script.php</scriptfile>

3. in the install script add code for the postflight() method to install the plugin from the plugin dir:

class com_mycomponentInstallerScript
{
function postflight($type,$parent) {



//now install.
$installer = new JInstaller();
$installer->install($parent->getParent()->getPath('source').DS.'plugin');
}
}


4. zip the whole thing and install as per normal.

5. active the plugin in the plugin manager.

Eric.



--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages