Announcement Widget In BlogEngine.Net

Download BlogEngine 2.0 WAP With Announcements (4.51 mb)

Lately we have been working on extending BlongEngine 2.0 to include some more CMS features and more capabilities to it. After converting it to Web Application Project (WAP) model, I have been working on extending the core to allow BlogEngine to publish and manage items like Announcement and News. This release of BlogEngine.Net 2.0 geared towards that. It allows you to add Announcements in BlogEngine with following attributes.

  • Title
  • Content
  • Publish Date
  • Expiration Date

I have implemented the whole administration user interface that looks and functions exactly as the one you have for Posts. I have also extended the database to include rights that are specific to Announcements administration. I have not created any widget objects for announcements yet. But I have included two user controls in web application that demonstrates how you can use it to display list of recent announcements with titles only. And then a detailed version of it that displays full content of announcements. You can see this on home page of this blog itself. In left section of home page, the items under Industry News is a user control displaying titles only. And in Announcements page, are full view of announcements.

Database Change

I have included MSSQLUpgrade2.0ForAnnouncements.sql file under Setup that you can use to modify the database. Here is the script that is included in that file/

CREATE TABLE [dbo].[be_Announcements](
	[AnnouncementId] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](200) NULL,
	[AnnouncementContent] [nvarchar](max) NULL,
	[DateCreated] [datetime] NULL,
	[DateModified] [datetime] NULL,
	[Author] [nvarchar](50) NULL,
	[IsPublished] [bit] NULL,
	[IsDeleted] [bit] NULL,
	[ExpireDate] [datetime] NULL,
 CONSTRAINT [PK_be_Announcements] PRIMARY KEY CLUSTERED 
(
	[AnnouncementId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, 
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, 
ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

insert into be_Rights (RightName) value('ViewPublicAnnouncements')
insert into be_Rights (RightName) value('ViewUnpublishedAnnouncements')
insert into be_Rights (RightName) value('CreateNewAnnouncements')
insert into be_Rights (RightName) value('EditOwnAnnouncements')
insert into be_Rights (RightName) value('EditOtherUsersAnnouncements')
insert into be_Rights (RightName) value('DeleteOwnAnnouncements')
insert into be_Rights (RightName) value('DeleteOtherUsersAnnouncements')
insert into be_Rights (RightName) value('PublishOwnAnnouncements')
insert into be_Rights (RightName) value('PublishOtherUsersAnnouncements')

insert into be_RightRoles (RightName,[Role]) values ('ViewPublicAnnouncements','Anonymous')

Administration

Here are screenshots of administration user interface. I have modified web.sitemap file to include Announcements item in Administration widget.

Announcements in BlogEngine

comments powered by Disqus

Search

Social

Weather

9.2 °C / 48.5 °F

weather conditions Clouds

Monthly Posts

Blog Tags