MyBB Community Forums

Full Version: making a custom field useful (er)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so i added a custom profile field, now how would I put it in the author info?
example
Wii Friendcode:
1111111111111111
Location: bleh
You need to edit the postbit templates
To add custom profile fields to the postbit(assuming that's what you meant), you need to add {$post['fidx']} to the template. Just keep in mind that you need to change x to the field's id.

Also, be aware that all HTML will be parsed by the browser and you are advised to escape it. See the following post on how to do that:
http://community.mybboard.net/showthread...1#pid91901
thanks, that helped.  I was trying to just put the field name in the $post.  that just didn't do anything.
would it be possible to make the field a link to pm the user and it had the field in the pm already
say for friendcodes, the friend code is a link to pm the user (doable)but in the pm it has a subject and message already. the message has the sender's friend code.
private.php?action=send&uid={$post['uid']}&subject=Test&message=Wow!

With code modification in private.php:
Find:
	$posticons = get_post_icons();
	$previewmessage = $mybb->input['message'];
	$message = htmlspecialchars_uni($mybb->input['message']);
Add after
$subject = htmlspecialchars_uni($mybb->input['subject']);

Untested code