<?php /** * decaf_upload_precompressor * * @author DECAF * @version $Id$ */ if ($REX['REDAXO']) { $mypage = 'upload_precompressor'; // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/upload_precompressor/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON'][$mypage]['settings'] = array('max_pixel' => 1200, 'jpg_quality' => 90); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile($mypage); // register plugin rex_plugin_factory::registerPlugin('be_utilities', 'upload_precompressor', 'Upload Precompressor', $I18N->msg('upload_precompressor_description'), '1.2.0', 'DECAF, RexDude', 'forum.redaxo.de', true); // includes require_once $REX['INCLUDE_PATH'] . "/addons/be_utilities/plugins/" . $mypage . "/extensions/extension." . $mypage . ".inc.php"; }
<?php $func = rex_request('func', 'string'); // save settings if ($func == 'update') { $thisPlugin = 'agk_skin_plus'; $settings = (array) rex_post('settings', 'array', array()); rex_backend_utilities::replaceSettings($thisPlugin, $settings); rex_backend_utilities::updateSettingsFile($thisPlugin); } ?> <div class="rex-addon-output"> <div class="rex-form"> <h2 class="rex-hl2"><?php echo $I18N->msg('agk_skin_plus_features'); ?> </h2> <div class="rex-form-wrapper"> <ul id="features"> <li><?php echo $I18N->msg('agk_skin_plus_feature1'); ?> </li> <li><?php echo $I18N->msg('agk_skin_plus_feature2'); ?> </li> <li><?php echo $I18N->msg('agk_skin_plus_feature3'); ?>
<?php if ($REX['REDAXO']) { // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/articlename_sync/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON']['articlename_sync']['settings'] = array('sync_cat_to_art' => true, 'sync_art_to_cat' => true); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile('articlename_sync'); // register plugin rex_plugin_factory::registerPlugin('be_utilities', 'articlename_sync', 'Articlename Sync', $I18N->msg('articlename_sync_description'), '1.0.0', 'RexDude', 'forum.redaxo.de', true); // includes include $REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/articlename_sync/classes/class.rex_articlename_sync.inc.php'; // sync cat to art if ($REX['ADDON']['articlename_sync']['settings']['sync_cat_to_art']) { rex_register_extension('CAT_UPDATED', 'rex_articlename_sync::syncCatname2Artname'); } // sync art to cat if ($REX['ADDON']['articlename_sync']['settings']['sync_art_to_cat']) { rex_register_extension('ART_UPDATED', 'rex_articlename_sync::syncArtname2Catname'); rex_register_extension('ART_META_UPDATED', 'rex_articlename_sync::syncArtname2Catname'); } }
<?php if ($REX['REDAXO']) { // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/colorizer/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON']['colorizer']['settings'] = array('labelcolor' => '#47a1ce', 'colorize_favicon' => false); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile('colorizer'); // register plugin rex_plugin_factory::registerPlugin('be_utilities', 'colorizer', 'Colorizer', $I18N->msg('colorizer_description'), '1.3.1', 'Jan Kristinus', 'www.redaxo.org/de/forum', true); // includes include $REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/colorizer/classes/class.rex_colorizer_utils.inc.php'; // add stuff to ep's if (rex_request('page') != 'mediapool' && rex_request('page') != 'linkmap') { rex_register_extension('PAGE_HEADER', 'rex_colorizer_utils::addToPageHeader'); } if ($REX['ADDON']['colorizer']['settings']['colorize_favicon'] && $REX['ADDON']['colorizer']['settings']['labelcolor'] != '') { rex_register_extension('OUTPUT_FILTER', 'rex_colorizer_utils::addToOutputFilter'); } }
<?php if ($REX['REDAXO']) { // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/agk_skin_plus/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON']['agk_skin_plus']['settings'] = array('liquid_layout' => false); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile('agk_skin_plus'); // register plugin rex_plugin_factory::registerPlugin('be_utilities', 'agk_skin_plus', 'AgkSkin Plus', $I18N->msg('agk_skin_plus_description'), '1.0.0', 'RexDude', 'forum.redaxo.de', true); // liquid layout if ($REX['ADDON']['agk_skin_plus']['settings']['liquid_layout']) { rex_register_extension('PAGE_BODY_ATTR', function ($params) { $params['subject']['class'][] = 'rex-layout-liquid'; $params['subject']['class'][] = 'be-style-customizer-textarea-big'; return $params['subject']; }); } // add css rex_register_extension('PAGE_HEADER', function ($params) { global $REX; $params["subject"] .= "\n" . ' <link rel="stylesheet" type="text/css" href="../' . $REX['MEDIA_ADDON_DIR'] . '/be_utilities/plugins/agk_skin_plus/agk_skin_plus.css" media="screen, projection, print" />'; return $params["subject"]; }); }
<?php if ($REX['REDAXO']) { // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/category_separator/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON']['category_separator']['settings'] = array('cat_id' => ''); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile('category_separator'); // register plugin rex_plugin_factory::registerPlugin('be_utilities', 'category_separator', 'Category Separator', $I18N->msg('category_separator_description'), '1.0.0', 'RexDude', 'forum.redaxo.de', true); // includes include $REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/category_separator/classes/class.rex_category_separator.inc.php'; if ($REX['ADDON']['category_separator']['settings']['cat_id'] != '' && rex_request('page') == 'structure' && (rex_request('category_id') == '' || rex_request('category_id') == '0') && rex_request('function') == '') { // only for root cats rex_register_extension('OUTPUT_FILTER', 'rex_category_separator::splitTable'); } }
<?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'); } }
<?php if ($REX['REDAXO']) { // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/rex_globals/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON']['rex_globals']['settings'] = array('include_template_id' => 0); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile('rex_globals'); // register plugin rex_plugin_factory::registerPlugin('be_utilities', 'rex_globals', 'Rex Globals', $I18N->msg('rex_globals_description'), '1.0.0', 'RexDude', 'forum.redaxo.de', true); // include template if (!$REX['SETUP'] && $REX['ADDON']['rex_globals']['settings']['include_template_id'] > 0) { rex_register_extension('ADDONS_INCLUDED', 'includeGlobalTemplate'); function includeGlobalTemplate() { global $REX; $sql = rex_sql::factory(); $qry = 'SELECT content FROM ' . $REX['TABLE_PREFIX'] . 'template WHERE id = ' . $REX['ADDON']['rex_globals']['settings']['include_template_id'] . ''; $sql->setQuery($qry); if ($sql->getRows() == 1) { eval('?>' . $sql->getValue('content')); } } } // check for media addon dir var introduced in REX 4.5 if (isset($REX['MEDIA_ADDON_DIR'])) { $mediaAddonDir = $REX['MEDIA_ADDON_DIR']; } else { $mediaAddonDir = 'files/addons'; }
<?php if ($REX['REDAXO']) { // add lang file $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/codemirror/lang/'); // default settings (user settings are saved in data dir!) $REX['ADDON']['codemirror']['settings'] = array('theme' => 'simple-rex'); // overwrite default settings with user settings rex_backend_utilities::includeSettingsFile('codemirror'); // register plugin rex_plugin_factory::registerPlugin('be_utilities', 'codemirror', 'CodeMirror', $I18N->msg('codemirror_description'), '1.0.0', 'REDAXO', 'forum.redaxo.de', true); // includes include $REX['INCLUDE_PATH'] . '/addons/be_utilities/plugins/codemirror/classes/class.rex_codemirror_utils.inc.php'; // extensions rex_register_extension('OUTPUT_FILTER', 'rex_codemirror_utils::addToOutputFilter'); }