images in wysiwyg

9 posts by 2 authors in: Forums > CMS Builder
Last Post: February 1, 2008   (RSS)

By loccom - January 18, 2008

Hi Dave

I like to post my thumbnails whithin my text of my news articles.

This is fine but i get broken images if the pages are displayed on a sub-domain.

I installed the cms on the main website domain ie. "www.mydomain.com" but some of the articles are displayed on subdomains like "sub.mydomain.com"

when i view the properties of the broken image the link is almost intact apart from the sub domain url is in the image url

ie;

sub.mydomain.com/cms/uploads/5508_200_001_thumb.jpg

when it should be

www.mydomain.com/cms/uploads/5508_200_001_thumb.jpg


I am sure its easy to fix

Re: [Dave] images in wysiwyg

By loccom - January 19, 2008

Hi Dave

Te urls do vary in the web page as the cms is based on the main url and not the sub.

Re: [steveo] images in wysiwyg

By Dave - January 19, 2008

Ok, I found the setting for it. Open this file:lib/menus/default/edit_functions.php

Search for "tinyMCE.init" and you'll see this line:

theme_advanced_buttons3 : "",

add a line after that one like this:

theme_advanced_buttons3 : "",
remove_script_host : false,


That should make it so anytime you save the wysiwyg all the times will have the full path with domain.

Hope that helps! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] images in wysiwyg

By loccom - January 19, 2008

thank you dave!

Re: [Dave] images in wysiwyg

By loccom - January 31, 2008

Hi Dave

I had to use this again on a sub domain as the WYSIWYG images would not work on a subdomain. Perhaps this line of codeshould be added to future versions?

cheers

Re: [steveo] images in wysiwyg

By Dave - February 1, 2008

For most users having the domains not included makes the most sense (because the data in the database isn't tied to a domain, if they change domains, etc).

I'd like to make it easy to toggle that for users such as yourself. Maybe as a setting in an ini file or something that wouldn't get overwritten with upgrades.

Was it for another install or after upgrading that you had to set it again?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] images in wysiwyg

By loccom - February 1, 2008

hi dave

it was for a client with a new install/licence

Re: [steveo] images in wysiwyg

By Dave - February 1, 2008

Ok, I've added a checkbox for this under Admin > General > Advanced Settings (new section) in v1.10 which is currently in development. So there will be checkbox for it in the next release.
Dave Edis - Senior Developer
interactivetools.com