Ok, one more quick test version.
Added JSON formatting [thanks Adam

] and fixed a few bugs. I also changed the last variable names for the archives (internal variables, not parameters) so that the archives script no-longer resemble any Etomite code.
Just for referance here is the code that generates the archives:
<?php
function generateArchive($archiveText, $archivePlaceholder, $stop, $total, $resource, $dateFormatType, $dateFormat, $archiveDateType, $tplArch, $debug) {
global $modx;
$lastCategory = "";
$archivehtml = "";
$archiveHTML .= "<h3>$archiveText</h3><div id=\"ditto_archivelist\"><ul>";
for ($i = $stop; $i < $total; $i++) {
$dateArray = getdate($resource[$i][$dateFormatType]);
$category = strftime("%B %Y", $resource[$i][$dateFormatType]);
$subCategory = $dateArray['mon'];
if ($subCategory != $lastCategory) {
if ($lastCategory != "") {
$archiveHTML .= '</ul></li>';
}
$archiveHTML .= '<li><span class="ditto_month">'.$category.'</span><ul>';
}
$archiveHTML .= "<li class=\"ditto_archpost\">";
$archiveHTML .= $this->render($resource, $i, "archive", $archiveDateType, $tplArch, $dateFormat, $debug);
$archiveHTML .= "</li>";
$lastCategory = $subCategory;
}
$archiveHTML .= "</ul></li></ul></div>";
if ($archivePlaceholder == 1) {
$modx->setPlaceholder('archive', $archiveHTML);
} else { return $archiveHTML; }
}
?php>
And the Etomite code is available here:
http://etomite.org/browsesnippets.html?int_snipid=162&lst_category=8 (remember to copy and paste)
Unless anyone objects, I plan to release this tomorrow afternoon.