Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: KiLLuMiNaTi-7- on June 16, 2008, 03:12:42 PM

Title: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on June 16, 2008, 03:12:42 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1252)

An updated version of this mod for 2.0 can be found here: http://custom.simplemachines.org/mods/index.php?mod=2769 (http://custom.simplemachines.org/mods/index.php?mod=2769)



Advanced Popup Xbox Gamertag V1.1
By KiLLuMiNaTi-7- (http://www.simplemachines.org/community/index.php?action=profile;u=151341)   (http://www.simplemachines.org/community/index.php?topic=)



Introduction
Adds a Xbox Gamer Tag to the users profile

When you mousehover over there gamertag name a popup will appear with there Xbox Gamer Tag.

Compatibility
I've only tested it on SMF 1.1.4 and SMF 1.1.5. So i don't no if it work on any other version's below 1.1.4. It does not work on 2.0 Public Beta yet.

Features
These features can be found in Admin -> Features and options -> Xbox GamerTag
- Display in posts     
- Display in private message's    
- Display as a gamercard (image). This wont look good on most themes you will have to do manual edits. Which i cannot help you with.    
- Display as plain text
(Ex PSN ID: Name)
- Display as a Xbox icon
(When you hover over. It will popup with a Xbox gamercard.)

Installation
Install the package to install on the default core theme/Babylon and any another theme that does NOT have a custom Profile.template.php or a custom Display.template.php or if you have copied it over from the theme it is based on, or the default theme.

Installation on custom themes
/Themes/{Your_Theme_Name}/index.template.php
All custom themes need these edit!
Code (Find) Select
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings

Code (Add After) Select
, $boardurl
Code (Find) Select
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
Code (Add after) Select
<script type="text/javascript" src="', $boardurl, '/pxbgt/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>

Copy the image (xbgt.gif) included in the package to your custom theme image directory.

Theme's that have a custom Profile.template.php or a custom Display.template.php. Or if you have copied Profile.template.php or/and custom Display.template.php over from the theme it is based on, or the default theme. Will require these manual edits.

Run the installer first and if you can't see the Xbox gamertag field in your profile do these edits. Only do these edits if you have custom template files i.e If you have copied them from the default theme

/Themes/{Your_Theme_Name}/Display.template.php
Code (Find) Select
// This shows the popular messaging icons.
echo '
', $message['member']['icq']['link'], '
', $message['member']['msn']['link'], '
', $message['member']['aim']['link'], '
', $message['member']['yim']['link'], '<br />';

Code (Add After) Select
// PXBGT MOD
if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<img src="http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png" alt="" /></a>';
}
// If they dont want the userbar just show plain text.
if ($modSettings['enable_pxbgt_plain'] && !empty($modSettings['enable_pxbgt_post']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<div class="smalltext">
'.$txt['pxbgt_txt2'].'
               ', $message['member']['options']['pxbgt'], '</div>';
}
if ($modSettings['enable_pxbgt_popup'] && !empty($message['member']['options']['pxbgt']))
{
echo '
<a href="javascript:void(0);" onmouseover="return overlib(\'\', WIDTH, 199, HEIGHT, 135, BACKGROUND, \'http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png\', PADX, 10, 10, PADY, 10, 10);" onmouseout="return nd();" title=""><img border="0" src="' . $settings['images_url'] . '/xbgt.gif" alt="' . $message['member']['options']['pxbgt'] . '" /></a>';
}


Change Log
1.0
- Initial release. On request here (http://www.simplemachines.org/community/index.php?topic=240627.msg1551571#msg1551571)
1.1
- Added new features.
Title: Re: Advanced Popup Xbox Gamertag
Post by: kizer on June 18, 2008, 01:46:02 AM
I don't know why, but the popup only shows my profile and nobody elses. Here is an example.
http://www.links4jeeps.com/forum/index.php?topic=8155.0

Fireman has one and so do I, but it only shows kizers
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on June 18, 2008, 04:51:24 AM
Quote from: kizer on June 18, 2008, 01:46:02 AM
I don't know why, but the popup only shows my profile and nobody elses. Here is an example.
http://www.links4jeeps.com/forum/index.php?topic=8155.0

Fireman has one and so do I, but it only shows kizers

Thats strange ::) Have you tried a manual install?

Here you can see working correctly on my test forum. Here. (#post_)

If anyone else has got it working on there forum could you please post a link so we can see it. Thanks
Title: Re: Advanced Popup Xbox Gamertag
Post by: kizer on June 18, 2008, 11:46:52 AM
No I just did the install per your files. I'll have to remove it and maybe something is wacked in the database. I'll uninstall it and remove the database files and see if anything changes.
Title: Re: Advanced Popup Xbox Gamertag
Post by: kizer on June 18, 2008, 11:54:48 AM
Ah I do have the Custom Profile Mod installed. The field is there to place the gamer tag, but its my only error showing my tag not somebody elses. I'll just give it a remove for now.
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on June 28, 2008, 10:42:10 AM
holy moly. Its a bug. When your xbox name has a space in it. It wont work. Really sorry i didn't find this earlier.
Title: Re: Advanced Popup Xbox Gamertag
Post by: d58e7 on July 07, 2008, 07:03:45 PM
How about a way to have it load when it's clicked, rather than hovered over? Also is it possible to add buttons underneath the gamercard to send live messages and send a friend request?
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on July 08, 2008, 10:06:03 AM
Im trying to fix a bug at the moment. I wont be adding anything to the mod until i can fix the bug.
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on July 11, 2008, 07:52:15 AM
Upadated

All people who has had the bug. Uninstall the old version and install the new one. Here (http://custom.simplemachines.org/mods/index.php?mod=1252)

Ive only added a extra text string. To tell members to add a "+" instead of a space.
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on August 03, 2008, 11:05:21 AM
Nice mod - does not work for me but do you have plans to make this more like the PSN one you made - i prefer that and it would probably suit my site better than the pop up version?
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on August 03, 2008, 03:19:28 PM
Quote from: Youngie360G on August 03, 2008, 11:05:21 AM
Nice mod - does not work for me but do you have plans to make this more like the PSN one you made - i prefer that and it would probably suit my site better than the pop up version?

What do you mean does not work for you? Whats the problem?

It won't be hard to make it more like the psn mod. When i get sometime i'll do it.
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on August 05, 2008, 09:25:27 AM
The way it pops up like in your picture.

I would prefer a gamerbar / gamercard in the actual area like the PSN one instead of the popup version.

I would love this to work :)
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on August 05, 2008, 06:49:30 PM
Oh sorry i read your post wrong.

Like i said above when i get some time and when i can be bothered i'll make it more like the PSN mod  ;)
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on August 06, 2008, 04:21:49 AM
Cheers bro - would appreciate that loads :)
Title: Re: Advanced Popup Xbox Gamertag
Post by: mattz83 on August 07, 2008, 02:58:34 AM
This is a great mod.. however, I am having a problem with it. When I hover my mouse over the Xbox icon, nothing happens.  :(

I had this mod previously installed on a different forum and it worked beautifully, now not so much. The hover feature is working on a different computer browsing the web with Internet Explorer, that led me to believe it was an issue with Java on my computer. However none of my users can use the hover feature either, and hovering worked for me on this computer when I installed the mod on a test forum. All the files the mod modifies are checking out as OK when I run the package installer...

Any ideas?

Thanks,
Matt
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on August 07, 2008, 07:37:03 AM
Hi.

Have you done this edit

<script type="text/javascript" src="pxbgt/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>


In your theme's index.template.php?
Title: Re: Advanced Popup Xbox Gamertag
Post by: mattz83 on August 07, 2008, 12:20:09 PM
Quote from: KiLLuMiNaTi-7- on August 07, 2008, 07:37:03 AM
Hi.

Have you done this edit

<script type="text/javascript" src="pxbgt/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>


In your theme's index.template.php?

Well, I'm not using a custom theme, so I didn't think I'd need to. Nonetheless, I just checked the index.template.php file and that line is there.
Title: Re: Advanced Popup Xbox Gamertag
Post by: MisterPuk on August 19, 2008, 10:38:19 AM
I'm having an issue getting this to work in a custom theme with a Display.template.php file.
(it is working on other themes)
placing the code prior to the specified line, and I get a parse error... perhaps I'm doing it wrong as I don't do much in the realm of php coding. Here is the portion of the file i would need to edit, where exactly would the code be plugged in?

            // This shows the popular messaging icons.
         echo '
                        ', $message['member']['icq']['link'], '
                        ', $message['member']['msn']['link'], '
                        ', $message['member']['skype']['link'], '
                        ', $message['member']['yim']['link'], '';
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on August 25, 2008, 03:21:07 PM
Quote from: MisterPuk on August 19, 2008, 10:38:19 AM
I'm having an issue getting this to work in a custom theme with a Display.template.php file.
(it is working on other themes)
placing the code prior to the specified line, and I get a parse error... perhaps I'm doing it wrong as I don't do much in the realm of php coding. Here is the portion of the file i would need to edit, where exactly would the code be plugged in?

            // This shows the popular messaging icons.
         echo '
                        ', $message['member']['icq']['link'], '
                        ', $message['member']['msn']['link'], '
                        ', $message['member']['skype']['link'], '
                        ', $message['member']['yim']['link'], '';


Follow the steps in the first post of this topic and you should be ok.
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on August 26, 2008, 10:41:58 AM
MOD UPDATED Its more like my PSN ID mod now. So now you can choose how you want it to display.
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on August 26, 2008, 07:27:11 PM
Wow bro - thanks for getting around to it :)

I can only seem to see Gamercards on a members profile - i have checked the code i changed and also checked the options - i have also treid switching to default style but nothing shows on post profile :( Any what i could be missing?
Title: Re: Advanced Popup Xbox Gamertag
Post by: 4fit? on September 02, 2008, 12:17:19 PM
Nice mod.  How would one go about editing the code so that when the user clicks on the XBL icon, it takes them to the MyGamerCard.net page for that person?
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on September 02, 2008, 01:26:23 PM
Quote from: 4fit? on September 02, 2008, 12:17:19 PM
Nice mod.  How would one go about editing the code so that when the user clicks on the XBL icon, it takes them to the MyGamerCard.net page for that person?

After installing, Find.

Code (Find) Select
// PXBGT MOD
if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<img src="http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png" alt="" /></a>';
}
// If they dont want the userbar just show plain text.
if ($modSettings['enable_pxbgt_plain'] && !empty($modSettings['enable_pxbgt_post']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<div class="smalltext">
'.$txt['pxbgt_txt2'].'
               ', $message['member']['options']['pxbgt'], '</div>';
}
if ($modSettings['enable_pxbgt_popup'] && !empty($message['member']['options']['pxbgt']))
{
echo '
<a href="javascript:void(0);" onmouseover="return overlib(\'\', WIDTH, 199, HEIGHT, 135, BACKGROUND, \'http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png\', PADX, 10, 10, PADY, 10, 10);" onmouseout="return nd();" title=""><img border="0" src="' . $settings['images_url'] . '/xbgt.gif" alt="' . $message['member']['options']['pxbgt'] . '" /></a>';
}


Replace with.

Code (Replace) Select
// PXBGT MOD
if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<img src="http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png" alt="" /></a>';
}
// If they dont want the userbar just show plain text.
if ($modSettings['enable_pxbgt_plain'] && !empty($modSettings['enable_pxbgt_post']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<div class="smalltext">
'.$txt['pxbgt_txt2'].'
               ', $message['member']['options']['pxbgt'], '</div>';
}
if ($modSettings['enable_pxbgt_popup'] && !empty($message['member']['options']['pxbgt']))
{
echo '
<a href="http://profile.mygamercard.net/'.$message['member']['options']['pxbgt'].'" onmouseover="return overlib(\'\', WIDTH, 199, HEIGHT, 135, BACKGROUND, \'http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png\', PADX, 10, 10, PADY, 10, 10);" onmouseout="return nd();" title=""><img border="0" src="' . $settings['images_url'] . '/xbgt.gif" alt="' . $message['member']['options']['pxbgt'] . '" /></a>';
}


Title: Re: Advanced Popup Xbox Gamertag
Post by: 4fit? on September 02, 2008, 03:24:54 PM
Nevermind.  Thanks.
Title: Re: Advanced Popup Xbox Gamertag
Post by: Fievel Lee on September 03, 2008, 04:05:08 PM

works on 1.1.4 ???

a just installed on the default theme and nothing happend  :(
Title: Re: Advanced Popup Xbox Gamertag
Post by: bfeo on September 10, 2008, 03:07:57 PM
Said it installed without errors, but why is this at the top of my forum?

$txt['pxbgt_txt'] = 'This is your Xbox Live GamerTag. Important: Replace spaces with + EG Your+Name'; $txt['pxbgt_txt2'] = 'XBLGT:'; $txt['pxbgt_settings_title'] = 'Xbox Live GamerTag'; $txt['enable_pxbgt_post'] = 'Display in posts'; $txt['enable_pxbgt_userbar'] = 'Display just the GamerCard
This will require manual edits to make it fit in the post page.
'; $txt['enable_pxbgt_pm'] = 'Display in private message\'s'; $txt['enable_pxbgt_popup'] = 'Display as a Xbox icon
When you hover over. It will popup with their gamercard.
'; $txt['enable_pxbgt_plain'] = 'Display as plain text
Ex XBLGT: Name';
Title: Re: Advanced Popup Xbox Gamertag
Post by: cqinzx on September 10, 2008, 08:49:07 PM
okay i installed this mod to a smf 1.1.6 version. i don't know how this works.where do i go to edit my gamertag?
Title: Re: Advanced Popup Xbox Gamertag
Post by: gameoverbeyond on September 14, 2008, 08:08:18 AM
I installed this mod, works great...except..I don't get the xbox icon in the user posts. Same thing happened with the PSN mod also. I double checked all the code and its still not there. It shows the Game Tag in underlined text, which if I mouse over will show the gamer card. Any ideas on how to fix? Here's a link to my forum I just put up:
www.gameoverbeyond.com/forum (http://www.gameoverbeyond.com/forum)
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on September 14, 2008, 10:23:41 AM
Quote from: bfeo on September 10, 2008, 03:07:57 PM
Said it installed without errors, but why is this at the top of my forum?

$txt['pxbgt_txt'] = 'This is your Xbox Live GamerTag. Important: Replace spaces with + EG Your+Name'; $txt['pxbgt_txt2'] = 'XBLGT:'; $txt['pxbgt_settings_title'] = 'Xbox Live GamerTag'; $txt['enable_pxbgt_post'] = 'Display in posts'; $txt['enable_pxbgt_userbar'] = 'Display just the GamerCard
This will require manual edits to make it fit in the post page.
'; $txt['enable_pxbgt_pm'] = 'Display in private message\'s'; $txt['enable_pxbgt_popup'] = 'Display as a Xbox icon
When you hover over. It will popup with their gamercard.
'; $txt['enable_pxbgt_plain'] = 'Display as plain text
Ex XBLGT: Name';


Check that ?> is at the end of your language file.

Quote from: cqinzx on September 10, 2008, 08:49:07 PM
okay i installed this mod to a smf 1.1.6 version. i don't know how this works.where do i go to edit my gamertag?

You have to create a gamercard on mygamercard.net first.

Quote from: gameoverbeyond on September 14, 2008, 08:08:18 AM
I installed this mod, works great...except..I don't get the xbox icon in the user posts. Same thing happened with the PSN mod also. I double checked all the code and its still not there. It shows the Game Tag in underlined text, which if I mouse over will show the gamer card. Any ideas on how to fix? Here's a link to my forum I just put up:
www.gameoverbeyond.com/forum (http://www.gameoverbeyond.com/forum)

Place "xbgt.gif" included in the Zip file. To "/forum/Themes/red/images/"
Title: Re: Advanced Popup Xbox Gamertag
Post by: gameoverbeyond on September 14, 2008, 04:35:07 PM
Thanks KiLLuMiNaTi-7- :) that even fixed the PSN mod too, image was also in wrong directory >:(
I appreciate the assistance and the outstanding Mod!
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on September 14, 2008, 04:35:59 PM
Good to hear :) and thanks
Title: Re: Advanced Popup Xbox Gamertag
Post by: natefrog2k1 on October 07, 2008, 09:43:52 PM
sweet I was looking for something just like this
It works great so far for me, hopefully when my members start using it it works for them also.

My question is is there any way to have the xbox icon show up and work the same way in the forum member listing like the aol, yahoo, etc. ones?


Title: Re: Advanced Popup Xbox Gamertag
Post by: ruckstande on December 10, 2008, 07:56:08 PM
If I have 1.0 installed, will I have to uninstall this mod and change my custom themes again?
Title: Re: Advanced Popup Xbox Gamertag
Post by: seeson on January 26, 2009, 12:04:48 AM
i wanted to show the gamertag under the avatar, but it gets cut off. what do i need to edit in order for it to fit/show properly? please let me know. thanks for a great mod! :)
Title: Re: Advanced Popup Xbox Gamertag
Post by: shortchange on February 01, 2009, 10:58:39 AM
Any word on 2.0 beta 4 compatability?
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on February 02, 2009, 03:37:51 PM
Hi KiLLuMiNaTi-7-,

I was wondering what the possibility would be on also having the Xbox avatar also display?

I tried to modify the display code and got it partially working but avatars with spaces would not show - is it a simple fix or would it require alot of work?

I could post the code but to put it simply - a member would input their XBLGT and then underneath their gamercard in forum post profile view you would also see their customised avatar
<img src="http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png" width="100%" alt="Member gamercard"/></a><br /><br /><img src="http://avatar.xboxlive.com/avatar/'.$message['member']['options']['pxbgt'].'/avatar-body.png" width="100%" alt="Member gamercard"/></a>
';
}


This is the image i am talking about:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Favatar.xboxlive.com%2Favatar%2Fyoungiiie%2Favatar-body.png&hash=795528e8346917ce16ee1c94078f8322263eb49c)
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on February 03, 2009, 12:47:06 PM
Youngiiie

Find:

// PXBGT MOD

Add below:

$message['member']['options']['pxbgt'] = strtr($message['member']['options']['pxbgt'], ' ', '+');

This will replace any spaces with +
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on February 03, 2009, 08:33:12 PM
Quote from: KiLLuMiNaTi-7- on February 03, 2009, 12:47:06 PM
Youngiiie

Find:

// PXBGT MOD

Add below:

$message['member']['options']['pxbgt'] = strtr($message['member']['options']['pxbgt'], ' ', '+');

This will replace any spaces with +

Thanks for getting back to me so quick!

It looks as if the + does not work - it spits out this:
http://avatar.xboxlive.com/avatar/DARTH+KEYHOLE/avatar-body.png

This does not work - but if you input the link manually to correct it:
http://avatar.xboxlive.com/avatar/DARTH KEYHOLE/avatar-body.png

The browser turns the URL into this:
http://avatar.xboxlive.com/avatar/DARTH%20KEYHOLE/avatar-body.png

As you can see the last link works - any suggestions?

I tried amending this:
$message['member']['options']['pxbgt'] = strtr($message['member']['options']['pxbgt'], ' ', '+');

To this:
$message['member']['options']['pxbgt'] = strtr($message['member']['options']['pxbgt'], ' ', '%20');

But this still does not work...

Also tried this:
$message['member']['options']['pxbgt'] = strtr($message['member']['options']['pxbgt'], ' ', '+','%20');

This did not work either - unless I have missed something?
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on February 04, 2009, 04:38:48 AM
Try this then:

$trans = array("+" => "%20", " " => "%20");
$message['member']['options']['pxbgt'] = strtr($message['member']['options']['pxbgt'], $trans);


NOTE: This is hard coded theres a chance that it might affect the efficiency of your forum. There is a proper way to do this but i haven't got time to play around with it :(
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on February 04, 2009, 08:20:09 AM
Cheers dude - couple of questions:

1: Where would this code be placed? Under the existing mygamercard img ref call?
2: By efficiency what do you mean load times?
3: Do you think it is a hard code mod worth having?

Cheers bro.
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on February 04, 2009, 11:23:45 AM
Above it the first "echo"

It might effect load times but i really doubt it will have any effect. I just put there just to cover myself tbh. Just incase someone else is having the same problem and wants to use that code. But if you notice anything you know what it is. The actual xbox mod is fine though no hardcoded code ;)
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on February 06, 2009, 09:46:29 PM
Cheers bro - it works fine - could be a modification for a later date?

