vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Xbox.com gamercard for all users (https://vborg.vbsupport.ru/showthread.php?t=99867)

stonyarc 10-31-2005 10:00 PM

Xbox.com gamercard for all users
 
Function

These modifications on a vbulletin forum allow you to fully integrate the xbox.com gamercard on your forum next to each and every post a user makes.

This will make it look more or less like the integration on our forum.

Important

First always backup the files that you're going to edit so you can revert to the old version if something goes wrong.

We do appreciate if you gave us the due credits for these functions.

Installation

This modification was tested on vbulletin 3.5.0. You might have to put some codes on another location in your files depending on the version of vbulletin your have.

http://www.xboxusersgroup.com/images...ngamercard.jpg

1. Add a gamertag field to your user (editable in profile) =>

vBulletin features a wide array of input options for you to gather information from your members through the creation of custom profile fields. With these fields you can present a list of options for the user to choose from or you can ask the user to give their own input.

Go to the adminCP and add a custom field => User Profile fields => Add New User Profile Field

You need a "Single-Line Text Box"

Title => Gamertag
Description => Xbox Live Gamertag
Default Value => Leave empty
Max length of allowed user input => 30
Display Size => 30
Display Order => put something like 10 or 15
Field Required => No as default but you can change if you want
Field Editable by User => Yes because gamertags do tend to change
Private Field => No the field is public
Field Searchable on Members List => No
Show on Members List => Yes
Regular Expression => leave empty

Save the field

Go to the User Profile Field Manager and look for your custom field you just added and look for the name column there is an ID for the field.
Something like "fieldXX" where XX is a number. Make sure you remember this value.

2. Go to the template you are using (Styles & Templates/Style Manager) and select Edit templates.

Go to "postbit templates" and select the template you are using (probably postbit or postbit_legacy).
and add the following code:

fieldXX is the field value you got from step 1.

You can embed the code in a div or a special table construction but that is up to you.

Code:

<if condition="$post[fieldXX]">
<iframe src="http://gamercard.xbox.com/$post[fieldXX].card" scrolling="no" frameBorder="0" height="140" width="204">$post[fieldXX]</iframe>
</if>

Demonstration

You can see it active on the forum of http://www.xboxusersgroup.com

Support

For support contact us through the feedback forum. ALL MODIFICATIONS ARE DONE AT YOUR OWN RISK. XBOX USERS GROUP IS NOT RESPONSIBLE FOR ANY LOSS OF DATA.

For gamertags with spaces look here for the solution.

Credits

All code is (c)2005 Xboxusersgroup.com and StonyArc.

You are however allowed to change the location / display location of the gamercard however you see fit.

predatorkill 11-01-2005 09:44 PM

i ll definetly install this in my site... you rule m8!!! :D :D

moethelawn 11-01-2005 09:49 PM

I'll have to keep this in mind... thanks dude!

Extreme John 11-02-2005 03:07 AM

If I didnt drink tonight I would so install this, you rule... this goes in 2morrow.

john1744 11-02-2005 04:14 AM

If there was a way to add this as a button next to the aim, msn, yahoo icons, that when clicked on would bring a hover image of this up. It would be perfect. :)

stonyarc 11-02-2005 07:14 AM

Quote:

Originally Posted by john1744
If there was a way to add this as a button next to the aim, msn, yahoo icons, that when clicked on would bring a hover image of this up. It would be perfect. :)

There is the danger teamxbox.com might think you copied them.

But I'll have a look. Maybe it's doable with the "standard" collaps function of VB (should look cool)

DarkDestinyD 11-02-2005 12:43 PM

I think a option to make it pop up in a window or like something that says [Gamercard] then when you click it shows up in a drop down list. But either way nice mod man it will definatly fit my new gamer community i just opened.

FleaBag 11-02-2005 06:18 PM

This would be nice in the profile... My site is not about gaming, but a lot of the users have XBOX Live!; I wouldn't want it in the postbit as most users would not understand what it was for.

BLazeD1 11-02-2005 06:53 PM

I had this running in my postbit, and I am certain that there was some certain text that some user had put in their profile that made load spike to 100+. We were playing around all day yesterday trying to find it, and as soon as I removed the code from the postbit load is back to normal.

