Suite à la réalisation du labo, j’en suis venu à développer mon propre plugin pour jQuery. J’étais tombé au moment sur ce projet mais le code et les fonctionnalités ne me satisfaisant pas, j’ai préféré refaire le mien.
J’ai bien cherché des icônes différentes pour me démarquer mais je n’ai rien trouvé de mieux. Alors merci FAMFAMFAM pour ton superbe set
Todo list
- Documentation plus complète en français et en anglais
- Possibilité de sauvegarder le contenu des dossiers pour diminuer le nombre de requêtes et de transferts inutiles (option)
- Tri par date, poids ou nom des fichiers
- Fond alternatif pour une meilleur lecture (option)
- Effet rollOver (option)
- Bibliothèque de skins
- …
Avant cela je dois corriger les potentiels bugs et compléter au mieux le skin actuel en fonction des extensions. Votre aide est d’ailleurs la bienvenue
Prérequis
- PHP 5
- jQuery
- jQuery Easing Plugin
Utilisation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /* Default values */ directory: "/", webDirectoryPath: "/", scriptLocation: "dirlister.php", filesIgnored: ".htaccess, .htpasswd, robots.txt", onEvent: "click", openEasing: "jswing", closeEasing: "jswing", openSpeed: "normal", closeSpeed: "normal", multiOpen: false, dateFormat: "d/m/y H:i", loadText: "Loading…", emptyText: "Empty", lang: "en", showDirPath: true, dirPathPosi: "top", filesLinkFollow: true /* Usage */ $('#tree').dirLister( { directory: "…", webDirectoryPath: "…", scriptLocation: "…", … }, function(file) { alert(file.name+" - "+file.path+" - "+file.ext); }); |
Vous trouverez la dernière version du plugin dans la partie javascript du Labo.






22 mai 2008 à 18:42
Great script!!!
Any plans on releasing an ASP version?
22 mai 2008 à 18:57
hello,
i’m trying to do this in dirlister 1.2
thx a lot
28 mai 2008 à 8:17
file.path is never set?
good script though, trying to get it work nicely for my purposes 
17 juillet 2008 à 16:14
Hello,
I’ve a problem trying to get it to work. I’ve got PHP5, Jquery and the easing plugin. I followed your instructions, but nothing happens.
1) I extracted the content of your version 1.1 to a webfolder,
2) I created a index.php and added the script files in the HEAD
@import url(dirlister.css);
$(’#tree’).dirLister(
{ directory: ‘../audio/audio’, webDirectoryPath: ‘audio/audio’, scriptLocation: ‘dirlister.php’},
function(file)
{
alert(file.name+” - “+file.path+” - “+file.ext);
});
and in my BODY I created the DIV with id=’tree’.
What’s wrong? Thank you!
17 juillet 2008 à 17:04
Hello,
Can you give me a link ?
i suppose there’s a wrong path in your code.
Sorry for my poor english
ps: send me information by mailer in contact
13 octobre 2008 à 14:14
I did the same as alan but i can not get it to work.
dirlister
$(document).ready( function() {
$(’#tree’).dirLister(
{
directory: “demo/”,
webDirectoryPath: “demo/”,
scriptLocation: “dirlister.php”,
…
}, function(file)
{
alert(file.name+” - “+file.path+” - “+file.ext);
});
});
17 décembre 2008 à 2:24
I have this script up and running and it looks great! Thanks!!
I have one question and one problem.
question: Can we set the base directory - directory: “public_html/www/ddfsf/images” but only have the /images displayed.
problem: The webDirectoryPath is set correctly, but the entire directory is being added to the path. So for
example: a file in /public_html/www/ddfsf/images should have the href
http://www.domain.com/images/file
instead it has
http://www.domain.com/public_html/www/ddfsf/images/file
Any tips would be greatly appreciated.
Thanks,
Rick