New sort plugin, including some optional sort modifications
[bizou.git] / plugins / _disabled / sort / before_content.php
diff --git a/plugins/_disabled/sort/before_content.php b/plugins/_disabled/sort/before_content.php
new file mode 100644 (file)
index 0000000..375a091
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+
+# reverts the order of folders
+# usefull if you have date named albums and you want the most recent first
+$GLOBALS["folders"] = array_reverse($GLOBALS["folders"]);
+
+# sort imageFiles by modification time instead of filename
+# usefull if you have renammed camera photos
+# http://stackoverflow.com/questions/2667065/sort-files-by-date-in-php
+# http://fr.php.net/create_function
+#usort( $GLOBALS["imageFiles"], create_function('$a,$b', 'return filemtime($a["file"]) > filemtime($b["file"]);') );