xoops forums

Mamba

Moderator
Posted on: 2015/9/14 8:24
Mamba
Mamba (Show more)
Moderator
Posts: 10372
Since: 2004/4/23
#11

Re: MyAlbum - sort categories

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...
Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs

Dante7237

Friend of XOOPS
Posted on: 2015/9/14 14:22
Dante7237
Dante7237 (Show more)
Friend of XOOPS
Posts: 277
Since: 2008/5/28
#12

Re: MyAlbum - sort categories

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

chaoos

Just popping in
Posted on: 2015/9/22 11:07
chaoos
chaoos (Show more)
Just popping in
Posts: 76
Since: 2005/3/9 1
#13

Re: MyAlbum - sort categories

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.

Mamba

Moderator
Posted on: 2015/9/23 0:14
Mamba
Mamba (Show more)
Moderator
Posts: 10372
Since: 2004/4/23
#14

Re: MyAlbum - sort categories

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:
Congratulations! Very nice site, excellent job!
Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs

chaoos

Just popping in
Posted on: 2015/9/23 4:24
chaoos
chaoos (Show more)
Just popping in
Posts: 76
Since: 2005/3/9 1
#15

Re: MyAlbum - sort categories

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)

Mamba

Moderator
Posted on: 2015/9/23 6:04
Mamba
Mamba (Show more)
Moderator
Posts: 10372
Since: 2004/4/23
#16

Re: MyAlbum - sort categories

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.
Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs

Bleekk

Theme Designer
Posted on: 2015/9/23 16:42
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 884
Since: 2002/12/14
#17

Re: MyAlbum - sort categories

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

chaoos

Just popping in
Posted on: 2015/9/24 3:55
chaoos
chaoos (Show more)
Just popping in
Posts: 76
Since: 2005/3/9 1
#18

Re: MyAlbum - sort categories

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

Bleekk

Theme Designer
Posted on: 2015/9/24 4:14
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 884
Since: 2002/12/14
#19

Re: MyAlbum - sort categories

I am happy for you
You are welcome!

Mamba

Moderator
Posted on: 2015/9/26 1:39
Mamba
Mamba (Show more)
Moderator
Posts: 10372
Since: 2004/4/23
#20

Re: MyAlbum - sort categories

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.
Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs