Index: asset.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/Attic/asset.js,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 asset.js
--- asset.js	24 Jul 2007 17:55:02 -0000	1.1.2.2
+++ asset.js	24 Jan 2008 11:44:02 -0000
@@ -12,7 +12,7 @@
   $("#edit-cancel").click(cancelAction);
   //$("#edit-finish").click(insertToEditor);
   $("#edit-aid").change(function(){
-    $(".asset-preview").load('/index.php?q=asset/js/preview/'+$(this).val());
+    $(".asset-preview").load(Drupal.settings.asset.basePath + 'index.php?q=asset/js/preview/'+$(this).val());
   });
   
   // replace buttons with links for better styling
Index: asset.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/asset.module,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 asset.module
--- asset.module	19 Dec 2007 18:50:23 -0000	1.1.2.11
+++ asset.module	24 Jan 2008 15:17:02 -0000
@@ -333,7 +333,7 @@
       $result = db_query('SELECT * FROM {asset_node} WHERE nid=%d AND refs > 0', $node->nid);
       while ($asset = db_fetch_object($result)) {
         $additions['assets'][] = $asset->aid;
-      }
+      }
     case 'view' :
       foreach($node as $fieldname => $value) {
         if(substr($fieldname, 0, 6)=="field_") {
@@ -348,7 +348,10 @@
               if(!empty($asset['aid'])) $asset['value'] = asset_preview($asset['aid']);
             }
             */
-            foreach (array_keys($node->fieldname) as $key) {              // Add the html code for the preview              if(!empty($node->fieldname[$key]['aid'])) $node->fieldname[$key]['value'] = asset_preview($node->fieldname[$key]['aid']);            }
+            foreach (array_keys($node->fieldname) as $key) {
+              // Add the html code for the preview
+              if(!empty($node->fieldname[$key]['aid'])) $node->fieldname[$key]['value'] = asset_preview($node->fieldname[$key]['aid']);
+            }
           }
         }
       }
@@ -586,6 +589,7 @@
   // all wizard related functionality first comes through this function so load the wizard inc
   require_once (drupal_get_path('module', 'asset') . '/asset_wizard.inc');
 
+  drupal_add_js(array('asset' => array('basePath' => base_path())), 'setting');
   drupal_add_js(drupal_get_path('module', 'asset') . '/asset.js');
   drupal_add_css(drupal_get_path('module', 'asset') . '/asset_wizard.css');
   list($sites, $site, $lost) = split("/", drupal_get_path('module', 'asset'), 3);
@@ -729,12 +733,8 @@
   $src = module_invoke($module, 'asset_formatter', 'img', $asset, array ('format' => $format));
   // We're not useing drupal_goto because filenames will have the language code prepended
   // return drupal_goto($src);
-  if(substr($src, 0, 5)!="http:") {
-    return header('location: /' . $src);
-  }
-  else {
-    return header('location: ' . $src);  	
-  }
+  $src = (substr($src, 0, 5) != "http:") ? base_path() . $src : $src;
+  return header('location: ' . $src);
 }
 
 
Index: asset_textarea.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/Attic/asset_textarea.js,v
retrieving revision 1.1
diff -u -r1.1 asset_textarea.js
--- asset_textarea.js	7 May 2007 20:52:17 -0000	1.1
+++ asset_textarea.js	24 Jan 2008 11:44:12 -0000
@@ -3,7 +3,7 @@
   $("#edit-cancel").click(cancelAction);
   //$("#edit-finish").click(insertToEditor);
   $("#edit-aid").change(function(){
-    $(".asset-preview").load('/index.php?q=asset/js/preview/'+$(this).val());
+    $(".asset-preview").load(Drupal.settings.asset.basePath + 'index.php?q=asset/js/preview/'+$(this).val());
   });
   
   initLoader();
