Front end shenanigans

Whilst I have been focusing on the back end of things a fair bit of late I took some time to work on the front side of things. I have finished off the basic layout for the film page and applied this template over to the list and genre pages and listings. Whilst doing these I have fixed the code so that the outputted items in the list/genre are all tabulated data, i then worked in a way to select the table headings that takes you to a new url and re-orders the data according to what you selected. So you can sort via Name a-z z-a year Ascending and Descending and rating Ascending and Descending.

Now whilst this is fairly simple (apart from some tweeking of url re-writes so it all worked properly and didnt f**k up) that is all done server side and the user is given a new page with the content filtered. What I then did was found a jquery library online that I have attached to the tables now that sorted the tables info on the client side so no need to send off and reload a new page to sort the data. This means I have a back up if JS is switched off so they both can work together.

I first did all this for the list pages, then when working on the genre page I came up with the idea of being able to write a MYSQL stored procedure that contained all 6 different sql statements then depending on what view you want you pass a variable to it and it selects this. Sounds complicated, but in truth it was pretty easy to do. The only Issue I had that took a while to debug and sort was my sql wasn't working in the group batch but if i put it in singularly then it woudl work. Once I got this sorted (took about 45 minutes) it was plain sailing after that.

I have also added a new field into the film table for the db for a bit more functionality but I am not 100% sure how to work that into the site yet, but I am sure I will soon enough. This new bit is an extra tag for a film where you can select the the re-watchability of a film. to go along with it's rating as you could have a great film but poor re-watchability or a poor film with high re-watchability.

I am also considering a way in which to put a way for people to report that links to youtube videos arent working, but at the same time I dont want people abusing it. Think I will need a new table that links to the film table to log that its been set as not working, at which point you cant re-log it as not working. that way every video can only have 1 not working put against it and then it's up to me to go fix it.

>>back<<