Album

From Smop.co.uk

Jump to: navigation, search

I'm using Album to manage my gallery at the moment.

I've used gallery2 before and I don't want the extra complexity - a CLI and some scripts is my preferred technique.

Inital setup:

/etc/album.conf:

#
# Configuration file automatically created by album
#
conf_version    4.02
theme_path      /var/www/album/themes
theme_url       /album/themes
medium  33%     # command-line saved option
exif    '<br>%Date and Time%</br>'      # command-line saved option
theme   default  # command-line saved option
plugin captions
plugin mouseover
plugin autorot

Current process:

  • use gtkam to select and save photos
  • create directory, caption.txt file ("filename%lt;tab>caption")
  • run album -add 2007/new_album/
    • (needs "-theme default" first time around)


Original process:

  • use gtkam to select and save photos
  • rotate images (now undeeded due to autorotate plugin)
    • jhead -autorot *
  • run album once:
    • album -plugin captions -plugin mouseover -plugin autorot -medium 33% -exif "
      %Date and Time%</br>" -add 2007/new_album/

mouseover improvement

I had some comments that the mouseover plugin was overly intrusive, which is true. So I've hacked a delay in. I don't do Javascript, so it's ugly, but seems to work (although sometimes it flickers really quickly). Apply this patch to /etc/album/plugins/mouseover.alp:

@@ -61,8 +61,8 @@
 	$cap .= <<EXIF_TOP;
 <div id="shLayer"
     style="position:absolute; z-index:1; background-color: #FFFFFF; border: 1px solid #660000; visibility: hidden"
-    onMouseOver="showHideLayers('shLayer','','show')"
-    onMouseOut="showHideLayers('shLayer','','hide')"> 
+    onMouseOver="myTimer=setTimeout('showHideLayers("shLayer","","show")',2000)"
+    onMouseOut="clearTimeout(myTimer); showHideLayers('shLayer','','hide')"> 
 	<table id="exif_info">
 EXIF_TOP
 
@@ -85,8 +85,8 @@
   my $obj = $data->{obj}{$pic};
 	$obj->{intag} .= <<IMGTAG;
 id='$id'
-onMouseOver="showHideLayers('shLayer','','show'); placeMenu('shLayer','$id')"
-onMouseOut="showHideLayers('shLayer','','hide')" style="position: relative;"
+onMouseOver="myTimer=setTimeout('showHideLayers("shLayer","","show"); placeMenu("shLayer","$id")',2000)"
+onMouseOut="clearTimeout(myTimer); showHideLayers('shLayer','','hide')" style="position: relative;"
 IMGTAG
 
 	return $cap;
@@ -139,6 +139,8 @@
     if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
     obj.visibility=v; }
 }
+
+var myTimer;
 //-->
 </script>
 HEAD
Personal tools