View Full Version : Profile Enhancements - XBL Gamerscore in Postbit
ChU v2
09-05-2007, 10:00 PM
Here is a little add on I did for my forum in the postbit_legacy template. This is the first time I'm posting really anything valuable on vb.org so here.
Step 1: Add Profile Field
Admin CP > User Profile Fields > Add new profile field
Title: XBL Gamertag
Description: Enter your XBL Gamertag.
Max length of allowed user input: 15
Field editable by user: Yes
Private Field: No
Every other option is up to you.
Step 2: Edit postbit/postbit_legacy template
Add this wherever you would like the image to show up in the postbit_legacy.
<fieldset><legend>XBL Gamertag</legend>
<div>
<center>
<iframe src="http://gamercard.xbox.com/$post[fieldXX].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
</center>
</div>
</fieldset>
Note: Edit the XX to the field number that you just made.
There you go, looks good on my forum, it's a little big, but I haven't been able to adjust the size because it cuts off the image.
Also, if you don't like the image displayed maybe this mod by EyeCrave will be more to your liking:
https://vborg.vbsupport.ru/showthread.php?t=137850
ShOcKz
09-06-2007, 09:55 AM
Thanks CHU!!
ninjamaster
09-07-2007, 08:20 AM
thanks this a good hack cheers :)
ChU v2
09-07-2007, 04:05 PM
Thanks for the feedback!
dreads
09-17-2007, 08:37 PM
Very Nice :D
going to add it to my forum very soon
XFSImperial
10-02-2007, 03:20 AM
Very good mod. I'm running it on Halo Nation.
atlambros83
11-03-2007, 09:45 PM
this isn't working for me. I believe i've followed the directions correctly but it isn't showing up when I try to view my forums. trying to run it on www.optikal-illuzionz.com/forums
I found that the Xbox.com gamercard is a little large for my forum and used this code instead.
<!--Start XBL Gamercard-->
<fieldset><legend>XBL Gamercard</legend>
<div>
<center>
<a href="http://live.xbox.com/profile/profile.aspx?GamerTag=$post[fieldXX]" target="_blank">
<img src="http://card.mygamercard.net/mini/$post[fieldXX].png" border=0>
</a>
</center>
</div>
</fieldset>
<!--End XBL Gamercard-->
It uses the gamercard from mygamercard.net and fits much better for me.
-----------------------------------------------------------------
@atlambros83
It's because you are using the regular postbit which is the horizontal one your running. You will need to edit the postbit template not the postbit_legacy like the instructions say.
Wolf_Hook
11-04-2007, 02:37 PM
Very good, I like it. Only thing is it leaves an empty space in the postbit for people that don't have a gamertag.
atlambros83
11-04-2007, 05:22 PM
thank you Lag, one question about your code. do the users have to be signed up with mygamercard.net for their gamercards to show on their profile or will it just display their gamercards no matter what?
ChU v2
11-04-2007, 05:27 PM
thank you Lag, one question about your code. do the users have to be signed up with mygamercard.net for their gamercards to show on their profile or will it just display their gamercards no matter what?
Try it for yourself,
Use:
http://card.mygamercard.net/mini/GAMERTAG.png
Try a gamertag that isn't in there database. I don't believe you have to be signed up.
atlambros83
11-04-2007, 07:46 PM
nevermind, yeah, you must be signed up with gamercard.net
atlambros83
11-04-2007, 07:47 PM
yeah you do have to have an account with gamercard.net
thanks chu
AK47 Nemesis
11-04-2007, 09:03 PM
That's incorrect, you don't need an account for mygamercard.net. Just tried some gamertags, works perfectly. I've got a mouse-over gamercard in my forum, that will make sure it's not too large. It'll pop up when you hover over a tag.
atlambros83
11-05-2007, 12:08 PM
you are right ak, sorry
atlambros83
11-05-2007, 12:10 PM
does anyone know how to make this so that if a user does not post their gamertag in their profile it will not show the box?
ChU v2
11-11-2007, 11:40 PM
does anyone know how to make this so that if a user does not post their gamertag in their profile it will not show the box?
You would need to add an <if> statement like this:
<if condition="$post[fieldXX]">
<fieldset><legend>XBL Gamertag</legend>
<div>
<center>
<iframe src="http://gamercard.xbox.com/$post[fieldXX].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
</center>
</div>
</fieldset>
</if>
That should work.
NoRem0rse
11-13-2007, 05:33 PM
Thanks CHU works great, just installed it now
ChU v2
11-13-2007, 11:38 PM
Thanks CHU works great, just installed it now
Your welcome, please mark as installed.
Jerlene
12-13-2007, 07:55 AM
Is there a way to make this show up only in certain forums within my site?
ChU v2
12-15-2007, 06:04 AM
Is there a way to make this show up only in certain forums within my site?
Try:
<if condition="$bbuserinfo['forumid'] == XX">
XBL GAMERSCORE CODE
</if>
That might work, for multiple forums I think you would have to use an array. Which I'm not exactly sure how to code.
gdavis480
01-06-2008, 01:58 AM
Hi I added this mod to my site but only admins can display there gamertag in the forum. How do I get it to where all members can display there's?
ChU v2
01-10-2008, 07:03 AM
Hi I added this mod to my site but only admins can display there gamertag in the forum. How do I get it to where all members can display there's?
All users should be able to add there gamertag via there profile. If you've followed the directions in setting up the profile field correctly you should have no problems.
playworks
01-31-2008, 06:37 AM
great code CHU, it works fine at my forum. if you ever find a way to resize the box or display this box in the member's profile page, please let me know. thanks heaps!
ChU v2
02-01-2008, 06:26 AM
great code CHU, it works fine at my forum. if you ever find a way to resize the box or display this box in the member's profile page, please let me know. thanks heaps!
If your wanting to resize, I would use Lag's suggestion early in this thread. As for the member profile page, what vB version are you using and where do you want it to be displayed?
fattony69
06-14-2008, 01:16 AM
Does this work for 3.7.1?
SSC streezer
01-09-2009, 05:52 AM
where do i have to add the code? can somebody post it here please?
BlueNinjaGo
06-23-2009, 07:24 PM
Has anyone found a way to just isolate the gamerscore? I don't need a gamercard, just the score.
Does this work for 3.7.1?
There's no reason it shouldn't
BlueNinjaGo
06-23-2009, 07:25 PM
where do i have to add the code? can somebody post it here please?
ACP -> Styles & Templates -> Postbit or Postbit Legacy(depending on which you use)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.