1
chaoos
MyAlbum - sort categories
  • 2015/9/10 16:21

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


I need a hack.
I want to sort the list of categories by dateD.
I want to sort categories, no photo in the category. Does anyone help me please?

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

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Try to sort by "cid" instead of "date".

I guess, you'll need to find the right places in the code and replace them there.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
chaoos
Re: MyAlbum - sort categories
  • 2015/9/11 18:14

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


I have examined the front of the module, but sorting categories ... I have not found.

4
Mamba
Re: MyAlbum - sort categories
  • 2015/9/12 3:19

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


The sorting is deep in the code in /viewcat.php.

It creates a "criteria" around line 133, sets the sorting based on the $orderby you select, and sorts the photo table "myalbum_photos".

To use Category, you would have to replace the "date" in PHP code with "cid" field that is for the Category.

Also adjust the /include/photo_orders.php

Unfortunately, I don't have the time to help more with that.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

5
chaoos
Re: MyAlbum - sort categories
  • 2015/9/12 13:44

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


All this I have tried. But it's not working. :(

6
Mamba
Re: MyAlbum - sort categories
  • 2015/9/12 14:44

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Please publish in detail what have you tried, incl. the code changes.

Maybe somebody will be able to help you and pinpoint you in the right direction...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

7
timgno
Re: MyAlbum - sort categories
  • 2015/9/12 18:57

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


In the photo.php file, at line 150 there is cid, you can change by replacing or deleting the file photo_orders.php inserting a control in xoops_version.php to cid, date and other

8
chaoos
Re: MyAlbum - sort categories
  • 2015/9/14 9:03

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


Mamba, I need to sort categories - the latest on top. Module Settings solves only sort pictures in the categories. And the entire code is centered brand image sort.
I do not know where to look for code editing sort categories. I examined it all. I think that the necessary amendments be made to the index.php, but do not know how.

Timgno - photo.php affect only photo detail page. I do not know exactly what else can I do there.

Friends, I am not proficient programmer as you. It's hard to realize your tips. I would very helpful, if you had your tips to test and put me here modified parts of the code.

But I try to be productive.

9
Bleekk
Re: MyAlbum - sort categories
  • 2015/9/14 9:15

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


myalbum does not store the date for categories.
You can't order the categories by any date.

How does it order the categories now? By title?

10
chaoos
Re: MyAlbum - sort categories
  • 2015/9/14 11:01

  • chaoos

  • Just popping in

  • Posts: 77

  • Since: 2005/3/9 1


The new category is always at the end. The principle of sort category in code I have not found.
I know it is necessary to add new code. I was just hoping someone will be able to do ...

Login

Who's Online

166 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 166


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