MyBB Community Forums

Full Version: Change profile fields behaviour / add new behaviour to custom profile fields ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
1 question: How can I add behaviour to custom profile fields ?

Thx for anyone pointing me in the right direction.

---------------
To clarify

- I have some custom profile fields a user can fill in, example : a game login.
- I would like to have the following : When a user profile is viewed and the game login exists, it should be displayed with a behaviour attached to it, for example something like <a href="tmtp://#addbuddy={login}">Click to add user as ingame buddy</href>.
This function would start the game (by protocol) and add the {login} as an ingame buddy.
1. To change them, go to the member_profile template and play around with the following code:
<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>
To delete them, simply remove that code from the template.

2. It depends what you want to change exactly.
3. See above.
I want to click a custom profile field and execute for example a particular javascript (different scripts for different profile fields)
Mhm noone?
Anyone..Bueller ???

Like..really?
Is there noone willing to give some insightful answer ? Seems the mybb forum has changed a lot over the times.
:ß still noone ?
You didn't give much details, that's why you haven't solved the question yet. How do you expect us to guess what you want to do?

Please elaborate your idea.
Oh ok, I thought I had made it clear... I updated the 1st post, thx for telling me.
I understand what you're trying to do now, but this isn't easy. You'd have to create a plugin and deal with the game's API to check if the account exists. You should hire a developer to do this for you.
Oh the game is not the problem, I've already taken care of that. The only thing I need is adding desired behaviour to mybb's profile fields.
As I already said, you should hire a developer. This would require a bit of PHP programming and it's not very simple to explain it to you in just a few steps...
Pages: 1 2