Generating Semantic Comment Lists with XHTML
XHTML specifications provide three types of lists ordered lists <ol>, unordered lists <ul> and definition lists <dl>. Ordered lists are meant for content that must be arranged in a specific order — things like instructions, or lines of code. Unordered lists are meant to be used for content that can reasonably be displayed in any order such as navigation menus or shopping lists. The rarely used definition lists is meant to be used where one list item is logically defined by a subsequent item (a definition term <dt> followed by a definition description <dd>) it functions the same way as a FAQ or glossary. However, when specifically used for comments, the only sure bet is that the unordered list is inappropriate — because comments require a specific order to make sense — while the ordered list and definition list vie for being the second worst.
Better Wordpress threaded comments
Here is something slightly different, I’m trying to get into the habit of writing out my notes and detailed changes in INAP 3.0 for my own use, so I thought they may help others in the process. The following walk through details the process I took to create a method to thread comments for Wordpress. Most of the project specific code has been removed to keep the code from being cluttered.
The threading structure for the plugin needed to be able to handle an unlimited number of children in an order, and the ability to “flatten” the children after a certain user-specified depth (shown in the code examples as $max_depth). The threading structure needed to be rewritten because in short, the old version (seen here) worked by individually querying the database for each comment to look for children, utilized globals to pass information from one section to another, used a complex method of if/elses to determine what functions should do, and was very slow.

