Sugesstion for sorting
-
- Phoca Enthusiast
- Posts: 61
- Joined: 08 Mar 2009, 09:26
- Contact:
Sugesstion for sorting
Hi Jan,
this time, I want to make a suggestion for an improvement of PhocaDownloads.
I have a lot of downloads in a lot of categories. The phsical folder structure looks like this:
- Category A
\-> 2011
\-> 2010
\-> 2009
- Category B
\-> 2011
\-> 2010
\-> 2009
- Category C
\-> 2011
\-> 2010
\-> 2009
[....]
Now, if you click on the Editor-Button, PhocaDownloads goes crazy on sorting the Folders... It's simply impossible to find the proper Folder, because a lot of folders are named identicaly. The are sorted somehow (mysticaly for me).
To improve this, I would suggest to use the Alias or the Name from the Backend. Maybe it's even better to show the structured folders from backend.
Thanks
JamFX
this time, I want to make a suggestion for an improvement of PhocaDownloads.
I have a lot of downloads in a lot of categories. The phsical folder structure looks like this:
- Category A
\-> 2011
\-> 2010
\-> 2009
- Category B
\-> 2011
\-> 2010
\-> 2009
- Category C
\-> 2011
\-> 2010
\-> 2009
[....]
Now, if you click on the Editor-Button, PhocaDownloads goes crazy on sorting the Folders... It's simply impossible to find the proper Folder, because a lot of folders are named identicaly. The are sorted somehow (mysticaly for me).
To improve this, I would suggest to use the Alias or the Name from the Backend. Maybe it's even better to show the structured folders from backend.
Thanks
JamFX
Last edited by jamfx on 24 Nov 2011, 09:26, edited 1 time in total.
- Jan
- Phoca Hero
- Posts: 48595
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Sugesstion for sorting
Hi, physical folder structure is not sorted, like by file manager, all your folder structure is displayed.
e.g. in multiple add feature
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 61
- Joined: 08 Mar 2009, 09:26
- Contact:
Re: Sugesstion for sorting
No, sorry, it's not sorted. It looks like this:
http://imageshack.us/photo/my-images/696/unsorted.png/
It's the latest Joomla 1.7 Version. This view is seen, if you write an article and use a the Download-Editor-Button to insert a download in an Article.
Thanks for your help / review.
JamFX
http://imageshack.us/photo/my-images/696/unsorted.png/
It's the latest Joomla 1.7 Version. This view is seen, if you write an article and use a the Download-Editor-Button to insert a download in an Article.
Thanks for your help / review.
JamFX
- Jan
- Phoca Hero
- Posts: 48595
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Sugesstion for sorting
Aha, now I know what you mean. The sorting of tree (which was added in some previous version) was removed because tree didn't follow the ACL - the rights needs to be checked for every category.
So you can change the sorting here:
administrator\components\com_phocadownload\models\fields\phocadownloadcategory.php
Jan
So you can change the sorting here:
administrator\components\com_phocadownload\models\fields\phocadownloadcategory.php
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 61
- Joined: 08 Mar 2009, 09:26
- Contact:
Re: Sugesstion for sorting
Hi,
thanks Jan for your reply. I found in the mentioned file line 29:
Which options do I have to sort? I would like to have a nice treeview if possible... Or can I just order them as I have the folder structure in my first post?
Thanks.
JamFX
thanks Jan for your reply. I found in the mentioned file line 29:
Code: Select all
. ' ORDER BY a.ordering';
Thanks.
JamFX
- Jan
- Phoca Hero
- Posts: 48595
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Sugesstion for sorting
Hi, depends on you. E.g. ORDER BY a.title ASC or ORDER BY a.title DESC, etc.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 61
- Joined: 08 Mar 2009, 09:26
- Contact:
Re: Sugesstion for sorting
Hi Jan,
is there an overview somewhere where I can find all possible sortings and their meanings?
Thx
JamFX
is there an overview somewhere where I can find all possible sortings and their meanings?
Thx
JamFX
- Jan
- Phoca Hero
- Posts: 48595
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Sugesstion for sorting
Hi, I think you need to see some mysql manual and see tables in database where you can see by which columns you can order.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 61
- Joined: 08 Mar 2009, 09:26
- Contact:
Re: Sugesstion for sorting
Hi Jan,
first, I hope you had a nice Xmas and had a fiew days off, so you could regain power, with family and a good dinner
But i just faced the problem again. I am not into SQL and Table-THings like you. Hopefully you will find a solution for this mess. I can not explain how hard it is to use the Phoca-Download with this issue. PLease find a way. I think - >THIS IS A BUG <- not a sorting problem at all...
So hopefully you can do something about it, please!!!
Thanks a lot
JamFX
first, I hope you had a nice Xmas and had a fiew days off, so you could regain power, with family and a good dinner

But i just faced the problem again. I am not into SQL and Table-THings like you. Hopefully you will find a solution for this mess. I can not explain how hard it is to use the Phoca-Download with this issue. PLease find a way. I think - >THIS IS A BUG <- not a sorting problem at all...
So hopefully you can do something about it, please!!!

Thanks a lot
JamFX
-
- Phoca Professional
- Posts: 258
- Joined: 02 Jun 2011, 09:29
- Contact:
Re: Sugesstion for sorting
Moin jamfx! 
/JOOMLAROOT/administrator/components/com_phocadownload/helpers/phocadownload.php (line 179-186):
I have changed this to keep the right order (which is in $catDataTree!).
/JOOMLAROOT/components/com_phocadownload/views/phocadownloadlinkfile/view.html.php (line 80-84):
To get the tree, we have to set the last parameter of the filterCategory function to true.
/JOOMLAROOT/adminstrator/components/com_phocadownload/views/phocadownloadlinkfile/view.html.php (line 80-84):
Hope this will fix your problem! 
And Jan: Maybe you could implement it into a new version. It would make the Phoca Download Button Plugin more user-friendly.

/JOOMLAROOT/administrator/components/com_phocadownload/helpers/phocadownload.php (line 179-186):
Code: Select all
foreach ($catDataTree as $k => $v) {
foreach ($catData as $k2 => $v2) {
if ($v->value == $v2->value) {
$catDataTreeRights[$k]->text = $v->text;
$catDataTreeRights[$k]->value = $v->value;
}
}
}
/JOOMLAROOT/components/com_phocadownload/views/phocadownloadlinkfile/view.html.php (line 80-84):
Code: Select all
if ($tmpl['type'] != 4) {
$lists['catid'] = PhocaDownloadHelper::filterCategory($query, $catid, null, true, true);
} else {
$lists['catid'] = PhocaDownloadHelper::filterCategory($query, $catid, null, false, true);
}
/JOOMLAROOT/adminstrator/components/com_phocadownload/views/phocadownloadlinkfile/view.html.php (line 80-84):
Code: Select all
if ($tmpl['type'] != 4) {
$lists['catid'] = PhocaDownloadHelper::filterCategory($query, $catid, null, true, true);
} else {
$lists['catid'] = PhocaDownloadHelper::filterCategory($query, $catid, null, false, true);
}

And Jan: Maybe you could implement it into a new version. It would make the Phoca Download Button Plugin more user-friendly.