I was in need of the What's New module which I soon discovered was no longer supported so I whipped up my own, rather quickly. You can use this as a starting point to build your own for your own needs without having to reinvent the wheel too much.
I have used a stored procedure because of a size restriction on the field for the report SQL statement.
In addition to the stored procedure, you will need the following settings at a minimum in the report module:
Query: exec myprefix_WhatsNew
HtmlDecode: Content
The formatting of this report is rather crude but there are options in the reporting module to clean that up if you want.
You will want to look at each of the queries in this script to customize them for your needs. In the portal that I wrote this for, there is only one tab with a blog module and only one tab with the forums module so I hard-coded those tab IDs. You may need to make those dynamic.
This What's New? report will work (with modifications for your portal) with the following "out-of-the-box" DNN modules:
- Text/HTML
- Announcements
- Wiki
- Blog
- Discussions
You can expand/contract it as needed to work with modules of your choice.
Stored Procedure (Name it to what you want, of course):
create procedure myprefix_WhatsNew
as
select top 50
'Link' as LinkTo,
substring(wt.Content, 1, 150) as [Content],
substring(tb.Title, 1, 30) as [Page Title],
wt.UpdateDate as Date
from
wiki_topic wt,
tabmodules tm,
Tabs tb
where
wt.moduleid = tm.moduleid and
tm.tabid = tb.tabid
union all
select top 50
'Link' as LinkTo,
substring(ht.desktophtml, 1, 100) as [Content],
substring(tb.Title, 1, 30) as [Page Title],
ht.CreatedDate as Date
from
htmltext ht,
tabmodules tm,
Tabs tb
where
ht.moduleid = tm.moduleid and
tm.tabid = tb.tabid
union all
select top 50
'Link' as LinkTo,
substring(an.Title, 1, 100) as [Content],
substring(tb.Title, 1, 30) as [Page Title],
an.PublishDate as Date
from
Announcements an,
tabmodules tm,
Tabs tb
where
an.moduleid = tm.moduleid and
tm.tabid = tb.tabid
union all
select top 50
'Link' as LinkTo,
substring(be.Entry, 1, 100) as [Content],
substring(bb.Title, 1, 30) as [Page Title],
be.AddedDate as Date
from
Blog_Entries be,
Blog_Blogs bb,
Tabs tb
where
be.blogid = bb.blogid and
tb.tabid = 55
union all
select top 50
'Link' as LinkTo,
substring(fp.Subject, 1, 100) as [Content],
'Discussion Forum - ' + substring(ff.Name, 1, 30) as [Page Title],
fp.UpdatedDate as [Date]
from
Forum_Posts fp,
Forum_Threads ft,
Forum_Forums ff
where
fp.ThreadID = ft.ThreadID and
ft.ForumID = ff.ForumID
order by Date desc