| Author |
Topic Search Topic Options
|
mikebj
Newbie
Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Topic: Wierd thing with quotes, advice please Posted: 29 January 2004 at 12:32pm |
Hi Support,
If a person post a reply wit a quote, and the name on that quote is like [aaa] Frank, then it truncate it like this in the quote, [aaa wrote
and then the quote text starts with ] Frank.
I understand that it's because it does not like the space, but how do I repair it to do so, i.e check for start and end of name.
Any help would be greatly appreciated
Cheers
Mike
|
 |
Semikolon
Senior Member
Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
|
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2004 at 12:36pm |
|
its not the space.. its the [ and ]
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2004 at 12:40pm |
|
New versions won't allow things like [ or ] in usernames to prevent this type of thing.
|
|
|
 |
mikebj
Newbie
Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2004 at 1:37pm |
Thank you for your quick response, I understand what you are saying.
Now how do I go about changing the names without deleating the users and re create them again.
I don't want them to loose connection to their posts, I've tried to install Maddogs change Usernames in admin mode, but when you try to logon using the new username, it say error in username or password, so I uninstalled that again, any other way.
Btw. using wwf 7.7
Cheers
Mike
|
 |
Semikolon
Senior Member
Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
|
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2004 at 1:47pm |
run this script one time for each username if you use sql server
<% Dim adoCon Dim strSQL Dim rsCommon
Const strDbTable = "tbl"
Const strSQLServerName = "dataenmin" Const strSQLDBUserName = "sa" Const strSQLDBPassword = "sapw" Const strSQLDBName = "WebWizForums"
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "Provider=SQLOLEDB;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";"
Set rsCommon = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT Username, User_code FROM " & strDbTable & "Author WHERE Username = 'Old username';"
rsCommon.CursorType = 2
rsCommon.LockType = 3
rsCommon.Open strSQL, adoCon
rsCommon.Fields("Username") = "New Username" rsCommon.Fields("User_code") = "New Usercode"
rsCommon.Update
rsCommon.Close Set rsCommon = Nothing Set adoCon = Nothing
Response.Write("Username Updated!") %> |
and this if you use access
]<% Dim adoCon Dim strSQL Dim rsCommon
Const strDbTable = "tbl"
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDbPathAndName
Set rsCommon = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT Username, User_code FROM " & strDbTable & "Author WHERE Username = 'Old username';"
rsCommon.CursorType = 2
rsCommon.LockType = 3
rsCommon.Open strSQL, adoCon
rsCommon.Fields("Username") = "New Username" rsCommon.Fields("User_code") = "New Usercode"
rsCommon.Update
rsCommon.Close Set rsCommon = Nothing Set adoCon = Nothing
Response.Write("Username Updated!") %> |
change the things in red
|
 |
mikebj
Newbie
Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2004 at 3:34pm |
If I understand this correctly, this will change the username AND the password right?
cheers
Mike
|
 |
Semikolon
Senior Member
Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
|
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2004 at 3:37pm |
|
no.. usercode
|
 |
mikebj
Newbie
Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2004 at 4:34pm |
Simen,
Thank you for your help, I understand now (looked at the database).
Cheers
Mike
|
 |