PDA

View Full Version : Unregistered's Numbering System


SneakyDave
13 Aug 2001, 11:10
PROBLEM:
I have a forum that unregistered users can post in. Although some choose to change their "guest" name to something other than "Unregistered", most don't, and on busy threads, confusion occurs.

SOLUTION:
In the newreply and newthread files, instead of assigning "Unregistered" to the username of posters who aren't signed in, use "Unregistered" plus a 4 digit random number. This new username doesn't need to be cookied to a user, its just to keep each post unique for reference.

I'm working on this myself, and I think its just required in newreply and newthread, but if someone already has something like this, please post it here.

Chen
13 Aug 2001, 11:36
Nice idea, and very simple to execute. :)

In sessions.php, under your admin folder, find


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Now. You have basically two options. One is to remove the Unregistered at all, so people will HAVE to enter a new username. If you want this, replace the above line with


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


and that's it.

If you still want to do the random number thing, you will need to replace


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


with


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

SneakyDave
13 Aug 2001, 13:41
Thanks, that will be useful, I think instead of random numbers, I'm going to give them a random pleasant name, the code kind of looks like the attached.

EDIT: Actually, I think I'm going to use the Captain Underpants names, which should give me over 17,000 possibilities. See attached for sample code.