Is there anyway to make a php script that would convert the gamercard into a simple jpg file we could use with normal img src tags and no iframe?

stonyarc 11-02-2005 06:55 PM

Quote:

Originally Posted by FleaBag
This would be nice in the profile... My site is not about gaming, but a lot of the users have XBOX Live!; I wouldn't want it in the postbit as most users would not understand what it was for.

To add it to the profile it should be easy enough

http://www.xboxusersgroup.com/forums/member.php?u=25035

Just drop me a line if you need help with it

Just add a custom field in the sameway and add in the applicable template for your members

john1744 11-02-2005 07:37 PM

Quote:

Originally Posted by stonyarc
To add it to the profile it should be easy enough

http://www.xboxusersgroup.com/forums/member.php?u=25035

Just drop me a line if you need help with it

Just add a custom field in the sameway and add in the applicable template for your members

I would be interested in going that route as well.

stonyarc 11-02-2005 07:51 PM

Quote:

Originally Posted by john1744
I would be interested in going that route as well.

Well instead of editing the postbit (or legacy) template just edit the MEMBERINFO template and drop it next to the avatar. If the gamertag field is empty it won't display.

So the rest of the code is exactly the same.

Should I make a new modification or can you handle it ?

Cyricx 11-02-2005 08:29 PM

Nice snipe stony..

For a dhtml popup window, check here

https://vborg.vbsupport.ru/showthread.php?t=99769

stonyarc 11-03-2005 06:35 PM

Quote:

Originally Posted by Cyricx
Nice snipe stony..
For a dhtml popup window, check here
https://vborg.vbsupport.ru/showthread.php?t=99769

Thanks,

Seems that there is a lot of discussion about the dhtml window. :speechless:

ggiersdorf 11-04-2005 04:52 PM

Ok this kinda psses me off First off I posted this as a request here

https://vborg.vbsupport.ru/showthrea...highlight=XBOX

Im not saying you took someone elses work, but this hack existed prior to your post and I think others should get some credit for this, and by the way I have it running over at my site in the postbit which works MUCH better as a pop-up beacuse it will GROW larger and could mess your forum structure up.

ALSO who cares what TeamXBOX thinks they didnt invent it! M$ put the code up for everyone to use in websites..

stonyarc 11-04-2005 09:02 PM

Quote:

Originally Posted by ggiersdorf
Ok this kinda psses me off First off I posted this as a request here

https://vborg.vbsupport.ru/showthrea...highlight=XBOX

Im not saying you took someone elses work, but this hack existed prior to your post and I think others should get some credit for this, and by the way I have it running over at my site in the postbit which works MUCH better as a pop-up beacuse it will GROW larger and could mess your forum structure up.

ALSO who cares what TeamXBOX thinks they didnt invent it! M$ put the code up for everyone to use in websites..

You are right. We already had the gamertag integration for a very long time. This made the gamercard code very easy to integrate in our forum.

We released the how to very fast on xbox.com and our forum as a service. Afterwards I posted it here. I didn't want to cancel out any other threads that are in here.

Moreover just look at want an MVP has to say about the teamxbox claim
http://msmvps.com/glach/archive/2005/10/30/73546.aspx

Funny stuff :smoke:

wattieuk 11-05-2005 07:28 PM

Can anyone tell me how to do an "if" they have a gamertag, use the XBox link ELSE show the avatar? I want it to show one or the other. Thanks.

stonyarc 11-06-2005 09:35 AM

Quote:

Originally Posted by wattieuk
Can anyone tell me how to do an "if" they have a gamertag, use the XBox link ELSE show the avatar? I want it to show one or the other. Thanks.

You can replace the avatar code by

FieldXX is the name of your gamertag field (see the first post)

Code:

<if condition="$post['fieldXX']">
<div class="smallfont" align="center">
<iframe src="http://gamercard.xbox.com/$post[fieldXX].card" target="_blank" scrolling="no" frameBorder="0" height="140" width="204">$post[fieldXX]</iframe>
</div>
<else>
<div class="smallfont">
<center><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></center>
</div>
</if>

Don't forget to remove the other codes.

Hope this helps

PTO 11-08-2005 04:34 PM

Hey stonyarc.