Index: asset_textfield.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/Attic/asset_textfield.js,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 asset_textfield.js
--- asset_textfield.js	19 Dec 2007 18:50:23 -0000	1.1.2.2
+++ asset_textfield.js	24 Jan 2008 11:44:37 -0000
@@ -2,7 +2,7 @@
   
   $("#edit-cancel").click(cancelAction);
   $("#edit-aid").change(function(){
-    $(".asset-preview").load('/index.php?q=asset/js/preview/'+$(this).val());
+    $(".asset-preview").load(Drupal.settings.asset.basePath + 'index.php?q=asset/js/preview/'+$(this).val());
   });
   
   initLoader();
Index: asset_bonus/asset_bonus.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/asset_bonus/Attic/asset_bonus.module,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 asset_bonus.module
--- asset_bonus/asset_bonus.module	19 Dec 2007 18:50:23 -0000	1.1.2.6
+++ asset_bonus/asset_bonus.module	24 Jan 2008 15:11:19 -0000
@@ -129,8 +129,8 @@
   drupal_add_js(drupal_get_path('module','asset_bonus').'/asset_bonus.js');
     
   $settings = array(
-    'asset_bonus_swf' => '/' . drupal_get_path('module','asset_bonus') . '/audioplayer/player.swf',
-    'asset_bonus_test_mp3' => '/' . drupal_get_path('module','asset_bonus') . '/audioplayer/test.mp3'
+    'asset_bonus_swf' => base_path() . drupal_get_path('module','asset_bonus') . '/audioplayer/player.swf',
+    'asset_bonus_test_mp3' => base_path() . drupal_get_path('module','asset_bonus') . '/audioplayer/test.mp3',
   );
   drupal_add_js($settings,'setting');
 
