Would love to know how to create a taxonomy vocabulary from webfm's creation of the "group root directory"s.
This would be great because then you could use the taxonomy terms to build a path when importing files to the correct group.

Here's what I am trying to accomplish.
for example when bringing in files in this case images to build an image gallery for organic groups.

I am using a combination of webfm, imagefield_import, taxonomy, and views.

This combination would allow mulitple file import with total control over where the files are located and their subdirectory sturcture.

I've almost got it but I just don't know how to handle the php to create such a list and update a taxonomy vocabulary of group "names".

I would love to learn how.

I have scoured the web and drupal.org to get this far but I have this one last missing piece to solve this problem

any help or direction or feature would be most appreciated
thanks

Comments

cgmonroe’s picture

IMHO, this is not a feature that is core to WebFM but should be an add-on module or just a bit of custom code.

That said here's a code snippet from the admin form that might gets you pointed in the right way:

if (module_exists('webfm') ) {
  $roles = user_roles(0, 'access webfm');
  foreach ($roles as $rid => $role) {
    if (variable_get("root_dir_". $rid, '') == '') {
      drupal_set_message(t('Role root directory not set for @role role', array('@role' => $role)), 'error');
    }
    // Do what you want with the role root directories...
  }

  if (module_exists('og')) {
    // Per group settings
    $groups = og_all_groups_options();
    foreach ($groups as $gid => $group) {
      if (variable_get("root_dir_group_". $gid, '') == '') {
        drupal_set_message(t('Group root directory not set for @group group', array('@group' => $group)), 'error');
      }
      //Do what you want with the group root directories....
    }
  }
}