My need is to upload a file or an image from a module :
ex I have the News module, but i would not use the WYSiIWYG editor because (maybe) I would like to have more control on data formatting in the front-end.
So I have any pure text fields and a field where i store an image name.
But also I would upload that image while I'm compiling my news.
I wrote a little uploader, maybe unuseful : If you have better, pls help because is an important need for me.
change in News.module.php line 971
Code: Select all
$this->smarty->assign('foto', $this->CreateInputText($id, 'foto', $foto, 30, 255,'id="foto"'));
Code: Select all
<p class="pageinput">{$foto}<input name="upload" value="upload" type="button" onclick="window.open('../upload.php?element=foto','Uploader','HEIGHT=400,WIDTH=400')"/></p>
[attachment deleted by admin]