A while back I modified the Efficion Article Module based on Announcements to change the order. The Stored Procedures are similar to the Repository module. I added an order control to settings that used an orderID. Only someone with admin rights can re-order it. The order code I wrote is based on code from Michael Washington's ADefServer ASPX Image App. I am dropping the Article Module and switching to the Repository. I have already created two custom templates for 'All' Media. It works with RealMedia, Flash, Windows Media. I also created an ITUNES type of audio interface and that's the one I really need the item ordering on. I have already tried using a naming convention as you suggested but it is a little cumbersome and doesn't match the CD Cover.
I have some screen shots here http://www.9dtv.com/articles_repository.htm
Here is the Stored Procedure. Notice I just set the Sort to ViewOrder. I added a vieworder field to the table.
CREATE PROCEDURE dbo.Articles_GetArticles
@PortalID int,
@ModuleID int,
@UserID int,
@Categories varchar(100),
@MaxNumber int,
@Age int,
@ShowAuthOnly bit,
@Featured bit,
@IgnorePublishDate bit,
@IgnoreExpired bit,
@SortField varchar(100)
AS
DECLARE @ORDER varchar(100)
SET ROWCOUNT @MaxNumber
if @SortField = 'ViewOrder'
SELECT ItemID,
PortalID,
ModuleId,
UserID,
Title,
Description,
Article,
Authed,
Featured,
ImageFile,
NumberOfViews,
CreatedDate,
PublishDate,
ExpireDate,
LastModifiedDate,
ViewOrder
FROM Article
WHERE PortalID = @PortalID
AND (@ModuleID = -1 OR (ModuleID = @ModuleID) OR (ModuleID is null))
AND (@UserID = -2 OR ItemID in (
SELECT DISTINCT ArticleID FROM ArticleRoles
WHERE (ArticleRoles.RoleID = -1 OR ArticleRoles.RoleID IN (SELECT RoleID FROM UserRoles WHERE UserID = @UserID))
))
AND ( @Categories = '' OR ItemID in (
SELECT DISTINCT ArticleID FROM ArticleCategories WHERE (ArticleCategories.CategoryID IN (SELECT intValue FROM dbo.csvToInt(@Categories)))
))
AND (@Age = -1 OR (CreatedDate BETWEEN DateAdd(day, @Age, GetDate()) AND GetDate()))
AND (@IgnorePublishDate = 1 OR IsNull(PublishDate, 1) <= CONVERT(CHAR(8), GETDATE(), 112))
AND (@IgnoreExpired = 1 OR IsNull(ExpireDate, DateAdd(d, 1, GetDate())) > CONVERT(CHAR(8), GETDATE(), 112))
AND (@ShowAuthOnly = 0 OR Authed = 1)
AND (@Featured = 0 OR Featured = 1)
ORDER By ViewOrder ASC
else
SELECT ItemID,
PortalID,
ModuleId,
UserID,
Title,
Description,
Article,
Authed,
Featured,
ImageFile,
NumberOfViews,
CreatedDate,
PublishDate,
ExpireDate,
LastModifiedDate,
ViewOrder
FROM Article
WHERE PortalID = @PortalID
AND (@ModuleID = -1 OR (ModuleID = @ModuleID) OR (ModuleID is null))
AND (@UserID = -2 OR ItemID in (
SELECT DISTINCT ArticleID FROM ArticleRoles
WHERE (ArticleRoles.RoleID = -1 OR ArticleRoles.RoleID IN (SELECT RoleID FROM UserRoles WHERE UserID = @UserID))
))
AND ( @Categories = '' OR ItemID in (
SELECT DISTINCT ArticleID FROM ArticleCategories WHERE (ArticleCategories.CategoryID IN (SELECT intValue FROM dbo.csvToInt(@Categories)))
))
AND (@Age = -1 OR (CreatedDate BETWEEN DateAdd(day, @Age, GetDate()) AND GetDate()))
AND (@IgnorePublishDate = 1 OR IsNull(PublishDate, 1) <= CONVERT(CHAR(8), GETDATE(), 112))
AND (@IgnoreExpired = 1 OR IsNull(ExpireDate, DateAdd(d, 1, GetDate())) > CONVERT(CHAR(8), GETDATE(), 112))
AND (@ShowAuthOnly = 0 OR Authed = 1)
AND (@Featured = 0 OR Featured = 1)
ORDER By
CASE @SortField
WHEN 'PublishDate' THEN PublishDate
WHEN 'LastModifiedDate' THEN LastModifiedDate
WHEN 'CreatedDate' THEN CreatedDate
ELSE LastModifiedDate
END DESC,
LastModifiedDate DESC
GO