KuraFire
02-03-2002, 01:43 PM
Note: I'm posting this on vb.org and on vb.com because I have no idea if this can be fixed by some template work only, or if it needs some hacking to fix it.
Okay, I'll explain the entire situation first:
My board (www.kurafire.com) has a lot of user status titles. Because there are so many of 'm, I made a special User Profile Field "CT" that people could use as custom title field. Since it had glow-tags (many of my members want glowing CT's) I previously didn't let the field be editable by the user, because it would mess up the layout on the Edit Profile field (the table that is needed to make a glow would f*ck it up, if you already have a glow. If not, then it was no problem of course).
Now, because it was rather annoying (for me, for my users) that only I (and my co-admin) could modify people's CT's, I tried looking at how to fix this. What I did was remove the existing input out of the Input field's value (i.e. it said <input type=... value="$bbuserinfo['profilefield']" and I made that value="") and place it above the input field, saying "Current: $bbuserinfo['profilefield']" and then have the input field below that.
Now, it worked wonders for the CT field, for that wouldn't f*ck up the layout anymore. What I failed to realize, however, was that the Submit function only submits the info that is in the fields, and when you would change your CT now on my board, you would have to cut-and-paste all the other profile fields (I have about 14) as well, otherwise they would get lost.
Now, my question is: how can I change that submit function on the Edit Profile page, so that it only changes a value in the database - if one already exists - when something is put into the Input Field? And that, if NOTHING is put into the input field, the Submit function will leave the data alone.
Of course, this would prevent people from ever removing their info (they can replace it with a . or a - of course) so it might be wise to add a checkbox below it with the function "Empty field in DB" or something like that.
Please help!! I really don't want to go back to the point where my users can't change their CT's themselves.. :(
Okay, I'll explain the entire situation first:
My board (www.kurafire.com) has a lot of user status titles. Because there are so many of 'm, I made a special User Profile Field "CT" that people could use as custom title field. Since it had glow-tags (many of my members want glowing CT's) I previously didn't let the field be editable by the user, because it would mess up the layout on the Edit Profile field (the table that is needed to make a glow would f*ck it up, if you already have a glow. If not, then it was no problem of course).
Now, because it was rather annoying (for me, for my users) that only I (and my co-admin) could modify people's CT's, I tried looking at how to fix this. What I did was remove the existing input out of the Input field's value (i.e. it said <input type=... value="$bbuserinfo['profilefield']" and I made that value="") and place it above the input field, saying "Current: $bbuserinfo['profilefield']" and then have the input field below that.
Now, it worked wonders for the CT field, for that wouldn't f*ck up the layout anymore. What I failed to realize, however, was that the Submit function only submits the info that is in the fields, and when you would change your CT now on my board, you would have to cut-and-paste all the other profile fields (I have about 14) as well, otherwise they would get lost.
Now, my question is: how can I change that submit function on the Edit Profile page, so that it only changes a value in the database - if one already exists - when something is put into the Input Field? And that, if NOTHING is put into the input field, the Submit function will leave the data alone.
Of course, this would prevent people from ever removing their info (they can replace it with a . or a - of course) so it might be wise to add a checkbox below it with the function "Empty field in DB" or something like that.
Please help!! I really don't want to go back to the point where my users can't change their CT's themselves.. :(