MyBB Community Forums

Full Version: Add a Contact Info field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I wanted to add a field called skype below MSN. I ran this query in PHPMyAdmin
ALTER TABLE mybb_users ADD skype TEXT NOT NULL AFTER msn

I then edited the usercp_profile template to include this after the msn input.
<tr><td><span class="smalltext">Skype Name:</span></td><tr><td><input type="text" class="textbox" name="skype" size="25" value="{$user['skype']}" /></td></tr>

I then edited the member_profile template to have this after the MSN part
<tr><td><span class="smalltext">Skype Name:</span></td><tr><td><input type="text" class="textbox" name="skype" size="25" value="{$user['skype']}" /></td></tr>

I tried going to User CP and edit my Skype name but it didn't perform the update in PHPMyAdmin for some reason. What am I forgetting to do?

Forum
Just make a custom profile field, its much simplier.
(2011-02-26, 05:55 PM)Aristotle Wrote: [ -> ]Just make a custom profile field, its much simplier.

Is there any way to move the custom profile field from Additional Info to Contact Info?
You can put it anywhere you want in the member_profile template using:
{$memprofile['fidX']}

Where X is the actual custom field ID.
(2011-02-26, 06:24 PM)AJS Wrote: [ -> ]You can put it anywhere you want in the member_profile template using:
{$memprofile['fidX']}

Where X is the actual custom field ID.

I did that but it's still showing it under Additional Contact Info.
You'll have to remove {$profilefields} from the member_profile template and set up all the fields you want to show manually.
(2011-02-26, 06:31 PM)AJS Wrote: [ -> ]You'll have to remove {$profilefields} from the member_profile template and set up all the fields you want to show manually.

Could you give me a template for showing the fields there please?
I got it to show correctly. Here's what mine ended up looking like:
<html><head><title>{$mybb->settings['bbname']} - {$lang->profile}</title>{$headerinclude}</head><body>{$header}<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder"><tr><td class="trow1"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td class="trow1" width="75%"><span class="largetext"><strong>{$formattedname}</strong></span><br /><span class="smalltext">({$usertitle})<br />{$groupimage}{$userstars}<br /><br /><strong>{$lang->registration_date}</strong> {$memregdate}<br /><strong>{$lang->date_of_birth}</strong> {$membday} {$membdayage}<br /><strong>{$lang->local_time}</strong> {$localtime}<br /><strong>{$lang->postbit_status}</strong> {$online_status}</span></td><td width="25%" align="right" valign="middle">{$avatar}</td></tr></table></td></tr>{$awaybit}</table><br /><table width="100%" cellspacing="0" cellpadding="0" border="0" align="center"><tr><td width="50%" valign="top"><table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder"><tr><td colspan="2" class="thead"><strong>{$lang->users_forum_info}</strong></td></tr><tr><td class="trow1"><strong>{$lang->joined}</strong></td><td class="trow1">{$memregdate}</td></tr><tr><td class="trow2"><strong>{$lang->lastvisit}</strong></td><td class="trow2">{$memlastvisitdate} {$memlastvisittime}</td></tr><tr><td class="trow1"><strong>{$lang->total_posts}</strong></td><td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total})<br /><span class="smalltext">(<a href="search.php?action=finduserthreads&amp;uid={$uid}">{$lang->find_threads}</a> &mdash; <a href="search.php?action=finduser&amp;uid={$uid}">{$lang->find_posts}</a>)</span></td></tr><tr><td class="trow1"><strong>Blog Posts:</strong></td><td class="trow1">{$memprofile['blogposts']}</td></tr><tr><td class="trow1"><strong>Social Group Posts:</strong></td><td class="trow1">{$memprofile['socialgroupposts']}</td></tr><tr><td class="trow2"><strong>{$lang->timeonline}</strong></td><td class="trow2">{$timeonline}</td></tr>{$referrals}{$reputation}{$warning_level}</table><br /><table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder"><tr><td colspan="2" class="thead"><strong>{$lang->users_contact_details}</strong></td></tr><tr><td class="trow1"><strong>{$lang->homepage}</strong></td><td class="trow1">{$website}</td></tr>{$sendemail}<tr><td class="{$bgcolors['pm']}"><strong>{$lang->pm}</strong></td><td class="{$bgcolors['pm']}"><a href="private.php?action=send&amp;uid={$memprofile['uid']}">{$lang->send_pm}</a></td></tr><tr><td class="{$bgcolors['icq']}"><strong>{$lang->icq_number}</strong></td><td class="{$bgcolors['icq']}">{$memprofile['icq']}</td></tr><tr><td class="{$bgcolors['aim']}"><strong>{$lang->aim_screenname}</strong></td><td class="{$bgcolors['aim']}"><a href="javascript:;" onclick="MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=aim&amp;uid={$uid}', 'imcenter', 450, 300);">{$memprofile['aim']}</a></td></tr><tr><td class="{$bgcolors['yahoo']}"><strong>{$lang->yahoo_id}</strong></td><td class="{$bgcolors['yahoo']}"><a href="javascript:;" onclick="MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=yahoo&amp;uid={$uid}', 'imcenter', 450, 300);">{$memprofile['yahoo']}</a></td></tr><tr><td class="{$bgcolors['msn']}"><strong>{$lang->msn}</strong></td><td class="{$bgcolors['msn']}"><a href="javascript:;" onclick="MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=msn&amp;uid={$uid}', 'imcenter', 450, 300);">{$memprofile['msn']}</a></td></tr><tr><td class="{$bgcolors['msn']}"><strong>Skype Name:</strong></td><td class="{$bgcolors['msn']}">{$memprofile['fid8']}</td></tr></table></td><td><img src="{$theme['imgdir']}/pixel.gif" height="1" width="8" alt=""/></td><td width="50%" valign="top"><table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder"><tr><td colspan="2" class="thead"><strong>{$lang->users_additional_info}</strong></td></tr><tr><td class="trow1"">Gender:</td><td class="trow1">{$memprofile['fid2']}</td></tr><tr><td class="trow2">Location:</td><td class="trow2">{$memprofile['fid1']}</td></tr><tr><td class="trow1">Favorite Pokemon:</td><td class="trow1">{$memprofile['fid4']}</td></tr><tr><td class="trow2">Special Service:</td><td class="trow2">{$memprofile['fid6']}</td></tr><tr><td class="trow1">Points:</td><td class="trow1">{$memprofile['fid7']}</td></tr><tr><td class="trow2">Bio:</td><td class="trow2">{$memprofile['fid2']}</td></tr></table>{$signature}{$modoptions}<!-- ProfileComments -->{$comments_index}<!-- /ProfileComments -->{$adminoptions}{$buddy_options}</td></tr></table>{$footer}</body></html>

Note that if you don't have Profile Comments installed, just remove that part from the template.

Edit: For some reason that ends up killing any spaces where a person presses enter. It also only is letting you view what should be displayed in your own profile. If I look at someone else's profile, I can see where it would say Gender, but if I'm not viewing my profile, the next cell is blank. Thoughts on why?
Can anyone give me the correct code to use?
(2011-02-26, 09:03 PM)GE1 Wrote: [ -> ]Can anyone give me the correct code to use?

What are you having a problem with? It's best to learn yourself and ask for help when you get stuck.
Pages: 1 2