This is not ajax but may give a new aspect to your problem:
You can assign any template to each FD call.
So if you are able to show/hide divs in js, you could generate all of the possible views on load, then hide/show them as needed.
You can make a ’root’ one, which calls FD many times to collect all of the subdirectories in divs with different ids. Each folder’s <a> tag could show/hide it’s own div on click.
..just a raw idea.
I am getting a error:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: array_merge() [function.array-merge]: Argument #2 is not an array
Error type/ Nr.: Warning - 2
File: /var/www/vhosts/XXXXXX.nl/httpdocs/assets/snippets/filedownload/filedownload.class.inc.php
Line: 146
Line 146 source: $this->allFiles = array_merge($this->allFiles,$this->getFiles($this->_config[’getFolder’]));
does anyone know how to fix this?
-
☆ A M B ☆
- 1,231 Posts
I can’t seem to get the delete function working with this... I have put &deleteGroups=`users` and tried all the different placeholders but nothing seemed to work.
Could someone tell me how they managed to get the delete option working?
hello.
I’m using filedownload with the plugin and all is working great. I use the browseDirectories setting and i’m trying to find a way to upload files when browsing the folders.. So i’m tring to grab the value from [+fd.path+] to use it as a param for the FileUpload Snippet and i’m stuck with my little code...
line: 453 of filedownload.class.inc.php
<?php //for color
function getDefaultLayout() {
//****** add an Fileupload call, trying to set the path dynamically.
global $modx;
$myPath='assets/files/modules/'.$this->_config['curRelPath']; // build a dynamic path
$t= '<table>';
if ($this->_config['browseDirectories']) {
$params['tpl']='FileUploadForm';
// $params['path']= $myPath; //doesn't work!
// $params['path']= 'assets/files/modules/[+fd.path+]'; //doesn't work!
$params['path']= 'assets/files/modules/module-1/'; // works great..
$params['uploadgroups']='support';
$params['extensions']='txt';
$snippetFileUpload=$modx->runSnippet('FileUpload', $params);
$t .= 'debug:'.$myPath.'<tr[+fd.class+]><td colspan="4"><strong>Path: [+fd.path+]</strong>'.$snippetFileUpload.'</td></tr>';
}
//**************************
maybe a php pro can tell me what i’m making wrong.. ?
CTRL+SHIFT+U - Clear Cache
CTRL+SHIFT+H - Hiding Heft Panel
CTRL+SHIFT+N - Fast Create Resource
CTRL+ALT+P - Preview Recource (in edit resorce window)
CTRL+ALT+S - Save
in the meanwhile, i was working with v2.6 ( from repository ) and i think i found a little bug.
"&deleteGroups" is not working as expected. It show the links even if the user is not in the group...
rollbacking to the version v.2.5(beta) found on
http://www.muddydogpaws.com/development/filedownload/download.html solved the problem...
CTRL+SHIFT+U - Clear Cache
CTRL+SHIFT+H - Hiding Heft Panel
CTRL+SHIFT+N - Fast Create Resource
CTRL+ALT+P - Preview Recource (in edit resorce window)
CTRL+ALT+S - Save
-
☆ A M B ☆
- 1,231 Posts
I can’t get the delete link to work at all. I tried 2.6 and 2.5...
-
☆ A M B ☆
- 1,231 Posts
Can someone explain how to allow web users to delete an uploaded file please. I can’t seem to get the delete function to work even in the manager.
Thank you.