I also hardcoded a link for the profil so other members can link directly to xbox.com to add that user to their FL.

I have attached an image below so you can see what result I have :)
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on March 16, 2009, 03:24:47 PM
Hey bro - I made a few modifications to my site and have managed to put the avatar on the member profile instead of within the posts.

I have one qwestion: When there is a user who has NO gamertag filled in it just shows nulled information - could you help me get it working so that the feilds will only show when information is filled in - such as how it works on the posts?

Here is a link to my profile on my site: http://consoleninjas.co.uk/forum/index.php?action=profile;u=1;sa=summary

As you can see it is working but here is a link to a profile with no gamertag: http://consoleninjas.co.uk/forum/index.php?action=profile;u=7

I edited the code to a point where it stoped working - something about ' being excaped by \ ??

I have attached both a working and non working copy of my profile template.

Cheers for your help dude!

Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on March 16, 2009, 04:52:07 PM
Quote from: Youngiiie on March 16, 2009, 03:24:47 PM
Hey bro - I made a few modifications to my site and have managed to put the avatar on the member profile instead of within the posts.

I have one qwestion: When there is a user who has NO gamertag filled in it just shows nulled information - could you help me get it working so that the feilds will only show when information is filled in - such as how it works on the posts?

Here is a link to my profile on my site: http://consoleninjas.co.uk/forum/index.php?action=profile;u=1;sa=summary

As you can see it is working but here is a link to a profile with no gamertag: http://consoleninjas.co.uk/forum/index.php?action=profile;u=7

I edited the code to a point where it stoped working - something about ' being excaped by \ ??

I have attached both a working and non working copy of my profile template.

Cheers for your help dude!

In addition to the above I also need the space fix to work - at the moment it currently shows a + as before - I tried to fix this using the code you provided before but I get the tamplate parse error - the example i am talking about can be seen in the non working display template attached to previous post.

Cheers bro.
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on March 16, 2009, 10:37:11 PM
Hope this is what you wanted mate :)

I didn't get chance to test it sorry, let me know if it chucks up an error.

I edited the non-working one.



Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on March 17, 2009, 09:25:16 AM
Hey dude,

Thanks for having a stab at it!

No errors but nothing shows up for gamertag info now - its like it has been wiped out? Could be something to do with the admin enabled / gamertag info check?

//XBLGT Mod.
$trans = array("+" => "%20", " " => "%20");
$message['member']['options']['pxbgt'] = strtr($message['member']['options']['pxbgt'], $trans);
//Check to see if the admin has enabled the mod and to check if the member has entered a gamertag or not
if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
{
echo '

<tr><td><b>XBL Gamercard:</b></td> <td><img src="http://card.mygamercard.net/'.$context['member']['options']['pxbgt'].'.png" alt="XBL gamercard of '.$context['member']['options']['pxbgt'].'" /></a></td>
</tr><tr>
<td><b>Add to XBL friends:</b></td> <td><a title="Send a Friend Request" href="http://live.xbox.com/en-GB/profile/FriendsMgmt.aspx?ru=%252fen-GB%252fprofile%252fprofile.aspx%253fpp%253d0%2526GamerTag%253d'.$context['member']['options']['pxbgt'].'&amp;gt='.$context['member']['options']['pxbgt'].'&amp;act=Add" target="_blank">Send a Friend Request</a></td>
</tr>';
}

