MyBB Community Forums

Full Version: Steam Community MyCode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any existing Steam Community MyCode's available? I want to give users an area in which they can put their http://steamcommunity.com/id link and have a small steam icon appear in the postbit that can be clicked to take them to their steam community page.

Thanks!
In case it doesn't work, you can also use a Custom Profile Field (not a MyCode).
ACP > Configuration > Custom Profile Field. Add a new one, for example:
[attachment=22990]

The user can fill it in during registration or via UserCP > Edit Profile.

To show it in the postbit, you could use it together with this plugin: http://mybbhacks.zingaburga.com/showthread.php?tid=260

And put this in the 'postbit_author_user' template:
<if $post['fidX'] != '' then>
<a href="https://steamcommunity.com/<func htmlspecialchars_uni>{$post['fidX']}</func>"><img src="images/steam.gif" alt="Steam ID" /></a>
</if>

Where the X is the ID of the Custom Profile Field.
Ah crap sorry guys, for some reason I thought this should be a MyCode request. What was I thinking?! Anyways, I managed to do this via the Custom Profile Field method but need a way for it to only appear in the postbit when the user has filled out the information. Currently it defaults to showing the default link on everyone's postbit if that makes sense lol.
You can use the "PHP in Templates" plugin for this, as I described in the post above:

(2011-06-04, 05:05 PM)Aries-Belgium Wrote: [ -> ]To show it in the postbit, you could use it together with this plugin: http://mybbhacks.zingaburga.com/showthread.php?tid=260

And put this in the 'postbit_author_user' template:
<if $post['fidX'] != '' then>
<a href="https://steamcommunity.com/<func htmlspecialchars_uni>{$post['fidX']}</func>"><img src="images/steam.gif" alt="Steam ID" /></a>
</if>

Where the X is the ID of the Custom Profile Field.
(2011-06-04, 07:50 PM)Aries-Belgium Wrote: [ -> ]You can use the "PHP in Templates" plugin for this, as I described in the post above:

(2011-06-04, 05:05 PM)Aries-Belgium Wrote: [ -> ]To show it in the postbit, you could use it together with this plugin: http://mybbhacks.zingaburga.com/showthread.php?tid=260

And put this in the 'postbit_author_user' template:
<if $post['fidX'] != '' then>
<a href="https://steamcommunity.com/<func htmlspecialchars_uni>{$post['fidX']}</func>"><img src="images/steam.gif" alt="Steam ID" /></a>
</if>

Where the X is the ID of the Custom Profile Field.

Ah thanks, though that's a little over my head really heh. We can just deal with it the way it is, it's not that bad I guess Smile
If you uploaded the plugin I suggested and you PM me your ACP login, I can do it for you if you wish.