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 ForumsBlogBlogTop active blog entries by comments?Top active blog entries by comments?
Previous
 
Next
New Post
6/9/2006 2:19 PM
 
Here's the SQL snippet :

  
SELECT     B.PortalID, B.BlogID, B.UserID, B.Title, B.LastEntry, E.EntryID, E.Title AS entry_title, C.count_comments
FROM         Blog_Entries E INNER JOIN
                      Blog_Blogs B ON E.BlogID = B.BlogID INNER JOIN
                          (SELECT     TOP 10 EntryID, COUNT(CommentID) AS count_comments
                            FROM          Blog_Comments
                            GROUP BY EntryID) C ON E.EntryID = C.EntryID
ORDER BY C.count_comments DESC


From there - just amend the data providers and change the control to match. 
 
New Post
6/20/2006 7:26 PM
 
If one were to build a custom module, speperate from the blog module itself but link to the blog, what is the best way to handle getting the full URL to an existing blog module so that one can link from the "top 10 list" to an actual blog item to display it?  I want to be able tto have a user click one of the top items and have it display the blog item as if it were clicked on directly from the blog list.
 
New Post
6/20/2006 10:17 PM
 

I'd say you'd need to make it portal specific and provide a settings drop down which would query the blogs installed.  This could be done similar to the repository dashboard, where you have to designate which repository it is supposed to pull info on.  From that setting, your code would have the module ID and other blog info to use. 

I was thinking instead to add another control definition, that could be added in.  But this would require a DB hack for any pre-existing blogs, or a settings as in the separate module.  I think I like your idea better - that way people could add it in and designate which blog to pull from.  You could also put a setting to be portal-wide and capture the top X of all blogs on the portal. 

Many options - one reason I love the DNN framework. 

 
New Post
6/21/2006 8:47 AM
 

I ended up using the SQLGridView module from http://www.tressleworks.ca/ to create a custom query to get the top commented stories and basically hard coded the blog path into the SQL to combine with the returned query ID and Title.  The results are a moduel listing whatever blog items I want with a link to the blog item itself.  Works great with no custom coding needed.

Here is the SQl for anyone interested:

SELECT     '<a href="http://www.mydomain.com/News/tabid/55/EntryID/' 
+ cast(E.EntryID as varchar(3)) + '/Default.aspx">' + E.Title
+ '</a>' as 'Recently Commented Stories'
FROM         Blog_Entries E INNER JOIN
                      Blog_Blogs B ON E.BlogID = B.BlogID INNER JOIN
                          (SELECT     TOP 10 EntryID, COUNT(CommentID) AS count_comments
                            FROM          Blog_Comments
Where addedDate > dateadd(dd,-28,getdate())
                            GROUP BY EntryID) C ON E.EntryID = C.EntryID
where 1=1
ORDER BY C.count_comments DESC
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogTop active blog entries by comments?Top active blog entries by comments?


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