My Major Project is going awesome, i have put alot of hard work into it with many a late night spent on it, but its all worth it especially when i see my progress. I admittedly have become stuck at times, as i have dreamed big and am reaching for the stars, and i wouldn’t have made it any other way!
 
To me this is the only way to learn, but i have become stuck in small ways and with the thanks to Kyle Gawley, (@kylegawley) David Turner, (@HerrWulf) and Chris Grant (@duckbox), they have been amazing in unravelling my craziness and have helped push me(code me) in the right direction!
 
The main pages of my Major Project where:
- Registration Form
- Login Form
- Submission Page with a small previews of Latest Upload, My Uploads and The Leaderboard
- Charts Page
- Leaderboard Page
 

- Registration Form

 

 
This registration page is quite simple the users have to input into 4 fields, with a valid email address, a 4 character plus unique username and have a password which follows the rules. While typing in a username, the user will know if it is available or not before they even submit it due to a small jQuery script which i have also blogged about. Once the user submits the forms, the form check all the necessary fields are filled in, the email and password is valid, and the username is available. If this is all successful, folders are then created for the users for the uploaded images and all of the information is passed to the database including an encrypted password. I have also coded a small php mail message to be sent to the user, to welcome them to the Textureyes community. There is a lot of coding here, but all of it is relatively straight forward and it completely necessary.
 

- Login Form

 

 
The login script is very straightforward, its checks the entered text against the the database and on that information lets the user into the into their own homepage or refers them back to the index page. The special part of my login form, it the fact it is attached to the top of the page and slides down on click and vice versa. I was able to create this with the help of a tutorial, i was able then completely customised it to my own needs which was very simple. This tutorial was from Tuts Plus.
 

- Submission Page with a small previews of Latest Upload, My Uploads and The Leaderboard

 

 
This submissions page was the main page that i needed to crack to make my project work. This pages hold alot of information:
- Query for Latest Uploads
- Query for Leaderboard
- Query for My Uploads
But all of the above could not be made possible unless my file uploads worked. This was the hardest part of my project as their was a lot of coding here that i was very unfamiliar with. I decided to implement Uploadify to help me upload files, when a file is uploaded the information about the upload file is added to the database and then copies of the image is added to different folders within the users folder. These copied images where created with the help of the GD library and have different sizes, i decided to do this to create minimal upload time to the site to benefit the users, so the site is only displaying the thumbnail, and the full sized image will only be shown upon request of the download. I also had to create a crop function within the GD library, as the sizes where being displayed with the thumbnail sized but to different proportion, creating a crop function helped enable all the sizing of thumbnails to be generic. Without the GD Library crop, this would be the outcome!
 

 

- Charts Page

 

 
This page is pretty awesome, this is where all of the image uploads are added, i havent added pagination but i have added a pretty cool autoload function, which is kind of similar to twitter, its works on the principles of scroll to view, the closer you get to the end of the page, then the page will upload more until you reach the end. The feature is pretty cool and will allow the user to keep viewing at their leisure without having the click through pagination etc.
On this page and others i also added a force download with htaccess file, this was quite simple, i replicated it to allow downloads of certain types, i.e jpg, png etc.
 

- Leaderboard Page

 

 
To make this page possible, it works on the number of downloads per texture, and the only way i could track this, was by tracking the amount of times a link was clicked, when a link is clicked then the force download is in play, which lets me know that it has been download! The tracking of this is fairly simple in theory but harder in theory, all it took was a little bit of jQuery to track any a tags with the class ‘downloads’, some php to update the database!

© Copyright of Alexandra Milne 2013 | Privacy Policy | Disclaimer | Disclosure