Index: og_files/og_files.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og_files/Attic/og_files.module,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 og_files.module
--- og_files/og_files.module	17 May 2008 13:42:16 -0000	1.1.2.2
+++ og_files/og_files.module	30 Nov 2008 18:48:04 -0000
@@ -1,8 +1,22 @@
 <?php
+function og_files_init() {
+  define('OG_FILES_PATH', drupal_get_path('module', 'og_files'));
+}
+
 function og_files_menu($may_cache) {
   global $user;
   $items = array();
-  if(!$may_cache) {
+  if ($may_cache) {
+    $items[] = array(
+      'path' => 'admin/og/og_files',
+      'title' => t('OG Files'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => 'og_files_settings_form',
+      'type' => MENU_NORMAL_ITEM,
+      'access' => user_access('administer site configuration'),
+    );
+  }
+  else {
     if(arg(0) == 'node' && is_numeric(arg(1))) {
       $node = node_load(arg(1));
       if(isset($node->type) && $node->og_files_enabled && in_array($node->nid, array_keys($user->og_groups))) {
@@ -20,6 +34,20 @@ function og_files_menu($may_cache) {
   return $items;
 }
 
+/**
+ * Menu callback: OG Files configuration.
+ */
+function og_files_settings_form() {
+  $form = array();
+  $form['og_files_skin'] = array(
+    '#type' => 'radios',
+    '#title' => t('Skin'),
+    '#options' => array(t('none'), 'default' => t('Default')),
+    '#default_value' => variable_get('og_files_skin', 0),
+  );
+  return system_settings_form($form);
+}
+
 function og_files($gid) {
   $group = node_load($gid);
   $params = func_get_args();
@@ -68,6 +96,12 @@ function og_files_file_download($file) {
 }
 
 function og_file_list_form($gid, $path){
+  // Choose theme
+  $skin = variable_get('og_files_skin', 0);
+  if ($skin !== 0) {
+    drupal_add_css(OG_FILES_PATH . '/skins/'. $skin .'/style.css');
+  }
+  
   $form = array();
   $form['#attributes']['enctype'] = 'multipart/form-data';
   
@@ -127,12 +161,13 @@ function og_file_list_form($gid, $path){
 
   if($virtualpath_count && $aux[0] != '') {
     array_pop($aux);
-    $dir_list['..'] = l('..', og_files_virtual_base_path($gid).implode('/',$aux));
+    $dir_list['..'] = array(
+      'data' => l('..', og_files_virtual_base_path($gid).implode('/',$aux)),
+    );
+    if ($skin !== 0)
+      $dir_list['..']['class'] = 'og_files-'. $skin .'-dir-up';
   }
-  
 
-    
-    
   while($file = db_fetch_object($files)) {
     $array = explode('/',og_files_relative_path($gid,$file->filepath));
     array_pop($array);
@@ -141,7 +176,11 @@ function og_file_list_form($gid, $path){
       
       // We just want to show first level of subfolders in current folder
       if (count($array) - $virtualpath_count < 2) {
-        $dir_list[$array[count($array)-1]] = l($array[count($array)-1], og_files_virtual_base_path($gid).implode('/',$array));
+        $dir_list[$array[count($array)-1]] = array(
+          'data' => l($array[count($array)-1], og_files_virtual_base_path($gid).implode('/',$array)),
+        );
+        if ($skin !== 0)
+          $dir_list[$array[count($array)-1]]['class'] = 'og_files-'. $skin .'-dir';
         $dir_count++;
       }
 
@@ -302,4 +341,4 @@ function og_files_nodeapi(&$node, $op, $
       db_query('DELETE FROM {og_files} WHERE gid = %d',$node->nid);
       break;
   }
-}
\ No newline at end of file
+}
Index: og_files/skins/default/dir.png
===================================================================
RCS file: og_files/skins/default/dir.png
diff -N og_files/skins/default/dir.png
Binary files /dev/null and dir.png differ
Index: og_files/skins/default/dir_up.png
===================================================================
RCS file: og_files/skins/default/dir_up.png
diff -N og_files/skins/default/dir_up.png
Binary files /dev/null and dir_up.png differ
Index: og_files/skins/default/style.css
===================================================================
RCS file: og_files/skins/default/style.css
diff -N og_files/skins/default/style.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ og_files/skins/default/style.css	30 Nov 2008 18:48:04 -0000
@@ -0,0 +1,18 @@
+.og_files-default-dir-up {
+  background: url(dir_up.png);
+  display: block;
+  width: 16px;
+  height: 16px;
+  overflow: hidden;
+  list-style-type: none !important;
+  margin:  0 0 0 0 !important;
+}
+  .og_files-default-dir-up a {
+    padding-left: 16px;
+    display: block;
+  }
+
+.og_files-default-dir {
+  list-style-image: url(dir.png) !important;
+}
+
