Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-10-25 11:04:46

mkknot
New member
Registered: 2006-10-25
Posts: 7

Wrong link with ExtendedFileManager

The upload work great but the link in the HTML code is wrong
it gave :
<a href="xinha-nightly/plugins/ExtendedFileManager/manager.phpdemo_images/file.pdf">test</a>

In fact it may give :
<a href="xinha-nightly/plugins/ExtendedFileManager/demo_images/file.pdf">test</a>

You can see this bug on the exemple test when you active ExtendedFileManager and you add a link with it...

ps: i'm french so excuse for my poor english !

Last edited by mkknot (2006-10-26 04:00:32)

Offline

#2 2006-10-26 04:09:44

mkknot
New member
Registered: 2006-10-25
Posts: 7

Re: Wrong link with ExtendedFileManager

I think I Find a solution for this :

In the config.inc.php files of EFM, you can see :

$IMConfig['images_dir'] = 'demo_images';
[...]
$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "demo_images";

But this code is better and work :
$IMConfig['images_dir'] = 'demo_images';
[...]
$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . $IMConfig['images_dir'];
$IMConfig['images_url'] = str_replace( "manager.php", "", $IMConfig['images_url'] );


Thanx a lot me !

Offline

#3 2006-10-26 21:33:31

koto
Xinha Pro
Registered: 2006-01-09
Posts: 58

Re: Wrong link with ExtendedFileManager

Or even simpler version:

$IMConfig['images_url'] = str_replace( array("backend.php","manager.php"), "", $_SERVER["PHP_SELF"] ) . $IMConfig['images_dir'];

Cheers!

Offline

#4 2007-03-27 05:37:19

sir_qwerty
New member
Registered: 2007-03-27
Posts: 3

Re: Wrong link with ExtendedFileManager

Please, could anyone help me with this?
my emf CONFIG.INC.PHP is configured like this

$IMConfig['images_dir'] = '../../../../images';

and my site has images in this directory

http://www.site.cz/images/imagetoinsert.gif

So I'd like EMF to produce the relative URLS in ../images/imagetoinsert.gif format but it still gives me /admin/xinha/plugins/ExtendedFileManager/../../../../images/imagetoinsert.gif

I've tried many mods and ideas, but no luck sad(( Please, would someone be so kind?

(either Firefox or IE, Xinha latest 0.92b)

Last edited by sir_qwerty (2007-03-27 05:49:16)

Offline

#5 2007-03-28 13:21:26

luvizon
New member
Registered: 2007-03-28
Posts: 3

Re: Wrong link with ExtendedFileManager

Hi Sir_qwerty,

I'm having the same....

When I insert any image from the EFM, it appears to be good because the insertion works, the image shows fine BUT, when I save and look to my database, the code saved is...

(...)
<img title="atirador" height="249" alt="atirador" src="/cad/xinha/uploads/atirador.jpg" width="280" />
(...)

The DOMAIN in SRC is missing... I've expect something like ...src="http://www.mydomain.com/cad/xinha/uploads/atirador.jpg"

if you find solution, plz report here...

Last edited by luvizon (2007-03-28 13:43:33)

Offline

#6 2007-03-28 14:50:02

sir_qwerty
New member
Registered: 2007-03-27
Posts: 3

Re: Wrong link with ExtendedFileManager

luvizon wrote:

Hi Sir_qwerty,


The DOMAIN in SRC is missing... I've expect something like ...

src="http://www.mydomain.com/cad/xinha/uploads/atirador.jpg"

if you find solution, plz report here...

In my opinion, you're looking for absolute url and getting relative. This should be achieved by adding this into your Xinha javascript config

xinha_editors.myArea.config.stripBaseHref=false;

(replace  MyArea with your xinha ID)

But my problem is different. I need relative URLs and I'm getting them pointing "forth and back again".

Last edited by sir_qwerty (2007-03-28 14:55:50)

Offline

#7 2007-03-28 14:56:21

luvizon
New member
Registered: 2007-03-28
Posts: 3

Re: Wrong link with ExtendedFileManager

Yeah!!

Now we are talking!!

It's work 100%! Thanks very much dude!!

Offline

#8 2007-03-28 16:30:48

luvizon
New member
Registered: 2007-03-28
Posts: 3

Re: Wrong link with ExtendedFileManager

Humm... about your issue, wich plugins do you have started?

My images_dir is:  $IMConfig['images_dir'] = '../../uploads'; and are working...

Talking about EFM yet... can you test on your environment if you could set page background image than save and check if results ok?

..if you prefer, my MSN is luvizon@hotmail.com or gtalk luvizon@gmail.com

Last edited by luvizon (2007-03-28 16:32:15)

Offline

#9 2007-03-28 16:56:25

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Wrong link with ExtendedFileManager

Hello sir_qwerty,

it looks like you have not set

$IMConfig['images_url']

Also, if want to use relative links, you have to set

xinha_config.expandRelativeUrl = false;

Offline

#10 2007-03-29 17:06:45

sir_qwerty
New member
Registered: 2007-03-27
Posts: 3

Re: Wrong link with ExtendedFileManager

Thanks guys for clues, Ray was almost right, I've replaced this standard game with variables

$IMConfig['images_url'] = str_replace( array("backend.php","manager.php"), "", $_SERVER["PHP_SELF"] ) . $IMConfig['images_dir'];

with this custom variable filling

$IMConfig['images_url'] = "/../images/";

Both editor and frontend see the images properly, everything's perfectly relative.

Offline

#11 2007-04-25 07:15:48

jinbatsu
New member
Registered: 2007-04-25
Posts: 6

Re: Wrong link with ExtendedFileManager

Please help, i still doesn't understand...
Where should i put the config?

xinha_config.expandRelativeUrl = false;

And my EFM config.inc.php

$IMConfig['images_dir'] = '../../files';
$IMConfig['images_url'] = str_replace( array("backend.php","manager.php"), "", $_SERVER["PHP_SELF"] ) . '../../files';

The result is:

­<img src="/http://127.0.0.1/platinum/xinhaEditor/plugins/ExtendedFileManager/../../files/Test/logo.jpg">

After i update/insert to database.
And i want edit with xinha editor, the result is:

<img src="/http://127.0.0.1/http://127.0.0.1/http://127.0.0.1/http://127.0.0.1/http://127.0.0.1/platinum/xinhaEditor/plugins/ExtendedFileManager/../../files/Test/logo.jpg">

why is that with the first "/" ? it should be direct with "http://blablabla" without "/http://blablbala"

Thanks for all.

Last edited by jinbatsu (2007-04-25 07:17:26)

Offline

#12 2007-04-25 08:16:11

jinbatsu
New member
Registered: 2007-04-25
Posts: 6

Re: Wrong link with ExtendedFileManager

well, for a while i use manually insert into EFM config.inc.php :

$IMConfig['images_dir'] = $_SERVER['DOCUMENT_ROOT'].'/xinhaEditor/files';
$IMConfig['images_url'] = 'http://localhost/xinhaEditor/files/';

it works.. thanks.

and for domain, maybe i'll just edit those with:

$IMConfig['images_dir'] = $_SERVER['DOCUMENT_ROOT'].'/xinhaEditor/files';
$IMConfig['images_url'] = 'http://domain.name/xinhaEditor/files/';

thanks for all Xinha!!! smile

Offline

Board footer

Powered by FluxBB