EyeCrave
01-28-2007, 10:00 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=99867) and to 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
<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)
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
Add below:
<div> </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:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Above add:
<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>
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 (https://vborg.vbsupport.ru/showthread.php?t=99867) and to 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
<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)
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
Add below:
<div> </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:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Above add:
<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>