DNN Blog Module Modifications

This is my first real post using Windows Live Writer. So far, it's great. It clearly appears to have evolved from the visual studio side of html generation rather than the office side, creating perfectly legible code for anyone that gets excited by that sort of thing.

Eventually, I'd like to go through the DNN blog code and restructure the CSS. Some of the wrappings don't make much sense, and I feel it could definitely use a few tweaks. However, getting these changes wrapped into the project without breaking too make people's existing blog layouts is definitely a challenge, so for now I'll document what I did here and if it's useful to you, great! I see so much promise in the blog module, and I definitely want DNN to have the same ease of use as a blogging platform as dedicated ones like wordpress.

For now, though, most of my changes are a matter of overriding the classes in module.css. This is what I added to my skin.css:

/* blog css */
.blog_dateline, .blog_footer_left {display:none;}
h2.blog_title {font: 36px Georgia; font-weight:bold; clear:left;}
h2.blog_title a, h2.blog_title a:visited { text-decoration:none; color:#035; }
.blog_published {
  float:right;
  width:50px;
  border:solid 1px #999; border-top-color:#ccc; border-left-color:#ccc;
}
.blog_pub-month {
  background:#035;
  padding:1px 5px;
  font: 14px calibri,verdana;
  font-weight:bold;
}
.blog_pub-date {
  background:#f8f8f8;
  padding:1px 5px;
  font: 16px calibri,verdana;
  font-weight:bold;
}
.blog-rss {float:right; padding-top:20px;}

A few lines were added to ViewBlog.aspx though. I like the calendar page in the entry views, but there's no option to bring them to the main entry list. Just add these lines right after line 8 (right inside of div.blog_head, and remove the apostrophes):

<'div class="blog_published">
 <'span class="blog_pub-month">
   <'%# Left(MonthName(Month(DataBinder.Eval(Container.DataItem, "AddedDate"))), 3) %>
 <'/span>
 <'span class="blog_pub-date">
  <'%# Day(DataBinder.Eval(Container.DataItem, "AddedDate"))%>
 <'/span>
<'/div>

This seemed like a nice easy way to get this to display without having to recompile the blog from source (that's where the label values are assigned in ViewEntry.aspx).