Hi Guys,
hope this type of question is ok for this forum...
I am customizing a Joomla extension( RSform PRO) and I need to add a variable to a path.
I need to browse a file directory for specific users.
So for example USER1 has files in this folder: /userupload/user1
I have a form that is now able to pickup the "user1" folder name (which is in fact the "user_id"). And I need to "append" this to the path of the uploaded files.
So I need to add "/user1/" to the "/userupload" path.
Any suggestion? What I have been able to do is to just pass my defined variable using this:
//<code>
$my = & JFactory::getUser();
$db = JFactory::getDBO();
if ($my->get('id'))
{
$db->setQuery("SELECT `user_id` FROM `#__briefcasefactory_files` WHERE `user_id`='".$my->get('id')."' LIMIT 1"); // THIS IS THE QUERY TO THE EXTENSION DEALING WITH UPLOADS IN THE USER FOLDER
define("userfolder", "910"); // THIS IS MY "SIMULATION" OF VARIABLE
jimport('joomla.filesystem.folder');
$items = "|Please Select[c]\n";
$files = JFolder::files($RSadapter->config['absolute_path'].'/slideshow/'.userfolder);
$items .= implode("\n",$files);
}
return rtrim($items);
//</code>
the problem is that instead of passing my "userfolder" variable, I should pass the "$db" variable which, after the query is indeed giving me the "folder" name of the user.
Sorry, as you already figured out....I am not a PHP programmer so I guess I am writing silly things!
Thanks
Cristiano


