Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Wierd thing with quotes, advice please
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Wierd thing with quotes, advice please

 Post Reply Post Reply
Author
mikebj View Drop Down
Newbie
Newbie


Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikebj Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2004 at 12:36pm
its not the space.. its the [ and ]
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2004 at 12:40pm
New versions won't allow things like [ or ] in usernames to prevent this type of thing.
Back to Top
mikebj View Drop Down
Newbie
Newbie


Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikebj Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
mikebj View Drop Down
Newbie
Newbie


Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikebj Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2004 at 3:34pm

If I understand this correctly, this will change the username AND the
password right?

cheers

Mike

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2004 at 3:37pm
no.. usercode
Back to Top
mikebj View Drop Down
Newbie
Newbie


Joined: 29 January 2004
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikebj Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2004 at 4:34pm

Simen,

Thank you for your help, I understand now (looked at the database).

Cheers

Mike

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.