Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - User Names vs Real Names
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

User Names vs Real Names

 Post Reply Post Reply
Author
onceah View Drop Down
Newbie
Newbie


Joined: 11 November 2005
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote onceah Quote  Post ReplyReply Direct Link To This Post Topic: User Names vs Real Names
    Posted: 11 November 2005 at 5:30pm
Hello everyone.
 
I install this forum on our intranet and it everything looks good.  I need to have a small change.  Maybe not small but change and I am not sure how to do it.
 
I want our users to login using their usernames but I want to have their real names to be displayed everywhere (who is logged it, topic starters, etc.....)
 
Is it possible to do?
 
Thank you.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2005 at 5:56pm
you would have to edit any page that shows strUsername etc and get it so that it uses the real name field instead.

there would be quite a few pages
Back to Top
onceah View Drop Down
Newbie
Newbie


Joined: 11 November 2005
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote onceah Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2005 at 6:15pm
This what I thought but the problem is that it does not work this way.
 
For example, on the page forum_topic.asp I changed all 3 entries related to Username.  I changed it to Real_name.  After that I have an error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/mas/forum/forum_topics.asp, line 434
And I cannot do anything about this.  There is something else or maybe I am missing something.
 
 
There is nothing else to change.  Any ideas? 
 
Thank you.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2005 at 6:19pm
its saying a field name is being wanted ot be used/requested but it was not called in within the query


can you paste around the section you are using, on lines 434, also highlight that line in red.
Back to Top
onceah View Drop Down
Newbie
Newbie


Joined: 11 November 2005
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote onceah Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2005 at 9:12am
This is the text around line 434:
431:   If NOT rsTopic.EOF Then
434:   strTopicStartUsername = rsTopic("Username")
435:   strFirstPostMsg = Mid(rsTopic("Message"), 1, 275)
436:   lngTopicStartUserID = CLng(rsTopic("Author_ID"))
I change Username to Real_name.
 
Also, I change this:
415:   If strDatabaseType = "SQLServer" Then
416:    strSQL = "EXECUTE " & strDbProc & "LastAndFirstThreadAuthor @lngTopicID = " & lngTopicID
417:   Else
418:    strSQL = "SELECT " & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Author_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Author.Username "
419:    strSQL = strSQL & "FROM " & strDbTable & "Author, " & strDbTable & "Thread "
420:    strSQL = strSQL & "WHERE " & strDbTable & "Author.Author_ID = " & strDbTable & "Thread.Author_ID AND " & strDbTable & "Thread.Topic_ID = " & lngTopicID & " "
421:    strSQL = strSQL & "ORDER BY " & strDbTable & "Thread.Message_date ASC;"
422:   End If
on line 418 I change Author.Username to Author.Real_name.
 
There is one more place that I change:
444:    lngLastEntryMessageID = CLng(rsTopic("Thread_ID"))
445:    strLastEntryUsername = rsTopic("Username")
446:    lngLastEntryUserID = CLng(rsTopic("Author_ID"))
447:    dtmLastEntryDate = CDate(rsTopic("Message_date"))
On line 445 I change Username to Real_name.
 
I do not think that there is anything else to change on this page but it gives me an error.
 
Thank you.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2005 at 9:51am
if those parts where changed then its ok, are you using the MS SQL or Access version?

it seems the queries are wrong, if using the MS SQL version you need to edit the stored procedures not the SQL you see there,
Back to Top
onceah View Drop Down
Newbie
Newbie


Joined: 11 November 2005
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote onceah Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2005 at 10:07am
I use MS SQL.  Could you please point me to what stored procedure should I update?  Are there different stored procedures for different pages or is there only one?
Thank you.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2005 at 10:23am
LastAndFirstThreadAuthor


is used on some you will have to be careful because some places do searchs on username so you will have to look though the SQL server setu p file and see what files reflect using username

im not sure how you are doing this but you could have issues
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.