[Xerte] Re: relative paths in img tags links
Ron Mitchell
ronm at mitchellmedia.co.uk
Thu Aug 9 10:07:19 BST 2012
Looking at the original post I wonder if there's a more basic problem
here...
If I had a link to an image or other file in an LO like <img
src="http://somepublicdomain/xertetoolkits/USER-FILES/14-guest2-Nottingham/m
edia/picture.png"> and then exported and imported that LO into another
toolkits installation on a different domain the image or link would still
work as long as the original location was still available but in the
original post the reference is to <img
src="http://localhost/xertetoolkits/USER-FILES/14-guest2-Nottingham/media/pi
cture.png"> which obviously isn't publically accessible.
The other question is - the original post refers to images not other files
types etc so why are the images being linked as full url's rather than
imported to a page which contains an image option and therefore maintains
the correct links when exported and imported?
HTH
Ron
-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 09 August 2012 09:44
To: Xerte discussion list
Subject: [Xerte] Re: relative paths in img tags links
The problem is that when you add <img src="pathHere"> there is no way to
evaluate expressions in the path: it has to be a literal, so you can't use
the templatePath or FileLocation variables without doing some sort of
processing on the text. Any literal path has to have the name of the folder
in it, so I'm not sure I see a good solution here on the toolkits side.
-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Pat Lockley
Sent: 09 August 2012 09:40
To: Xerte discussion list
Subject: [Xerte] Re: relative paths in img tags links
Assuming the working process is
1) Picture uploaded using media and quota to add files to the media folder
for a specific project on a specific site
2) HTML pasted in text area containing img src="url from step 1"
then there isn't much you can do
but I am not sure that is the problem
If you can code - you might like the dev list
On Thu, Aug 9, 2012 at 9:30 AM, Laurent MATHIEU <laurent.mathieu at scassi.com>
wrote:
> If i understand correctly, i have no other alternative than to change the
subfolder name after each import. Is that correct?
> If so, I'll probably look into a way to automate this with some batches.
> Thanks.
> /L
>
> -----Message d'origine-----
> De : xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] De la part de Pat
> Lockley Envoyé : mercredi 8 août 2012 23:49 À : Xerte discussion list
> Objet : [Xerte] Re: relative paths in img tags links
>
> same answer
>
> it's basically free text find and replace
>
> On Wed, Aug 8, 2012 at 10:46 PM, Dave Burnett <d_b_burnett at hotmail.com>
wrote:
>> I mean the actual folder name and the database instances.
>>
>>
>>> Date: Wed, 8 Aug 2012 22:43:37 +0100
>>
>>> From: patrick.lockley at googlemail.com
>>> To: xerte at lists.nottingham.ac.uk
>>> Subject: [Xerte] Re: relative paths in img tags links
>>>
>>> if you add a picture via text entry - as many times as you've entered
it.
>>>
>>> There isn't really a work round in this case I think.
>>>
>>> On Wed, Aug 8, 2012 at 10:41 PM, Dave Burnett
>>> <d_b_burnett at hotmail.com>
>>> wrote:
>>> >
>>> > Pat, how many places would 14-guest2-Nottingham have to be changed?
>>> > (so that the existing paths worked?)
>>> >
>>> >
>>> >> Date: Wed, 8 Aug 2012 22:09:59 +0100
>>> >> From: patrick.lockley at googlemail.com
>>> >> To: xerte at lists.nottingham.ac.uk
>>> >> Subject: [Xerte] Re: relative paths in img tags links
>>> >>
>>> >> i think the project folder would kill it
>>> >>
>>> >> i am not sure it's possible
>>> >>
>>> >> On Wed, Aug 8, 2012 at 10:08 PM, Paul Swanson
>>> >> <Paul.Swanson at harlandfs.com> wrote:
>>> >> > Try <img src="media/picture.png">
>>> >> >
>>> >> >
>>> >> >
>>> >> > That should work if the media folder is in the same
>>> >> > relationship as you describe below to your "14-guest2-Nottingham"
folder.
>>> >> >
>>> >> >
>>> >> >
>>> >> > Paul Swanson
>>> >> >
>>> >> > Internal Business Systems Analyst
>>> >> >
>>> >> > Internal Business Intelligence
>>> >> >
>>> >> > Harland Financial Solutions
>>> >> >
>>> >> > (800) 274-7280 Ext. 2462
>>> >> >
>>> >> > Paul.Swanson at harlandfs.com
>>> >> >
>>> >> >
>>> >> >
>>> >> > From: xerte-bounces at lists.nottingham.ac.uk
>>> >> > [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of
>>> >> > Laurent MATHIEU
>>> >> > Sent: Wednesday, August 08, 2012 2:00 PM
>>> >> > To: xerte at lists.nottingham.ac.uk
>>> >> > Subject: [Xerte] relative paths in img tags links
>>> >> >
>>> >> >
>>> >> >
>>> >> > Dears,
>>> >> >
>>> >> >
>>> >> >
>>> >> > Some of my images cannot be found after I import a XOT exported
>>> >> > LO into another XOT server. This more than likely due to some
>>> >> > absolute links being used into some img tags.
>>> >> >
>>> >> >
>>> >> >
>>> >> > I was just wondering if there is a way to change those to some
>>> >> > kinds of relative paths?
>>> >> >
>>> >> >
>>> >> >
>>> >> > i.e. something like <img src="my-relative-path/picture.png">
>>> >> > rather than <img
>>> >> >
>>> >> >
>>> >> > src="http://localhost/xertetoolkits/USER-FILES/14-guest2-Nottin
>>> >> > g
>>> >> > ham/media/picture.png">
>>> >> >
>>> >> >
>>> >> >
>>> >> > The main issue is that the subfolder "14-guest2-Nottingham"
>>> >> > turns into different names after I import my LO in another XOT
>>> >> > server.
>>> >> >
>>> >> >
>>> >> >
>>> >> > Any help would be much appreciated.
>>> >> >
>>> >> >
>>> >> >
>>> >> > Kind regards,
>>> >> >
>>> >> > Laurent
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > This message and any attachment are intended solely for the
>>> >> > addressee and may contain confidential information. If you have
>>> >> > received this message in error, please send it back to me, and
>>> >> > immediately delete it. Please do not use, copy or disclose the
>>> >> > information contained in this message or in any attachment. Any
>>> >> > views or opinions expressed by the author of this email do not
>>> >> > necessarily reflect the views of the University of Nottingham.
>>> >> >
>>> >> > This message has been checked for viruses but the contents of
>>> >> > an attachment may still contain software viruses which could
>>> >> > damage your computer
>>> >> > system:
>>> >> > you are advised to perform your own checks. Email
>>> >> > communications with the University of Nottingham may be
>>> >> > monitored as permitted by UK legislation.
>>> >> >
>>> >> >
>>> >> > _______________________________________________
>>> >> > Xerte mailing list
>>> >> > Xerte at lists.nottingham.ac.uk
>>> >> > http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>> >> >
>>> >> > This message and any attachment are intended solely for the
>>> >> > addressee and may contain confidential information. If you have
>>> >> > received this message in error, please send it back to me, and
>>> >> > immediately delete it. Please do not use, copy or disclose the
>>> >> > information contained in this message or in any attachment. Any
>>> >> > views or opinions expressed by the author of this email do not
>>> >> > necessarily reflect the views of the University of Nottingham.
>>> >> >
>>> >> > This message has been checked for viruses but the contents of
>>> >> > an attachment may still contain software viruses which could
>>> >> > damage your computer
>>> >> > system:
>>> >> > you are advised to perform your own checks. Email
>>> >> > communications with the University of Nottingham may be
>>> >> > monitored as permitted by UK legislation.
>>> >> >
>>> >> >
>>> >>
>>> >> _______________________________________________
>>> >> Xerte mailing list
>>> >> Xerte at lists.nottingham.ac.uk
>>> >> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>> >
>>> > This message and any attachment are intended solely for the
>>> > addressee and may contain confidential information. If you have
>>> > received this message in error, please send it back to me, and
>>> > immediately delete it. Please do not use, copy or disclose the
>>> > information contained in this message or in any attachment. Any
>>> > views or opinions expressed by the author of this email do not
>>> > necessarily reflect the views of the University of Nottingham.
>>> >
>>> > This message has been checked for viruses but the contents of an
>>> > attachment may still contain software viruses which could damage
>>> > your computer
>>> > system:
>>> > you are advised to perform your own checks. Email communications
>>> > with the University of Nottingham may be monitored as permitted by
>>> > UK legislation.
>>> >
>>> >
>>> > _______________________________________________
>>> > Xerte mailing list
>>> > Xerte at lists.nottingham.ac.uk
>>> > http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>> >
>>> > This message and any attachment are intended solely for the
>>> > addressee and may contain confidential information. If you have
>>> > received this message in error, please send it back to me, and
>>> > immediately delete it. Please do not use, copy or disclose the
>>> > information contained in this message or in any attachment. Any
>>> > views or opinions expressed by the author of this email do not
>>> > necessarily reflect the views of the University of Nottingham.
>>> >
>>> > This message has been checked for viruses but the contents of an
>>> > attachment may still contain software viruses which could damage
>>> > your computer
>>> > system:
>>> > you are advised to perform your own checks. Email communications
>>> > with the University of Nottingham may be monitored as permitted by
>>> > UK legislation.
>>> >
>>> >
>>>
>>> _______________________________________________
>>> Xerte mailing list
>>> Xerte at lists.nottingham.ac.uk
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>
>> This message and any attachment are intended solely for the addressee
>> and may contain confidential information. If you have received this
>> message in error, please send it back to me, and immediately delete
>> it. Please do not use, copy or disclose the information contained in
>> this message or in any attachment. Any views or opinions expressed by
>> the author of this email do not necessarily reflect the views of the
University of Nottingham.
>>
>> This message has been checked for viruses but the contents of an
>> attachment may still contain software viruses which could damage your
computer system:
>> you are advised to perform your own checks. Email communications with
>> the University of Nottingham may be monitored as permitted by UK
legislation.
>>
>>
>> _______________________________________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>
>> This message and any attachment are intended solely for the addressee
>> and may contain confidential information. If you have received this
message in
>> error, please send it back to me, and immediately delete it. Please do
not
>> use, copy or disclose the information contained in this message or in
>> any attachment. Any views or opinions expressed by the author of
>> this email do not necessarily reflect the views of the University of
Nottingham.
>>
>> This message has been checked for viruses but the contents of an
>> attachment may still contain software viruses which could damage your
computer system:
>> you are advised to perform your own checks. Email communications with
>> the University of Nottingham may be monitored as permitted by UK
legislation.
>>
>>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
More information about the Xerte
mailing list