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 ForumsBlogBlogdiplay news in another order and displayed numberdiplay news in another order and displayed number
Previous
 
Next
New Post
12/1/2005 8:15 AM
 
At the front page news are ordered in (i think) wrong order (ASC) ... how to display 30 news starting on the top of the page from last one added (DESC) ???
Which file i must modify ?
 
Here is my new site under DNN:
 
Thx
IZ
 
New Post
12/2/2005 11:40 AM
 

If you like to changed the view order, you can change the stored procedure

Blog_ListEntriesByPortal

Have a look at the end of the following SQL script.(ORDER BY)



CREATE PROCEDURE dbo.Blog_ListEntriesByPortal
@PortalID int,
@BlogDate datetime = null,
@ShowNonPublic bit = 0,
@ShowNonPublished bit=0,
@MaxEntries int = 10

AS

If @BlogDate IS NULL SET @BlogDate = GetUTCDate()
SET rowcount @MaxEntries
 SELECT
  U.[UserID],
  U.[Username],
  U.[FirstName] + ' ' + U.[LastName] AS UserFullName,
  E.[EntryID],
  E.[BlogID],
  E.[Title],
  E.[Description],
  E.[Entry],
  E.[AddedDate],
  E.[Published],
  E.[Copyright],
  E.[PermaLink],
  IsNull(E.[AllowComments],B.[AllowComments]) As AllowComments,
  B.[ParentBlogID],
  B.[AllowAnonymous],
  B.[Syndicated] AS BlogSyndicated,
  B.[Public] AS BlogPublic,
  (Select Count(*) FROM dbo.Blog_Comments WHERE EntryID = E.EntryID AND (Approved = 1 OR Approved <> @ShowNonPublic)) As CommentCount
 FROM   dbo.Blog_Blogs B INNER JOIN
  dbo.Blog_Entries E ON B.[BlogID] = E.[BlogID] INNER JOIN
  dbo.Users U ON B.[UserID] = U.[UserID]
 WHERE B.PortalID = @PortalID AND E.AddedDate <=@BlogDate
 AND (E.[Published] = 1 OR E.[Published] <> @ShowNonPublished)
 AND (B.[Public] = 1 OR B.[Public] <> @ShowNonPublic)
 ORDER BY E.AddedDate DESC


GO


regards

HP


Best regards
Hans-Peter Schelian
www.schelian.com (English)
German DotNetNuke Community
 
New Post
12/4/2005 11:36 AM
 

Thanks a lot :-p

IZ

(i will post all change i do to inform "all" )

 
New Post
12/7/2005 8:54 AM
 
Yes Very Good :-pp I prefer ordering by EntryID ;-pp Thix works great

 ORDER BY E.EntryID DESC
 
Thx
IZ.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogdiplay news in another order and displayed numberdiplay news in another order and displayed number


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