How to install cb plugin during ext. installation?
- THE_AI
- OFFLINE
- Posts: 25
- Thanks: 2
- Karma: 2
11 years 8 months ago #210357
by THE_AI
How to install cb plugin during ext. installation? was created by THE_AI
For our hotspots component:
demo.compojoom.com/hotspots
we have a cb plugin that displays the last locations that a user has entered. I want to distribute this plugin together with our main component package and install it in cb while we install our component. If it was a normal plugin one could do
but since it is not a normal joomla plugin, but a cb plugin I'm a little lost how to use the cb framework for this.
I tried this:
but then I have fatal errors from missing functions etc...
Any advise on this would be much appreciated!
Thank you!
Daniel
Code:
$installer = new JInstaller;
$isntaller->install('path_to_package');
I tried this:
Code:
if(JFile::exists(JPATH_ADMINISTRATOR . '/components/com_comprofiler/library/cb/cb.installer.php')) {
require_once(JPATH_ADMINISTRATOR . '/components/com_comprofiler/library/cb/cb.installer.php');
$cbInstaller = new cbInstallerPlugin();
$cbInstaller->install($parent->getParent()->getPath('source').'/components/com_comprofiler/plugin/user/plug_hotspots');
}
but then I have fatal errors from missing functions etc...
Any advise on this would be much appreciated!
Thank you!
Daniel
Please Log in or Create an account to join the conversation.
- nant
- OFFLINE
- Posts: 25532
- Thanks: 1834
- Karma: 877
11 years 8 months ago #210368
by nant
--
Nick (nant)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
For more add-ons and support: Upgrade your membership
Links: Community Builder - Languages - Adv/Pro/Dev membership - CBSubs Paid Subscriptions - GPL Templates - Hosting
Visit my CB Profile - Send me a Private Message (PM)
Replied by nant on topic Re: How to install cb plugin during ext. installation?
check out CB API documentation in free download area
--
Nick (nant)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
For more add-ons and support: Upgrade your membership
Links: Community Builder - Languages - Adv/Pro/Dev membership - CBSubs Paid Subscriptions - GPL Templates - Hosting
Visit my CB Profile - Send me a Private Message (PM)
Please Log in or Create an account to join the conversation.
- THE_AI
- OFFLINE
- Posts: 25
- Thanks: 2
- Karma: 2
11 years 8 months ago #210370
by THE_AI
Replied by THE_AI on topic Re: How to install cb plugin during ext. installation?
I managed to do the trick. Here is the code in case anyone wants to do something similar:
Code:
if(JFile::exists(JPATH_ADMINISTRATOR . '/components/com_comprofiler/library/cb/cb.installer.php')) {
global $_CB_framework;
require_once(JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php');
require_once(JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.class.php');
require_once(JPATH_ADMINISTRATOR . '/components/com_comprofiler/comprofiler.class.php');
require_once(JPATH_ADMINISTRATOR . '/components/com_comprofiler/library/cb/cb.installer.php');
$cbInstaller = new cbInstallerPlugin();
if($cbInstaller->install($parent->getParent()->getPath('source').'/components/com_comprofiler/plugin/user/plug_hotspots/'))
{
// do something
}
}
The following user(s) said Thank You: beat, pelloq1
Please Log in or Create an account to join the conversation.
- beat
- ONLINE
- Posts: 8176
- Thanks: 528
- Karma: 352
11 years 8 months ago #210377
by beat
Beat - Community Builder Team Member
Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
Replied by beat on topic Re: How to install cb plugin during ext. installation?
Thanks for sharing
Beat - Community Builder Team Member
Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
Please Log in or Create an account to join the conversation.
Moderators: beat, nant, krileon