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



Can someone please address my... Expand / Collapse
Author
Message
Posted 08/02/2007 07:40:21
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 01/03/2007 14:10:04
Posts: 6, Visits: 19
Can you replace the text that shows up in areas such as posted by: username, to use the users email address or another field from the db. If so where can I change this.

Thank you
Post #12349
Posted 08/02/2007 13:40:59


Support Supremo

Support SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport Supremo

Group: Customers
Last Login: 13/11/2008 12:44:07
Posts: 568, Visits: 2,507
jayham (2/8/2007)
Can you replace the text that shows up in areas such as posted by: username, to use the users email address or another field from the db. If so where can I change this.

Thank you

Dear jayham,

Yes, In the InstantASP.InstantForum\InstantASP.InstantForum.UI\Controls\ViewTopics.vb

around line 825 we have :

If tLastPosterUserID > 0 Then
                        hypLastPostBy.TextNonLocalized = InstantASP.Common.Text.Helpers.Truncate( _
                        Topic.LastPosterUsername, MyBase.CurrentContext.CurrentForumSettings.UsernameTruncation)
                        hypLastPostBy.NavigateUrl = MyBase.CurrentContext.InstallURL + _
                        InstantASP.InstantForum.Globals.Paths.UserProfile(tLastPosterUserID)
                        hypLastPostBy.ToolTip = "ViewTopics_LastPostByToolTip"
                    Else
                        hypLastPostBy.TextNonLocalized = InstantASP.Common.Text.Helpers.Truncate( _
                        MyBase.CurrentContext.CurrentSharedSettings.AnonymousUsername, MyBase.CurrentContext.CurrentForumSettings.UsernameTruncation)
                    End If

You would need to modify this to:

If tLastPosterUserID > 0 Then
                        Dim lastposteruser As New User(Topic.LastPosterUserID)

                        hypLastPostBy.TextNonLocalized = InstantASP.Common.Text.Helpers.Truncate( _
                        lastposteruser.EmailAddress, MyBase.CurrentContext.CurrentForumSettings.UsernameTruncation)
                        hypLastPostBy.NavigateUrl = MyBase.CurrentContext.InstallURL + _
                        InstantASP.InstantForum.Globals.Paths.UserProfile(tLastPosterUserID)
                        hypLastPostBy.ToolTip = "ViewTopics_LastPostByToolTip"
                    Else
                        hypLastPostBy.TextNonLocalized = InstantASP.Common.Text.Helpers.Truncate( _
                        MyBase.CurrentContext.CurrentSharedSettings.AnonymousUsername, MyBase.CurrentContext.CurrentForumSettings.UsernameTruncation)
                    End If

You will also need to recompile your solution.

 

Post #12352
Posted 12/02/2007 13:57:11
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 01/03/2007 14:10:04
Posts: 6, Visits: 19
Thanks for your reply Carlos, now I have a really stupid question, how do I recompile? Sorry I am a newbie
Post #12369
Posted 12/02/2007 14:12:32
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 01/03/2007 14:10:04
Posts: 6, Visits: 19
By the way I am using Visual studio 2005
Post #12370
« 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 5:14pm

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