PDA

View Full Version : Location 'Undisclosed'.


Davey
02-12-2003, 01:36 AM
I couldn't find this within about 6 pages of the request forum.
Basically, I'm using a table in the postbit now, and the location field is sometimes left blank, which means the table is not complete.
I was wondering how to make the location as 'Undisclosed' by default.
Sorry if this has already been requested but I'm in a foul mood tonight and I didn't want to search further than 2 pages.

Dave.

mr e
02-12-2003, 01:52 AM
use phpMyAdmin to change the field's default to "Undisclosed"

Davey
02-12-2003, 01:56 AM
Which gives me an idea, I'll just add value="Undisclosed" in the registration templates and set the field to "must be completed" thanks mr e.

Dave.

Erwin
02-12-2003, 02:33 AM
Better yet, do this:

Open functions.php -

Find:


if ($post[avatarid]!=0) {
$avatarurl=$post[avatarpath];
} else {
if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
} else {
$avatarurl="";
}
}


Below add:


if ($post[field2]=="") {
$post[field2] = "Undisclosed";
}

Xenon
02-12-2003, 04:50 PM
i'd use this:
if (trim($post[field2])=="") {
$post[field2] = "Undisclosed";
}

Rose
02-12-2003, 05:09 PM
*lol @ the many different ways to do the same(ish) thing*

;)

Xenon
02-12-2003, 05:13 PM
it's not the same thing.

if a user has entered a space the string is " " and so there wouldn't be undisclosed....
with trim() it would show undisclosed

Erwin
02-13-2003, 04:27 AM
LOL! True, Stefan, very classy. :)

trim is better than (!$post[field2]) as well then. Still, for most users ! or "" would work.

Davey
02-13-2003, 07:26 PM
I used Xenon's since he had a good point about the leaving the field blank.
Thanks both of you :).
BTW@Rose I would suggest a new host for your banner because not only did it take about 3 minutes to load on ADSL (........), but it also didn't load - it was a red x.
That might lag 56k surfers (:().

Dave.

Rose
02-13-2003, 08:43 PM
Originally posted by Davey

BTW@Rose I would suggest a new host for your banner because not only did it take about 3 minutes to load on ADSL (........), but it also didn't load - it was a red x.
That might lag 56k surfers (:().

Dave.


Yeah, I'll update that - thanks! I am cancelling the host it's currently located on, and since I've alreadys witched the domain addy, it's not pointing right.