Here is a breakdown of the changes I have made to the trail pages:
- Comments are now paginated.
- Visitors are required to login before posting a trail comment.
- If the user has previously rated the trail they will be unable to rate it a second time.
- Users are able to edit comments previously submitted.
Now for a bit more detail...
Comments are paginated:
Previously, all comments were displayed when loading the screen. If their were a lot of comments the page would be pretty long. I changed it so only the 10 most recent comments are displayed when the page is first loaded. If visitors would like to see more, they simply need to select a link to the next page. The cool thing is that this doesn't require the entire screen to reload. Instead, only the section of the web page that displays comments is reloaded with the next 10 comments. This makes for a much more compact and efficient method of viewing trail comments.
Visitors are required to login before posting:
If the user has previously rated the trail they will be unable to rate it a second time:
The purpose of this is simply to keep people from rating the same trail and skewing the results. Once the form is used once to submit a comment the form will not be seen again. However, some people will change their mind about a trail rating, which is why I allow comments to be updated.
Users are able to update previously submitted comments:
If a user has previously submitted a comment for a trail they are now able to update it by simply clicking on a link that appears under the comment, which is labeled "Edit My Comment." By clicking the link the comment is replaced with a form pre-populated with the previous comment (page refresh is not required). The user is able to modify any part of the comment and submit it again. The page rank is then recalculated and displayed in the comment list. The comment is updated with the current date and the next time the first page of comments is loaded, the updated comment is displayed as the first comment.
These changed have been implemented using a new method of coding that Google made popular called AJAX. This allows only certain areas of the web page to be modified without causing the entire page to reload. This makes for a much more efficient and usable means of leaving trail feedback.
I look forward to many more changes as I clean up TrailCentral using AJAX.
No comments:
Post a Comment