Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogPrint Blog Entry functionalityPrint Blog Entry functionality
Previous
 
Next
New Post
9/15/2006 11:20 AM
 
When clicking the print link button on an entry with comments, the resulting html generated for the popup does not include the comments. Am I doing something wrong?
 
New Post
9/16/2006 4:42 PM
 

If anyone is interested, I pulled down the source for the Blog module

opened just the DotNetNuke.Blog project. referenced DotNetNuke.dll v3.3.4.16841 

changed the cmdPrint_Click handler to the following:


Private Function InfoHeaderRow(ByVal info As CommentInfo) As String

Return String.Format("<td><h5>{0}</h5></td><td Align=""RIGHT""><h5>Posted by: {1} {2} {3}</h5></td>", info.Title, IIf(info.UserFullName.Trim() = String.Empty, info.Author, info.UserFullName), info.AddedDate.ToShortDateString, info.AddedDate.ToShortTimeString)

End Function

Private Function InfoCommentRow(ByVal info As CommentInfo) As String

Return String.Format("<td colspan=""2"">{0}<td>", info.Comment)

End Function

Private Sub cmdPrint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdPrint.Click

Dim sb As New System.Text.StringBuilder

Dim objCtlComments As New CommentController

Dim list As ArrayList

list = objCtlComments.ListComments(m_oEntry.EntryID, Utility.HasBlogPermission(Me.UserId, m_oBlog.UserID, Me.ModuleId))

For Each info As CommentInfo In list

sb.Append(String.Format("<hr><br><table style=""width:100%""><tr style=""width:100%"">{0}</tr><tr>{1}</tr></table>", InfoHeaderRow(info), InfoCommentRow(info)))

Next

Response.Clear()

Response.Write("<html><head><title>Blog Print Page Option:" & m_oEntry.Title & "</title></head><body bgcolor=""white"">" & _

"<table width=""100%""><tr><td align=""left"">" & _

"<H1>" & m_oEntry.Title & "</H1></td>" & _

"<td align=""right""><h5>" & Localization.GetString("lblPostedBy.Text", LocalResourceFile) & m_oBlog.UserName & " " & m_oEntry.AddedDate.ToLocalTime().ToString() & "</h5></td></tr></table>" & _

"<HR>" & _

m_oEntry.Description & Environment.NewLine & _

"<HR>" & _

Server.HtmlDecode(m_oEntry.Entry) & Environment.NewLine & _

CStr(IIf(list.Count = 0, "<hr>", sb.ToString() & "<hr>")) & _

"</body></html>")

Response.End()

End Sub


Recompiled and dropped it in my deployments /bin folder and works like a charm

now to hack the RSS feed

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogPrint Blog Entry functionalityPrint Blog Entry functionality


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out