Hi,
I'm an old user of Phocadownload and never had problems or issues about this component that I found is probably the best among all.
But now I have a request to do having a particular situation to solve (not linked to Phocadownload).
I need that subfolders in userupload (actually named i.e. 1243844491) be named as the real name of the user (i.e. John).
I'm working in a static situation (users that can upload are only 12 now and after) so I can also modify database ... table ... code and so on.
How can I solve this particual and personal problem?
Thanks
Joseph
Subfolders name in userupload directory
-
- Phoca Newbie
- Posts: 3
- Joined: 08 Jun 2014, 17:57
- Jan
- Phoca Hero
- Posts: 48568
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Subfolders name in userupload directory
Hi, not sure but maybe you need to customize the part of code which creates the subfolders:
But not sure which version of Phoca Download you are using, but e.g. in version 3, the users folders are named by user names:
components\com_phocadownload\models\user.php
$userFolder = htmlspecialchars(strip_tags($user->username));
Jan
But not sure which version of Phoca Download you are using, but e.g. in version 3, the users folders are named by user names:
components\com_phocadownload\models\user.php
$userFolder = htmlspecialchars(strip_tags($user->username));
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 08 Jun 2014, 17:57
Re: Subfolders name in userupload directory
Hi Jan,
thanks a lot for your reply.
I forgot to say that my version was 2.1.9 but after your replay I examined the code you indicate me so I simply made a substitution in module user.php.
I replaced in the line 495 the code for version 2.1.9
$userFolder = substr(md5($user->username),0, 10);
with the code for version 3.0 (that you said to me)
$userFolder = htmlspecialchars(strip_tags($user->username));
and all worked perfectly for me.
Again thanks a lot
Joseph
thanks a lot for your reply.
I forgot to say that my version was 2.1.9 but after your replay I examined the code you indicate me so I simply made a substitution in module user.php.
I replaced in the line 495 the code for version 2.1.9
$userFolder = substr(md5($user->username),0, 10);
with the code for version 3.0 (that you said to me)
$userFolder = htmlspecialchars(strip_tags($user->username));
and all worked perfectly for me.
Again thanks a lot
Joseph
-
- Phoca Newbie
- Posts: 3
- Joined: 08 Jun 2014, 17:57
Re: Subfolders name in userupload directory
Hi,
during this activity I found many errors in Italian translation of the component so I corrected them all.
So how can I send the corrected files to update your documentation? (I was unable to create the zip file to recreate the Italian language package).
Thanks
Joseph
during this activity I found many errors in Italian translation of the component so I corrected them all.
So how can I send the corrected files to update your documentation? (I was unable to create the zip file to recreate the Italian language package).
Thanks
Joseph
- Jan
- Phoca Hero
- Posts: 48568
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Subfolders name in userupload directory
Hi, sent PM, Jan.
If you find Phoca extensions useful, please support the project