Sort Personal Galleries by Date Updated

Go down

In progress Sort Personal Galleries by Date Updated

Post by DesignersSociety on Wed Apr 08 2015, 05: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
avatar
DesignersSociety
Forumember

Female Posts : 133
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 on Wed Apr 08 2015, 08:45

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

Default Sort Method:
Default Sort Order:


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43514
Reputation : 3094
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by DesignersSociety on Wed Apr 08 2015, 19: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.
avatar
DesignersSociety
Forumember

Female Posts : 133
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 on Sun Apr 12 2015, 23:46

Bump
avatar
DesignersSociety
Forumember

Female Posts : 133
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 on Mon Apr 13 2015, 01: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
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2918
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Back to top


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