Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » pickup subdir from table and put into upload_subdir
Re: pickup subdir from table and put into upload_subdir [message #1371 is a reply to message #1363] Wed, 11 June 2008 20:03 Go to previous messageGo to previous message
Jovan is currently offline  Jovan
Messages: 24
Registered: February 2008
Location: Serbia
Junior Member

Hi Tony,

I tried with code which you suggest me, but I could not pick up data from table.
This is code which I implement:

function _cm_initialiseFileUpload ($where, $fieldarray)
// perform any initialisation before displaying the File Upload screen.
{
// ******* new code
$fieldarray = $this->_cm_getForeignData($fieldarray);
// ******
$this->upload_subdir = $fieldarray['path']; // **** new
$this->upload_filetypes = 'text/plain';

$this->upload_maxfilesize = 1000000;
return $fieldarray;

This part of code :

$fieldarray = $this->_cm_getForeignData($fieldarray);

works when I put in other _cm ... functions. Also I tried with global variable and found very interesting thing that data from global variable is not possible transfer from _cm .. function, to _cm functions, but when I put global variable in first function (function table_name()) I could read content of global variable inside _cm_initialiseFileUpload function.










Jovan
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Filter values of fields depending on other fields
Next Topic: Use the ADD5 template
Goto Forum:
  


Current Time: Mon Apr 29 06:09:56 EDT 2024

Total time taken to generate the page: 0.01359 seconds