I want all images uploaded by a user stored in a personal gallery.
Since i didn't find a suitable solution, i added a gallery for every user (username = gallery name) and changed the taxonomy module:
function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
$vocabulary = taxonomy_get_vocabulary($vid);
$help = ($help) ? $help : $vocabulary->help;
if ($vocabulary->required) {
$blank = 0;
}
else {
$blank = '<'. t('none') .'>';
}
//custom
global $user;
if ($user->uid!=1 && $vid==3) { //3 = image gallery Vocabulary ID(vid)
$res = db_query('SELECT * FROM {term_data} WHERE name = "%s"', $user->name);
$term_data = db_fetch_object($res);
return array('#type' => 'select',
'#title' => $title,
'#default_value' => $value,
'#options' => array($term_data->tid => $user->name),
'#description' => $description,
'#multiple' => $multiple,
'#size' => $multiple ? min(9, count($options)) : 0,
'#weight' => -15,
'#theme' => 'taxonomy_term_select',
);
}
//custom
return _taxonomy_term_select(check_plain($vocabulary->name), $name, $value, $vid, $help, intval($vocabulary->multiple), $blank);
}
This causes only the gallery with the same name as current user is beeing showed to all users except admin for image upload.