php-resource




Archiv verlassen und diese Seite im Standarddesign anzeigen :
Frage zur Einrichtung des Editors "SPAW"


 
BSG
10-03-2008, 17:42 
 
Hallo,

ich habe mal eine Frage zur Einrichtung des Online-Editors "SPAW".

Und zwar gehts um die Konfiguration der Verzeichnisse, in welche die Dateien dann mittels des Editors hochgeladen werden können.

Kann mir jemand sagen, an welcher Stelle (Datei) dieses Upload-Verzeichnis eingestellt wird?

// set default "global" settings if not set by user
if (!isset($settings['allow_upload']))
$settings['allow_upload'] = TRUE;
if (!isset($settings['allow_modify']))
$settings['allow_modify'] = TRUE;
if (!isset($settings['max_upload_filesize']))
$settings['max_upload_filesize'] = 512000;
if (!isset($settings['allowed_filetypes']))
$settings['allowed_filetypes'] = array('any');
if (!isset($settings['chmod_to']))
$settings['chmod_to'] = TRUE;
if (!isset($settings['max_img_width']))
$settings['max_img_width'] = 0;
if (!isset($settings['max_img_height']))
$settings['max_img_height'] = 0;
if (!isset($settings['recursive']))
$settings['recursive'] = TRUE;
if (!isset($settings['allow_modify_subdirectories']))
$settings['allow_modify_subdirectories'] = TRUE;
if (!isset($settings['allow_create_subdirectories']))
$settings['allow_create_subdirectories'] = TRUE;

// fetch context variables
$tmp = explode($config->getConfigValue('spawfm_path_separator'), SpawVars::getPostVar('dir')
? SpawVars::getPostVar('dir') : SpawVars::getGetVar('dir'));
$curr_dir = SpawFm::normalizeDir($tmp[0], true);
$curr_dir_subdir = isset($tmp[1]) ? $tmp[1] : false;

$curr_type = SpawVars::getPostVar('type') ? SpawVars::stripSlashes(SpawVars::getPostVar('type')) :
SpawVars::stripSlashes(SpawVars::getGetVar('type'));
if ($curr_type == '*')
$curr_type = false;
$type_fixed = SpawVars::getGetVar('nofilter');

// build directories list, determine selected option
$dirs = array();
$curr_dir_pos = false;
$all_types = array();
foreach ($dir_list as $dirpos=>$dirdef) {
if (is_string($dirdef)) { // simple dir definition
$dir = $caption = $dirdef;
$dir = SpawFm::normalizeDir($dir);
$fsdir = $doc_root.$dir;
$params = $settings;
} elseif (is_array($dirdef) and isset($dirdef['dir'])) { // advanced dir definition
$dir = $dirdef['dir'];
$caption = (!empty($dirdef['caption'])) ? $dirdef['caption'] : $dir;
$params = (!empty($dirdef['params'])) ? array_merge($settings, $dirdef['params']) : $settings;
$dir = SpawFm::normalizeDir($dir);
if (empty($dirdef['fsdir'])) {
$fsdir = $doc_root.$dir;
} else {
$fsdir = SpawFm::normalizeDir($dirdef['fsdir'], false, true);
}
} else {
$dir = false;
}

if ($dir and file_exists($fsdir)) {
$dir_data = array(
'dir' => $dir,
'fsdir' => $fsdir,
'caption' => $caption,
'params' => $params,
);
$dirs[] = $dir_data;
// set default dir if needed
if (!$curr_dir and !empty($params['default_dir'])) {
$curr_dir = $dir;
}

// track filetypes allowed
if (is_array($params['allowed_filetypes'])) {
$all_types = array_merge($all_types, $params['allowed_filetypes']);
} else {
$all_types[] = $params['allowed_filetypes'];
}

// load current directory data
if ($dir == $curr_dir) {
$spawfm->setCurrentDirData($dir_data);
$curr_dir_pos = $dirpos;
}
}
}

Suche ich da schon an der richtigen Stelle? :confused:

-archiv-

Alle Zeitangaben in WEZ +2. Es ist jetzt 18:02 Uhr.