Improvements for the web system, applications to moderator, spam, etc.
by rodot » Tue Aug 12, 2014 2:52 pm
Yeah of course but as I said sorting is made using Isotope, so I don't have control over the sorted strings. I only tells it using which attribute I want the sorting to be done.
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by Drakker » Tue Aug 12, 2014 5:05 pm
Add an attribute which is the all lowercase names?
-
Drakker
-
- Posts: 297
- Joined: Sun Mar 30, 2014 2:54 am
- Location: Québec, Canada
-
by rodot » Tue Aug 12, 2014 5:14 pm
Well people are supposed to type their name in lower case (it's in the instructions) but nobody does. One day I'll make an actual database where you submit your game, rate people's games and all, not just a wiki page. But I don't have the time neither the skills for now. I'm already busy learning Java to make the tracker, we'll see later for mySQL and PHP
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by Drakker » Tue Aug 12, 2014 6:59 pm
Well, a quick look at the code shows that it sorts by "date_updated" right now.
- Code: Select all
// sort by name
$container.isotope({ sortBy: 'date_updated', sortAscending: false});
Technically you could patch it so that is does a toLowerCase() to whatever it is sorting, but the important part of the code has been made rather unreadable by a size reduction transformation. Since you use CSS to have the names display as uppercase, why don't you write a short javascript script that changes all those names to either lowercase or uppercase before isotope is called? That's a band aid type dirty fix, but that should work.
-
Drakker
-
- Posts: 297
- Joined: Sun Mar 30, 2014 2:54 am
- Location: Québec, Canada
-
by rodot » Tue Aug 12, 2014 7:14 pm
Drakker wrote:That's a band aid type dirty fix, but that should work.
Good idea, I like it!
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by rodot » Wed Aug 13, 2014 9:56 am
The games gallery no longer requires names to be lower case \o/
Thanks for the quick & dirty solution Drakker.
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by Drakker » Wed Aug 13, 2014 10:27 am
It's so dirty it doesn't seem to work on minesweeper and snakeabcbuino....
-
Drakker
-
- Posts: 297
- Joined: Sun Mar 30, 2014 2:54 am
- Location: Québec, Canada
-
by rodot » Wed Aug 13, 2014 10:32 am
Did you try pressing Ctrl+Shift+R to force refreshing of the browser cache?
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by Drakker » Wed Aug 13, 2014 11:02 am
It works... now that is weird. If the JS was not up to date, it should have shown the same mess as earlier, not sort them all but two. Oh well, weird things happen.
-
Drakker
-
- Posts: 297
- Joined: Sun Mar 30, 2014 2:54 am
- Location: Québec, Canada
-
by rodot » Wed Aug 13, 2014 11:09 am
That's because they were already all lower case but two
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
Return to Website and Forum
Who is online
Users browsing this forum: No registered users and 2 guests