Beispiel #1
0
 * @author markus[dot]staab[at]redaxo[dot]de Markus Staab
 * @author <a href="http://www.redaxo.de">www.redaxo.de</a>
 *
 * @package redaxo4
 * @version svn:$Id$
 */
$error = '';
// "agk_skin" Plugin mitinstallieren
$addonname = 'be_style';
$plugins = array('agk_skin');
$ADDONS = rex_read_addons_folder();
$PLUGINS = array();
foreach ($ADDONS as $_addon) {
    $PLUGINS[$_addon] = rex_read_plugins_folder($_addon);
}
$pluginManager = new rex_pluginManager($PLUGINS, $addonname);
foreach ($plugins as $pluginname) {
    // plugin installieren
    if (($instErr = $pluginManager->install($pluginname)) !== true) {
        $error = $instErr;
    }
    // plugin aktivieren
    if ($error == '' && ($actErr = $pluginManager->activate($pluginname)) !== true) {
        $error = $actErr;
    }
    if ($error != '') {
        break;
    }
}
if ($error != '') {
    $REX['ADDON']['installmsg']['be_style'] = $error;
 function includeUninstaller($addonName, $uninstallFile)
 {
     rex_pluginManager::addon2plugin($this->addonName, $addonName, $uninstallFile);
 }
Beispiel #3
0
<?php

/**
 * Addonlist
 * @package redaxo4
 * @version svn:$Id$
 */
// ----------------- addons
unset($REX['ADDON']);
$REX['ADDON'] = array();
// ----------------- DONT EDIT BELOW THIS
// --- DYN
$REX['ADDON']['install']['be_style'] = '1';
$REX['ADDON']['status']['be_style'] = '1';
// --- /DYN
// ----------------- /DONT EDIT BELOW THIS
require $REX['INCLUDE_PATH'] . '/plugins.inc.php';
foreach (OOAddon::getAvailableAddons() as $addonName) {
    $addonConfig = rex_addons_folder($addonName) . 'config.inc.php';
    if (file_exists($addonConfig)) {
        require $addonConfig;
    }
    foreach (OOPlugin::getAvailablePlugins($addonName) as $pluginName) {
        $pluginConfig = rex_plugins_folder($addonName, $pluginName) . 'config.inc.php';
        if (file_exists($pluginConfig)) {
            rex_pluginManager::addon2plugin($addonName, $pluginName, $pluginConfig);
        }
    }
}
// ----- all addons configs included
rex_register_extension_point('ADDONS_INCLUDED');
 public static function autoInstallPlugins($addon, $plugins)
 {
     // take from xform install routine :)
     $msg = '';
     // GET ALL ADDONS & PLUGINS
     $all_addons = rex_read_addons_folder();
     $all_plugins = array();
     foreach ($all_addons as $_addon) {
         $all_plugins[$_addon] = rex_read_plugins_folder($_addon);
     }
     // DO AUTOINSTALL
     $pluginManager = new rex_pluginManager($all_plugins, $addon);
     foreach ($plugins as $pluginname) {
         if (in_array($pluginname, $all_plugins[$addon])) {
             // check if plugin that should be auto install really exists in addon folder
             // INSTALL PLUGIN
             if (($instErr = $pluginManager->install($pluginname)) !== true) {
                 $msg = $instErr;
             }
             // ACTIVATE PLUGIN
             if ($msg == '' && ($actErr = $pluginManager->activate($pluginname)) !== true) {
                 $msg = $actErr;
             }
             if ($msg != '') {
                 break;
             }
         }
     }
     return $msg;
 }
 * 
 * @author markus[dot]staab[at]redaxo[dot]de Markus Staab
 * @author <a href="http://www.redaxo.de">www.redaxo.de</a>
 *
 * @package redaxo4
 * @version svn:$Id$
 */
$error = '';
// "agk_skin" Plugin mitinstallieren
$addonname = 'be_style';
$pluginname = 'agk_skin';
$ADDONS = rex_read_addons_folder();
$PLUGINS = array();
foreach ($ADDONS as $_addon) {
    $PLUGINS[$_addon] = rex_read_plugins_folder($_addon);
}
$addonManager = new rex_pluginManager($PLUGINS, $addonname);
$addonManager->install($pluginname);
// plugin installieren
if (($instErr = $addonManager->install('agk_skin')) !== true) {
    $error = $instErr;
}
// plugin aktivieren
if ($error == '' && ($actErr = $addonManager->activate('agk_skin')) !== true) {
    $error = $actErr;
}
if ($error != '') {
    $REX['ADDON']['installmsg']['be_style'] = $error;
} else {
    $REX['ADDON']['install']['be_style'] = true;
}