After many, many, many hours of brain scratching, stress and anger, I have finally got my comment system working. The comments system allows users to add comments to each different dreams. On the homepage it will display a link that shows the word "Comments" and then showing a number in brackets displaying how many comments that dream has, for example "(3)". When a user clicks this link it will take them to a page that displays the dream on it' own with no other dreams. Then all the comments that have been written will be displayed. (Just thinking about this now, I may need to add pagination to the comments system). Underneath the comments then is a form that allows people to add more comments. The comments are being submitted into a database via the form, and then the script is pulling the comments from the database and displaying them on the page.
I followed this tutorial which you can view here that was shown to me by my friend Scott Llewellyn. I had to alter a lot of the code because it wasn't working as it should have been. I had to change all the "<" and ">" to "<" and ">" because this stopped the whole script from working properly. Obviously I also had to edit the code to suite my database and names etc. I had many problems with this script and had to get help from PHP Freaks Forum to help me with them. I have to acknowledge that people have helped me with this and cannot say I did it all on my own because that would be untrue. I don't think I would have been able to solve the problems without the help if I'm truly honest. However, from the help I have received, I can see where I have gone wrong and have learnt from this. The comment system I have in place at the moment is in a file on it's own and so I now need to get it integrated with the actual website itself so it can fit in with the whole design and workings of the website.
I have know got two of the three major parts of the website working which has been great progress throughout the month of January. I have learnt a lot during this time, and probably spent the most time of my life coding and practicing web work, which I have thoroughly enjoyed. Once I have added the comment system to the website I must then move on to the ratings system for the website.
Saturday, 23 January 2010
Thursday, 14 January 2010
"Tag clouds are the work of the devil"
The title was a quote taken from myself. As you may have guessed I have been struggling with carrying out the tag cloud feature on my website. But at last I have made a major breakthrough. To start the day off I thought I would need to change the table in the database that I had set up and so decided to delete the table. Then after setting up the new table (losing all the entries that I had submitted in the process) and it did not work, breaking the website in the process I thought I had made a major mistake. I ended up deleting the new table that I had made and created the same table that I started with. So after alot of frustration and wasted time, I just couldn't figure out how to get the tag cloud script working properly. I then posted my code on the website of the tutorial I was following, which can be found here. The guy who wrote the tutorial, Andrew Johnson, helped me out alot, and showed me where I was going wrong with the script. So after a hard days work, I have finally gotten the tags submitted into the database, then increments when the same tag is entered more than once. The more times the tag has been entered the bigger the tag will look in the tag cloud. This has been a big break through after alot of hard work finally paying off and help from Andrew Johnson who I greatly appreciate for helping me so much.
Sunday, 10 January 2010
Latest
I have learnt over the past few days how to style the results that are in the database with CSS instead of using a table. This means that I can make the results look much better with the use of Photoshop. I have also started to make progress with the tag cloud. I can pull the tags from the database if I enter them into the database myself, but cannot pull them from the tags that have been entered via the form. I have asked for help with the tutorial I am following which you can see here.
Wednesday, 6 January 2010
DMP
Sorry, I couldn't think of a decent title to write. The last couple of days since I have last posted a blog have gone well. I have found a new and improved pagination script which I have implemented on the website. To do this I followed this tutorial. The only problem with this is that it is not sorting the dreams by the sate entered, so the oldest dreams in the database are being submitted on the first page. I'll need to find a solution to this. I've also been playing around with the display of the website. It looks much better now, although this may not be the final design. It just looks nicer to work on. I have been looking for a PHP script to allow users to vote whether the dream is a good dream or a bad dream, but have not found anything
Monday, 4 January 2010
Festive Period Over
Christmas and New Years is over which means that work begins again. I have made much progress over the past two days. Firstly I have learnt how to style the dreams that have been pulled from the database and displayed on the website by CSS. This allows me to show the dreams more clearly for the users. The second thing I have learnt how to do was pagination. Pagination is when a user can go from page to page looking at the results. To do this I used this tutorial so now I can display a certain amount of dreams on each page for users to scroll through. I also tried looking at the tag cloud again, however I am struggling with this so may have to get help from my tutor. I've also had inspiration for a design for the website which I am very happy about. I need to crack on with the project now over the next coming months to make the website as successful as possible.
Subscribe to:
Comments (Atom)
