Page 1 of 1

Filelist ordering

Posted: 26 Sep 2011, 20:53
by theatrewes
Hello,

I was able to get PhocaDownload working last night after some hiccups with the install related to an outdated version of the plugin. It seems to be working correctly, now, except for sorting a filelist in an article.

I have a category created and have inserted three files in that category and ordered them the way I'd like them to appear within the PhocaDownload component. When I insert a Filelist into an article using the Phoca Download Button plugin, the three files appear on the page, however they do not appear in the order I specified.

In the PhocaDownload Component Options menu, I have tried each of the options for ordering under Filelist but none seem to make a difference. Have I identified a bug or am I doing something wrong? I haven't tried to look through the component and plugin code yet, but figured I'd ask in the meantime to see if it was a known issue. I was unable to find anything online when searching on this issue.

Kind Regards,

~Wes

Re: Filelist ordering

Posted: 29 Sep 2011, 19:25
by Jan
Hi, the plugin does not take ordering from the component, just set it in the plugin code.

Jan

Re: Filelist ordering

Posted: 21 Nov 2011, 13:13
by jegbertzen
Which ordering does it take? I can't find the logics of it. Would be great if the results of a plugin can be ordered.

Re: Filelist ordering

Posted: 23 Nov 2011, 16:49
by Jan
It takes default ordering, the taking of component ordering is planned.

Jan

Re: Filelist ordering

Posted: 16 Jan 2012, 07:02
by mohsho
This was very irritating. A pretty simple fix, I think. I modified:

/plugins/content/phocadownload/phocadownload.php

Add a.ordering, to line 224:

Code: Select all

$query = 'SELECT a.id, a.title, a.alias, a.filename_play, a.filename_preview, a.link_external, a.ordering, c.id as catid, a.confirm_license, a.ordering,c.title as cattitle, c.alias as catalias,'
And add this line before line 233:

Code: Select all

$query .= ' ORDER BY a.ordering';
Perhaps it's more complicated than that, but it did the trick for my problem.

Re: Filelist ordering

Posted: 16 Jan 2012, 20:36
by Jan
Ok