I'm still trying to get the gamercards to load in a location other than postbit or user profile. I'm not a VB coder and barely get by with PHP so if anyone can help I'd be immensely grateful. You would think it would be as simple as just copying the profile block to another page somehow. I had hoped the developer would be willing to help but it's not looking good at the moment.
EDIT: Just in case anyone else is after this I finally figured it out after taking a crash refresher course in working with databases in PHP and including PHP in vb templates.
Create a plugin at global_start, execution order 5, with the following code:
PHP Code:
ob_start();
include_once('freeagent_steamcard.php');
$mycode = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('tmnt_freeagent',array('mycode' => $mycode));
Then edit the
tmnt_freeagent template and add
{vb:raw mycode} wherever you want it to show up.
Then create and upload
freeagent_steamcard.php to the same directory as your teams.php and other tournament files (usually the forum root) with the following code:
PHP Code:
<?php
$myfield = "field".$vbulletin->options['bc_gamercards_steamid'];
$id = $vbulletin->input->clean_gpc('g', 'id', TYPE_UINT);
$rowcount = 0;
$getuserid = $vbulletin->db->query_first("SELECT userid FROM " . TABLE_PREFIX . "tmnt_members WHERE id = '$id'");
if (!$getuserid[userid]){}
else{$getsteamid = $vbulletin->db->query_first("SELECT ".$myfield." FROM " . TABLE_PREFIX . "userfield WHERE userid = ".$getuserid[userid]);}
$steamid = $getsteamid[$myfield];
if (!$steamid){echo 'This user has not specified a Steam ID yet.';}
else{echo '<a target="_blank" href="http://steamcommunity.com/id/'.$steamid.'"><img width="203" border="0" alt="" src="http://steamcard.com/do/original/'.$steamid.'.png"></a>';}
?>
I'm not a good coder by any means but this gets the job done. If improvements can be made please let me know.