Hi,
If I understand you well, you should register object event in your custom module initialization class:
ForumGroupInfo.TYPEINFO.Events.Insert.After += ForumGroup_InsertAfterEventHandler;
and then handle it like this:
private void ForumGroup_InsertAfterEventHandler(object sender, ObjectEventArgs e)
{
// Checks that the forum group was successfully created
if (e.Object != null)
{
// Gets an info object representing the new forum group
ForumGroupInfo forumGroup = (ForumGroupInfo)e.Object;
// Creates the child forum object
ForumInfo newForum = new ForumInfo()
{
// Sets the child forum's properties
ForumDisplayName = forumGroup.GroupDisplayName + " - General",
ForumName = forumGroup.GroupName + "_General",
ForumGroupID = forumGroup.GroupID,
ForumSiteID = forumGroup.GroupSiteID,
ForumOpen = true,
ForumModerated = false,
AllowAccess = SecurityAccessEnum.AllUsers,
ForumThreads = 0,
ForumPosts = 0
};
// Saves the child forum to the database
ForumInfoProvider.SetForumInfo(newForum);
}
}
You can find full example on this link in documentation.
Best regards,
Dragoljub