Index: texy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/texy/texy.module,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 texy.module
--- texy.module	23 Feb 2007 17:24:45 -0000	1.6.2.3
+++ texy.module	21 Mar 2007 14:20:40 -0000
@@ -106,8 +106,9 @@
     '#type' => 'textfield',
     '#size' => '12',
     '#title' => t('Directory'),
-    '#description' => t('Directory where to look for saved images. This is usually something like <tt>/'.file_directory_path().'/images</tt>'),
-    '#default_value' => variable_get('texy_image_dir', '/'.file_directory_path().'/images'),
+    '#description' => t('Subdirectory in the directory <code>%dir</code> where pictures are stored. Do not include trailing slash.', array('%dir' => base_path().variable_get('file_directory_path', 'files'))),
+    '#default_value' => variable_get('texy_image_dir', 'images'),
+    '#field_prefix' => base_path() . variable_get('file_directory_path', 'files') .'/',
   );
   $form['imageset']['texy_image_class_left'] = array(
     '#type' => 'textfield',
@@ -320,8 +321,11 @@
     $texy->allowedStyles = preg_split('/,/', str_replace(' ', '', $_allowedstyles));
   }
 
-  $texy->imageModule->root = variable_get('texy_image_dir', 'files/images');
-  $texy->imageModule->rootPrefix;
+  // we need real physical path
+  $texy->imageModule->rootPrefix = dirname($_SERVER["SCRIPT_FILENAME"]);
+  // path where is images stored and reachable from web
+  // (but how about private files??? this is need some exploration)
+  $texy->imageModule->root = base_path() . file_create_path(variable_get('texy_image_dir', 'images'));
 
   $_imageclassleft = variable_get('texy_image_class_left', '');
   if (empty($_imageclassleft)) {
