Search
Register
Login
Today: 09/12/2005 we have setup our new dedicated English forum.
From today on, please use this forum instead of the English forums on DNNPortal.DE.
I will lock the English forums on DNNPortal.DE.
Just wanted to blog the download module from dnnPortal.de today, and realized the RSS feed puts the elements in the alphabetic order instead of ordering by published date.
If you don't like the sort order you can simply execute the following sql script in host menu sql, After that you will get the the rss feed in updateddate descending.
START HERE TO COPY
=========================================
if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}HPS_DNNPortal_Downloads_GetByModules') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure {databaseOwner}{objectQualifier}HPS_DNNPortal_Downloads_GetByModulesGO
CREATE PROCEDURE {databaseOwner}{objectQualifier}HPS_DNNPortal_Downloads_GetByModules @ModuleID int, @sFilter nvarchar(256), @sSort nvarchar(100), @Approved int, @Roles nvarchar(150), @IsAdmin bit
AS
SELECT *, (SELECT COUNT({databaseOwner}{objectQualifier}HPS_DNNPortal_DownloadsComments.ItemID) FROM {databaseOwner}{objectQualifier}HPS_DNNPortal_DownloadsComments WHERE {databaseOwner}{objectQualifier}HPS_DNNPortal_DownloadsComments.ItemID={databaseOwner}{objectQualifier}HPS_DNNPortal_Downloads.ItemID) AS CommentCount
FROM {databaseOwner}{objectQualifier}HPS_DNNPortal_Downloads
WHERE ModuleID = @ModuleIDAND Approved = @ApprovedAND( @sFilter = '' OR UPPER(Name) LIKE UPPER('%' + @sFilter + '%') OR UPPER(Author) LIKE UPPER('%' + @sFilter + '%') OR UPPER(AuthorEMail) LIKE UPPER('%' + @sFilter + '%') OR Description LIKE '%' + @sFilter + '%' )
AND ( (([PublishDate] <GetDate()) or ([PublishDate] is null) ) and ( ([ExpireDate] >= getDate()) or([ExpireDate] is null) ) or @isAdmin = 1)
ORDER BY
CASE @sSort WHEN 'Name' THEN Name WHEN 'Author' THEN AuthorEND ASC,
CASE @sSort WHEN 'Downloads' THEN Downloads WHEN 'RatingAverage' THEN RatingAverageEND DESC,
CASE @sSort WHEN 'UpdatedDate' THEN UpdatedDate WHEN '' THEN UpdatedDateEND DESCGO
=================================================
END HERE TO COPY
Hope that helps
HP
Thanks for the custom SProc.
Actually I eventually ended up using this forum's syndication, which is fine as you announce the new downloads there.
That was more a suggestion for the next version; I reckon RSS feeds are naturally meant to be ordered by date since people will generally configure their reader to display the 5 last entries or so to keep up to date with the recent news.
Maybe you should change the sproc by default.
Page generated in 0.4375 seconds.