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 ForumsAnnouncementsAnnouncementsSort AnnouncementsSort Announcements
Previous
 
Next
New Post
2/1/2010 12:51 PM
 

I was wondering if anyone has found a way to get the announcements to sort correctly?  If you don't enter a number for the sort order, it puts the oldest one first.  It should be the newest one first.  I am going to try and see if I can sort the actual database table, but am not too comfortable with that.  If anyone has any ideas, I would greatly appreciate it.  I'm running DNN 4.9.5 and Announcements 4.00.03.  Thank you.

 
New Post
2/1/2010 3:20 PM
 

Ok found out the answer.  It sorts the announcements by publish date, which is different from creation date.  It uses publish date so that you can tell it to publish a week from now and it will be on top.  But for those of us like me who don't really use the future publishing functionality, I just want it sorted by creation date.  If this is how you want you want it to work, you have to edit the stored procedure.  There are a few different ones, dob.dnnAnnouncements_GetCurrent, Get Expired, & GetAll.  Open the one you want and on the last line edit the 'order by' part.

from:
order by dbo.Announcements.ViewOrder asc, dbo.Announcements.PublishDate desc

to:
order by dbo.Announcements.ViewOrder asc, dbo.Announcements.CreatedDate desc

 The better way would have been when you are creating an announcement, make the Publish Date auto populate the current time to have them in an order of when they are created.  Right now, if the user doesn't have a publish date, he assumes he doesn't need to enter a date.  How is he supposed to know that it orders by this?  So if he enters 5 announcements in one day, they are all set to 12:00am and are not ordered.  Maybe they will correct this in the future, guess for now I just won't use the publish date functionality.  I know it is not an 'error', but I am trying to make sites that are as user friendly and intuitive as possible.

Side Note: If you want to keep the user from, say, entereing a publish date, just put a div tag around the label, something like this <div style="visibility:hidden;"><dnn:label.....></div>

 
New Post
8/24/2011 10:30 AM
 
Nice tip there mate, this came in very handy! I would like to add that when Modifying the S/P in SQL Management Studio, you're unable to save it direct from there (or I was at least!), so anyone else trying to update these Stored Procedures will have to do it via the Host/SQL module and 'Run as Script'.

Thanks again!
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsAnnouncementsAnnouncementsSort AnnouncementsSort Announcements


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