2.times { think_before :posting }
prototype File Tree: new connector
Overview
I really want to thank Ben Duffin, who kindly sent me an e-mail with a new connector for the prototype File Tree plugin. This one makes possible to list directories and files from a remote FTP directory.
Download
You can download the new connector with the new v. 1.1 of the plugin (17 January 2009).
Usage
The usage of the connector is really simple. First of all, in the file prototypeFileTreeFTP.php you have to update the variables at lines 33-35 ($ftp_server, $ftp_user and $ftp_pw) with the address of the remote FTP server, the username and its password. The javascript code has to be updated to make it refer to the new connector, passing it a GET variable, isstart, like this:
var startRemoteDir = 'public_html';
$('myElementId').fileTree({
root: startRemoteDir,
script: 'prototypeFileTreeFTP.php?isstart='+startRemoteDir,
folderEvent: 'click',
loadMessage: 'Loading remote file list...'
}, callbackFunction);
function callbackFunction(file) {
// My custom code here for file selection
}
Please make use of the new connector and let me know what you think of it. Once again, thank you Ben!
If you want to thank me for this post, feel free to pay me a coffee! :)
| Stampa l'articolo | Questo articolo è stato pubblicato da marzapower il 17 gennaio 2009 alle 20:37, ed è archiviato come Informatica, Siti web. Puoi seguire i commenti a questo post attraverso RSS 2.0. Puoi pubblicare un commento o segnalare un trackback dal tuo sito. |