How do I make my images have absolute paths?
I've spent ages trying to read up on this forum.
I've looked in documentation: nothing there.
I can't find a straight forward answer anywhere.
Lots of articles: but none that give a simple asnwer.
So: how do I do it?
(From the reading I have done: I know it's possible.)
Thanks.
OM
Mon, 07/23/2007 - 00:37
#1
Re: How do I make my images have absolute paths?
Maybe my 'HOWTO - Get absolute urls with the filemanager' can be of any help.
Re: How do I make my images have absolute paths?
same reply as my other thread.
cant get it to work.
Re: How do I make my images have absolute paths?
Well can you tell me where you're stuck?
Re: How do I make my images have absolute paths?
apologies for the cross posts.
didn't mean to.
i've attached my HTML code.
the code that is causing the problem is as given below:
// var sLink = '<a href="#" onclick="OpenFile(\'' + fileUrl.replace( /'/g, '\\\'') + '\');return false;">' ;
// var sLink = '<a href="#" onclick="OpenFile(\'' + fileUrl + '\');return false;">' ;
fileUrl = top.opener.FCKConfig.FullBasePath.substr(0, top.opener.FCKConfig.FullBasePath.length - top.opener.FCKConfig.BasePath.length) + fileUrl;
var sLink = '<a href="#" onclick="OpenFile(\'' + fileUrl + '\');return false;">' ;
the code only work with the first option given above.
as i said, when i click on browse server, the popup window doesn't work (nothing is displayed for the contents of the directory) and i get an error icon in the status bar.
let me know what you think.
thanks.
Re: How do I make my images have absolute paths?
- Was your filemanager also not displaying any files/dirs before you changed the code?
- Could you paste here what the error says (preferably an errormessage from firefox)?
Re: How do I make my images have absolute paths?
Re: How do I make my images have absolute paths?
Re: How do I make my images have absolute paths?
If you don't want to make the address public, just PM me or mail me.
Re: How do I make my images have absolute paths?
i'm going to send a pm now.
are you the saul behind the flceditor imagemanager?
i emailed you asking about freelancing. you replied to my email.
if so... i'll also send details of some coding i need afterwards.
(this is all related to using the fckeditor + some other simple coding work needed.)
let me know.
thanks.
Re: How do I make my images have absolute paths?
Yep, that's me
thanks for the PM and email...
Re: How do I make my images have absolute paths?
You don't need any change to javascript, just the the config of your connector properly:
Re: How do I make my images have absolute paths?
thanks for the reply.
i had someone else do the coding for me (who has now dissapered!).
i have the following:
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "xml_cms" ) )."xml_cms/editor/" ;
and the $Config['UserFilesPath'] is commented out.
is $sBasePath one of the variables of fckeditor...?
what i want: be able to take the directory where the code exist... and put it anywhere.
so... if what u suggest works, can i instead use:
$Config['UserFilesPath'] = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" ;
?
also... saul pointed out to me that i'm using version 2.0 of fckeditor.
i assume that's maybe why the solution given is not working?
let me know what you think.
Re: How do I make my images have absolute paths?
Then, it's possible that he has changed the connector mixing some patch or custom code, it might be easier to start from scratch as it's really easy to setup the connector, it takes no time at all to do it if you're using clean sources.
Re: How do I make my images have absolute paths?
well... there is a small addtion... when the text is edited and saved...
it is saved for an xml file.
so... i assume i have to deal with that part as well.
i've had bad trouble working with freelancers - on this occassion the guy coded 95% of the project... and then decided he didn't want to work anymore on the project.
can you suggest anywhere to get freelancers?
i've tried:
gaf - ok.
scriptlance - hmm... not sure.
guru - don't like.
let me know what you think.
thanks.
Re: How do I make my images have absolute paths?
Starting next week I'll have more free time so I can share that time between coding in the core of the editor and doing custom programming (or fixing bugs that I didn't looked at initially but someone thinks that they are important and put his money where his mouth is)
Re: How do I make my images have absolute paths?
Re: How do I make my images have absolute paths?
i think the problem was: i had a mishmash of 2 different versions of fckeditor.
i installed from new.
spent ages configuring it.
in the end... i used the first suggested solution.
that seems to have done the trick.
however... i am confused about there being about 2 or 3 copies of config.php.
the one i updated was in .... filemanagaer/browser/...... /connectors.
what are the other ones for?
thanks for all the help!
Re: How do I make my images have absolute paths?
Did you completely delete the 2.0 fckeditor before installing the latest?
alfonsoml, is your suggestion of just altering the config making the images to have absolute paths when inserting them? Didn't know that. If so, that solution is far better, because when upgrading you don't have to adopt a codechange.
Re: How do I make my images have absolute paths?
i did a complete new install.
i was referring to the fact that there is another config.php in filemanager/upload...?
what's the supposed to be for...?
let me know.
thanks.
Re: How do I make my images have absolute paths?
Re: How do I make my images have absolute paths?
Just download a nightly and test it! If there are any problems with the new code it would be better to know them before the new version is released (although there will be an official beta period, anytime is good to check that everything works fine and nothing has regressed)
Re: How do I make my images have absolute paths?
Hi guys
I spent 2 or 3 hours trying to fix this problem and finally I obtain a solution...
Ok, alfonsoml wrote this:
Re: How do I make my images have absolute paths?
i did as saul recommended... and it worked for me.
but with the way i coded it...
i can now put my fckeditor anywhere (i.e. any directory) on any domain...
and it will work.
i think this should be something that is an option u can set...
instead of having to mes around with the code!
Re: How do I make my images have absolute paths?
With the benefit that upgrading is absolutely painless.
Re: How do I make my images have absolute paths?
Re: How do I make my images have absolute paths?
That's a link to the old sourceforge forums, the new one is viewtopic.php?t=686
Re: How do I make my images have absolute paths?