Filelist ordering

Phoca Download - download manager
theatrewes
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 26 Sep 2011, 20:09

Filelist ordering

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Filelist ordering

Post by Jan »

Hi, the plugin does not take ordering from the component, just set it in the plugin code.

Jan
If you find Phoca extensions useful, please support the project
jegbertzen
Phoca Member
Phoca Member
Posts: 21
Joined: 01 Aug 2009, 20:12

Re: Filelist ordering

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Filelist ordering

Post by Jan »

It takes default ordering, the taking of component ordering is planned.

Jan
If you find Phoca extensions useful, please support the project
mohsho
Phoca Member
Phoca Member
Posts: 19
Joined: 11 Nov 2010, 23:39
Location: Hamilton, ON, Canada
Contact:

Re: Filelist ordering

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Filelist ordering

Post by Jan »

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