InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Where are the "active users"... Expand / Collapse
Author
Message
Posted 28/02/2006 18:56:19
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 18/03/2006 13:09:58
Posts: 15, Visits: 20
I want to display the forum "Active Users" information of what memebers and how many quests are on outside of the forum, like on my homepage. How should I do this? Are they stored in some table or can I somehow reuse the control?

Visit VistaForums.com
Post #10225
Posted 01/03/2006 07:38:04


IF.NET 4.2 Coming Soon

IF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming Soon

Group: Administrators
Last Login: 13/11/2008 13:12:14
Posts: 1,955, Visits: 3,014
Hi,

Good question. Active users are held within the InstantForum_WhosOn database table. This table contains 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 homepage like 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 file file 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




Kindest Regards,

Ryan Healey
Director / Developer

Explore our products...
http://demos.instantasp.co.uk/

Post #10231
Posted 03/03/2006 14:00:50
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 18/03/2006 13:09:58
Posts: 15, Visits: 20
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


Although that wasnt exactly what I was talking about, I will be doing that as well! What I was talking about was just displaying on my homepage, the same statistics which are available when your on the forum.
ex. Active Users: 9 (8 guests, 1 member, 0 anonymous members)
I want to display that on my homepage. So I could just grab it from the Whos_on table? Which columns coorespond to a member/guest/or annoymous member? Thanks a lot for the help.

Visit VistaForums.com
Post #10268
Posted 10/03/2006 22:46:04
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 18/03/2006 13:09:58
Posts: 15, Visits: 20
anyone? I just want to display the "active users" stuff like it does inside the forum (near the bottom) on my homepage which is outside of the forum.

Visit VistaForums.com
Post #10332
Posted 11/03/2006 20:19:54
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 14/10/2006 01:27:14
Posts: 276, Visits: 3,858
Just throwing this out there but if you import the right things onto an aspx page, couldn't you just use the exact same user controls the the forum is using?  Or if the colors/format won't work, then maybe dissect the user control and then use those same individual pieces with custom CSS.



Jimmy Stuart
Post #10342
Posted 17/03/2006 14:57:34
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 18/03/2006 13:09:58
Posts: 15, Visits: 20
Jimmy Stuart (3/11/2006)
Just throwing thisout there but if you import the right things onto an aspx page, couldn't you just use the exact same user controls the the forum is using? Or if the colors/format won't work, then maybe dissect the user control and then use those same individual pieces with custom CSS.


Thats exactly what I want to do. But I dont know what to Import. I try to import the same things which the master page uses etc.. but I always get error.

Visit VistaForums.com
Post #10407
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 12:09pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.141. 10 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.