You are not logged in.
I'd like to use either EFM or ImageManager to allow people to upload images, but I do not have php running on my server.
When I try to use either of them now, the server responds by sending me back the backend.php file, b/c it cannot execute it.
Short of rewriting the plugin entirely, is there a non-php way to use it?
Offline
Writing the server-side code in Python would be a snap; I'm just not sure how I would interact with the existing plugins.
Are there any guides to writing a plugin? I didn't find much in http://xinha.webfactional.com/wiki/Docu … umentation
Offline
For general plugin writing, learn by example...
SelectCharacter is a very simple plugin which has a dialog
See contrib/php-xinha.php and plugins/MootoolsFileManager/config.php to see how we pass "backend configuration details" around securly, you would have to implement something similar.
ImageManager and ExtendedFileManager are VERY php centric, the entire things would have to be rewritten, they are also pretty antiquated, prone to security issues, and unpleasant to use IMHO.
MootoolsFileManager (MFM) on the other hand is not highly coupled to PHP, I've recently created a branch in the subversion with an updated MFM, there are some more (slightly heavy I believe) changes coming to that branch.
Get it by:
svn co http://svn.xinha.org/branches/MootoolsF … er-Update/
Essentially, in MFM, you'd need to rewrite (here's your reading list, in order :-)):
plugins/MootoolsFileManager/backend.php
plugins/MootoolsFileManager/config.php
plugins/MootoolsFileManager/contrib/php-xinha.php
plugins/MootoolsFileManager/Assets/Connector/FileManager.php
Broadly speaking...
your backend.py or whatever needs (in conjuction with FileManager.py or whatever)
take 'event' as GET/POST, event can be
list (default if no event)
create (create directory)
upload (upload file)
download (download a file)
destroy (delete a file)
move (move a file)
detail (get information on a file)
do stuff based on event (including checking permission!) and the data provided to it in get/post
return a JSON encoded response of appropriate format
I don't have time to dig through and work out the JSON response formats and I don't think it's documented in the mootools-filemanager itself (maybe I will do myself that when I have time to spare), but you should be able to get it from reading the PHP, Javascript, or probably easier, just sniffing the requests on a working mootools-filemanager using Firebug or Chrome Developer Tools (CTRL-SHIFT-J in Chrome, select Network tab).
If you do write a py backend, I'm sure the mootools-filemanager people would like to have it available, and we certainly would in Xinha.
Official version mootools-filemanager:
https://github.com/cpojer/mootools-filemanager
The version I'm tracking in my Xinha branch:
https://github.com/sleemanj/mootools-filemanager
The version that is going to be merging a pile of stuff back to cpojer and which I'll pick up:
https://github.com/GerHobbelt/mootools-filemanager
James Sleeman
Offline
Many thanks for the information; I'll have a chance to dig into the source later this month.
Offline