Gamebuino Games

Improvements for the web system, applications to moderator, spam, etc.

Re: Gamebuino Games

Postby 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.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Gamebuino Games

Postby Drakker » Tue Aug 12, 2014 5:05 pm

Add an attribute which is the all lowercase names?
User avatar
Drakker
 
Posts: 297
Joined: Sun Mar 30, 2014 2:54 am
Location: Québec, Canada

Re: Gamebuino Games

Postby 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 :lol:
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Gamebuino Games

Postby 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.
User avatar
Drakker
 
Posts: 297
Joined: Sun Mar 30, 2014 2:54 am
Location: Québec, Canada

Re: Gamebuino Games

Postby 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!
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Gamebuino Games

Postby 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.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Gamebuino Games

Postby Drakker » Wed Aug 13, 2014 10:27 am

It's so dirty it doesn't seem to work on minesweeper and snakeabcbuino....
User avatar
Drakker
 
Posts: 297
Joined: Sun Mar 30, 2014 2:54 am
Location: Québec, Canada

Re: Gamebuino Games

Postby rodot » Wed Aug 13, 2014 10:32 am

Did you try pressing Ctrl+Shift+R to force refreshing of the browser cache?
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Gamebuino Games

Postby 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.
User avatar
Drakker
 
Posts: 297
Joined: Sun Mar 30, 2014 2:54 am
Location: Québec, Canada

Re: Gamebuino Games

Postby rodot » Wed Aug 13, 2014 11:09 am

That's because they were already all lower case but two ;)
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

PreviousNext

Return to Website and Forum

Who is online

Users browsing this forum: No registered users and 23 guests

cron