Love the code. However, I'm much more interested in the entire card scheme style you have (avatar...username..etc etc with the gamercard underneath). Any chance of you releasing that?

wattieuk 11-10-2005 10:10 PM

Quote:

Originally Posted by stonyarc
You can replace the avatar code by

FieldXX is the name of your gamertag field (see the first post)

Code:

<if condition="$post['fieldXX']">
<div class="smallfont" align="center">
<iframe src="http://gamercard.xbox.com/$post[fieldXX].card" target="_blank" scrolling="no" frameBorder="0" height="140" width="204">$post[fieldXX]</iframe>
</div>
<else>
<div class="smallfont">
<center><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></center>
</div>
</if>

Don't forget to remove the other codes.

Hope this helps

thanks - much appreciated

PTO 11-11-2005 04:14 PM

Never mind...I totally hax0red the crap out of your site and did it myself :D.

stonyarc 11-17-2005 02:02 PM

Quote:

Originally Posted by PTO
Never mind...I totally hax0red the crap out of your site and did it myself :D.

So it's mister xboxliveforums again :ermm:

Well it seems you removed all references and credits from the things you copied.

xug 11-17-2005 02:35 PM

Quote:

Originally Posted by PTO
Never mind...I totally hax0red the crap out of your site and did it myself :D.

It's only makes us feel better and stronger, that sites like yours copy the crap out of sites like XUG, it's that you don't have the template else your site could be seen as a complete mirror, lucky you can't copy our memberbase, Wow 57 Members, good Luck :D

On a site note, you have violated several laws ;)

sbryan 11-27-2005 10:35 PM

hi guys, i've had the extra custom form field in my forums for ages to display peoples gamertags when they post. since upgrading to 3.5.1 i havent edited the templates to get it displaying again.

i know some people will criticise me for wanting to do it the 'teamxbox' way but its really the most elegant way to do it, and not original :)

but really, it isnt stealing as it utilises code from xbox themselves and then the vb menu system to display it.. nothing proprietry there.

so if someone can help me get my custom field displaying in the posts again, then link to the xbox live gamercard in a vb style menu popup that would rock :)

actually, after reading threads properly.. sorry ;)

i found this code

<!-- XBOX LIVE TAG Below by: Cyrick -->

<if condition="$post['field6']"><div class="info">
<div id="gamertagmenu_$post[postid]">XBOX Live: <b><u>$post[field6]</u></b>
<script type="text/javascript"> vbmenu_register("gamertagmenu_$post[postid]", true); </script> </div> <div class="vbmenu_popup" id="gamertagmenu_$post[postid]_menu" style="display:none"><iframe src="http://gamercard.xbox.com/$post[field6].card" scrolling="no" frameBorder="0" height="140" width="204">$post[field6]</iframe> </div> </if>

<!-- XBOX Live TAG ABOVE -->

can someone refresh my memory where that goes in the postbit template?

thanks in advance!

stonyarc 11-30-2005 09:19 AM

Quote:

Originally Posted by sbryan
hi guys, i've had the extra custom form field in my forums for ages to display peoples gamertags when they post. since upgrading to 3.5.1 i havent edited the templates to get it displaying again.

i know some people will criticise me for wanting to do it the 'teamxbox' way but its really the most elegant way to do it, and not original :)

but really, it isnt stealing as it utilises code from xbox themselves and then the vb menu system to display it.. nothing proprietry there.

so if someone can help me get my custom field displaying in the posts again, then link to the xbox live gamercard in a vb style menu popup that would rock :)

actually, after reading threads properly.. sorry ;)

i found this code

<!-- XBOX LIVE TAG Below by: Cyrick -->

<if condition="$post['field6']"><div class="info">
<div id="gamertagmenu_$post[postid]">XBOX Live: <b><u>$post[field6]</u></b>
<script type="text/javascript"> vbmenu_register("gamertagmenu_$post[postid]", true); </script> </div> <div class="vbmenu_popup" id="gamertagmenu_$post[postid]_menu" style="display:none"><iframe src="http://gamercard.xbox.com/$post[field6].card" scrolling="no" frameBorder="0" height="140" width="204">$post[field6]</iframe> </div> </if>

