Front end upload: select category by default

Phoca Download - download manager
pat01
Phoca Member
Phoca Member
Posts: 32
Joined: 22 May 2013, 16:06

Front end upload: select category by default

Post by pat01 »

Hello

In the front end upload the user must select one category from the select menu.

Since I have one category only, I want this one to be the default category, so the user must not select it.
How can I do this?

Reason for this: Some user select the file first or add a description first. If the user then selects the category after, Phoca Download reloads the page and clears all data entered by the user! I want to avoid this by having a category selected by default an then hide the select field with display: none.

Joomla 3.6.4, PD 3.1.2

Thank you.

Regards
Patrick
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Front end upload: select category by default

Post by Jan »

Hi, this needs to be customized, directly in the code:

components\com_phocadownload\views\user\tmpl\default_files.php

Code: Select all

<?php echo $this->listsfiles['catid'] ?>
components\com_phocadownload\views\user\view.html.php

Code: Select all

$lists_files['catid'] = PhocaDownloadCategory::filterCategory($query, $catid_files, TRUE, TRUE, TRUE);
administrator\components\com_phocadownload\libraries\phocadownload\category\category.php

Code: Select all

public static function filterCategory()

Jan
If you find Phoca extensions useful, please support the project
pat01
Phoca Member
Phoca Member
Posts: 32
Joined: 22 May 2013, 16:06

Re: Front end upload: select category by default

Post by pat01 »

Thank you!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Front end upload: select category by default

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply