WRITE YOUR OWN BLOG ENGINE (My web site) Figure 7-23. Adding

WRITE YOUR OWN BLOG ENGINE Figure 7-23. Adding an index to the postdate field in phpMyAdmin Now do the same for the post_id field in the comments table, and your blog database will be fully optimized. Creating an RSS feed The final thing every blog should have is an RSS feed, which is a web content syndication format. (RSS stands for Really Simple Syndication.) An RSS feed is an XML file that tells the outside world when you have updated your blog so your readers don t have to keep com ing back to your website to find out whether you made any changes. RSS feeds can be read online, through websites such as Bloglines (www.bloglines.com), or by using news reader software. There are many different news readers available for all operating systems. Your RSS feed might well end up being the most frequently downloaded file on your website. Many robots, indexers, and software will come and grab it so they can keep their users up to date with when your blog has been updated. Assuming that you want your blog to be read (and who doesn t), this is a good thing. However, it also means that your database server could end up fairly stressed if a database query were required every time the RSS file is requested. For this reason, I will show you how to create a static file that is updated only when you make a change to your blog. Because, by definition, static files do not require a database connection, your site will be more easily able to handle lots of nosy RSS software. Traditionally, the main RSS feed for a site is named index.xml. The first step is to create an empty index.xml file just create a new document in your text editor and save it to your root directory as index.xml. Because your code will eventually be rewriting this document, it needs to have read-write privileges. On Windows machines that should already be the case, but on Mac OS X machines you need to change the file properties. To do so, locate your index.xml file in Finder and select File . Get Info. Open the Details area of Ownership & Permissions and Figure 7-24. Changing file permissions select Read & Write access for Owner, Group, and Others; then close of index.xml on Mac OS X the Info window (see Figure 7-24). 329

WordPress database error: [Table 'armadillowebhosting_com_-_apache.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '400' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply