11
Mamba
Re: MyAlbum - sort categories
  • 2015/9/14 12:24

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Probably the easiest way (and most consistent with other modules) would be to add "weight" to the Category table, and then automatically sort it by "weight".

Then you could adjust the order of categories as needed...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

12
Dante7237
Re: MyAlbum - sort categories
  • 2015/9/14 18:22

  • Dante7237

  • Friend of XOOPS

  • Posts: 294

  • Since: 2008/5/28


Would the "Recent Downloads" block as used in TDMDownloads have something you could use?
It sounds like something similar to what's wanted.

13
chaoos
Re: MyAlbum - sort categories
  • 2015/9/22 15:07

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


I tried everything, but nothing worked.
I had to quickly run project, because the customer no longer wanted him. I missed not translate articles into English :)

www.mattiamuller.com

If you can think how to help sort control categories, please write solution.

14
Mamba
Re: MyAlbum - sort categories
  • 2015/9/23 4:14

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
I tried everything, but nothing worked.

Can you describe what you have tried, so we can learn what didn't work?

Can you post any code of your projects? Maybe it just needs to be fixed?

Quote:
www.mattiamuller.com

Congratulations! Very nice site, excellent job!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

15
chaoos
Re: MyAlbum - sort categories
  • 2015/9/23 8:24

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


I studied all the files module. A example:

I tried to change viewcat.php, but in this code it discusses the sort pictures in the categories.
photo.php? It was only a detail of the image display.
It was a great chance file index.php, I tried to add code and modify the code.

I tried to change different parts of the code. But I'm not proficient coder
What parts of the code I publish and where? (I think it is a solution in index.php)

16
Mamba
Re: MyAlbum - sort categories
  • 2015/9/23 10:04

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


The easiest way would be for you to go to MyAlbum on GitHub and fork it to your account

From there, you can use tools like ToritoiseGit or SourceTree (unless you prefer a command line window), to download the code, creat a branch, and then commit back your changes for us to review.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

17
Bleekk
Re: MyAlbum - sort categories
  • 2015/9/23 20:42

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


please open /myalbum/include/draw_functions.php

find line 243
$criterib = new Criteria('`pid`'$parent_id'=');

after this line add following 2 lines
$criterib->setSort('cid');
$criterib->setOrder('DESC');


I hope it helps

18
chaoos
Re: MyAlbum - sort categories
  • 2015/9/24 7:55

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


It works! Thank you very much for your help !!
This hack should be added to the new version of the module, it is for it new option.

I have a great mood. THANK YOU

19
Bleekk
Re: MyAlbum - sort categories
  • 2015/9/24 8:14

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


I am happy for you
You are welcome!

20
Mamba
Re: MyAlbum - sort categories
  • 2015/9/26 5:39

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
please open /myalbum/include/draw_functions.php

sometimes the simplest solutions are the best! .
Thanks Bleekk for providing this fix.

Quote:
This hack should be added to the new version of the module, it is for it new option.

I've added it to the next release.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Login

Who's Online

230 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 230


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits