Hi all.
I'm planning to take a creey trip into the world of plugins and Gallery3.
My plan is to take the "upload from server" plugin and do a couple of small changes so that it will be able to create symbolic links instead of uploading the images to gallery.
I have no clue when it comes to writing plugins to gallery so i asking you for ideas, hints.. where do i start in the plugin source?
I run a gallery2 site with 20000+ images, all symlinked to a different disk on my server so this would be really neat if i cold make it work.
I know i'll probably only work with linux hosts but thats what I'm using
I'd be happy for any input you can give me
//Jörgen
Posts: 7994
Symlinks is *probably* as easy as writing a module that listens for the item_created() event and deletes the file and replaces it with a symlink. Most of the rest of the Gallery code probably won't notice that it's got a symlink and not the original file (but I don't know that for sure). The trick will be identifying the source file to symlink too.. but I'd suggest that you first write a simple module that can capture events (look in modules/*/helpers/*_event.php for examples)
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git
Posts: 8
Thanks, now i know *lots* more than before
Posts: 19
Hello,
Was there any progress on this? I am in the same situation I don't want to duplicate 30k+ picts within the same server.
Will there be a workaround available, like browsing existing directories/albums and automatically creates the structure with g3 db without really having to import them?
Thanks
XabiX
Posts: 8
As far as i know there is nothing more on this (i know that i haven't been creative ). But *really* hope someone else have taken to the idea. My image collection have grown....+65k
it would help LOTS with this functionality
(the coding idea was no in my skillset)
//Jörgen