My aim is simple: to get xfire working in profiles. Xfire is Instant Messenger for gamers, has a cool and widely supported in-game overlay (like steam has, but better).
It's quite simple. But I haven't got the hang on hooks. I need a walkthrough, using hooks.
Modifiying directly the code, i was able to get it working. First one needs to add a new field into users table, let's examples from msn. Make the field exactly like msn's, just that the name is xfire. (i used phpmyadmin, due to novice sql skills, so it should be in install script, if one doesn't exist.)
in profile.php, it's also almost the copy of msn's, has one language variable.
Line 868:
$form = extract_elements(array('realname', 'url', 'location', 'jabber', 'icq', 'msn', 'aim', 'yahoo','xfire'));
so this array needs xfire.
below lines 1344-1345 are exact copies of msn (which are the named lines), with difference that they are named to xfire.
the same applies to lines 1555-1556
At the form (which is somewhere at the beginning of #1800 lines), there should be the input sizes size="20" maxlength="30" so it looks small, like aim and yahoo.
i thought the xfire username should be linked as http://www.xfire.com/profile/USERNAME and after that there is a link, which links as a friend. So we take advantage of xfire's own url protocol (xfire:add_friend?user=USERNAME). so, let's say it looks like this:
Xfire: username (Add as a friend)
unfortunately in this example the xfire's own protocol is being parsed differently by forum right now. The word Xfire doesn't require language string, because it's a name. Add as a friend phrase might need one.
In topics, below posts count (at poster's info). There's a simple Xfire: username
So people will see it.
and please, let's don't add uninstallation script (aka removal of the field in sql).