Thanks a lot for this mod. It was just what I was looking for.
I just wanted to add simple date breaks into the existing news, so I just used a snippet of the code to replace a line in news.php (CMPS v2.x):
in news.php replace:
PHP Code:
eval('$newsbits .= "' . fetch_template('adv_portal_newsbits') . '";');
with:
PHP Code:
//datemod 1 of 2 start
$dayposted = vbdate('njy', $news['postdateline']);
//Display The Current News Day
if ($dategroup != $dayposted)
{
$datelongform = vbdate('l, F jS, Y', $news['postdateline']);
$dategroup = vbdate('njy', $news['postdateline']);
$prevdate = true;
eval('$newsbits .= "' . fetch_template('adv_portal_newsdigest_date') . fetch_template('adv_portal_newsbits') . '";');
}else{
//datemod 1 of 2 end
eval('$newsbits .= "' . fetch_template('adv_portal_newsbits') . '";');
//datemod 2 of 2 start
}
//datemod 2 of 2 end
And in this case, you need to enclose the contents of adv_portal_newsdigest_date in <tr><td></td></tr> tags.
Also, note this only works if you have your News module option "Separate News Posts" set to "No", but it should be easy to figure out the code to change in news.php for this to work for the other mode.
All this does is divide up your normal News posts with a date bar. It doesn't have any of the extra functions of the full mod.
In using this with vB 3.0.8 and CMPS 2, I noticed I had to change the use of
date() to
vbdate() or else I would get discrepancies between the post dates and current time zone setting.