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 ForumsForumForumNothing NewNothing New
Previous
 
Next
New Post
5/26/2006 9:04 AM
 
    I tried your fix and it didn't seem to work either.  I may have messed it up, but at least I didn't break anything. 

http://www.jiltedcitizen.com
 
New Post
5/26/2006 3:04 PM
 

Should work fine, at least it works on both my sites. Have you allowed time for the cache info to get refreshed?

Roger


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
5/28/2006 1:25 PM
 

This fix works Only for SQL Server 2005. RED parts are changes

--------------------------------------------------------------------------------

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

 

ALTER 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'
Print @sql
EXEC(@sql)
SELECT  TOP(@NumberOfThread)
 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 DESC

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumNothing NewNothing 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