The Investing Section
In the previous update, the ability to add posts to the investing section was implemented, but what's the point without being able to see them? Now the investing section is live with seven categories to post to! The investing section works just like the news section however the styling is different in the newsfeed. Right now, it has a 2-column layout, but in the future it may look better with a one-column layout. The only problem with that may be the images being too big. We will have to see.
Pagination
Now search results are limited per page and the number of pages is automatically calculated for the results. Although this is a rather common feature to have on search pages, this is a huge step in the right direction because this function will be key to other sections of the site. Also, at the bottom of each news and investing section is a Show All button that redirects the user to the search page where every post is displayed in order.
Forgot Password
If by any chance a user forgets their password, now they can request a password reset with their username or email address. For security reasons, this function has a certain level of complexity to it. The user enters their username or password into the form and it is checked in the database. Then, a unique "ticket" is created in the database and sent to the user's email address. The email sent to the user contains a link with both the ticket and the tickets ID in the URL. This provides a two layers of security for the sake of the user's account. When the user clicks on the link the webpage will check the ticket and ID. If the ticket is still open, the user will be able to change their password and then the ticket is deleted from the database. If the ticket is not open, the user will be redirected back to the login page.
Mailer
With the implementation of the reset password function, a universal mailing function has been added. This is a universal mailing function that can be used for anything. As of right now, it is being used for the reset password link and the confirmation email when a user signs up. There is no need to validate accounts as of right now, but that is a possibility in the future. This function will also be used to send out the news letters and the invoices from the shop page in the future.
Resizable Article Images
Article body images can now be resized to fit to any percentage value. Before, all images were set to 100% of the width of the article. Now, when an image is added with the "Add Image" button in the text editor, a width attribute is available for resizing the image. This is useful for images with a low resolution so they don't pixelate when enlarged from their original size. Here is an example of an image that is 50% of the width of the article.
Although images are set to be aligned to the left in the text editor, they are centered when they are centered after they are posted. Click the image to enlarge it to the full size!
Floating Navigation
As requested, the navigation bar detaches from the top of the screen and follows the user down the page. When the user returns to the top of the page, the bar snaps back into place. In the future, this same functionality will be implemented into elements/widgets that appear on the left and/or right side of each page (like ads).
Bug Fixes
- Made the start-up image resizing functions happen quicker
- The newsfeed will now resize as the page width is resized
- Page functions have be minimized and fixed.
Somehow, there weren't that many bugs!