/** * F�gt die ben�tigen Stylesheets ein * * @param $params Extension-Point Parameter */ function rex_be_style_css_add($params) { $addon = "be_style"; foreach (OOPlugin::getAvailablePlugins($addon) as $plugin) { echo "\n" . '<link rel="stylesheet" type="text/css" href="../files/addons/' . $addon . '/plugins/' . $plugin . '/css_main.css" media="screen, projection, print" />'; } }
function execute() { global $REX; $config = OOPlugin::getProperty('cronjob', 'article_status', 'config'); $from = $config['from']; $to = $config['to']; $from['before'] = (array) $from['before']; $to['before'] = (array) $to['before']; $sql = rex_sql::factory(); // $sql->debugsql = true; $sql->setQuery(' SELECT name FROM ' . $REX['TABLE_PREFIX'] . '62_params WHERE name="' . $from['field'] . '" OR name="' . $to['field'] . '" '); $rows = $sql->getRows(); if ($rows < 2) { if ($rows == 0) { $msg = 'Metainfo fields "' . $from['field'] . '" and "' . $to['field'] . '" not found'; } else { $field = $sql->getValue('name') == $from['field'] ? $to['field'] : $from['field']; $msg = 'Metainfo field "' . $field . '" not found'; } $this->setMessage($msg); return false; } $time = time(); $sql->setQuery(' SELECT id, clang, status FROM ' . $REX['TABLE_PREFIX'] . 'article WHERE ( ' . $from['field'] . ' > 0 AND ' . $from['field'] . ' < ' . $time . ' AND status IN (' . implode(',', $from['before']) . ') AND (' . $to['field'] . ' > ' . $time . ' OR ' . $to['field'] . ' = 0 OR ' . $to['field'] . ' = "") ) OR ( ' . $to['field'] . ' > 0 AND ' . $to['field'] . ' < ' . $time . ' AND status IN (' . implode(',', $to['before']) . ') ) '); $rows = $sql->getRows(); include_once $REX['INCLUDE_PATH'] . '/functions/function_rex_structure.inc.php'; for ($i = 0; $i < $rows; $i++) { if (in_array($sql->getValue('status'), $from['before'])) { $status = $from['after']; } else { $status = $to['after']; } rex_articleStatus($sql->getValue('id'), $sql->getValue('clang'), $status); $sql->next(); } $this->setMessage('Updated articles: ' . $rows); return true; }
/** * Fügt die benötigen Stylesheets ein * * @param $params Extension-Point Parameter */ function rex_be_style_css_add($params) { global $REX; $addon = 'be_style'; foreach (OOPlugin::getAvailablePlugins($addon) as $plugin) { if (file_exists('../' . $REX['MEDIA_ADDON_DIR'] . '/' . $addon . '/plugins/' . $plugin . '/css_main.css')) { $params['subject'] .= "\n" . ' <link rel="stylesheet" type="text/css" href="../' . $REX['MEDIA_ADDON_DIR'] . '/' . $addon . '/plugins/' . $plugin . '/css_main.css" media="screen, projection, print" />'; } } return $params['subject']; }
/** * Fügt die benötigen Stylesheets ein * * @param $params Extension-Point Parameter */ function rex_be_script_js_add($params) { global $REX; $addon = 'be_style'; foreach (OOPlugin::getAvailablePlugins($addon) as $plugin) { if (file_exists('../' . $REX['MEDIA_ADDON_DIR'] . '/' . $addon . '/plugins/' . $plugin . '/js_main.js')) { $params['subject'] .= "\n" . ' <script type="text/javascript" src="../' . $REX['MEDIA_ADDON_DIR'] . '/' . $addon . '/plugins/' . $plugin . '/js_main.js"></script>'; } } return $params['subject']; }
public function doAction() { global $I18N, $REX; // $REX is needed for update.inc.php $path = rex_path::addon($this->addonkey); $temppath = rex_path::addon('.new.' . $this->addonkey); if (($msg = $this->extractArchiveTo($temppath)) !== true) { return $msg; } // ---- include update.php if (file_exists($temppath . 'update.inc.php')) { try { require $temppath . 'update.inc.php'; } catch (rex_install_functional_exception $e) { return $e->getMessage(); } if (($msg = OOAddon::getProperty($this->addonkey, 'updatemsg', '')) != '') { return $msg; } if (!OOAddon::getProperty($this->addonkey, 'update', true)) { return $I18N->msg('package_no_reason'); } } // ---- backup $assets = rex_path::addonAssets($this->addonkey); if (OOAddon::getProperty('install', 'backups')) { $archivePath = rex_path::addonData('install', $this->addonkey . '/'); rex_dir::create($archivePath); $archive = $archivePath . strtolower(preg_replace('/[^a-z0-9-_.]/i', '_', OOAddon::getVersion($this->addonkey))) . '.zip'; rex_install_archive::copyDirToArchive($path, $archive); if (is_dir($assets)) { rex_install_archive::copyDirToArchive($assets, $archive, 'assets'); } } // ---- copy plugins to new addon dir foreach (OOPlugin::getRegisteredPlugins($this->addonkey) as $plugin) { $pluginPath = $temppath . '/plugins/' . $plugin; if (!is_dir($pluginPath)) { rex_dir::copy(rex_path::plugin($this->addonkey, $plugin), $pluginPath); } elseif (OOPlugin::isInstalled($this->addonkey, $plugin) && is_dir($pluginPath . '/files')) { rex_dir::copy($pluginPath . '/files', rex_path::pluginAssets($this->addonkey, $plugin)); } } // ---- update main addon dir rex_dir::delete($path); rename($temppath, $path); // ---- update assets $origAssets = rex_path::addon($this->addonkey, 'assets'); if (is_dir($origAssets)) { rex_dir::copy($origAssets, $assets); } OOAddon::setProperty($this->addonkey, 'version', $this->file['version']); rex_install_packages::updatedPackage($this->addonkey, $this->fileId); }
function setProperty($plugin, $property, $value) { global $REX; // Plugin in Liste aufnehmen $plugins = OOPlugin::getRegisteredPlugins(); if (!in_array($plugin, $plugins)) { $plugins[$plugin] = $plugin; OOAddon::setProperty('community', 'pluginlist', $plugins); } if (!isset($REX['ADDON']['plugins']['community'][$plugin])) { $REX['ADDON']['plugins']['community'][$plugin] = array(); } // Property fuer das Plugin setzen $REX['ADDON']['plugins']['community'][$plugin][$property] = $value; }
$subPage->setHref('index.php?page=' . $addonName . '&subpage=' . $s[0]); $addonPage->addSubPage($subPage); } else { if (rex_be_main_page::isValid($s)) { $p = $s->getPage(); $REX['PAGES'][$addonName . '_' . $pluginName . '_' . $p->getTitle()] = $s; } else { if (rex_be_page::isValid($s) && $addonPage) { $addonPage->addSubPage($s); } } } } if ($pluginPage) { // "navigation" adds attributes to the plugin-root page $navProperties = OOPlugin::getProperty($addonName, $pluginName, 'navigation', array()); // if there are some navigation attributes set, create a main page and apply attributes to it if (count($navProperties) > 0) { $mainPluginPage = new rex_be_main_page($addonName, $pluginPage); foreach ($navProperties as $key => $value) { $mainPluginPage->_set($key, $value); } $REX['PAGES'][$addonName . '_' . $pluginName] = $mainPluginPage; } else { if ($addonPage) { $addonPage->addSubPage($pluginPage); } } } } }
if ($supportPage) { $supportPage = '<a href="http://' . $supportPage . '" onclick="window.open(this.href); return false;">' . $supportPage . '</a>'; } echo ' <tr class="rex-addon"> <td class="rex-col-a"><span class="' . $cl . '">' . htmlspecialchars($addon) . '</span> [<a href="index.php?page=addon&subpage=help&addonname=' . $addon . '">?</a>]</td> <td class="rex-col-b ' . $cl . '">' . $version . '</td> <td class="rex-col-c' . $cl . '">' . $author . '</td> <td class="rex-col-d' . $cl . '">' . $supportPage . '</td> </tr>'; if ($isActive) { foreach (OOPlugin::getAvailablePlugins($addon) as $plugin) { $isActive = OOPlugin::isActivated($addon, $plugin); $version = OOPlugin::getVersion($addon, $plugin); $author = OOPlugin::getAuthor($addon, $plugin); $supportPage = OOPlugin::getSupportPage($addon, $plugin); if ($isActive) { $cl = 'rex-clr-grn'; } else { $cl = 'rex-clr-red'; } if ($version) { $version = '[' . $version . ']'; } if ($author) { $author = htmlspecialchars($author); } if (!$isActive) { $author = $I18N->msg('credits_addon_inactive'); } if ($supportPage) {
<td class="rex-col-f">' . $delete . '</td> </tr>' . "\n "; if (OOAddon::isAvailable($addon)) { foreach ($PLUGINS[$addon] as $plugin) { $pluginurl = 'index.php?page=addon&addonname=' . $addon . '&pluginname=' . $plugin . '&'; $delete = '<a href="' . $pluginurl . 'delete=1" onclick="return confirm(\'' . htmlspecialchars($I18N->msg('plugin_delete_question', $plugin)) . '\');">' . $I18N->msg('addon_delete') . '</a>'; if (OOPlugin::isInstalled($addon, $plugin)) { $install = $I18N->msg('addon_yes') . ' - <a href="' . $pluginurl . 'install=1">' . $I18N->msg('addon_reinstall') . '</a>'; $uninstall = '<a href="' . $pluginurl . 'uninstall=1" onclick="return confirm(\'' . htmlspecialchars($I18N->msg('plugin_uninstall_question', $plugin)) . '\');">' . $I18N->msg('addon_uninstall') . '</a>'; } else { $install = $I18N->msg('addon_no') . ' - <a href="' . $pluginurl . 'install=1">' . $I18N->msg('addon_install') . '</a>'; $uninstall = $I18N->msg('addon_notinstalled'); } if (OOPlugin::isActivated($addon, $plugin)) { $status = $I18N->msg('addon_yes') . ' - <a href="' . $pluginurl . 'activate=0">' . $I18N->msg('addon_deactivate') . '</a>'; } elseif (OOPlugin::isInstalled($addon, $plugin)) { $status = $I18N->msg('addon_no') . ' - <a href="' . $pluginurl . 'activate=1">' . $I18N->msg('addon_activate') . '</a>'; } else { $status = $I18N->msg('addon_notinstalled'); } echo ' <tr class="rex-plugin"> <td class="rex-icon rex-col-a"><span class="rex-i-element rex-i-plugin"><span class="rex-i-element-text">' . htmlspecialchars($plugin) . '</span></span></td> <td class="rex-col-b">' . htmlspecialchars($plugin) . ' [<a href="index.php?page=addon&subpage=help&addonname=' . $addon . '&pluginname=' . $plugin . '">?</a>]</td> <td class="rex-col-c">' . $install . '</td> <td class="rex-col-d">' . $status . '</td> <td class="rex-col-e">' . $uninstall . '</td> <td class="rex-col-f">' . $delete . '</td> </tr>' . "\n "; } }
<th>' . $I18N_COM->msg("plugin_hactive") . '</th> <th>' . $I18N_COM->msg("plugin_hdelete") . '</th> </tr> </thead> <tbody>'; foreach ($plugins as $cur) { if (OOPlugin::isInstalled($cur)) { $install = $I18N_COM->msg("plugin_yes") . ' - <a href="index.php?page=community&subpage=plugin_manager&pluginname=' . $cur . '&install=1">' . $I18N_COM->msg("plugin_reinstall") . '</a>'; $uninstall = '<a href="index.php?page=community&subpage=plugin_manager&pluginname=' . $cur . '&uninstall=1" onclick="return confirm(\'' . htmlspecialchars($I18N_COM->msg("plugin_uninstall_question", $cur)) . '\');">' . $I18N_COM->msg("plugin_uninstall") . '</a>'; } else { $install = $I18N_COM->msg("plugin_no") . ' - <a href="index.php?page=community&subpage=plugin_manager&pluginname=' . $cur . '&install=1">' . $I18N_COM->msg("plugin_install") . '</a>'; $uninstall = $I18N_COM->msg("plugin_notinstalled"); } if (OOPlugin::isActivated($cur)) { $status = $I18N_COM->msg("plugin_yes") . ' - <a href="index.php?page=community&subpage=plugin_manager&pluginname=' . $cur . '&activate=0">' . $I18N_COM->msg("plugin_deactivate") . '</a>'; } elseif (OOPlugin::isInstalled($cur)) { $status = $I18N_COM->msg("plugin_no") . ' - <a href="index.php?page=community&subpage=plugin_manager&pluginname=' . $cur . '&activate=1">' . $I18N_COM->msg("plugin_activate") . '</a>'; } else { $status = $I18N_COM->msg("plugin_notinstalled"); } echo ' <tr> <td class="rex-icon"><img src="media/addon.gif" alt="' . htmlspecialchars($cur) . '" title="' . htmlspecialchars($cur) . '"/></td> <td>' . htmlspecialchars($cur) . ' [<a href="index.php?page=community&subpage=plugin_manager&function=help&pluginname=' . $cur . '">?</a>]</td> <td>' . $install . '</td> <td>' . $status . '</td> <td>' . $uninstall . '</td> </tr>' . "\n "; } echo '</tbody> </table>';
<?php if (OOPlugin::isInstalled('xform', 'manager')) { include rex_path::plugin('xform', 'manager', 'install.inc.php'); } $REX['ADDON']['update']['xform'] = true;
<?php // append lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/lang/'); if (OOPlugin::isAvailable('be_style', 'customizer')) { $REX['ADDON']['installmsg']['be_utilities'] = $I18N->msg('be_utilities_uninstall_customizer'); } else { $REX['ADDON']['install']['be_utilities'] = 1; }
/** * @param $addons,... */ public static function setSeoAddon($addons) { $addons = func_get_args(); foreach ($addons as $addon) { if (OOAddon::isAvailable($addon)) { self::$seoAddon = $addon; // Kompatibilität erhalten rex_asd_news::$SEO_ADDON = self::$seoAddon; } } self::$seoSettings = self::setSeoSettings(); if (self::$seoAddon) { self::$urlControlPlugin = OOPlugin::isAvailable(self::$seoAddon, 'url_control'); } // Kompatibilität erhalten rex_asd_news::$SEO_URL_CONTROL = self::$urlControlPlugin; }
if (rex_request('rex_logout') == 1) { // reset website selection rex_set_session('current_website_id', rex_website::firstId); // show user msg when no permissions for any websites if (rex_request('noperm_msg') == 1) { rex_register_extension('OUTPUT_FILTER', 'rex_website_manager_utils::noPermMsg'); } } // check for existence of website manager object if (isset($REX['WEBSITE_MANAGER'])) { // used for addon uninstall to stop user from uninstallig when wm codeline ist still in master.inc.php $REX['WEBSITE_MANAGER_DO_UNINSTALL'] = false; // add subpages $REX['ADDON']['website_manager']['SUBPAGES'] = array(array('', $I18N->msg('website_manager_websites'))); // plugins (will be autoloaded incl. language file) $plugins = OOPlugin::getAvailablePlugins('website_manager'); for ($i = 0; $i < count($plugins); $i++) { $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/website_manager/plugins/' . $plugins[$i] . '/lang/'); // make msg for subpage available at this point array_push($REX['ADDON']['website_manager']['SUBPAGES'], array($plugins[$i], $I18N->msg('website_manager_' . $plugins[$i]))); } array_push($REX['ADDON']['website_manager']['SUBPAGES'], array('tools', $I18N->msg('website_manager_tools')), array('settings', $I18N->msg('website_manager_settings')), array('setup', $I18N->msg('website_manager_setup')), array('help', $I18N->msg('website_manager_help'))); } else { // this is only neccesary until user has put this code line in master.inc.php require_once WEBSITE_MANAGER_GENERATED_DIR . 'init.inc.php'; // used for addon uninstall to stop user from uninstallig when wm codeline ist still in master.inc.php $REX['WEBSITE_MANAGER_DO_UNINSTALL'] = true; // add only setup subpage $REX['ADDON']['website_manager']['SUBPAGES'] = array(array('', $I18N->msg('website_manager_setup')), array('settings', $I18N->msg('website_manager_settings')), array('help', $I18N->msg('website_manager_help'))); } if (rex_request('page') != '') {
// init addon $REX['ADDON']['name']['navigation_factory'] = 'Navigation Factory'; $REX['ADDON']['page']['navigation_factory'] = 'navigation_factory'; $REX['ADDON']['version']['navigation_factory'] = '1.1.1'; $REX['ADDON']['author']['navigation_factory'] = 'RexDude'; $REX['ADDON']['supportpage']['navigation_factory'] = 'forum.redaxo.org'; $REX['ADDON']['perm']['navigation_factory'] = 'navigation_factory[]'; // permissions $REX['PERM'][] = 'navigation_factory[]'; // add lang file if ($REX['REDAXO']) { $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/navigation_factory/lang/'); } // includes require $REX['INCLUDE_PATH'] . '/addons/navigation_factory/classes/class.rex_nav.inc.php'; require $REX['INCLUDE_PATH'] . '/addons/navigation_factory/classes/class.rex_lang_nav.inc.php'; require $REX['INCLUDE_PATH'] . '/addons/navigation_factory/classes/class.rex_breadcrumb_nav.inc.php'; require $REX['INCLUDE_PATH'] . '/addons/navigation_factory/classes/class.rex_navigation_factory_utils.inc.php'; if (rex_request('page') != 'addon') { if (!class_exists('simple_html_dom_node') && !OOPlugin::isAvailable('rexsearch', 'plaintext')) { require $REX['INCLUDE_PATH'] . '/addons/navigation_factory/classes/class.simple_html_dom.inc.php'; } } if ($REX['REDAXO']) { // add subpages $REX['ADDON']['navigation_factory']['SUBPAGES'] = array(array('', $I18N->msg('navigation_factory_start')), array('codeexamples', $I18N->msg('navigation_factory_codeexamples')), array('help', $I18N->msg('navigation_factory_help'))); // add css/js files to page header if (rex_request('page') == 'navigation_factory') { rex_register_extension('PAGE_HEADER', 'rex_navigation_factory_utils::appendToPageHeader'); } }
echo rex_warning($I18N->msg('tracking_code_configfile_nosave')); } } rex_tracking_code::init(); $trackingCode = rex_tracking_code::getTrackingCode(); ?> <div class="rex-addon-output"> <h2 class="rex-hl2"><?php echo $I18N->msg('tracking_code_tracking_code', rex_tracking_code_utils::sanitizeUrl($REX['SERVER'])); ?> </h2> <div class="rex-area-content"> <form action="index.php" method="post"> <textarea <?php if (OOPlugin::isAvailable('be_utilities', 'codemirror') || isset($REX['ADDON']['be_style']['plugin_customizer']['codemirror']) && $REX['ADDON']['be_style']['plugin_customizer']['codemirror'] == 1) { ?> style="display: none;"<?php } ?> class="codemirror" codemirror-mode="php/htmlmixed" name="tracking_code"><?php echo $trackingCode; ?> </textarea> <input type="hidden" name="page" value="tracking_code" /> <input type="hidden" name="subpage" value="" /> <input type="hidden" name="func" value="save" /> <div class="rex-form-row"> <p class="button"><input type="submit" class="rex-form-submit" name="sendit" value="<?php echo $I18N->msg('tracking_code_save_button');
<?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');
$REX['ADDON']['navigation'][$mypage] = array('activateCondition' => array('page' => $mypage, 'subpage' => 'manager'), 'hidden' => false); if ($REX['USER'] && !$REX['USER']->isAdmin()) { $REX['ADDON']['navigation'][$mypage]['hidden'] = true; } $REX['ADDON']['xform']['SUBPAGES'][] = array('manager', $I18N->msg('xform_table_manager')); rex_register_extension('OOMEDIA_IS_IN_USE', 'rex_xform_manager::checkMediaInUse'); rex_register_extension('ADDONS_INCLUDED', function () { global $REX, $I18N; $tables = rex_xform_manager_table::getAll(); $subpages = array(); foreach ($tables as $table) { $table_perm = 'xform[table:' . $table['table_name'] . ']'; $REX['EXTPERM'][] = $table_perm; if ($table['status'] == 1 && $table['hidden'] != 1 && $REX['USER'] && ($REX['USER']->isAdmin() || $REX['USER']->hasPerm($table_perm))) { $table_name = rex_translate($table['name']); if ($I18N) { $I18N->addMsg($table['table_name'], $table_name); } $be_page = new rex_be_page($table_name, array('page' => 'xform', 'subpage' => 'manager', 'tripage' => 'data_edit', 'table_name' => $table['table_name'])); $be_page->setHref('index.php?page=xform&subpage=manager&tripage=data_edit&table_name=' . $table['table_name']); $subpages[] = new rex_be_main_page('manager', $be_page); } } $subpages = rex_register_extension_point('XFORM_MANAGER_SUBPAGES_TABLES', $subpages); OOPlugin::setProperty('xform', 'manager', 'pages', $subpages); }); // hack - if data edit, then deactivate xform navigation if (rex_request('tripage', 'string') == 'data_edit') { $REX['ADDON']['navigation']['xform'] = array('activateCondition' => array('page' => 'xformmm'), 'hidden' => false); } }
// add tools page only $REX['ADDON']['seo42']['SUBPAGES'][] = array('tools', $I18N->msg('seo42_tools')); } if ($REX['USER']->hasPerm('seo42[redirects_only]')) { // add redirects page only $REX['ADDON']['seo42']['SUBPAGES'][] = array('redirects', $I18N->msg('seo42_redirects')); } $REX['ADDON']['seo42']['SUBPAGES'][0][0] = ''; } else { // add subpages $REX['ADDON']['seo42']['SUBPAGES'] = array(array('', $I18N->msg('seo42_start')), array('tools', $I18N->msg('seo42_tools'))); if ($REX['ADDON']['seo42']['settings']['redirects']) { array_push($REX['ADDON']['seo42']['SUBPAGES'], array('redirects', $I18N->msg('seo42_redirects'))); } // plugins (will be autoloaded incl. language file) $plugins = OOPlugin::getAvailablePlugins('seo42'); for ($i = 0; $i < count($plugins); $i++) { if (file_exists($REX['INCLUDE_PATH'] . '/addons/seo42/plugins/' . $plugins[$i] . '/pages/' . $plugins[$i] . '.inc.php')) { $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/seo42/plugins/' . $plugins[$i] . '/lang/'); // make msg for subpage available at this point array_push($REX['ADDON']['seo42']['SUBPAGES'], array($plugins[$i], $I18N->msg('seo42_' . $plugins[$i]))); } } // rest of sub pages array_push($REX['ADDON']['seo42']['SUBPAGES'], array('settings', $I18N->msg('seo42_settings')), array('setup', $I18N->msg('seo42_setup')), array('help', $I18N->msg('seo42_help'))); } // add css/js files to page header if (rex_request('page') == 'seo42') { rex_register_extension('PAGE_HEADER', 'seo42_utils::appendToPageHeader'); } // check if seopage/urlpage needs to be enabled
$select->addOption($template['name'], $template['id']); } } else { // normal text $field =& $form->addTextField('default_template_id', $defaultId); $field->setLabel($I18N->msg('website_manager_website_default_template_id')); } // protocol $field =& $form->addSelectField('protocol'); $field->setLabel($I18N->msg('website_manager_website_protocol')); $select =& $field->getSelect(); $select->setSize(1); $select->addOption($I18N->msg('website_manager_website_http'), 'http'); $select->addOption($I18N->msg('website_manager_website_https'), 'https'); // theme if (OOPlugin::isAvailable('website_manager', 'themes')) { $field =& $form->addSelectField('theme_id'); $field->setLabel($I18N->msg('website_manager_website_theme')); $select =& $field->getSelect(); $select->setSize(1); $select->addOption($I18N->msg('website_manager_theme_none'), 0); $query = 'SELECT name as label, id FROM rex_website_theme'; $select->addSqlOptions($query); } if ($func == 'edit') { $key = $I18N->msg('website_manager_edit_button_key'); if ($REX['WEBSITE_MANAGER_SETTINGS']['allow_website_delete']) { if ($website_id == 1) { $form->elements[$key][0]->deleteElement->setAttribute('onclick', "alert('" . $I18N->msg('website_manager_website_master_website_disallow_delete') . "'); return false;"); } else { $form->elements[$key][0]->deleteElement->setAttribute('onclick', "return confirm('" . $I18N->msg('website_manager_website_delete_confirm') . "');");
foreach ($REX['ADDON']['community']['xform_path']['value'] as $value) { $REX['ADDON']['xform']['classpaths']['value'][] = $value; } foreach ($REX['ADDON']['community']['xform_path']['validate'] as $validate) { $REX['ADDON']['xform']['classpaths']['validate'][] = $validate; } foreach ($REX['ADDON']['community']['xform_path']['action'] as $action) { $REX['ADDON']['xform']['classpaths']['action'][] = $action; } } // ----- PlugIns $REX['ADDON']['community']['subpages'] = array(); // Welche Seiten werden noch eingebunden require $REX["INCLUDE_PATH"] . "/addons/community/classes/class.ooplugin.inc.php"; require $REX["INCLUDE_PATH"] . "/addons/community/plugins.inc.php"; foreach (OOPlugin::getAvailablePlugins() as $plugin_name) { include $REX["INCLUDE_PATH"] . '/addons/community/plugins/' . $plugin_name . '/config.inc.php'; } /* // Tab Start define("REX_COM_PAGE_PROFIL_ID",42); define("REX_COM_PAGE_MYPROFIL_ID",30); define("REX_COM_PAGE_REGISTER_ID",32); define("REX_COM_PAGE_PSWFORGOTTEN_ID",33); // Tab Ende // status wird über kategorie vergeben. // in metaform eingetragen mit default = 1 und select/radiobox // -> cat_perms // --> 1 _ alle, 2 _ nur eingeloggte, 3 _ nur nicht eingeloggte, 4 _ admins $REX["ADDON_COMMUNITY"]["config"]["link"]["login"]["id"] = 1; $REX["ADDON_COMMUNITY"]["config"]["link"]["userdetail"]["id"] = 207;
} $lang_chooser .= "<a href='" . $_SERVER["PHP_SELF"] . "?page=" . $page . "&subpage=" . $subpage . "&subform=" . ($clang_id + 1) . "&func=" . $func_link . "&entry_id=" . $entry_id . "' " . $style . ">"; $lang_chooser .= $clang_name; $lang_chooser .= "</a>"; } } } if ($subform == 0) { $form = rex_form::factory($REX['TABLE_PREFIX'] . 'd2u_stellenmarkt_kategorien', $I18N_STELLEN->msg('kategorien') . " " . $I18N_STELLEN->msg('sprachunabhaengig'), "kategorie_id = " . $entry_id, "post", false); // Formularauswahl $form->addRawField(raw_field("", $lang_chooser)); // Interne Bezeichnung $field = $form->addTextField('interne_bezeichnung'); $field->setLabel($I18N_STELLEN->msg('interne_bezeichnung')); // HR4YOU Katageorie ID if (OOPlugin::isAvailable('d2u_stellenmarkt', 'hr4you_sync')) { $field = $form->addTextField('hr4you_berufskategorie_id'); $field->setLabel($I18N_STELLEN->msg('hr4you_berufskategorie_id')); } if ($func == 'edit') { $form->addParam('entry_id', $entry_id); } // Trigger für SEO42 Pathlist Update $form->addParam('seo42', 'update'); $form->show(); } else { // CLANG wird in variable $subform uebergeben; -1 da Sprachen mit ID 0 beginnen, PHP diesen Wert aber nicht uebermittelt $clang_id = $subform - 1; $form = rex_form::factory($REX['TABLE_PREFIX'] . 'd2u_stellenmarkt_kategorien_lang', $I18N_STELLEN->msg('kategorien') . " " . $REX['CLANG'][$clang_id], "kategorie_id = " . $entry_id . " AND clang_id = " . $clang_id, "post", false); // Formularauswahl $form->addRawField(raw_field("", $lang_chooser));
static function getAvailablePlugins($addon) { return OOPlugin::getAvailablePlugins($addon); }
<?php if ($REX['REDAXO']) { // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/frontend_link/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON']['frontend_link']['settings'] = array('metamenu_link' => 'default', 'metamenu_link_text' => '', 'metamenu_header_link' => true); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile('frontend_link'); /// register plugin rex_plugin_factory::registerPlugin('be_utilities', 'frontend_link', 'Frontend Link', $I18N->msg('frontend_link_description'), '1.0.0', 'RexDude', 'forum.redaxo.de', true); // includes include $REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/frontend_link/classes/class.rex_frontend_link.inc.php'; // add link to backend $thisRexVersion = $REX['VERSION'] . '.' . $REX['SUBVERSION'] . '.' . $REX['MINORVERSION']; if ($REX['ADDON']['frontend_link']['settings']['metamenu_link'] != 'none') { if (version_compare($thisRexVersion, '4.5.0', '<')) { rex_register_extension('OUTPUT_FILTER', 'rex_frontend_link::addFrontendLinkByOutputFilterEP'); } else { rex_register_extension('META_NAVI', 'rex_frontend_link::addFrontendLinkByMetaNaviEP'); } } if ($REX['ADDON']['frontend_link']['settings']['metamenu_header_link'] && OOPlugin::isActivated('be_utilities', 'frontend_link')) { // link in header if (rex_request('page') != 'mediapool' && rex_request('page') != 'linkmap') { rex_register_extension('OUTPUT_FILTER', 'rex_frontend_link::addToOutputFilter'); } // link in metamenu rex_register_extension('PAGE_HEADER', 'rex_frontend_link::addToPageHeader'); } }
$func = rex_request('func'); if ($page == rex_asd_news_config::getName()) { require_once rex_path::addon(rex_asd_news_config::getName(), 'classes/rex_asd_news_ajaxHandler.php'); rex_register_extension('PAGE_HEADER', 'asd_news_setjQueryTags'); // Ajax Publish if ($func == 'publish') { $id = rex_post('id', 'int'); $clang = rex_post('clang', 'int'); try { $time = new DateTime(rex_post('time')); } catch (Exception $e) { $time = new DateTime(); } echo rex_asd_news_ajaxHandler::publishNews($id, $clang, $time); exit; } } // add / remove News if lang added or removed rex_register_extension('CLANG_ADDED', 'asd_news_addClang'); rex_register_extension('CLANG_DELETED', 'asd_news_deleteClang'); // check if image in use rex_register_extension('OOMEDIA_IS_IN_USE', 'rex_asd_news_utils::isImageInUse'); // autoload Plugins $plugins = OOPlugin::getAvailablePlugins(rex_asd_news_config::getName()); foreach ($plugins as $name) { if (file_exists(rex_path::plugin(rex_asd_news_config::getName(), $name, 'pages' . DIRECTORY_SEPARATOR . $name))) { $I18N->appendFile(rex_path::plugin(rex_asd_news_config::getName(), $name, 'lang' . DIRECTORY_SEPARATOR)); array_push($REX['ADDON'][rex_asd_news_config::getName()]['SUBPAGES'], array($name, $I18N->msg(rex_asd_news_config::getName() . '_' . $name))); } } }
function rex_generatePlugins($plugins) { global $REX; natsort($plugins); $content = ""; foreach ($plugins as $cur) { if (!OOPlugin::isInstalled($cur)) { OOPlugin::setProperty($cur, 'install', 0); } if (!OOPlugin::isActivated($cur)) { OOPlugin::setProperty($cur, 'status', 0); } $content .= sprintf("%s = %d;\n%s = %d;\n\n", OOPlugin::getAsPropertyString($cur, 'install'), OOPlugin::getProperty($cur, 'install'), OOPlugin::getAsPropertyString($cur, 'status'), OOPlugin::getProperty($cur, 'status')); } $content .= sprintf("\$REX['ADDON']['pluginlist']['community'] = \"%s\";", implode(',', OOPlugin::getRegisteredPlugins())); // Da dieser Funktion öfter pro request aufgerufen werden kann, // hier die caches löschen clearstatcache(); $file = rex_plugins_file(); if (!rex_replace_dynamic_contents($file, $content)) { return 'Datei "' . $file . '" hat keine Schreibrechte'; } return true; }
/** * Schreibt Plugineigenschaften in die Datei include/plugins.inc.php * * @param array Array mit den Namen der Plugins aus dem Verzeichnis addons/plugins * * @return TRUE bei Erfolg, sonst eine Fehlermeldung */ function rex_generatePlugins($PLUGINS) { global $REX; $content = ''; foreach ($PLUGINS as $addon => $_plugins) { foreach ($_plugins as $plugin) { if (!OOPlugin::isInstalled($addon, $plugin)) { OOPlugin::setProperty($addon, $plugin, 'install', 0); } if (!OOPlugin::isActivated($addon, $plugin)) { OOPlugin::setProperty($addon, $plugin, 'status', 0); } foreach (array('install', 'status') as $prop) { $content .= sprintf("\$REX['ADDON']['plugins']['%s']['%s']['%s'] = '%d';\n", $addon, $prop, $plugin, OOPlugin::getProperty($addon, $plugin, $prop)); } $content .= "\n"; } } // Da dieser Funktion öfter pro request aufgerufen werden kann, // hier die caches löschen clearstatcache(); $file = $REX['INCLUDE_PATH'] . '/plugins.inc.php'; if (rex_replace_dynamic_contents($file, $content) === false) { return 'Datei "' . $file . '" hat keine Schreibrechte'; } return true; }
function getInstalledPlugins($addon) { $avail = array(); foreach (OOPlugin::getRegisteredPlugins($addon) as $plugin) { if (OOPlugin::isInstalled($addon, $plugin)) { $avail[] = $plugin; } } return $avail; }
// Name $field = $form->addTextField('name'); $field->setLabel($I18N_KURSE->msg('name')); $field->setAttribute('maxlenght', '25'); // Bild $field = $form->addMediaField('bild'); $field->setLabel($I18N_KURSE->msg('bild')); // Elternkategorie $field = $form->addSelectField('eltern_zielgruppe_id'); $field->setLabel($I18N_KURSE->msg('elternkategorie')); $elternkategorie = $field->getSelect(); $elternkategorie->setSize(1); $elternkategorie->addOption($I18N_KURSE->msg('keine_eltern'), -1); $elternkategorie_sql = 'SELECT name, zielgruppe_id FROM ' . $REX['TABLE_PREFIX'] . 'd2u_kurse_zielgruppen ' . 'WHERE zielgruppe_id <> ' . $entry_id . ' ' . 'AND (eltern_zielgruppe_id < 0 OR eltern_zielgruppe_id IS NULL) ' . 'ORDER BY name'; $elternkategorie->addSqlOptions($elternkategorie_sql); if (OOPlugin::isAvailable('d2u_kurse', 'kufer_import')) { // Name der entsprechenden Kufer Kategorie $field = $form->addTextField('kufer_zielgruppe_name'); $field->setLabel($I18N_KURSE->msg('kufer_kategorie_name')); // Kategorie Bezeichnungsstrukturen in Kufer $field = $form->addTextAreaField('kufer_kategorien_bezeichnungsstrukturen'); $field->setLabel($I18N_KURSE->msg('kufer_kategorien_bezeichnungsstrukturen')); $field->setAttribute('rows', '15'); } // Updatedatum $field = $form->addHiddenField('updatedate'); $field->setValue(time()); if ($func == 'edit') { $form->addParam('entry_id', $entry_id); } // Trigger für RexSEO Pathlist Update
<?php // append lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/website_manager/lang/'); // check redaxo version if (version_compare($REX['VERSION'] . '.' . $REX['SUBVERSION'] . '.' . $REX['MINORVERSION'], '4.4.1', '<=')) { // version incorrect $REX['ADDON']['installmsg']['website_manager'] = $I18N->msg('website_manager_install_rex_version'); } elseif (OOPlugin::isAvailable('be_utilities', 'colorizer')) { // colorizer plugin $REX['ADDON']['installmsg']['website_manager'] = $I18N->msg('website_manager_install_colorizer'); } elseif (OOPlugin::isAvailable('be_utilities', 'frontend_link')) { // prontend_link plugin $REX['ADDON']['installmsg']['website_manager'] = $I18N->msg('website_manager_install_frontend_link'); } elseif (OOPlugin::isAvailable('be_style', 'customizer') && (isset($REX['ADDON']['be_style']['plugin_customizer']['labelcolor']) && $REX['ADDON']['be_style']['plugin_customizer']['labelcolor'] != '') || isset($REX['ADDON']['be_style']['plugin_customizer']['showlink']) && $REX['ADDON']['be_style']['plugin_customizer']['showlink'] == 1) { // customizer plugin $REX['ADDON']['installmsg']['website_manager'] = $I18N->msg('website_manager_install_customizer'); } else { // version correct. proceed... require_once $REX['INCLUDE_PATH'] . '/addons/website_manager/paths.inc.php'; require_once $REX['INCLUDE_PATH'] . '/addons/website_manager/classes/class.rex_website.inc.php'; require_once $REX['INCLUDE_PATH'] . '/addons/website_manager/classes/class.rex_website_manager.inc.php'; require_once $REX['INCLUDE_PATH'] . '/addons/website_manager/classes/class.rex_website_manager_utils.inc.php'; $firstWebsiteId = rex_website::firstId; $firstWebsiteColor = rex_website::defaultColor; $firstTablePrefix = rex_website::tablePrefix; $firstWebsiteProtocol = rex_website::defaultProtocol; $defaultThemeId = rex_website::defaultThemeId; $sql = new rex_sql(); //$sql->debugsql = true; $sql->setQuery('CREATE TABLE IF NOT EXISTS `rex_website` (