New sort plugin, including some optional sort modifications
authorMarc MAURICE <marc-bizou@pub.positon.org>
Sun, 18 Aug 2013 10:17:47 +0000 (12:17 +0200)
committerMarc MAURICE <marc-bizou@pub.positon.org>
Sun, 18 Aug 2013 10:17:47 +0000 (12:17 +0200)
plugins/_disabled/sort/before_content.php [new file with mode: 0644]

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"]);') );