Posts

Showing posts from May, 2019

Week 29 & 30 (May 16th & May 23rd)

Image
In the last two weeks, I have been trying to put some finishing touches on to my website. One of these finishing touches is the addition of an upload form where users can add their own photos. The screenshot shows how the form looks. The idea is that when the user clicks the "choose file" button, a box will pop up which allows the user to select a photo file to upload to their profile. When they click "upload image" the file will be added to the database which holds the other photos. I have also added some code which checks the format of the file, to ensure the user is uploading a real image rather than a fake file. This will help with security as it means only certain types of files can be uploaded. Although the form has been designed and the code created, unfortunately it isn't currently functional. The form allows the user to select the file they want to upload, however the file doesn't actually get uploaded and instead results in an error, ...

Week 28 (May 9th)

Image
After weeks of trying, I finally managed to get the images to display correctly on my website. After studying my code and getting a little help, I managed to figure out where I had gone wrong in my code. It turned out to be an extremely simple error which I had initially overlooked. As I missed the issue originally, I then began to over-complicate the code in order to try and fix the problem. After asking for help, the issue was very quickly pointed out to me. The red circle in the screenshot shows the amended code and shows just how easy it was to fix the problem. All I had to do was use the "img src" tag and then point it to the image field in my database. This is how simple the issue was to fix, however I missed this and instead spent weeks trying to encode/decode the image data in various different ways. After changing the code, I was met with the glorious site of my images being displayed on my website. Having finally got the images onto my website, I quickly se...

Week 26 & 27 (April 24th & May 1st)

Image
In the past two weeks, I worked on implementing the gallery page on my site. The aim of this page is to show a gallery of images from various sources. These images could come from the database or could be pulled from various social media accounts. The screenshot shows how the page currently looks: As the screenshot shows, I have implemented the same design on this page as is on my other pages. The page currently pulls images from the National Geographic Twitter account only. I plan to expand this by adding some of my own images and some different social media accounts. The other pages still look a little bare at this stage, though this is because I have been working on this page. Over the next week or two I will be adding much more content to the other pages.

Week 24 & 25 (April 10th & April 17th)

Image
Over the past 2 weeks I have once again struggled to get the pictures to display correctly on my site. Due to the continuing struggle with this issue, I decided to instead focus my attention on the site design instead. My old site design looked like this: After taking some time to think about my design, I realised that my design looked very ordinary and quite boring. It also looked old fashioned and very square. I therefore decided to search the web for some design inspiration, as I was keen to make my site look more modern. My main aim was to find a new design for the navigation bar at the top of the page and then use CSS to modernise the rest of the page. I quickly found a few designs that I liked and so I decided to try and implement them on my site. All of the designs I tried used a combination of HTML, CSS and JavaScript to give functionality to the navigation bar. However, I quickly ran into a major issue. When I implemented JavaScript, it wouldn't work. I tried various di...