@@ -273,7 +273,7 @@
   if($asset->extension=="flv") {
     $addVariable .= "oSwf.addVariable('file','" . $asset->url . "');";
     $addParam .= "oSwf.addParam('allowfullscreen','true');\n";
-    $asset->url = '/' . drupal_get_path('module','asset_bonus').'/swfobject/flvplayer.swf';
+    $asset->url = base_path() . drupal_get_path('module','asset_bonus').'/swfobject/flvplayer.swf';
     // if(arg(2)!="edit" && (arg(0)!="node" || $options['width']==0)) {
     if(arg(2)!="edit" && ($options['height']=="112.5" || $options['height']=="100")) {
       // Set a default width/height if none is available or when we're looking at an asset gallery (panels)
@@ -296,7 +296,7 @@
   }
   if(empty($options['version'])) $options['version'] = "0";
   // We're not using drupal_add_js(drupal_get_path('module','asset_bonus').'/swfobject/swfobject.js') because of caching issues
-  $swfobject = '/' . drupal_get_path('module','asset_bonus') . '/swfobject/swfobject.js';
+  $swfobject = base_path() . drupal_get_path('module','asset_bonus') . '/swfobject/swfobject.js';
   $output = <<<OUT
   <script type="text/javascript" src="{$swfobject}"></script>
   <div id="$div_id" class="asset-swfobject">Video placeholder</div>
@@ -328,7 +328,7 @@
 function theme_asset_bonus_mp3player($asset, $options=array()){
   drupal_add_js(drupal_get_path('module','asset_bonus').'/swfobject/swfobject.js');
   drupal_add_js(drupal_get_path('module','asset_bonus').'/audioplayer/audio-player.js');
-  $swffile = '/' . drupal_get_path('module','asset_bonus') . '/audioplayer/player.swf';
+  $swffile = base_path() . drupal_get_path('module','asset_bonus') . '/audioplayer/player.swf';
   $colors = asset_bonus_mp3player_colors();
   foreach($colors as $key => $color_data){
     $color = variable_get('asset_bonus_mp3player_'.$key,$color_data['default']);
Index: modules/asset_content.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/modules/asset_content.inc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 asset_content.inc
--- modules/asset_content.inc	19 Dec 2007 18:50:23 -0000	1.1.2.2
+++ modules/asset_content.inc	24 Jan 2008 15:13:54 -0000
@@ -213,7 +213,7 @@
           '#maxlength' => '256',
           '#default_value' => $items[0]['caption'],
           '#description' => 'Enter the caption for this asset',
-          '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-15px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="/' . drupal_get_path('module', 'asset') . '/lullacons/doc-option-add.png" alt="' . t("Insert asset") . '" title="' . t("Insert asset") . '"/>', 'asset/wizard/textfield', array(
+          '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-15px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="'. base_path() . drupal_get_path('module', 'asset') . '/lullacons/doc-option-add.png' .'" alt="'. t("Insert asset") . '" title="'. t("Insert asset") .'"/>', 'asset/wizard/textfield', array(
     'class'=>'asset-textfield-link',
     'id'=>'asset-link-' . $field_name . '-0-value',
     'onclick'=>"window.open(this.href, 'asset_textfield_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no'); return false",
@@ -227,7 +227,7 @@
           '#maxlength' => '256',
           '#default_value' => $items[0]['copyright'],
           '#description' => 'Enter the copyright for this asset',
-          '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-30px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="/' . drupal_get_path('module', 'asset') . '/lullacons/doc-option-remove.png" alt="' . t("Delete asset") . '" title="' . t("Delete asset") . '"/>', '', array('onclick' => "
+          '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-30px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="'. base_path() . drupal_get_path('module', 'asset') . '/lullacons/doc-option-remove.png' .'" alt="'. t("Delete asset") .'" title="'. t("Delete asset") .'"/>', '', array('onclick' => "
     document.getElementById('edit-" . str_replace("_","-",$field_name) . "-0-value').value='';
     document.getElementById('edit-" . str_replace("_","-",$field_name) . "-0-aid').value='';
     document.getElementById('edit-" . str_replace("_","-",$field_name) . "-0-caption').value='';
@@ -379,7 +379,7 @@
     '#maxlength' => '256',
     '#default_value' => $node_field['caption'],
     '#description' => 'Enter the caption for this asset',
-    '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-15px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="/' . drupal_get_path('module', 'asset') . '/lullacons/doc-option-add.png" alt="' . t("Insert asset") . '" title="' . t("Insert asset") . '"/>', 'asset/wizard/textfield', array(
+    '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-15px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="'. base_path() . drupal_get_path('module', 'asset') . '/lullacons/doc-option-add.png' .'" alt="'. t("Insert asset") . '" title="' . t("Insert asset") . '"/>', 'asset/wizard/textfield', array(
     'class'=>'asset-textfield-link',
     'id'=>'asset-link-' . $field_name . '-' . $delta . '-value',
     'onclick'=>"window.open(this.href, 'asset_textfield_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no'); return false",
@@ -392,7 +392,7 @@
     '#maxlength' => '256',
     '#default_value' => $node_field['copyright'],
     '#description' => 'Enter the copyright for this asset',
-    '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-30px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="/' . drupal_get_path('module', 'asset') . '/lullacons/doc-option-remove.png" alt="' . t("Delete asset") . '" title="' . t("Delete asset") . '"/>', '', array('onclick' => "
+    '#prefix' => '<div style="margin-'.$rtl.':130px"><table style="width:400px;margin-top:-30px;border-collapse:inherit"><tr><td style="padding:0px;margin:0px;text-align:center;padding-top:16px;width:10px" valign="top">'.l('<img src="'. base_path() . drupal_get_path('module', 'asset') . '/lullacons/doc-option-remove.png' .'" alt="'. t("Delete asset") . '" title="' . t("Delete asset") . '"/>', '', array('onclick' => "
     document.getElementById('edit-" . str_replace("_","-",$field_name) . "-" . $delta . "-value').value='';
     document.getElementById('edit-" . str_replace("_","-",$field_name) . "-" . $delta . "-aid').value='';
     document.getElementById('edit-" . str_replace("_","-",$field_name) . "-" . $delta . "-caption').value='';

