HomeHomeDotNetNuke Forg...DotNetNuke Forg...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
HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsAnnouncementsAnnouncementsSort AnnouncementsSort Announcements


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.