MyBB Community Forums

Full Version: How can I create a default value for custom profile Fields?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here's some example of what im talking about [This is in the members profile]

[Image: s16bs3.gif]


Ok I So I make a custom profile field and set it to only allow admin/mods/ Edit it but users cannot. Ok done.

But then i need it show that "Not Rated" Thing.

Then when once we edit it

IT shows:

[Image: 2lj3rc6.gif]

And how to show this in the Postbit display too, I know how to call the function out but I Just dont know how to call a Default function.[example "Not Rated"]



So yea is this a mod request a support? LoL I dont really know so I posted here!

Hope u can get me some help on how to achieve this! nickman helps me and dennis and tikituku and zingiabumira they all help alot <3 em @@
In inc/functions_post.php, find:
eval("\$post['user_details'] = \"".$templates->get("postbit_author_user")."\";");
Before that, add:
if(!$post['fidX'])
{
  $post['fidX'] = 'Not Rated';
}
Replace X with the field ID.
Ok i've done that dennis but it doesnt seem to show up Sad
s/s's availibity!!


[Image: 2h3xzk3.gif]





[Image: 2jziwj.gif]

Hmmm?


Then..

[Image: eznx1h.gif]


Is this only availiby for postbit display if not? can u tell me how for profile display or is that the problem? lol im confused


DENIISS!! I GOT IT WORK ON THE POSTBIT BUT Yea i need it on profile!!!

u could tell me real quiick right man? THANKS SO Much! <3
In member.php, find:
if($customfield['type'] == "textarea")
Add before:
			if($customfield['fid'] == X && !$userfields[$field])
			{
				$userfields[$field] = 'Not Rated';
			}
(replace X with the appropriate number)
WoW omg how do u guys learn all this stuff.. god bless u to the max im so gratefull for your help.. :-)

WOW. I LOVE MYBBB Now and im sticking with this 100% until i die.
(2008-03-10, 10:59 PM)Yumi Wrote: [ -> ]In member.php, find:
if($customfield['type'] == "textarea")
Add before:
			if($customfield['fid'] == X && !$userfields[$field])
			{
				$userfields[$field] = 'Not Rated';
			}
(replace X with the appropriate number)

How would I do this for a radio button so that a default value is always marked?