The groundwork for tagging YetAnotherForum.NET topics and messages as favorites is complete. Before adding the buttons I wanted to show how Sueetie Data Core expands to include forum content.
For review, the data used in Sueetie-specific features like favorites begins with the Sueetie Data Core and tables Sueetie_Applications, _ApplicationTypes, _Content and _ContentTypes. These tie into the various data sources of the Sueetie apps. For our purposes in generating favorite forum topics and messages, we'll be linking to yaf_topics, yaf_messages and various supporting YAF.NET objects.
Below we see the Sueetie Data Core content records containing YAF.NET forum topics and messages with the all-important ContentID which Favorites and other Sueetie processes key on. SourceID links us to the application data source, yaf_topics or yaf_messages for example. ContentTypeID indicates whether the item is a forum topic or message, Application is the site application ID for the forum. (6 for the Demo Group Forum, 2 for the site main forum. Each app instance in each group or elsewhere has a unique ID.)
As for entering the data into Sueetie_Content, we'll do this in the YAF.NET PostMessage.ASCX control, first populating our SueetieForumContent object with sufficient information to determine the forum's permissions for our Sueetie_Content.IsRestricted flag. (More on restricted content handling later.) We'll then send SueetieForumContent to the data provider for entry into Sueetie_Content.
