Ryan Healey (3/1/2006)
Hi,
Good question. Active users are held within the InstantForum_WhosOn database table. This tablecontains field called CurrentActivity which corresponds to the InstantASP.InstantForum.Enumerations. EnumTask enumeration.
To add data to this table you can use our existing API. For example say you wanted to show users as viewing your homepage you could use something similar to the following...
First add a ViewingHomepage option to the InstantASP.InstantForum.Enumerations. EnumTask enumeration like so...
Public Enum EnumTask
None = 1
ViewingHomePage = 2
ViewingForum = 3
ViewingForumGroup = 4
ViewingTopic = 5
ViewingMembersList = 6
ViewingCalendar = 7
ViewingControlPanel = 8
ViewingLogin = 9
ViewingRegistration = 10
ViewingPrivateMessage = 11
ViewingWhosOn = 12
ViewingPermissionDenied = 13
ViewingHomepage = 14
End Enum
Then call the method to add information to the InstantForum_WhosOn table on your homepagelike so...
InstantASP.InstantForum.Business.WhosOn.InsertWhosOn( _
InstantASP.InstantForum.Enumerations.EnumTask.
ViewingHomePage, _
InstantASP.InstantForum.HttpContext.Current.Current)
You will then need to modify the Resource.xml language filefile to ensure the correct text is displayed on the Who's On page for your new ViewingHomepage option again i've provided an example of this below...
<item name="EnumTask_DeleteOwnTopics">Deleting Own Topic</item>
<item name="EnumTask_DeleteAnyTopic">Deleting a Topic</item>
<item name="EnumTask_ViewingRedirectForumLink">Viewing Forum Redirect</item>
<item name="
EnumTask_ViewingHomepage">Viewing Homepage</item>
Notice how the name of the string is the same as that of the enumeration. This is important to ensure the correct text is displayed on the Who's On page.
Does this make sense? Have i understood your question correctly?. Please don't hesitate to respond if you need any further information or have any further questions.
I hope it helps a little