<!-- XBOX Live TAG ABOVE -->

can someone refresh my memory where that goes in the postbit template?

thanks in advance!

Just look for the place where the avatar is called.

You can put in that region depending on where you want it to display.

If you use the legacy you'll have to edit the legacy postbit.

TomJames 04-30-2006 03:12 PM

Thanks mate its fantastic

PeeweeJD 08-02-2006 01:24 PM

if anyone wants it, I have a pretty cool hack that works like this:

if the user has a gamertag, a small XBL button shows up next to the IM buttons.

when a user clicks that button, the avatar is replaced with their gamercard (from xbox.com).

its works like this:

the avatar (and whatever else you want to replace with the gamercard) is wrapped in a div with a name that contains the post number. The style is set to visible.

the gamercard (iframe code straight from xbox.com) is wrapped in a different div that contains the post number as well. this div's style is set so its invisible.

the XBL gif triggers a very small javascript that toggles the visibility of the 2 divs for that post number.

I hope that makes sense.

HellBoy 08-24-2006 08:52 PM

Excellent hack, but I'm using Glop.org's gamercards instead, as they doesn't take up as much space.

Code:

<if condition="$post['fieldXX']">
<a href="http://live.xbox.com/en-US/profile/profile.aspx?pp=0&GamerTag=$post[fieldXX]" target="_blank"><img src="http://www.glop.org/gamercard/card/$post[fieldXX]-forum.png" border="0"></a>
</if>

See www.glop.org/gamercard for more designs.

The Fathom 10-04-2006 10:16 PM

Nice one!

JamieLee2k 12-02-2006 12:21 PM

Can anyone tell me how to do it for gamertags with spaces, the link above it's letting me view it

jamesf4218 12-29-2006 05:24 AM

This only appears to work for Xbox 360 and not just Xbox. How do I get Xbox gamertags as well?

Thanks...

storpappa 01-02-2007 08:32 PM

I was looking to add xbox tags under the user info and founds this humerous thread of whiners crying over free code. It gets funny when she talks about the law - :rolleyes:

Anyone, I am looking to addthe xbox info, so thanks for the thread. Maybe next time the ranters can go to a different thread and cry there ...


Quote:

Originally Posted by xug (Post 823703)
It's only makes us feel better and stronger, that sites like yours copy the crap out of sites like XUG, it's that you don't have the template else your site could be seen as a complete mirror, lucky you can't copy our memberbase, Wow 57 Members, good Luck :D

On a site note, you have violated several laws ;)


ArabOZ.com 03-30-2007 01:39 AM

How i can chane size GamerTag 203×140 to Small size like 150×100px

i hope someone answer me

M4H 04-03-2007 07:03 AM

Quote:

Originally Posted by ArabOZ.com (Post 1215788)
How i can chane size GamerTag 203?140 to Small size like 150?100px

i hope someone answer me

I am having the same issues.

ArabOZ.com 04-03-2007 01:59 PM

Quote:

Originally Posted by M4H (Post 1218892)
I am having the same issues.


you want change the size?
i have idea and use it
it's worked now with me

if you want that i tell you how you can change size..

playworks 02-01-2008 06:16 AM

change the size of the gamertag box? oh please tell us how? i'm stuck with the 203x140 and it's shifting my whole forum.

ArabOZ.com 02-01-2008 09:45 PM

To Change size Change other website i'm use Mygamertag.net
Just Change old code

USE THIS CODE .. change [fieldXX] 3 time
Code:

<if condition="$post[fieldXX]">
<iframe src="http://card.mygamercard.net/mini/$post[fieldXX].png" scrolling="no" frameBorder="0" height="101" width="151">$post[fieldXX]</iframe>
</if>


Done .. :up:

ArabOZ.com 02-01-2008 09:51 PM

like this photo

https://vborg.vbsupport.ru/external/2008/02/22.png

TheInsaneManiac 02-14-2008 10:21 PM

Thanks, INSTALLED!

odeezie 03-20-2008 08:47 PM

Does anyone know where to find something like this for Play Station? I do searches for it and cannot find anything. :confused:


All times are GMT. The time now is 06:32 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.01509 seconds
  • Memory Usage 1,851KB
  • 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
  • (5)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete