so from the linked thread, the base recordset you are using is:
SELECT Date_format(pcms2_contents.ContentDate, '%M, %Y') as contDate,
COUNT(*) AS cc FROM pcms2_contents
WHERE pcms2_contents.ContentPageName='News' AND pcms2_contents.ContentPageSetParentID=12
GROUP BY YEAR(pcms2_contents.ContentDate),
MONTH(pcms2_contents.ContentDate)
ORDER BY pcms2_contents.ContentDate DESC
to filter by a month and year url variable, you would need to pass the 2 digit month number in the querystring, and the 4 digit year in the quertystring for example:
news.php?month=02&year=2012
then in the recordset, use DATE_FORMAT to convert the date to year and month pieces: add to the where clause:
SELECT Date_format(pcms2_contents.ContentDate, '%M, %Y') as contDate,
COUNT(*) AS cc FROM pcms2_contents
WHERE pcms2_contents.ContentPageName='News' AND pcms2_contents.ContentPageSetParentID=12 AND DATE_FORMAT(pcms2_contents.ContentDate, %m) = paramMonth AND DATE_FORMAT(pcms2_contents.ContentDate, %Y) = paramYear
GROUP BY YEAR(pcms2_contents.ContentDate),
MONTH(pcms2_contents.ContentDate)
ORDER BY pcms2_contents.ContentDate DESC
then in the variables section, create 2 new variables as:
name: paramMonth
type: date
default value: -1
runtime value: $_GET['month']
name: paramYear
type: date
default value: -1
runtime value: $_GET['year']