The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Sort Personal Galleries by Date Updated

3 posters

Go down

In progress Sort Personal Galleries by Date Updated

Post by DesignersSociety Wed 08 Apr 2015, 03:33

Alright so is there a way to set it to show the personal galleries in order of most recently updated. It shows the dates they were updated so I'm assuming that means theres a way to do this. I want to have it newest at the top. Heres a link to the page: http://www.designerssociety.net/gallery/personal.htm
Heres a guest account: username: guestaccount pass:guestpass123
DesignersSociety
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by SLGray Wed 08 Apr 2015, 06:45

Administration Panel > Modules > Gallery > Display
How do you have these options set -

Default Sort Method:
Default Sort Order:


Sort Personal Galleries by Date Updated Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by DesignersSociety Wed 08 Apr 2015, 17:54

@SLGray I've already gone into that and had them all set by posted and descending. That only sorts the actual images themselves, not the order of the personal albums, which go by name.
DesignersSociety
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by DesignersSociety Sun 12 Apr 2015, 21:46

Bump
DesignersSociety
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by Ange Tuteur Sun 12 Apr 2015, 23:43

@DesignersSociety I wrote a small script to attempt sorting the personal galleries by date. Go to Administration Panel > Modules > JavaScript codes management > Create a new script

Placement : In all the pages
Code:
/\/gallery\/personal/.test(window.location.pathname) && $(function() {
  var a = [], b = [], c = document.getElementsByTagName('TD'), d, i = 0, j = c.length, k, o = {};
 
  for (; i<j; i++) {
    if (c[i].onmouseover) {
      d = +new Date(c[i].getElementsByTagName('TR')[2].innerHTML.replace(/<.*?>|\d+&nbsp;pic/g,''));
      o[d] = c[i].innerHTML;
      a.push(d);
      b.push(c[i]);
    }
  }
 
  a.sort(function(d1, d2) { return d1 > d2 ? 1 : -1 });
 
  for (i = 0, j = a.length; i<j; i++) b[i].innerHTML = o[a[i]];
});

I only had 3 personal galleries while testing this, so let me know if anything goes wrong.

See you bye
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum