Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Popup XBOX 360 gamertag Details »»
Popup XBOX 360 gamertag
Version: 1.00, by EyeCrave EyeCrave is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Version: 3.6.4 Rating:
Released: 01-28-2007 Last Update: Never Installs: 29
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-03-2007, 04:02 PM
jkwasn01 jkwasn01 is offline
 
Join Date: Jul 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the same problem as Thorlax. I used posbit legacy instead tho.
Reply With Quote
  #13  
Old 02-04-2007, 01:18 PM
Thorlax402 Thorlax402 is offline
 
Join Date: Sep 2006
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, I figured out how to get it to work. Change the source from "/mini/overlib_mini.js" to simply "/overlib.js". Also, there is a typo in the postbit template edit.

It says:

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 hidegmercard();" href="http://live.xbox.com/member/$post[fieldX]" target="_blank" rel="nofollow">$post[fieldX]</a></if></div>
The part that is labeled in red needs to be changed to:
Code:
hidegamercard
It is missing an "A".


Anyway, I still have a small problem. On the hover, it is a little slow to show the gamercard. Check it out at halofordummies.com. If anyone knows how to fix this then please let me know.
Reply With Quote
  #14  
Old 02-04-2007, 03:23 PM
Oliver-Berlin Oliver-Berlin is offline
 
Join Date: Jun 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice work THX
Reply With Quote
  #15  
Old 02-05-2007, 01:43 AM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Thorlax - that did the trick, I'm all up and running!!!!
Reply With Quote
  #16  
Old 02-05-2007, 01:52 AM
EyeCrave EyeCrave is offline
 
Join Date: Sep 2002
Location: Layer 2 of the DVD
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Thorlax402. It was missing only above the file was fine.

As for the slow loading it seems to have to do with the page loading fully. Once it's done it pops up pretty fast, but I'm not javascript expert. As I said above I took it from another site.

As for the overlib_mini.js make sure your path is correct. The package actually has a capital M for the directory in the path.
Reply With Quote
  #17  
Old 07-14-2007, 05:55 PM
TrickyD TrickyD is offline
 
Join Date: Oct 2003
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know how to take this mod and make it work "on click" instead of on mouseoever?

I'd love to use this on my site.
Reply With Quote
  #18  
Old 07-27-2007, 06:23 PM
barryhand barryhand is offline
 
Join Date: Jul 2006
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TrickyD View Post
Anyone know how to take this mod and make it work "on click" instead of on mouseoever?

I'd love to use this on my site.
Wild guess, change the action from onmouseover to onClick
Reply With Quote
  #19  
Old 09-05-2007, 10:35 PM
Evolution06 Evolution06 is offline
 
Join Date: May 2006
Location: California
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is nice *installed* now I wonder do you have to actually upload all those overlib/ files or can you just get away with putting the mini.js java file in your forums root? Cause it doesn't seem like all the files in that download are needed and just take up room lol.
Reply With Quote
  #20  
Old 06-05-2008, 05:04 AM
stickskills stickskills is offline
 
Join Date: May 2008
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone help me out with a "if conditon" so that if users don't have a gamertag supplied, there's no box show up?
Reply With Quote
  #21  
Old 06-05-2008, 06:36 AM
Wobbly Goblin's Avatar
Wobbly Goblin Wobbly Goblin is offline
 
Join Date: Oct 2007
Location: Victorville, CA
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stickskills View Post
Can anyone help me out with a "if conditon" so that if users don't have a gamertag supplied, there's no box show up?
Here's mine:
PHP Code:
<!-- Xbox GamerTag -->
<
input type="hidden" name="gamertag" value="$post[field5]"

<if 
condition="$post['field5']"><hr>
<
strong>Xbox GamerTag:</strong><br/>
<
a onmouseover="showgamercard('$post[field5]');" onmouseout="return hidegamercard();" href="http://live.xbox.com/member/$post[field5]target="_blank" rel="nofollow">$post[field5]</a><br/>
</if> 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06517 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete