Langkawi - Pantai Cenang
Travelling Malaysia during "rain season" may sound weird but weather was fine most of the time.
Travelling Malaysia during "rain season" may sound weird but weather was fine most of the time.
I had to get rid of Gallery3 without losing all my pictures and albums. Fortunately, I found Koken as a possible replacement. It turned out that there is also is quite simple way to migrate Gallery3 to Koken - thanks to Daniel Muller.
His migration scripts can be found here: https://github.com/DanielMuller/gallery_to_koken
Three issues occured:
- Galleries were obviously imported but not shown as albums
- Aspect ratio was a bit messed up
- Several images were not shown
A few SQL statements later, they were solved:
update koken_albums set level=1;
update koken_content set aspect_ratio = width/height;
update koken_content set filename = replace(filename, ' ', '_');
Obviously, filenames on disk should match those in the database:
find . -name "* *" | while read FILENAME; do mv "$FILENAME" $(echo $FILENAME | tr ' ' '_'); done;
Finally, get the urls nice and clean:
url.rewrite-if-not-file = (
"^/koken/admin($|/.*)" => "$0",
"^/koken/storage/cache/images(/[0-9]{3}/[0-9]{3}/.*)$" => "/koken/i.php?path=$1",
"^/koken(/[^?]*)(\?(.*))?" => "/koken/app/site/site.php?url=$1&$3"
)