Print Page | Close Window

Unique name as "guest"?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9940
Printed Date: 29 March 2026 at 4:22am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Unique name as "guest"?
Posted By: i2Paq
Subject: Unique name as "guest"?
Date Posted: 10 April 2004 at 10:20am

Did a large search but no answer to be found on this 1 question...

"When people register they have to choose a unique name otherwise they cannot register. But when a Guest wants to make a post he can choose a name that is already registered..  very confusing!"

What can I do to prefend this?

Thanks.

 

Ps. Great job on reopening this supportforum!!




Replies:
Posted By: michael
Date Posted: 10 April 2004 at 10:26am
You could manually set a prefix to Guest names like
...= "anon:" & strGuesName
or something like that. It is indeed a problem but there is not too much you can do if you allow guest posting. Maybe it has been changed somehow in a newer release???

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: i2Paq
Date Posted: 10 April 2004 at 11:17am

Originally posted by michael michael wrote:

You could manually set a prefix to Guest names like
...= "anon:" & strGuesName
or something like that. It is indeed a problem but there is not too much you can do if you allow guest posting. Maybe it has been changed somehow in a newer release???

Hello Michael,

Thanks for the reply. I asked TheKiwi on his site the same question and he came up with this;

"OK Doesnt look too hard to implement.

  • You need to edit post_message.asp
  • At about line 306 there is the text
    Code:

    'If the user is in a guest then clean up their username to remove malicious code
    If lngLoggedInUserID = 2 Then
        strGuestName = formatSQLInput(strGuestName)
        strGuestName = formatInput(strGuestName)
    End If
  • Basically in this block you need to call a function which does a check for a used username
  • If you find a name exists, then do something like strReturnCode="UNameE"
  • THen in the file not_posted.asp, at approx Line 100, you need to add in
    Code:

    ElseIf strErrorCode = "UNameE" Then
        Response.Write("That Username already exists in the database")
    "

You should know that I'm no way an ASP writer nor programmer. I can edit it a little. These kind of things someone has to build for me

The forum I'm moderating is an 18+ forum and we do allow anonymous posting in one section of this forum. The problem is that you can choose a name which is already registered by someone else  and that's sometimes confusing....

So,  Help!




Posted By: michael
Date Posted: 10 April 2004 at 12:22pm

I realize the problem you run into with that but if you have a large forum, common usernames may be gone already and how often do you want to prompt a user that the name is gone when just doing a post?

I would consider a different solution where it is easily identifiable that it is a guest post even if the name is one of a registered user.



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: i2Paq
Date Posted: 10 April 2004 at 12:44pm
The forum is not that large (yet ) but the problem is that you can post as a guest and the name can be of a registered user. You can tell by the forum statistics that the last post is by "Guests" but when you go to the topic where he/she posted the name can say "Admin", underneeth you can see that it's a guest, also when the avatar is missing, but still. Can I open a topic somewhere else on this forum to ask this question en see if someone already came up with a solution (and where can I open this topic)?


Posted By: Scotty32
Date Posted: 10 April 2004 at 2:10pm

could use the code above that inserts the perfix and have

for example "username_Guest"



-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: i2Paq
Date Posted: 12 April 2004 at 11:17am
Originally posted by Scotty_32 Scotty_32 wrote:

could use the code above that inserts the perfix and have

for example "username_Guest"

I do need some help with this because I'm no programmer or ASP writer. If someone could come up with a working code it would be very appriciated



Posted By: i2Paq
Date Posted: 21 April 2004 at 6:38am

Is there realy nobody who is able to help me on this?

The problem is that there's no other place or forum to put this question and I think the solution could help many now and in the future.



Posted By: Scotty32
Date Posted: 21 April 2004 at 6:48am

try line 622 (or near it, it may be an old copy i looked at)

and look for this line

If NOT rsTopic.EOF Then strUsername = rsTopic("Name")

just add to the end like this:

If NOT rsTopic.EOF Then strUsername = rsTopic("Name") & "_Guest"

and this SHOULD put guests posts so its username_Guest

if this doesnt work, post back and i'll have a proper look when i can



-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: i2Paq
Date Posted: 21 April 2004 at 10:53am
Originally posted by Scotty_32 Scotty_32 wrote:

try line 622 (or near it, it may be an old copy i looked at)

and look for this line

If NOT rsTopic.EOF Then strUsername = rsTopic("Name")

just add to the end like this:

If NOT rsTopic.EOF Then strUsername = rsTopic("Name") & "_Guest"

and this SHOULD put guests posts so its username_Guest

if this doesnt work, post back and i'll have a proper look when i can

In witch ASP file do I look, it's not in the post_message.asp.



Posted By: Scotty32
Date Posted: 21 April 2004 at 2:50pm

my bad, am sorry i completely forgot

its the "forum_posts.asp" file in the main folder



-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: i2Paq
Date Posted: 21 April 2004 at 4:45pm
Originally posted by Scotty_32 Scotty_32 wrote:

my bad, am sorry i completely forgot

its the "forum_posts.asp" file in the main folder

Works for me!

Great job!



Posted By: i2Paq
Date Posted: 23 April 2004 at 10:23am

 

It would be great if in the future a mod would be made so that there's a check on the uniquenes of the names used by a guest.



Posted By: Scotty32
Date Posted: 23 April 2004 at 1:43pm

i dont think stopping guests using usernames is good

becose on my site i only allow guest posting in 1 forum so they can get help if they cant log in or have any problems

so the "_Guest" i think would be best

and you can see there a "guest" user anyway so it doesnt really matter in my opinion



-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: i2Paq
Date Posted: 25 April 2004 at 3:57am

You're right!

And because they all get, in my Dutch forum, "-Gast" they do not have a unique name. To get that the need to register  . We will leave it like it is now




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net