• Welcome to Simple Machines Community Forum. Please login or sign up.

Advanced Popup Xbox Gamertag

Started by KiLLuMiNaTi-7-, June 16, 2008, 03:12:42 PM

Previous topic - Next topic

KiLLuMiNaTi-7-

June 16, 2008, 03:12:42 PM Last Edit: October 19, 2010, 03:47:08 PM by KiLLuMiNaTi-7-
Link to Mod

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



Advanced Popup Xbox Gamertag V1.1
By KiLLuMiNaTi-7- 



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
1.1
- Added new features.

kizer

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
Own a Jeep? Links4Jeeps.com

KiLLuMiNaTi-7-

June 18, 2008, 04:51:24 AM #2 Last Edit: August 26, 2008, 10:39:33 AM by KiLLuMiNaTi-7-
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.

If anyone else has got it working on there forum could you please post a link so we can see it. Thanks

kizer

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.
Own a Jeep? Links4Jeeps.com

kizer

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.
Own a Jeep? Links4Jeeps.com

KiLLuMiNaTi-7-

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.

d58e7

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?

KiLLuMiNaTi-7-

Im trying to fix a bug at the moment. I wont be adding anything to the mod until i can fix the bug.

KiLLuMiNaTi-7-

Upadated

All people who has had the bug. Uninstall the old version and install the new one. Here

Ive only added a extra text string. To tell members to add a "+" instead of a space.

fext

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?

KiLLuMiNaTi-7-

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.

fext

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

KiLLuMiNaTi-7-

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

fext

Cheers bro - would appreciate that loads :)

mattz83

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

KiLLuMiNaTi-7-

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?

mattz83

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.

MisterPuk

August 19, 2008, 10:38:19 AM #17 Last Edit: August 19, 2008, 10:41:00 AM by MisterPuk
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'], '';

KiLLuMiNaTi-7-

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.

KiLLuMiNaTi-7-

MOD UPDATED Its more like my PSN ID mod now. So now you can choose how you want it to display.

Advertisement: