I'm trying to add a Steam block to the free agent page. I have a profile field for the Steam community id. I have a plugin started to output the profile field but it requires the free agent's userid. I see in the tmnt_freeagent template that there is $agent['userid']. Does anyone know how to use this in a plugin to load the agentid? Here's the rough code I have worked up but I don't know if any of it is correct. Any pointers would be appreciated.
PHP Code:
// get agent userid
$userinfo = fetch_userinfo($agent['userid']);
// get profile field
$steamid_card = $userinfo['field11'];
vB_Template::PreRegister('tmnt_freeagent',array('steamid_card' => $steamid_card));
The idea is to use this code on the free agent page to show a Steam block:
HTML Code:
<a target="_blank" href="http://steamcommunity.com/id/{vb:raw steamid_card}"><img width="203" border="0" alt="" src="http://steamcard.com/do/original/{vb:raw steamid_card}.png"></a>
I've had it working with the currently logged in user's userid but I need it to work with the free agent's userid.