public function execute() { if ($this->params['mediapath'] != '') { $media_path = rex_path::frontend($this->params['mediapath'] . '/' . rex_media_manager::getMediaFile()); $this->media->setMediapath($media_path); } }
var currentShown = null; $("#' . $field->getAttribute('id') . '").change(function(){ if(currentShown) currentShown.hide(); var effectParamsId = "#rex-rex_effect_"+ jQuery(this).val(); currentShown = $(effectParamsId); currentShown.show(); }).change(); })(jQuery); //--></script>'; // effect parameters $fieldContainer = $form->addContainerField('parameters'); $fieldContainer->setAttribute('style', 'display: none'); $fieldContainer->setSuffix($script); $effects = rex_media_manager::getSupportedEffects(); foreach ($effects as $effectClass => $effectFile) { require_once $effectFile; $effectObj = new $effectClass(); $effectParams = $effectObj->getParams(); $group = $effectClass; if (empty($effectParams)) { continue; } foreach ($effectParams as $param) { $name = $effectClass . '_' . $param['name']; $value = isset($param['default']) ? $param['default'] : null; $attributes = []; if (isset($param['attributes'])) { $attributes = $param['attributes']; }
if ($func == 'delete' && $type_id > 0) { $sql = rex_sql::factory(); // $sql->setDebug(); $sql->setTable(rex::getTablePrefix() . 'media_manager_type'); $sql->setWhere(['id' => $type_id]); try { $sql->delete(); $success = rex_i18n::msg('media_manager_type_deleted'); } catch (rex_sql_exception $e) { $error = $sql->getError(); } $func = ''; } //-------------- delete cache by type-id if ($func == 'delete_cache' && $type_id > 0) { $counter = rex_media_manager::deleteCacheByType($type_id); $success = rex_i18n::msg('media_manager_cache_files_removed', $counter); $func = ''; } //-------------- output messages if ($success != '') { echo rex_view::success($success); } if ($error != '') { echo rex_view::error($error); } if ($func == '') { // Nach Status sortieren, damit Systemtypen immer zuletzt stehen // (werden am seltesten bearbeitet) $query = 'SELECT * FROM ' . rex::getTablePrefix() . 'media_manager_type ORDER BY status, name'; $list = rex_list::factory($query);
<?php if (rex::isBackend()) { rex_extension::register('MEDIA_ADDED', 'rex_focuspoint::set_media'); rex_extension::register('MEDIA_UPDATED', 'rex_focuspoint::set_media'); rex_extension::register('MEDIA_FORM_EDIT', 'rex_focuspoint::show_form_info'); } rex_media_manager::addEffect('rex_effect_focuspoint_resize');
<?php /** * Media Manager Addon. * * @author office[at]vscope[dot]at Wolfgang Hutteger * @author markus.staab[at]redaxo[dot]de Markus Staab * @author jan.kristinus[at]yakmara[dot]de Jan Kristinus * @author dh[at]daveholloway[dot]co[dot]uk Dave Holloway * * @package redaxo5 */ $subpage = rex_be_controller::getCurrentPagePart(2); $func = rex_request('func', 'string'); echo rex_view::title(rex_i18n::msg('media_manager')); if ($func == 'clear_cache') { $c = rex_media_manager::deleteCache(); echo rex_view::info(rex_i18n::msg('media_manager_cache_files_removed', $c)); $func = ''; } include rex_be_controller::getCurrentPageObject()->getSubPath();