Back to vBulletin 3.6 Template Modifications

Popup XBOX 360 gamertag
Mod Version: 1.00, by EyeCrave

This modification is in the archives.
vB Version: 3.6.4 Rating: (3 votes - 4.33 average) Installs: 29
Released: 29 Jan 2007 Last Update: Never Downloads: 109
Not Supported  

Function

This mod will popup XBOX 360 gamertags when you hover your cursor over them.

Important

Backup all templates you're going to edit in the event a revert is required.

Credit

To stonyarc for his Xbox.com gamercard for all users and to http://www.xboxworld.nl from where I pretty much stole the script from.

Support

Limited

Important

Update: Fixed code in postbit to add missing 'A'

Modifications

* file uploads
* 3 templates
* 1 new userfield

Copy the following into your templates and voila it works. Enjoy!

See it in action at
http://www.eyecravedvd.com/forums/showthread.php?p=9701

User Field

Go to AdminCP -> User Profile Fields -> Add New User Profile Field
Profile Field Type: Single-Line Text Box
Title: XBOX 360 Gamertag
Description: Please type your Gamertag Here
Field Editable by User: Yes
Save

Template mods

In order for this script to work you must download the overLIB javascript library from
http://www.bosrup.com/web/overlib/

Ensure the correct path to overlib is set in the first line. The correct file is overlib_mini.js. It's located in the mini folder in the library.

Change the 'X' in $post[fieldX] to whatever your field ID is.

edit template: headerinclude
place at bottom

Code:
<script type="text/javascript" src="http://www.path-to-overlib/mini/overlib_mini.js"></script>
<script type="text/javascript">
function setcursor(type) {
    document.getElementsByTagName('body')[0].style.cursor = typeof type == 'undefined' ? 'default' : type;
    links = document.getElementsByTagName('a');
    for(i = 0; i < links.length; i++) links.item(i).style.cursor = typeof type == 'undefined' ? 'pointer' : type;
}
function showgamercard(gamertag) {
    setcursor('progress');
    return overlib('<iframe onload="setcursor();" src="http://gamercard.xbox.com/'+gamertag+'.card" scrolling="no" frameBorder="0" height="140" width="204">'+gamertag+'</iframe>', BORDER, 0, FULLHTML, WIDTH, 204, HEIGHT, 140);
}
function hidegamercard() {
    return nd();
}
</script>
Edit template: Postbit

Find: (you can edit the location this is just a suggested spot)

Code:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
Add below:

Code:
  <div>&nbsp;</div>
  <div class="smallfont"><input type="hidden" name="gamertag" value="$post[fieldX]"> 
  <if condition="$post[fieldX]">
  <strong>Gamertag:</strong> <a onmouseover="showgamercard('$post[fieldX]');" onmouseout="return hidegamercard();" href="http://live.xbox.com/member/$post[fieldX]" target="_blank" rel="nofollow">$post[fieldX]</a></if></div>
Edit template: Postbit Legacy

Find:

Code:
 <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Above add:

Code:
<br />
  <div><input type="hidden" name="gamertag" value="$post[fieldX]"> 
  <if condition="$post[fieldX]">
  <strong>Gamertag:</strong> <a onmouseover="showgamercard('$post[fieldX]');" onmouseout="return hidegamercard();" href="http://live.xbox.com/member/$post[fieldX]" target="_blank" rel="nofollow">$post[fieldX]</a></if></div>

Download

This modification is archived, downloads are still allowed.

File Type: %1$s gamertag.txt (3.2 KB, 124 downloads)

Similar Mods

Profile Enhancements Add XBOX Gamertag to IM List vBulletin 3.6 Add-ons

vblts.ru supports vBulletin®, 2022-2024