Revision [3584]
This is an old revision of FilesManagementHandler made by ChristianBarthelemy on 2004-12-22 00:21:27.
Change the Mod015fFilesAction into a handler
- Change the files.php location from the /actions folder to the /handlers/page folder
- Encapsulate the full code between <div class="page"> and </div> (not mandatory but more readable)
- Change this code:
// form
$result = "<form action=\"".$this->href()."\" method=\"post\" enctype=\"multipart/form-data\">\n";
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wakka\" value=\"".$this->MiniHref()."\">\n";
echo $result;
$result = "<form action=\"".$this->href()."\" method=\"post\" enctype=\"multipart/form-data\">\n";
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wakka\" value=\"".$this->MiniHref()."\">\n";
echo $result;
into:
// form
// form
$result = "<form action=\"".$this->href()."/files\" method=\"post\" enctype=\"multipart/form-data\">\n";
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wakka\" value=\"".$this->MiniHref()."/files\">\n";
echo $result;
// form
$result = "<form action=\"".$this->href()."/files\" method=\"post\" enctype=\"multipart/form-data\">\n";
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wakka\" value=\"".$this->MiniHref()."/files\">\n";
echo $result;
- Change this code:
<?php
echo $this->FormClose();
(php)echo $this->FormClose();
into:
<?php
echo "<a href=\"".$this->Href()."\">Back to the page</a>";
echo $this->FormClose();
%%- You still need the files.xml.php and the other parts of the Mod015fFilesAction!