Leveraging YetAnotherForum.NET for External Post Display

The new Sueetie Announcement List View Control displays YetAnotherForum.NET content from anywhere on your site. It supports HTML text display and WYSIWYG editing, attached image display and file downloads. It supports all of those things because it leverages the advanced feature set of YetAnotherForum.NET. Here’s a screenshot of a sample Announcement List.

Image

Announcement images support lightbox display using your favorite plugin as shown below.

Image

Leveraging YetAnotherForum.NET

As we mentioned, the Announcement Control leverages YetAnotherForum.NET. YetAnotherForum.NET was perfect for the control since almost every community has an Announcements forum and YetAnotherForum.NET supports rich WYSIWYG editing, attached image display and file downloads out of the box. The best way to think of the Announcement Control is an Announcements Forum displayed outside of YetAnotherForum.NET. Here you see the same announcement shown in the Announcement List above in its native YetAnotherForum.NET format.

Image

The Announcement Control displays any forum you select as your "Announcements" forum. You can also display multiple forum lists on a single page. You can even theoretically display your entire community forum anywhere on your site. The Announcement Control uses Sueetie-specific handlers and other logic that bypasses YetAnotherForum.NET’s internal permission rules. So you could designate a restricted or hidden forum for your Announcement Control if you don’t want the content to appear on your forums.

The great thing about the Announcement Control is that we’re using YetAnotherForum.NET for all management of our announcement content as you can see in the screenshots below.

Image

Image

Using the Control

While the Announcement Control has a few advanced features not found in other List View Controls, it is still the familiar Sueetie List View. The control is dropped onto a page like other List View Controls.

Image

Notice the "ForumID" property. The ForumID determines which forum you wish to display. A quick YAF tip on obtaining the Forum’s ID is to observe the forum’s URL in YetAnotherForum.NET. The Forum ID is displayed for you in the Url. The ForumID for the Sueetie.com Announcements folder if I wished to use it would be "2", for instance.

Image

Like all Sueetie List View Controls, Announcements use an .ASCX template you specify in your THEME "Views" directory.  Here is the Announcement Control .ASCX View Template used in the example above. It’s like all other List View Templates with the exception it has two ASPNET Repeater Controls to display the attached files and images.

Image

So go forth and announce throughout the land (or from anywhere in your community!)

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.