View Full Version : How to make a custom postbit field display 0 instead of nothing?
Gutspiller
01-13-2003, 06:13 PM
I created a simple field in peoples profiles that are called cookies. They are points like many other forums have. If I don't give people "cookies" personally by going into the field and giving them 1 or however many, the field is just blank.
How do I make it so that the fields default value is 0 instead of nothing? Is this possible? :nervous:
Dean C
01-13-2003, 06:27 PM
Hmmmm go into phpmyadmin and edit the filed maybe?
Gutspiller
01-13-2003, 10:05 PM
Originally posted by Mist
Hmmmm go into phpmyadmin and edit the filed maybe? If I knew what phpmyadmin was maybe I could do that. :rolleyes:
How do I find the field, etc. and what do I change it to?
Dean C
01-14-2003, 03:31 PM
I've helped someone do this before but i just can't remember :)
Xenon will see this sooner or later and help you out so don't worry :)
- miSt
Gutspiller
01-15-2003, 11:14 PM
bump. Calling Xenon! Calling all Xenon!!!
Mist if you happen to remember and if Xenon doesn't show up shortly, I would appreciate any help you can provide. :)
Erwin
01-16-2003, 04:23 AM
In your admin/functions.php file, find:
$post[joindate]=vbdate($registereddateformat,$post[joindate]);
Underneath, ADD:
if (!$post[fieldx]) {
$post[fieldx] = "0";
}
Replace x with the custom profile field ID number for the cookies variable in the 2 places in the code.
Gutspiller
01-16-2003, 11:10 PM
Thank you Sir.
Dean C
01-17-2003, 03:17 PM
Ahh that's it :)
- miSt
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.