Quote:
Originally Posted by goarack
how do you put the mini profile in a forum block
thanks
|
I'm also working on including this in a separate location. I'm trying to add this to the profile page under the avatar. I've included the below code to the memberinfo_block_ministats template:
HTML Code:
<vb:if condition="$post['steamid']"><div class="steamprofile" title="{vb:raw post.steamid}"></div></vb:if>
It seems to be working but gets a 'No Profile ID assigned' error (after removing the if statement for testing).
I made a new plugin at member_start with the following code:
Code:
global $vbulletin;
include_once(DIR . '/includes/functions_steamconnect.php');
$steam_info = fetch_steam_info(get_user_steamid($userinfo), $vbulletin->options['stc_apikey']);
echo "$steam_info[steamid]";
This echoes the steamid to the top of the page so I know it's working so far. I'm still learning PHP and Javascript and I'd appreciate any help getting the rest of this figured out. I guess all that's left is I just need to know how to set the ProfileID variable with the steam id. I assume it's something as simple as the below bit but I just need to know what the variable is:
Code:
global $vbulletin;
include_once(DIR . '/includes/functions_steamconnect.php');
$steam_info = fetch_steam_info(get_user_steamid($userinfo), $vbulletin->options['stc_apikey']);
$ProfileID = $steam_info[steamid];
If this is wrong please let me know. I imagine this same code (once working) would work anywhere, even for the forum blocks, you just need to set the proper plugin hook.