FCKeditor and images

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Alfred

Re: FCKeditor and images

Post by Alfred »

Hi,

I've solved my problem - for the moment - that way: put the TinyMCE-folder from the 0.10.4 release in the actual module folder. Install and select TinyMCE as WYSIWYG.

Let's see, how long it will last . . .
cyberman

Re: FCKeditor and images

Post by cyberman »

Alfred wrote: TinyMCE-folder from the 0.10.4 release
You can also found the last TinyMCE module from his project homepage for now  :).
tamlyn

Re: FCKeditor and images

Post by tamlyn »

Problem not entirely solved. Although the url is now shown correctly in fckeditor as an absolute url (/files/images/image.jpg), it is shown on the page as a relative url (files/images/image.jpg). This causes a problem with the url rewriting scheme I am using in which /index.php?page=hello becomes /hello/

I've had a look through FCKeditorX.module.php but I suspect that is not the right place to look as the url is being stored correctly in the database but, for some reason, turned into a relative url at runtime.

EDIT: sorry, the url is NOT stored correctly in the database. It is converted to a relative URL at save-time. I had to turn FCK off in order to manually edit the source to display the correct url.
Last edited by tamlyn on Wed Jan 18, 2006 7:39 pm, edited 1 time in total.
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn wrote: Problem not entirely solved. Although the url is now shown correctly in fckeditor as an absolute url (/files/images/image.jpg), it is shown on the page as a relative url (files/images/image.jpg). This causes a problem with the url rewriting scheme I am using in which /index.php?page=hello becomes /hello/

I've had a look through FCKeditorX.module.php but I suspect that is not the right place to look as the url is being stored correctly in the database but, for some reason, turned into a relative url at runtime.

EDIT: sorry, the url is NOT stored correctly in the database. It is converted to a relative URL at save-time. I had to turn FCK off in order to manually edit the source to display the correct url.
;)
tamlyn

Re: FCKeditor and images

Post by tamlyn »

megabob3 wrote: ;)
???

Any ideas why the module is converting it to a relative path?
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn wrote:
megabob3 wrote: ;)
???

Any ideas why the module is converting it to a relative path?
Sorry read wrong, wait a response :P
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

I done right done this FIX

maybe resolve also your problem.


modify FCKeditorX.js


remove line 93 and 94.

are these:
        regexp= new RegExp (REP, "gi");
        newTag =  newTag.replace(regexp,"");


remove this lines.

Bye ;)
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

SVN is updated.

Can download it.

Sorry time ago, i worked hard for have RELATIVE path, and forgot to do not touch absolute PATH like url from external site.

Use FireFox, on IE have to fix other thing.

Sorry :/
Last edited by megabob3 on Wed Jan 18, 2006 11:38 pm, edited 1 time in total.
tamlyn

Re: FCKeditor and images

Post by tamlyn »

Cool - thanks bob! No need to apologise; I really appreciate your hard work and quick responses!
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn wrote: Cool - thanks bob! No need to apologise; I really appreciate your hard work and quick responses!
FIXED into SVN the bug with IE

Thanks to you.

I have request for Sgal :P

I am working on galleryS ;)
tamlyn

Re: FCKeditor and images

Post by tamlyn »

Actually that doesn't seem to have fixed the problem either. I had to comment out line 111 in FCKeditorX.js (between alert 4 and alert 5 in preparaHTMLtoSave()) in order to get absolute paths to work. I don't know if that will have broken anything else.
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn wrote: Actually that doesn't seem to have fixed the problem either. I had to comment out line 111 in FCKeditorX.js (between alert 4 and alert 5 in preparaHTMLtoSave()) in order to get absolute paths to work. I don't know if that will have broken anything else.

No that line commented not affect on absolute, now you will not have RELATIVE path into LINK tag!


The problem was from alert 2 and alert 3.

Tonight i will look again, see you later ;)
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn

Re: FCKeditor and images

Post by tamlyn »

megabob3 wrote: Did you downloaded this: ... ?
Yeah, well I got the HEAD out of svn which i assume is the same thing...
megabob3 wrote: No that line commented not affect on absolute, now you will not have RELATIVE path into LINK tag!
Which link tag? Actually I don't want *any* relative paths. All paths need to be absolute because of the rewrite rules. I don't know if my setup is especially weird but commenting out those lines really did seem to solve it. I've PMed you a login for the site in question if you want to do some tests or whatever.
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn wrote:
megabob3 wrote: Did you downloaded this: ... ?
Yeah, well I got the HEAD out of svn which i assume is the same thing...
megabob3 wrote: No that line commented not affect on absolute, now you will not have RELATIVE path into LINK tag!
Which link tag? Actually I don't want *any* relative paths. All paths need to be absolute because of the rewrite rules. I don't know if my setup is especially weird but commenting out those lines really did seem to solve it. I've PMed you a login for the site in question if you want to do some tests or whatever.
Ok thanks ;)

And with you are 5 login access :P
Locked

Return to “CMSMS Core”