vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Profile Enhancements - XBL Gamerscore in Postbit (https://vborg.vbsupport.ru/showthread.php?t=157122)

ChU v2 09-05-2007 10:00 PM

XBL Gamerscore in Postbit
 
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.

HTML Code:

<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!

Lag 09-15-2007 06:16 PM

Nice hack ChU.

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

Lag 11-04-2007 05:41 AM

I found that the Xbox.com gamercard is a little large for my forum and used this code instead.

HTML Code:

<!--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

Quote:

Originally Posted by atlambros83 (Post 1375713)
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

Quote:

Originally Posted by atlambros83 (Post 1376219)
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:

HTML Code:

<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

Quote:

Originally Posted by NoRem0rse (Post 1381875)
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

Quote:

Originally Posted by Jerlene (Post 1400362)
Is there a way to make this show up only in certain forums within my site?

Try:
Code:

<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

Quote:

Originally Posted by gdavis480 (Post 1416277)
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

Quote:

Originally Posted by playworks (Post 1432950)
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.

Quote:

Originally Posted by fattony69 (Post 1548856)
Does this work for 3.7.1?

There's no reason it shouldn't

BlueNinjaGo 06-23-2009 07:25 PM

Quote:

Originally Posted by SSC streezer (Post 1705976)
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)


All times are GMT. The time now is 06:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01298 seconds
  • Memory Usage 1,783KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_html_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete