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 ForumsForumForumWhatWhat's new
Previous
 
Next
New Post
6/27/2006 4:44 PM
 

When ever I activate my footer to enable the what's new feature all I get is old items. I have to show the all items to get anything to show up and the earlest date is march.

Anybody have a clue how to fix it?

 

Thanks

 
New Post
6/27/2006 5:47 PM
 

Found out the dbo.Forum_WhatsNewGetAll stored procedure was wrong.

Made changes to SP, I have highlighted the changes.

 

 

CREATE procedure dbo.Forum_WhatsNewGetAll

(

@ModuleID int,

@NumberOfThread int,

@UserID int,

@FromDate datetime,

@ToDate datetime,

@Filter nvarchar(500)

)

AS

-- Create a temp table to store the select results

CREATE TABLE #PageIndex

(

IndexID int IDENTITY (1, 1) NOT NULL,

PostID int)

DECLARE @sql nvarchar(1000)

SELECT @sql = 'INSERT INTO #PageIndex (PostID)' +

' SELECT Max(PostID) As PostID' +

' FROM Forum_Posts, Forum_Threads, Forum_Forums, Forum_Groups (nolock) ' +

' WHERE ModuleID = ' + CONVERT(varchar, @ModuleID) +

' AND Forum_Groups.GroupID = Forum_Forums.GroupID' +

' AND Forum_Forums.ForumID = Forum_Threads.ForumID' +

' AND Forum_Threads.ThreadID = Forum_Posts.ThreadID' +

' AND Forum_Posts.IsApproved = 1' +

' AND Forum_Posts.IsLocked = 0' +

' AND (Forum_Threads.ForumID NOT IN (SELECT ForumID FROM Forum_PrivateForums) OR' +

' Forum_Threads.ForumID IN (SELECT ForumID FROM Forum_PrivateForums (nolock) ' +

' WHERE RoleID IN (SELECT RoleID FROM UserRoles (nolock) WHERE UserID =' + CONVERT(varchar, @UserID) +

')))' +

@Filter +

' GROUP BY Forum_Posts.ThreadID' +

' ORDER BY Max(Forum_Posts.PostID) DESC'

Print @sql

EXEC(@sql)

SELECT

G.ModuleID,

T.ForumID,

F.Name AS ForumName,

P1.ThreadID,

P1.PostID As LastPostID,

P2.UserID As StartedByUserID,

U2.Alias As StartedByAlias,

P2.Subject As StartedSubject,

P1.Subject As LastSubject,

P1.UserID As LastPostUserID,

U1.Alias As LastPostAlias,

P1.Body As LastPostBody,

P1.CreatedDate As LastCreatedDate

FROM

#PageIndex PageIndex (nolock), Forum_Posts P1 (nolock), Forum_Posts P2 (nolock), Forum_Threads T (nolock), Forum_Forums F (nolock), Forum_Groups G (nolock), Modules M (nolock), Forum_Users U1 (nolock), Forum_Users U2 (nolock)

WHERE

P1.PostID = PageIndex.PostID AND

P1.CreatedDate > @FromDate AND

P1.CreatedDate < @ToDate AND

P1.ThreadID = T.ThreadID AND

P1.ThreadID = P2.PostID AND

P1.UserID = U1.UserID AND

P2.UserID = U2.UserID AND

T.ForumID = F.ForumID AND

F.GroupID = G.GroupID AND

G.ModuleID = M.ModuleID AND

PageIndex.IndexID <= @NumberOfThread

ORDER BY

PageIndex.IndexID

GO

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumWhatWhat's new


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