This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Pages: 1 - Last Post: 30-Jan-2018 20:50 Last Post By: jGromit
jGromit

Posts: 33,462
Registered: 31-Jan-2006
Allow webLocation to accept a relative URL
Posted: 22-Jun-2017 16:37
 
  Click to reply to this thread Reply
(Rescued from the jAlbum 14 beta thread, because I think it's worthy of consideration.)

There is one problem with the way webLocations have been implemented.

Let's say I'm building an album of albums, and my site is structured like this:

http://example.com/master
http://example.com/album1
http://example.com/album2
... and so on.

I add my webLocations to the master, but I can't specify the URL as, for example, ../album1/index.html. I have to give it the absolute URL: http://example.com/album1.

But now say I want to move my entire collection to a different structure:

http://example.com/galleries/master
http://example.com/galleries/album1
http://example.com/galleries/album2
... and so on.

The master album will now be broken, because the links from the thumbnails are absolute, and are wrong.

I think the only way to handle relative URL's would be to say that any webLocation URL that starts with a "dot" is interpreted as a relative URL. A sibling directory, for example, would be ../dogalbum. A child directory would be specified as ./dogalbum, which is functionally identical to dogalbum. In short, there's no relative URL that can't be given by starting with a dot.

Of course, in this instance the user would absolutely be required to select a representing image. jAlbum can't possibly know where to look for one.

Edit: The user would also have to be given a direct way of naming the webLocation object, since there's no way to extract it from the site (because jAlbum doesn't know where the site actually is).
jGromit

Posts: 33,462
Registered: 31-Jan-2006
Re: Allow webLocation to accept a relative URL
Posted: 27-Jan-2018 14:06   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Working very nicely in jAlbum 15.2b2. :)

Between this and theme image support, I guess I can now die happy. ;)
davidekholm

Posts: 21,774
Registered: 18-Oct-2002
Re: Allow webLocation to accept a relative URL
Posted: 30-Jan-2018 16:01   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Just don't die yet please :-)
jGromit

Posts: 33,462
Registered: 31-Jan-2006
Re: Allow webLocation to accept a relative URL
Posted: 30-Jan-2018 20:50   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
If I ever finish my "to do" list, that's it, I'm outta here. ;)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums