move hotlinked images

Found a bug? Tell us!!
Post Reply
r0bs
Posts: 4
Joined: Mon Oct 16, 2006 3:00 pm

move hotlinked images

Post by r0bs »

I tried to move a hotlinked image from one directory to another using the media properties in the library.

Moving the image seems to garble the URL, so it cannot be found anymore.

Is this a bug or a problem on my side?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: move hotlinked images

Post by garvinhicking »

Hi!

The problem more is that hotlinked images do not exist on your server and thus cannot be moved.

But it can be considered a bug that s9y offers you to move such an item. It should not offer you to do that.

Which s9y version are you using?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
r0bs
Posts: 4
Joined: Mon Oct 16, 2006 3:00 pm

Post by r0bs »

I am using 1.1beta1.

BTW, at first I thought the directories are just virtual folders and mainly for media organizing purposes: So why not move a hotlink from one folder to another?!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I must admit I have not done the hotlinking feature of s9y, so I can't say much without having a clear look at it. Which is probably the reason why the 1.1 media database makeoer focussed on real files and not hotlinked images ;)

I believe that a hotlink is not stored in a "directory" on the server; the "path" option of such a virtual image relates to the path on the original server. Thus changing it to a local directory will completely remove the "hotlink"-attribute frmo such an image.

Best egards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

And the directories are created on my account, verifiable with FTP access, so I'm pretty sure they're physical directories. I don't know how the hotlinking works either, but the "virtual directory" thing seems like a good mental analogy.

If you "move" the hotlinked image back to its original location, does it work again? I'm betting it gets a permalink when it's created, but the link isn't updated when it's moved.
Judebert
---
Website | Wishlist | PayPal
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Actually, I believe the hotlink path is stored in the 'path' column of the table... This is the same column used to store the directory...

mrblah stumbled across it here: http://www.s9y.org/forums/viewtopic.php ... ge+hotlink

I had planned to take look at this but I am pressed for time...
(Converting an 8.4 GB static html site (no css- straight html from 1996) to a crappy CMS product for work... Original projected timeline: One year. New "fast-tracked" implementation timeline, from install of _test_ site to install of live site: 3 weeks. Went live on Sunday, so I am still squelching bugs... )

I think the easy fix would be to put a check for $file['hotlink'] in the appropriate function and not output the directory dropdown. The better fix would be to do that and add a check to the update function so path is never overwritten for a hotlink.

But I haven't had a chance to actually find those functions yet... If anyone has any idea which functions those might be, feel free to mention it and I can see about making a patch. (yeah, it is going to probably be in include/functions_images.inc.php... but a specific function name would be great...)
Post Reply