echo '<tr>
<td><b>', $txt[69], ': </b></td>
<td>';


If there something missing maybe?
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on March 17, 2009, 12:12:00 PM
I think you have to enable some of the options in the admin panel to show it, anyway do this to get rid of that check

Find:

   //Check to see if the admin has enabled the mod and to check if the member has entered a gamertag or not
            if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
            {


Replace:

   //Check to see if the admin has enabled the mod and to check if the member has entered a gamertag or not
            if (!empty($message['member']['options']['pxbgt']))
            {


Find:

//Added check to see if the admin has enabled the mod and to check if the member has entered a gamertag or not
if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
{


Replace:

//Added check to see if the admin has enabled the mod and to check if the member has entered a gamertag or not
if (!empty($message['member']['options']['pxbgt']))
{


If that still doesn't do what you wanted, contact me through PM ;)
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on March 18, 2009, 03:09:32 AM
Sent you a PM bro - cheers for the help on this.
Title: Re: Advanced Popup Xbox Gamertag
Post by: Giiyom on March 20, 2009, 03:19:28 PM
Will it works if I'm using a different language pack (french)?
And would you recommend me to install it manually?
Title: Re: Advanced Popup Xbox Gamertag
Post by: KnottyMars on March 25, 2009, 05:09:48 PM
Great work on the mod, I love the addition and it works like a champ.

I noticed another person asked if there was any possibility of have some sort of link that would add that persons GT to your friends list.

Is this something I can add to it? or maybe it was added already?

We have a gaming community (www.world-racers.com) and it would be great to click on their GT and add them as a friend straight away.

Cheers!!
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on April 01, 2009, 04:50:41 PM
Quote from: KnottyMars on March 25, 2009, 05:09:48 PM
Great work on the mod, I love the addition and it works like a champ.

I noticed another person asked if there was any possibility of have some sort of link that would add that persons GT to your friends list.

Is this something I can add to it? or maybe it was added already?

We have a gaming community (www.world-racers.com) and it would be great to click on their GT and add them as a friend straight away.

Cheers!!

Hi,

Take a look at my site - All the modifications I made were custom edits tailored to the design of my site - the maker of the mod helped me with issues I encountered - everything works fine for me.
Title: Re: Advanced Popup Xbox Gamertag
Post by: seeson on April 17, 2009, 07:27:45 PM
I have this mod installed on a 1.1.8 SMF forum and would like to make it so that the gamertag (as plain text) is a link to add to friends friends list. Can somebody please point me in the right direction?

I.E. XBLGT: Seeson (http://live.xbox.com/en-US/profile/FriendsMgmt.aspx?ru=%252fen-US%252fprofile%252fprofile.aspx%253fpp%253d0%2526GamerTag%253dSeeson&gt=Seeson&act=Add)
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on April 30, 2009, 06:00:22 PM
Quote from: seeson on April 17, 2009, 07:27:45 PM
I have this mod installed on a 1.1.8 SMF forum and would like to make it so that the gamertag (as plain text) is a link to add to friends friends list. Can somebody please point me in the right direction?

I.E. XBLGT: Seeson (http://live.xbox.com/en-US/profile/FriendsMgmt.aspx?ru=%252fen-US%252fprofile%252fprofile.aspx%253fpp%253d0%2526GamerTag%253dSeeson&gt=Seeson&act=Add)

Install the mod.

Open up your display.template.php in your theme directory (if it isn't there open up the display.template.php in the /default folder)

Find:

// PXBGT MOD
if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<img src="http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png" alt="" /></a>';
}
// If they dont want the userbar just show plain text.
if ($modSettings['enable_pxbgt_plain'] && !empty($modSettings['enable_pxbgt_post']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<div class="smalltext">
'.$txt['pxbgt_txt2'].'
               ', $message['member']['options']['pxbgt'], '</div>';
}
if ($modSettings['enable_pxbgt_popup'] && !empty($message['member']['options']['pxbgt']))
{
echo '
<a href="javascript:void(0);" onmouseover="return overlib(\'\', WIDTH, 199, HEIGHT, 135, BACKGROUND, \'http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png\', PADX, 10, 10, PADY, 10, 10);" onmouseout="return nd();" title=""><img border="0" src="' . $settings['images_url'] . '/xbgt.gif" alt="' . $message['member']['options']['pxbgt'] . '" /></a>';
}


Replace with:

// PXBGT MOD
if ($modSettings['enable_pxbgt_post'] && !empty($modSettings['enable_pxbgt_userbar']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<img src="http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png" alt="" /></a>';
}
// If they dont want the userbar just show plain text.
if ($modSettings['enable_pxbgt_plain'] && !empty($modSettings['enable_pxbgt_post']) && !empty($message['member']['options']['pxbgt']))
{
echo '
<div class="smalltext">
'.$txt['pxbgt_txt2'].'
               <a href="http://live.xbox.com/en-US/profile/profile.aspx?pp=0&GamerTag=', $message['member']['options']['pxbgt'], '">', $message['member']['options']['pxbgt'], '</a></div>';
}
if ($modSettings['enable_pxbgt_popup'] && !empty($message['member']['options']['pxbgt']))
{
echo '
<a href="javascript:void(0);" onmouseover="return overlib(\'\', WIDTH, 199, HEIGHT, 135, BACKGROUND, \'http://card.mygamercard.net/'.$message['member']['options']['pxbgt'].'.png\', PADX, 10, 10, PADY, 10, 10);" onmouseout="return nd();" title=""><img border="0" src="' . $settings['images_url'] . '/xbgt.gif" alt="' . $message['member']['options']['pxbgt'] . '" /></a>';
}


and sorry for the late reply!
Title: Re: Advanced Popup Xbox Gamertag
Post by: seeson on April 30, 2009, 06:08:50 PM
Thank you very much! It works :)
Title: Re: Advanced Popup Xbox Gamertag
Post by: fext on May 01, 2009, 08:29:46 AM
Sorry I never helped with this - I made alot of global changes to the files that are mentioned in this thread nad did not want to post those changes up as they might have messed up the site being modified.

Glad you finally got it working Seeson :)
Title: Re: Advanced Popup Xbox Gamertag
Post by: h4nbury on July 07, 2009, 04:56:45 PM
hey i really want this on 1.1.9, please can it be updated?
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on July 08, 2009, 06:00:40 AM
@h4nbury. Ive tested it and it works fine on a fresh install of 1.1.9. Let me know if you have any error's.

Updated mod to 1.2

- Updated compatibility to 1.1.9. (No changes needed)
- Added New Xbox Live icon.

Ive started work on upgrading this to 2.0 RC1 when i had some free time, hopefully it will be done sometime soon and will only need a few edits done to it when 2.0 becomes final.
Title: Re: Advanced Popup Xbox Gamertag
Post by: h4nbury on July 18, 2009, 03:47:29 AM
well i still cant get it working on it, and now i have updated to 1.1.10, please can you update it?
Title: Re: Advanced Popup Xbox Gamertag
Post by: d58e7 on August 02, 2009, 10:39:51 AM
I installed it fine with the package manager, but for some reason when I scroll over the icon nothing happens (Same thing happens when I click it) What could be causing this?
Title: Re: Advanced Popup Xbox Gamertag
Post by: smp420 on September 14, 2009, 02:03:27 AM
any way to make it so it shows without putting the mouse over the icon
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on September 14, 2009, 07:58:59 AM
Quote from: smp420 on September 14, 2009, 02:03:27 AM
any way to make it so it shows without putting the mouse over the icon

Admin -> Features and options -> Xbox GamerTag -> Display as a gamercard

Then you might want to disable "Display as a Xbox icon". You also may need modify your theme's css so the gamercard fits.
Title: Re: Advanced Popup Xbox Gamertag
Post by: Bijan641 on April 04, 2010, 11:20:25 PM
For some reason the hover button function isn't working anymore for me. I don't know what the issue is.
Title: Re: Advanced Popup Xbox Gamertag
Post by: MoreBloodWine on August 28, 2010, 04:05:00 AM
I know with 2.0 you can do the new field thing but I really like this mod so any chance of a 2.0 RC3 port ?
Title: Re: Advanced Popup Xbox Gamertag
Post by: mcliff1971 on June 26, 2011, 07:07:48 PM
Where do users enter their gamertag on their profile?  The MOD installed correctly (1.1.13), I can set the admin settings for the mod, but I don't see anywhere for users to enter their gamertag on their profile???
Title: Re: Advanced Popup Xbox Gamertag
Post by: KiLLuMiNaTi-7- on June 26, 2011, 07:58:16 PM
Quote from: mcliff1971 on June 26, 2011, 07:07:48 PM
Where do users enter their gamertag on their profile?  The MOD installed correctly (1.1.13), I can set the admin settings for the mod, but I don't see anywhere for users to enter their gamertag on their profile???

It should be under Profile -> Modify Profile -> Forum Profile. If its not there make sure you have the permissions set up correct ("Edit their additional profile options" should be ticked, and maybe more profile related ones.)

BTW this mod won't work properly no more because mygamercard.net is no longer up - Hence why I've archived the mod.

I'm no longer supporting it too. Only the SMF 2.0 version.