Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

How to make Main Page of Downloads Section sort by Download Title?

Asked Modified Viewed 2,311 times
S
sitename101
S
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Newbie

Hello,

I was able to customize the sort order for the download categories without a problem but I ran into a problem when trying to make the Main Page of the Downloads section sort-able by Title.

How do I make Main Page of Downloads Section sort by Download Title?

Thank you!
1 reply

9 posts

K
Kvido
K
Kvido 10
Linux-Ubuntu 09.03.60, Linux/Ubuntu, PHP5, HTML5, Mozilla-Firefox 3.6.3, Opera 10.51, IE 8.0.6
https://www.nekecamweb.cz
  • Senior Member, joined since
  • Contributed 524 posts on the community forums.
  • Started 108 threads in the forums
answered
Senior Member

Try changing location at all in downloads / downloads.php:

GROUP BY d.download_id

edit:
GROUP BY ASC LIMIT b.download_title


I have not tried it!
0 replies
— 3 years later —
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Did you try this reply?, https://www.php-fusion.co.uk/infusions/forum/viewthread.php?thread_id=38949&pid=209907#post_204022
0 replies
P
PeterH
P
PeterH 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
answered
Newbie

Yes I did but it didn't seem to work for me hence asking @sitename101 what his configuration changes were?

My query was aimed at the category name ordering and not the download titles within the categories.
0 replies
R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

@Falk ehm GROUP BY .. his "solution" will never work.

https://github.com/PHPFusion/PHPFusio...s.php#L339

Change dc.download_cat_sorting to d.download_title
0 replies
P
PeterH
P
PeterH 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
answered
Newbie

@RobiNN - Thanks very much for that. It definitely solves one problem in that downloads are now sorted alphabetically in the main downloads view which is brilliant.

However, my main issue is around the categories themselves which do not display in alphabetic order but in ID order.

For example I created a top level category and underneath I created three sub-categories so it looks like this:
Commodore (cat_id=2)
>Zzap! 64 (cat_id=13)
>Vic Computing (cat_id=38)
>Amiga Action (cat_id=120)

I want these sub-categories to sort alphabetically rather than by ID number.

I was thinking it might be something editable in downloads/admin/downloads_cats.php but I freely admit to being a total noob so might be barking up the wrong tree by a country mile.

I do think in a subsequent revision it would be really great if the option to sort categories is in the admin interface the same way that you can select ordering of files within the categories.
0 replies
R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

https://github.com/PHPFusion/PHPFusio...ns.php#L83

$data = dbquery_tree_full(DB_DOWNLOAD_CATS, 'download_cat_id', 'download_cat_parent', (multilang_table('DL') ? "WHERE ".in_group('download_cat_language', LANGUAGE) : '')." ORDER BY download_cat_name ASC");


Note that this is not the best solution and can be done at theme level (without core editing), but I don't have time to write code for you.
0 replies
P
PeterH
P
PeterH 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
answered
Newbie

Many thanks!! I will make a backup copy of the file in question and give it a go!!
It's very much appreciated your taking the time to look into this for me!!

UPDATE: It worked perfectly. Thank you!!
Edited by PeterH on 18-04-2021 11:09,
0 replies
— 6 months later —
P
PeterH
P
PeterH 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
answered
Newbie

Hi @RobiNN

I have just upgraded the site to 9.10.11 and found the categories ordered by category number rather than alphabetically after the upgrade. I thought I'd just edit the Functions.php file again but this file no longer appears at all in downloads/classes directory.

Has this file been superseded by another file under the new version of PHP-Fusion?
0 replies
R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

Labels

None yet

Statistics

  • Views 0 views
  • Posts 9 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
K
K
Kvido 10
Linux-Ubuntu 09.03.60, Linux/Ubuntu, PHP5, HTML5, Mozilla-Firefox 3.6.3, Opera 10.51, IE 8.0.6
https://www.nekecamweb.cz
  • Senior Member, joined since
  • Contributed 524 posts on the community forums.
  • Started 108 threads in the forums
R
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
S
S
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
P
P
PeterH 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet