New Admin Functionality
So it has been a while since I added anything to this site in the way of functionality and I have been thinking of things I could add that add value to what I have built. I had come up with a lot of ideas and I have thrown out all of those so far, that is until today.
Today I struck on an idea. Currently I can award a film up to 2 badges (For it being a classic and for me owning it) and I was wondering If I could expand this a little. That is when I hit upon the idea of being able to log against a film I have had seen in in the cinema. Seems an obvious thing now to tag films with but I totally didn't even think about being able to do this before.
So I set about adding this functionality and within an hour, lo and behold not only did I have it set up but I had it fully implemented in the admin section (both admins as I still haven't got rid of the old admin). Turns out it was simple enough to do, created a new table in the database to store any tagged films. Then created 2 scripts to tag a film as being seen and to un tag a film. These scripts were basically ripped right off from (sorry I mean reused) the classic scripts I have previously written and tested. Then on the front end for the admin I amended the sql to add in a search of the new table for a particular film when pulling back film info in the film list view. I then set up an easy if else statement and outputted the right text and link to add or remove the film.
Tested this in the old admin section then once I tweaked it and was happy replicated this over in the new proper admin section. This needed some extra tweaking due to it functioning slightly different from the original admin section. Boom bang bosh and it is done, also went through and tagged all the films currently in the db that I had seen in the cinema. Last step (not for today) is to implement the code on the main site to check and see if the film has been seen in the cinema or not. I will do this but have to create a badge for it first before I implement it, which shouldn't take me too long as the code should be easy enough to add in as its a simple check to see if its been tagged or not.