The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Sort Personal Galleries by Date Updated

View previous topic View next topic Go down

In progress Sort Personal Galleries by Date Updated

Post by DesignersSociety on April 8th 2015, 4:33 am

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 : 121
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by SLGray on April 8th 2015, 7:45 am

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 : 38005
Reputation : 2563
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by DesignersSociety on April 8th 2015, 6:54 pm

@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 : 121
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Sort Personal Galleries by Date Updated

Post by DesignersSociety on April 12th 2015, 10:46 pm

Bump
avatar
DesignersSociety
Forumember

Female Posts : 121
Reputation : 2
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 April 13th 2015, 12:43 am

@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 : 13068
Reputation : 2742
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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