We have a client running Phoca download and it is working well for their purposes. Their main challenge is that too many users are "forgetting" to choose their default category from the drop-down menu after logging in and the upload is failing. They are instead leaving it at " -- Select Category --".
The way this is set up is that there a single category assigned to a user that represents a particular company. All users within that company have the same category, and NO users, other than the developers and our client, as access to more than a single category. All users that are registered are members of a category as they are created individually by out client. These are NOT public uploads and downloads.
So what we would like to do is remove the "--Select Category--" value from the drop down list when updating a file and only show the actual categories they are a member of. I tried making some code adjustments but was unable to find the right locations to do so.
Any assistance would be appreciated.
Remove -- Select Category -- from file upload
-
- Phoca Newbie
- Posts: 1
- Joined: 31 Dec 2015, 20:58
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Remove -- Select Category -- from file upload
Hi,
the file to edit is:
components\com_phocadownload\views\user\tmpl\default_files.php
there you can find the list of categories:
<?php echo $this->listsfiles['catid'] ?>
which is called by view:
components\com_phocadownload\views\user\view.html.php
$lists_files['catid'] = PhocaDownloadCategory::filterCategory($query, $catid_files, TRUE, TRUE, TRUE);
The function you can find here:
administrator\components\com_phocadownload\libraries\phocadownload\category\category.php
So you can somehow implement the loading only specific category and set it as default - instead of "select category"
When you remove this line:
$categories[] = JHTML::_('select.option', '0', '- '.JText::_('COM_PHOCADOWNLOAD_SELECT_CATEGORY').' -');
then the "select category" will be not more set.
Jan
the file to edit is:
components\com_phocadownload\views\user\tmpl\default_files.php
there you can find the list of categories:
<?php echo $this->listsfiles['catid'] ?>
which is called by view:
components\com_phocadownload\views\user\view.html.php
$lists_files['catid'] = PhocaDownloadCategory::filterCategory($query, $catid_files, TRUE, TRUE, TRUE);
The function you can find here:
administrator\components\com_phocadownload\libraries\phocadownload\category\category.php
So you can somehow implement the loading only specific category and set it as default - instead of "select category"
When you remove this line:
$categories[] = JHTML::_('select.option', '0', '- '.JText::_('COM_PHOCADOWNLOAD_SELECT_CATEGORY').' -');
then the "select category" will be not more set.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 16 Sep 2015, 18:34
Re: Remove -- Select Category -- from file upload
Hi
Thanks
I am not able to do that. How do I set a default category?So you can somehow implement the loading only specific category and set it as default - instead of "select category"
Thanks
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Remove -- Select Category -- from file upload
Hi, why you are not able to do it? Is the file somehow protected from editing?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 16 Sep 2015, 18:34
Re: Remove -- Select Category -- from file upload
No, i do not know how to do this.
I need to set a default category and then remove the field.
Sorry my bad english.
Thanks
I need to set a default category and then remove the field.
Sorry my bad english.
Thanks
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Remove -- Select Category -- from file upload
Hmmm, then I think, you need to someone hire for this. Unfortunately, I didn't do such customization yet, so cannot give any clue advice there 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 16 Sep 2015, 18:34
Re: Remove -- Select Category -- from file upload
Ok, no problem!
Thanks
Thanks