Alright. Losing thought integrity, so I think I'm about done for the night. Got lots done, however. I think I've completed the following sections:

  • Archives
  • Home
  • Help
  • Rules
  • 'Tils
  • Online
  • Stats
  • Search

However, the stuff I took care of today was largely "boiler-plate," that is, most of the standard or more simplistic displays, and not the more complex, crazy-go-nuts part that thread/item generation is. I've left that for another day. Maybe tomorrow.

However, my code, now, is much, much cleaner. Take, for instance, my home page, which is now in its entirety the following code segment:

 
require_once('include/navigation.php');
require_once('include/header.php');

echo layout(
    array(
        'header' =>  gen_header( "Home" ),
        'right'  =>  gen_pinned(),
    ),
    array(  
        'renderer'  =>  'split_layout' 
    )
);

As part of the new rendering mechanism, I have introduced 'layouts'. As I was already creating a templating system for the smaller portions of the site, it made sense to create something that would give some sort of consistency to how the smaller portions would fit together, and also give me the control to mess with them later on across the entire site (critical, if ever want to have idkfa automatically switch between 'layouts,' say, for switching between a mobile layout and a desktop layout). Now I have an easy and powerful way to generate site contents that leaves the actual HTML code to the underlying renderers (hidden in gen_header and gen_pinned, in this example), and then also having the ability to apply any renderer to join together the components (but also have the renderer be smart enough to build itself if I don't specify certain elements).

It also means that I'm having to go back and see all the other "bad things" I did when I was trying to get things to look okay. I've been able to mop up my mess so far, but if you find something I missed, please let me know.

#4133, posted at 2012-02-20 03:06:50 in idkfa