Steam Community MyCode
#1
Question 
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!
Reply
#2
http://mods.mybb.com/view/profile-steam Smile
Reply
#3
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:
   

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.
Reply
#4
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.
Reply
#5
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.
Reply
#6
(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
Reply
#7
If you uploaded the plugin I suggested and you PM me your ACP login, I can do it for you if you wish.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)