Folder View 2 Support Product Page

File Management

Shared 05 Oct 2010 18:52:00
1
likes this idea
05 Oct 2010 18:52:00 Bart Garner posted:
If this had Delete functionality it would be perfect!


Edited by - Bart Garner on 05 Oct 2010  18:52:18

Replies

Replied 06 Jul 2011 14:27:35
06 Jul 2011 14:27:35 manuel pinto replied:
If this has the functionality to link files and not only showing files and folders it's perfect.
Replied 27 Sep 2012 10:34:19
27 Sep 2012 10:34:19 Graeme Beaty replied:
It is possible to delete a file using Folderview and one php file. From folder simply use the 'Go To URL' behaviour and send to a page where you will have the delete action + the name of the relevant file e.g. delete-file.php?filename={path}

On the processing page simply state the following

<?php
$filename=$_GET['filename'];
unlink ($filename);

$updateGoTo = "[i][b]THE PAGE YOU WISH TO REDIRECT TO AFTER THE DELETION[/i][/b]";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));

?>

Hey presto!

Reply to this topic