Hi,
I am using Drupal 4.7, tiny MCE (1.90), IMCE, expert and the syndication modules.
when I place an image on my expert text, it will show up nicely on the main page, but when the teaser text go to the RSS feed, the image is not displayed.
I think the reason is that the images has onlt the relative path to the image (i.e. /files/images/myimage.jpg) and not the full location of the image including the http:// and domain name (i.e. http://mysite.com/files/images/myimage.jpg).
I have tried to manually insert the full URL of the image, but the module automatically "repairs" the URL to be relative.
thanks,
Udi

Comments

ufku’s picture

udijw’s picture

Thanks ufku,
I have completed step 1 - I can get IMCE to show abs paths when I select an image (it looks like the inputs from your comment were introduced to imce_browse.js, and all I had to do is set imceVar['absURL'] = 1;//absolute URLs at the top of the file).
however - if I "OK" the image then reopen it with tinyMCE it is still relative.
any ideas?
Thanks,
Udi

ufku’s picture

Version: 4.7.x-1.1 » 5.x-1.x-dev
Category: bug » support

it seems that you are using 5.x not 4.7.x. (or unofficial 4.7)
yes, in 5.x there is a quickway to achieve absolute paths, as you mentioned.
anyway, your problem is related to a settings in tinymce. http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/relative_urls

udijw’s picture

Thanks again ufku.
I must be doing something wrong. this code is taken from my tinymce.module file:

function tinymce_config($profile) {
  global $user;
  
  // Drupal theme path.
  $themepath = path_to_theme() . '/';
  $host = base_path();

  $settings = $profile->settings;

  // Build a default list of TinyMCE settings.

  // Is tinymce on by default?
  $status = tinymce_user_get_status($user, $profile);
  
  $init['mode']               = $status == 'true' ? 'exact' : 'none';
  $init['theme']              = $settings['theme'] ? $settings['theme'] : 'advanced';
  $init['relative_urls']      = 'false';
  $init['document_base_url']  = "$host";
  $init['language']           = $settings['language'] ? $settings['language'] : 'en';
  $init['safari_warning']     = $settings['safari_message'] ?  $settings['safari_message'] : 'false';
  $init['entity_encoding']    = 'raw';
  $init['verify_html']        = $settings['verify_html'] ? $settings['verify_html'] : 'false';
  $init['preformatted']       = $settings['preformatted'] ? $settings['preformatted'] : 'false';
  $init['convert_fonts_to_styles'] = $settings['convert_fonts_to_styles'] ? $settings['convert_fonts_to_styles'] : 'false';

shouldn't the "$init['relative_urls'] = 'false';" take care of the abs/relative location issue?

ufku’s picture

here is another configuration option http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/convert_urls.
You'd better check all URL related configurations from those wiki pages.

udijw’s picture

Thanks ufku.
Adding

  $init['convert_urls'] = 'true';
  $init['remove_script_host'] = 'false';

did the trick.

udijw’s picture

Status: Active » Closed (fixed)

closing this issue

Geldora@drupal.ru’s picture

I found a new way - this module helps http://drupal.org/project/abssrc

I don-t touch any files of imce or tinymce, but I see on html output of my rss feed, that pathesare correct. Well, i just installed module, so let`s see!

One problem - in 5 version autor used a bit of 6v code. There is a patch for it, but the autor of module didn`t upload a new version...

Well, lets see...