PDA

View Full Version : Profile Enhancements - Xbox Live Recent Games in Profile Tab


Bilderback
11-20-2008, 10:00 PM
This mod is DEPRECIATED and no longer works
The API was taken offline

Xbox Live Recent Games Tab v1.3

WARNING! You must be running minimum of PHP5

Description
This vBulletin product displays a profile tab for your members
showing their recent games,status, achievements and more from Xbox Live.
This product uses the API from Duncan MacKenzies Xbox Gamertag Data
located at http://www.duncanmackenzie.net/
Thanks goes out to Duncan.


Features
adds users recent games, achievements and more to a profile tab
This product integrates by default with Gamefields Icons Userfields Product (https://vborg.vbsupport.ru/showthread.php?t=196587)
You can choose to display as first or last profile tab.
You can choose your own user profile field if needed.
No Template Edits! Uses plugins, phrases and hooks
admincp settings enable/disable/display options

Requirements
This product uses the simple_xml function released with PHP5
You must be running PHP5 - will not work on php4
If you have modified your member profile templates (ie, Facebook MySpace hacks), this Mod may not work.

Reported Issues and planned fixes
small issue with special characters
increase in server load


INSTALLATION
Upload xblcache folder to forum/ (or create your own folder)
You can choose your directory location in settings
CHMOD your cache directory per your server suggested.(777 or 755)
(If you already have the Bungie Info Halo 3 Games mod (https://vborg.vbsupport.ru/showthread.php?t=197344) installed,
you can use the same cache folder for both mods.)
This mod must be able to write xml files to cache folder.
Import the XML file into your Product manager
Go to vBulletin Settings->Xbox Live Info Tab
Set up your preferences and enable product.

UPGRADE:
-Import the XML file and select 'Allow Overwrite'

DEMO HERE (http://imgaming.net/forum/member.php?u=2)

Feature Requests
usergroup settings
template enhancements
style settings
forumid settings

VERSION HISTORY

version 1.3
~bug fix
~updated API location
~remove tab display if gamertag field empty
version 1.2
~added tab title field to settings
~-changed xml filename to {GAMERTAG}_xbox.xml
~fixed code and template error
version 1.1
~addressed foreach() error on invalid data - added valid check
version 1.0
~original beta release

stickskills
11-21-2008, 06:07 AM
Oh wow, great mod.

Im Spazzoid
11-21-2008, 06:18 AM
fantastic mod, nominated for MOTM

jambo_1969
11-21-2008, 02:03 PM
Excellent Mod.

Small issues with special chars, and you need to chmod your xblcache folder on your server, but other than that - brilliant !

daydie
11-21-2008, 02:16 PM
Good mod,Thanks

jambo_1969
11-21-2008, 03:24 PM
A bit of an increase in server load though....

dirtyfeast
11-21-2008, 03:39 PM
Make one for PS3, and you'll be the man.

Bilderback
11-21-2008, 04:06 PM
Small issues with special chars, and you need to chmod your xblcache folder on your server
I'll look into the special characters - I'm not too familiar with handling them.
A bit of an increase in server load though....
I'll debug and try to find whats going on.
Do you have any details on your end?


Make one for PS3, and you'll be the man.

Does PS3 have any feed APIs?
Anyplace to grab data?

a marked man 70
11-21-2008, 05:01 PM
top mod. voted for motm

Gryphon
11-21-2008, 08:20 PM
Bilderback you can use vB_XML_Parser and then it won't be PHP5 dependent.

neoxephon
11-21-2008, 10:36 PM
Awesome modification, I have it installed on my forums now. Even nominated it for MOTM. Keep up the great work and if a PS3 and Wii version are possible those would be great as well.

roxorx
11-21-2008, 11:08 PM
Install seemed to go OK, but whenever I click on 'Add your gamertag here' it just takes me to the usual edit details page at :

http://********.co.uk/forums/profile.php?do=editprofile

I'm guessing it's something simple I've missed! Anyone got any ideas?

[edit[ it was something simple, but I now get the following error when viewing my profile after putting an xbox gamer tag in :


Fatal error: Call to undefined function curl_init() in E:\domains\r\roxorx.co.uk\user\htdocs\forums\membe r.php(454) : eval()'d code on line 61

Bilderback
11-21-2008, 11:41 PM
Bilderback you can use vB_XML_Parser and then it won't be PHP5 dependent.
Thanks Gryphon, I'll look into rewriting the code.
Feel free to hack it up your self to improve anything.
Im still new to vbcode and php. :erm:

~ the following error when viewing my profile after putting an xbox gamer tag in :

Fatal error: Call to undefined function curl_init() in E:\domains\r\roxorx.co.uk\user\htdocs\forums\membe r.php(454) : eval()'d code on line 61
Does your php support cURL?
I am searching for an alternative solution to retrieving data.

roxorx
11-21-2008, 11:46 PM
Thanks Gryphon, I'll look into rewriting the code.
Feel free to hack it up your self to improve anything.
Im still new to vbcode and php. :erm:


Does your php support cURL?
I am searching for an alternative solution to retrieving data.

To be honest, I have no idea! Web stuff aint my specialty in the world of IT sadly. Where would I find that out? The issue isn't down to Profile Fields in some way is it? Under AdminCP I only have field1 through field4.

Bilderback
11-22-2008, 12:01 AM
To be honest, I have no idea! Web stuff aint my specialty in the world of IT sadly. Where would I find that out? The issue isn't down to Profile Fields in some way is it? Under AdminCP I only have field1 through field4.
You could view your phpinfo located in admincp
Maintenance -> View PHP Info
Look for curl support.

I am working on a new release that will replace the php5 and curl dependencies.

zombietom
11-26-2008, 02:11 PM
Great Mod --thanks! Installed

zombietom
11-26-2008, 03:33 PM
Modification of the Month -clicked!

zombietom
11-27-2008, 01:24 PM
I installed the upgrade and everything went great -no problems at all.
thanks

mikeo9043
12-11-2008, 08:24 PM
I installed it, it's working great! A+ Mod! Thanks again!

Blumy
12-11-2008, 08:36 PM
What If I'm using the modification gXboxLive? I already have a profile field set up for gamertags when users register. Is it possible that this modification will pick up their gamertag in that field?

mikeo9043
12-11-2008, 08:47 PM
What If I'm using the modification gXboxLive? I already have a profile field set up for gamertags when users register. Is it possible that this modification will pick up their gamertag in that field?

Just find out what field it is and put that field instead of the default one that comes with this mod which would be this: gf_xbox

So find out what field gXboxLive is using and put that, on my site for example it is field8.

Blumy
12-11-2008, 09:19 PM
alright, thanks a lot.

Blumy
12-11-2008, 11:15 PM
Exactly where should xblcache be if I don't want to change the cache folder field in the admincp? I uploaded it into my forum root folder, but it says I didn't edit a valid value for it.

mikeo9043
12-12-2008, 04:25 AM
Exactly where should xblcache be if I don't want to change the cache folder field in the admincp? I uploaded it into my forum root folder, but it says I didn't edit a valid value for it.

I just put mine in the root folder, and it is working fine...did you CHMOD it?

Blumy
12-12-2008, 02:19 PM
It's working now.

MotMann
02-18-2009, 06:49 PM
There no Games displayed right now, even in the Demoside :(
http://imgaming.net/forum/member.php?u=176


Is the XBL Network down? Or a bug in the Mod?

MotMann
02-22-2009, 11:58 AM
No support here?

camomouse
03-17-2009, 01:03 PM
Doesn't work well with Vbulletin 3.8.1

AK47 Nemesis
03-21-2009, 08:11 PM
There no Games displayed right now, even in the Demoside :(
http://imgaming.net/forum/member.php?u=176


Is the XBL Network down? Or a bug in the Mod?

Same problem on my site.

Gamelobby
04-04-2009, 07:57 AM
So is it a 3.8+ issue..?

I would love to add this, but i am running 3.8.2.

appsfinder
04-04-2009, 09:11 PM
need help just stoped working :confused:

zombietom
04-06-2009, 02:12 PM
yep --it did the same to me ..i think it is some kind of issue with xbl leaderboard mod

fattony69
04-06-2009, 02:45 PM
I have this running on my site (3.8.2 with vBSEO and many other mods) and it runs perfect. Check if you installed it correctly.

Gamelobby
04-06-2009, 11:51 PM
I have this running on my site (3.8.2 with vBSEO and many other mods) and it runs perfect. Check if you installed it correctly.

Are you running the gxboxlive leaderboard mod.?

*edit*
YES he is.! :)
--------------------


Is there anyway for the "TAB" to NOT show up for profiles that dont have xbox.?
PS3 people will not be happy to have this tab on thier profile.!?

I might have to disable this, until i get that figured out. Dont want to piss off PS3 members.

fattony69
04-07-2009, 01:15 AM
Are you running the gxboxlive leaderboard mod.?

*edit*
YES he is.! :)
--------------------


Is there anyway for the "TAB" to NOT show up for profiles that dont have xbox.?
PS3 people will not be happy to have this tab on thier profile.!?

I might have to disable this, until i get that figured out. Dont want to piss off PS3 members.

I assume you can edit so you can put the <if you don't have an xbox live account> on it.

*Caution - Off Topic*
Do you know of any PS3 Mods?

zombietom
04-07-2009, 12:39 PM
i made a mod that will let you show a ps3 gamer card in profile or in post

Gamelobby
04-08-2009, 02:03 AM
I assume you can edit so you can put the <if you don't have an xbox live account> on it.

*Caution - Off Topic*
Do you know of any PS3 Mods?
PS3 doesn't have any kind of updating system, so the only thing you can do is add one of those cards that you make manually.

Like this..
i made a mod that will let you show a ps3 gamer card in profile or in post



Fattony.. What exactly does this mean.?
<if you don't have an xbox live account>
How will that remove the tab from a persons profile.?

fattony69
04-08-2009, 02:38 AM
PS3 doesn't have any kind of updating system, so the only thing you can do is add one of those cards that you make manually.

Like this..




Fattony.. What exactly does this mean.?
<if you don't have an xbox live account>
How will that remove the tab from a persons profile.?

I don't know much about conditionals, but as shown here, http://www.vbulletin.com/forum/showthread.php?t=200894 you can do the same thing with if they used modifications as you can put if they the profile field or not. I would love to tell you the exact code, but I am not good with that.

Gamelobby
04-08-2009, 08:20 AM
Ahh, i see what you mean, you are just somewhat guessing, based off of that thread.
Well it does make some sense, & im sure it is possible, BUT...
I would think it would be much easier to not show the tab if they leave the xbox field blank, instead. lol

Hopefully, or this mod does me no good. :erm:

zombietom
04-08-2009, 02:31 PM
http://linkbee.com/zombietom
linkbee website is down so here is the normal link
http://www.tzaclan.net/forum/member.php?u=25

i put my ps3 card in the right block.
There is a updating card that comes from the uk..it updates trophies and everything ..i'm using it as a sig at the moment but it could be done as a card on post or in the right block..but would need a size adjustment.
Click on the "about me" tab to see the updating sig i'm using.

OcR Envy
04-09-2009, 01:17 PM
For some reason when I install your Bungie.net recent games tab this one stops working. Any help?

Gamelobby
04-09-2009, 08:45 PM
Is there anyway for the "TAB" to NOT show up for profiles that dont have xbox.?
PS3 people will not be happy to have this tab on thier profile.!?

I might have to disable this, until i get that figured out. Dont want to piss off PS3 members.

Any ideas..?

zombietom
04-11-2009, 01:37 AM
This mod is not working due to http://www.duncanmackenzie.net/ site being down..this is where the stats come from...at least that is what the developer told me and sure enough that site is down.

zombietom
04-11-2009, 01:40 AM
as for disabling this mod so the ps3 gamers don't get upset..you should be able to write in the <if condition> code to not show it unless they have a gamertag in the field.

Gamelobby
04-11-2009, 01:45 AM
as for disabling this mod so the ps3 gamers don't get upset..you should be able to write in the <if condition> code to not show it unless they have a gamertag in the field.

That is exactly what i want, but i dont know how to write such a code. :)

zombietom
04-11-2009, 01:59 AM
There should be some post on here on how to do it if you want to try yourself, if not there is a section to request help
https://vborg.vbsupport.ru/forumdisplay.php?f=30&order=desc

let me know -- i might be able to help

TigerC10
04-13-2009, 12:51 AM
To disable the tab from displaying for people that don't have the XBox Live service, you just need to change some of the plugin code.

For the simple fix, change the first line of your plugin Xbox Live Info Tab (it's at the member_build_blocks_start hook) code to:


if ( $vbulletin->options['xblinfo_enable_product'] AND $userinfo[ $vbulletin->options['xblinfo_fieldid'] ] )
{



Altered code is in red. It's not the most efficient code, but it should work fine.

Gamelobby
04-13-2009, 02:25 AM
To disable the tab from displaying for people that don't have the XBox Live service, you just need to change some of the plugin code.

For the simple fix, change the first line of your plugin Xbox Live Info Tab (it's at the member_build_blocks_start hook) code to:

if ( $vbulletin->options['xblinfo_enable_product'] AND $this->profile->userinfo[ $vbulletin->options['xblinfo_fieldid'] ] )
{

Altered code is in red. It's not the most efficient code, but it should work fine.
It screwed up my profile.. and still no tab. (it made all the font on the site much bigger.)
It actually screwed up my profile worse than others because of my photobucket slide show mod, but it still screwed up other profile too.

Also there is this error code across the top of the site now.. Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /home/content/m/i/l/milo327/html/Forum/member.php(463) : eval()'d code on line 1

Any other thoughts..?


Here is the full xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="xblinfo_tab" active="1"> <title>Xbox Live Info tab in Profile</title> <description>Adds Xbox Live recent games list in user profile tab.</description> <version>1.2</version> <url>https://vborg.vbsupport.ru/showthread.php?t=196843</url> <versioncheckurl /> <dependencies> <dependency dependencytype="php" minversion="5" maxversion="" /> </dependencies> <codes> </codes> <templates> <template name="memberinfo_block_xblinfo" templatetype="template" date="1227759456" username="Dudditz" version="1.2"><![CDATA[<div class="alt1 block_row">
<ul class="list_no_decoration">
$block_data[xblinfo]
</ul>
</div>]]></template> </templates> <plugins> <plugin active="0" executionorder="5"> <title>Templates Cache</title> <hookname>cache_templates</hookname> <phpcode><![CDATA[$globaltemplates[] = 'memberinfo_block_xblinfo';]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>Xbox Live Info Tab</title> <hookname>member_build_blocks_start</hookname> <phpcode><![CDATA[if ($vbulletin->options['xblinfo_enable_product'])
{
error_reporting(0);
if(empty($vbulletin->options['xblinfo_tabtitle']))
{
$xblinfo_tabtitle = 'Xbox Live Games';
}else{
$xblinfo_tabtitle = $vbulletin->options['xblinfo_tabtitle'];
}
$blocklist = array_merge($blocklist, array(
'xblinfo' => array(
'class' => 'xblinfo',
'title' => $xblinfo_tabtitle,
'hook_location' => ($vbulletin->options['xblinfo_tab_location']==0) ? 'profile_left_first' : 'profile_left_last'
)
));

class vB_ProfileBlock_xblinfo extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_xblinfo';
function confirm_empty_wrap()
{
return false;
}

function confirm_display()
{
return ($this->block_data['xblinfo'] != '');
}

function prepare_output($id = '', $options = array())
{ global $vbulletin;
$pmgc_gamertag = '';
$xblupf = $vbulletin->options['xblinfo_fieldid'];
$pmgc_gamertag = $this->profile->userinfo[$xblupf];
if ($pmgc_gamertag=='') {
$pmgc_xbl_content='No Gamertag on file.<br /><a href="profile.php?do=editprofile">Add your gamertag here</a>';
$this->block_data['xblinfo'] = $pmgc_xbl_content;
}else{

$getnew = true;
$pmgc_newtag = strtolower($pmgc_gamertag);
$pmgc_newtag = ereg_replace(" ", "+", $pmgc_newtag);
$gamerxml = ereg_replace(" ", "%20", $pmgc_gamertag);
$url = "http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=" . $gamerxml;
$file = "".$pmgc_newtag."_xbox.xml";
$path = $vbulletin->options['xblinfo_cache_dir']."/";
if (!is_dir($path)) { return; }else{

$filetime = @filemtime($path.$file);
$time = time();
$difference = ($time - $filetime);
if (file_exists($path.$file))
{
$filetime = @filemtime($path.$file);
$time = time();
$difference = ($time - $filetime);
if ($difference < 60)
{
$getnew = false;
}
}
$pmgc_xbl_content = '';
//update temp file with live xml data
if ($getnew === true)
{
$fp = fopen($path.$file, "w+");
$ch = curl_init();
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_exec($ch); // get data from url and dump to file
curl_close($ch);
fclose($fp);
}
if (file_exists($path.$file))
{
$xml = simplexml_load_file($path.$file);

$pmgc_xbl_content = '<table width="100%" cellpadding="5" cellspacing="5" style="border: 1px solid"><tr><td valign="top"><img src="' . $xml->TileUrl . '"></td><td align="left" valign="top" nowrap><b>' . $xml->Gamertag . '</b><br> <br>Reputation:<br><img src="' . $xml->ReputationImageUrl . '"></td><td align="left" valign="top" width="100%">Gamer Score: ' . $xml->GamerScore . '<br> <br>Zone: ' . $xml->Zone . '</td></tr><tr><td><b>' . $xml->PresenceInfo->StatusText . '</b></td><td colspan=2><b>' . $xml->PresenceInfo->Info . '</b></td></tr></table>';
if ($xml->State == "Valid") {
foreach ($xml->RecentGames->XboxUserGameInfo as $games)
{
$pmgc_xbl_content .= '<br><table width="100%" cellpadding="5" cellspacing="5" style="border: 1px solid"><tr><td valign="top"><img src="' . $games->Game->Image64Url . '"></td><td align="left" valign="top" width="100%"><b>' . $games->Game->Name . '</b><br> <br>Achievements: ' . $games->Achievements . ' of ' . $games->Game->TotalAchievements . ' possible.<br> <br>Gamer Score: ' . $games->GamerScore . ' of ' . $games->Game->TotalGamerScore . ' possible.</td></tr></table>';
}
}else{unlink($path.$file);}
$pmgc_xbl_content .= "<br><div align=\"center\" class=\"smallfont\">provided by <a target=\"_blank\" href=\"http://www.pimpmygamercard.com\"><b>PimpMyGamercard</b></a></div>";
}
$this->block_data['xblinfo'] = $pmgc_xbl_content;
}
}
}
}
}]]></phpcode> </plugin> </plugins> <phrases> <phrasetype name="GLOBAL" fieldname="global"> <phrase name="xblinfo_xblinfo" date="0" username="" version=""><![CDATA[Xbox Live Info]]></phrase> </phrasetype> <phrasetype name="vBulletin Settings" fieldname="vbsettings"> <phrase name="setting_xblinfo_cache_dir_desc" date="1227758607" username="Administrator" version="1.1"><![CDATA[Please enter a folder, to which the xml files should be stored <br />(Please no slash (/) at the begining or the end)]]></phrase> <phrase name="setting_xblinfo_cache_dir_title" date="1227758607" username="Administrator" version="1.1"><![CDATA[Cache Folder]]></phrase> <phrase name="setting_xblinfo_enable_product_desc" date="1227758504" username="Administrator" version="1.1"><![CDATA[Select Yes to turn enable product]]></phrase> <phrase name="setting_xblinfo_enable_product_title" date="1227758504" username="Administrator" version="1.1"><![CDATA[Enable Product]]></phrase> <phrase name="setting_xblinfo_fieldid_desc" date="0" username="Dudditz" version="1.0"><![CDATA[If you have my <a href="https://vborg.vbsupport.ru/showthread.php?t=196587" target="_blank">Gamefields Icons Userfields</a> Product installed, leave this setting at <b>gf_xbox</b><br />OR you may use your own user profile field<br />Example: If your gamertag field id is 5, enter <b>field5</b> ]]></phrase> <phrase name="setting_xblinfo_fieldid_title" date="0" username="Dudditz" version="1.0"><![CDATA[User Field]]></phrase> <phrase name="setting_xblinfo_tab_location_desc" date="1227758487" username="Administrator" version="1.1"><![CDATA[Please select hook location]]></phrase> <phrase name="setting_xblinfo_tab_location_title" date="1227758487" username="Administrator" version="1.1"><![CDATA[Profile Tab Hook location]]></phrase> <phrase name="setting_xblinfo_tabtitle_desc" date="1227758579" username="Administrator" version="1.1"><![CDATA[You can set your own title for the profile tab here.]]></phrase> <phrase name="setting_xblinfo_tabtitle_title" date="1227758579" username="Administrator" version="1.1"><![CDATA[Change the profile tab title]]></phrase> <phrase name="settinggroup_xblinfo_group" date="0" username="Dudditz" version="1.0"><![CDATA[Xbox Live Info Tab]]></phrase> </phrasetype> </phrases> <options> <settinggroup name="xblinfo_group" displayorder="65535"> <setting varname="xblinfo_enable_product" displayorder="5"> <datatype>boolean</datatype> <optioncode>yesno</optioncode> <defaultvalue>0</defaultvalue> </setting> <setting varname="xblinfo_tab_location" displayorder="10"> <datatype>free</datatype> <optioncode><![CDATA[select:piped
0|$template_hook[profile_left_first]
1|$template_hook[profile_left_last]]]></optioncode> <defaultvalue>0</defaultvalue> </setting> <setting varname="xblinfo_tabtitle" displayorder="15"> <datatype>free</datatype> <defaultvalue>Xbox Live Games</defaultvalue> </setting> <setting varname="xblinfo_cache_dir" displayorder="30"> <datatype>free</datatype> <validationcode><![CDATA[return (is_dir(DIR . '/' . $data . '/'));]]></validationcode> <defaultvalue>xblcache</defaultvalue> </setting> <setting varname="xblinfo_fieldid" displayorder="40"> <datatype>free</datatype> <defaultvalue>gf_xbox</defaultvalue> </setting> </settinggroup> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> <templateedits> </templateedits></product>

TigerC10
04-13-2009, 02:37 AM
Eh? Well the only reason that would happen is if the template code is still trying to display something.

Try changing your memberinfo_block_xblinfo template to this (in addition to the plugin change):

<if condition="$block_data[xblinfo]">
<div class="alt1 block_row">
<ul class="list_no_decoration">
$block_data[xblinfo]
</ul>
</div>
</if>


See if that clears things up. :) Template caching could be affecting the output.

Shouldn't be necessary anymore, figured out the original modification to this mod used the wrong variable name. :p

Gamelobby
04-13-2009, 03:54 AM
Nope same thing.. error code on top, photobucket slideshow is super wide, & youtube, mp3 player are not showing on profile.
Still no tab.

TigerC10
04-13-2009, 05:15 AM
My bad, dude. I used the wrong variable name in the plugin.

Change the first line in Plugin Xbox Live Info Tab:

if ( $vbulletin->options['xblinfo_enable_product'] AND $userinfo[ $vbulletin->options['xblinfo_fieldid'] ] )
{


That should resolve it. You shouldn't need to alter the template.

Gamelobby
04-13-2009, 06:22 AM
Yup that did it.!
Thanks man

Out of curiousity what/how would this work in a block on the side.?

TigerC10
04-13-2009, 03:34 PM
Well, I don't use this mod so I'm not sure how it would look in a profile block on the right side instead of on the left. In order to do that you'll have to change the XML file and re-import the product. Here's what you'll use.


<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="xblinfo_tab" active="1"> <title>Xbox Live Info tab in Profile</title> <description>Adds Xbox Live recent games list in user profile tab.</description> <version>1.2</version> <url>https://vborg.vbsupport.ru/showthread.php?t=196843</url> <versioncheckurl /> <dependencies> <dependency dependencytype="php" minversion="5" maxversion="" /> </dependencies> <codes> </codes> <templates> <template name="memberinfo_block_xblinfo" templatetype="template" date="1227759456" username="Dudditz" version="1.2"><![CDATA[<div class="alt1 block_row">
<ul class="list_no_decoration">
$block_data[xblinfo]
</ul>
</div>]]></template> </templates> <plugins> <plugin active="0" executionorder="5"> <title>Templates Cache</title> <hookname>cache_templates</hookname> <phpcode><![CDATA[$globaltemplates[] = 'memberinfo_block_xblinfo';]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>Xbox Live Info Tab</title> <hookname>member_build_blocks_start</hookname> <phpcode><![CDATA[if (
$vbulletin->options['xblinfo_enable_product'] ]
AND $userinfo[ $vbulletin->options['xblinfo_fieldid'] ] /* Hide tab for members without XBox Live by TigerC10 */
) {
error_reporting(0);
if(empty($vbulletin->options['xblinfo_tabtitle']))
{
$xblinfo_tabtitle = 'Xbox Live Games';
}else{
$xblinfo_tabtitle = $vbulletin->options['xblinfo_tabtitle'];
}
$blocklist = array_merge($blocklist, array(
//Extended template hook location by TigerC10
$blocklocation;
switch($vbulletin->options['xblinfo_tab_location']){
case 0:
$blocklocation = 'profile_left_first';
break;
default:
case 1:
$blocklocation = 'profile_left_last';
break;
case 2:
$blocklocation = 'profile_right_first';
break;
case 3:
$blocklocation = 'profile_right_mini';
break;
case 4:
$blocklocation = 'profile_right_album';
break;
case 5:
$blocklocation = 'profile_right_last';
break;
}

'xblinfo' => array(
'class' => 'xblinfo',
'title' => $xblinfo_tabtitle,
'hook_location' => $blocklocation
)
//End extended template hook location by TigerC10
));

class vB_ProfileBlock_xblinfo extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_xblinfo';
function confirm_empty_wrap()
{
return false;
}

function confirm_display()
{
return ($this->block_data['xblinfo'] != '');
}

function prepare_output($id = '', $options = array())
{ global $vbulletin;
$pmgc_gamertag = '';
$xblupf = $vbulletin->options['xblinfo_fieldid'];
$pmgc_gamertag = $this->profile->userinfo[$xblupf];
if ($pmgc_gamertag=='') {
$pmgc_xbl_content='No Gamertag on file.<br /><a href="profile.php?do=editprofile">Add your gamertag here</a>';
$this->block_data['xblinfo'] = $pmgc_xbl_content;
}else{

$getnew = true;
$pmgc_newtag = strtolower($pmgc_gamertag);
$pmgc_newtag = ereg_replace(" ", "+", $pmgc_newtag);
$gamerxml = ereg_replace(" ", "%20", $pmgc_gamertag);
$url = "http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=" . $gamerxml;
$file = "".$pmgc_newtag."_xbox.xml";
$path = $vbulletin->options['xblinfo_cache_dir']."/";
if (!is_dir($path)) { return; }else{

$filetime = @filemtime($path.$file);
$time = time();
$difference = ($time - $filetime);
if (file_exists($path.$file))
{
$filetime = @filemtime($path.$file);
$time = time();
$difference = ($time - $filetime);
if ($difference < 60)
{
$getnew = false;
}
}
$pmgc_xbl_content = '';
//update temp file with live xml data
if ($getnew === true)
{
$fp = fopen($path.$file, "w+");
$ch = curl_init();
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_exec($ch); // get data from url and dump to file
curl_close($ch);
fclose($fp);
}
if (file_exists($path.$file))
{
$xml = simplexml_load_file($path.$file);

$pmgc_xbl_content = '<table width="100%" cellpadding="5" cellspacing="5" style="border: 1px solid"><tr><td valign="top"><img src="' . $xml->TileUrl . '"></td><td align="left" valign="top" nowrap><b>' . $xml->Gamertag . '</b><br> <br>Reputation:<br><img src="' . $xml->ReputationImageUrl . '"></td><td align="left" valign="top" width="100%">Gamer Score: ' . $xml->GamerScore . '<br> <br>Zone: ' . $xml->Zone . '</td></tr><tr><td><b>' . $xml->PresenceInfo->StatusText . '</b></td><td colspan=2><b>' . $xml->PresenceInfo->Info . '</b></td></tr></table>';
if ($xml->State == "Valid") {
foreach ($xml->RecentGames->XboxUserGameInfo as $games)
{
$pmgc_xbl_content .= '<br><table width="100%" cellpadding="5" cellspacing="5" style="border: 1px solid"><tr><td valign="top"><img src="' . $games->Game->Image64Url . '"></td><td align="left" valign="top" width="100%"><b>' . $games->Game->Name . '</b><br> <br>Achievements: ' . $games->Achievements . ' of ' . $games->Game->TotalAchievements . ' possible.<br> <br>Gamer Score: ' . $games->GamerScore . ' of ' . $games->Game->TotalGamerScore . ' possible.</td></tr></table>';
}
}else{unlink($path.$file);}
$pmgc_xbl_content .= "<br><div align=\"center\" class=\"smallfont\">provided by <a target=\"_blank\" href=\"http://www.pimpmygamercard.com\"><b>PimpMyGamercard</b></a></div>";
}
$this->block_data['xblinfo'] = $pmgc_xbl_content;
}
}
}
}
}]]></phpcode> </plugin> </plugins> <phrases> <phrasetype name="GLOBAL" fieldname="global"> <phrase name="xblinfo_xblinfo" date="0" username="" version=""><![CDATA[Xbox Live Info]]></phrase> </phrasetype> <phrasetype name="vBulletin Settings" fieldname="vbsettings"> <phrase name="setting_xblinfo_cache_dir_desc" date="1227758607" username="Administrator" version="1.1"><![CDATA[Please enter a folder, to which the xml files should be stored <br />(Please no slash (/) at the begining or the end)]]></phrase> <phrase name="setting_xblinfo_cache_dir_title" date="1227758607" username="Administrator" version="1.1"><![CDATA[Cache Folder]]></phrase> <phrase name="setting_xblinfo_enable_product_desc" date="1227758504" username="Administrator" version="1.1"><![CDATA[Select Yes to turn enable product]]></phrase> <phrase name="setting_xblinfo_enable_product_title" date="1227758504" username="Administrator" version="1.1"><![CDATA[Enable Product]]></phrase> <phrase name="setting_xblinfo_fieldid_desc" date="0" username="Dudditz" version="1.0"><![CDATA[If you have my <a href="https://vborg.vbsupport.ru/showthread.php?t=196587" target="_blank">Gamefields Icons Userfields</a> Product installed, leave this setting at <b>gf_xbox</b><br />OR you may use your own user profile field<br />Example: If your gamertag field id is 5, enter <b>field5</b> ]]></phrase> <phrase name="setting_xblinfo_fieldid_title" date="0" username="Dudditz" version="1.0"><![CDATA[User Field]]></phrase> <phrase name="setting_xblinfo_tab_location_desc" date="1227758487" username="Administrator" version="1.1"><![CDATA[Please select hook location]]></phrase> <phrase name="setting_xblinfo_tab_location_title" date="1227758487" username="Administrator" version="1.1"><![CDATA[Profile Tab Hook location]]></phrase> <phrase name="setting_xblinfo_tabtitle_desc" date="1227758579" username="Administrator" version="1.1"><![CDATA[You can set your own title for the profile tab here.]]></phrase> <phrase name="setting_xblinfo_tabtitle_title" date="1227758579" username="Administrator" version="1.1"><![CDATA[Change the profile tab title]]></phrase> <phrase name="settinggroup_xblinfo_group" date="0" username="Dudditz" version="1.0"><![CDATA[Xbox Live Info Tab]]></phrase> </phrasetype> </phrases> <options> <settinggroup name="xblinfo_group" displayorder="65535"> <setting varname="xblinfo_enable_product" displayorder="5"> <datatype>boolean</datatype> <optioncode>yesno</optioncode> <defaultvalue>0</defaultvalue> </setting> <setting varname="xblinfo_tab_location" displayorder="10"> <datatype>free</datatype> <optioncode><![CDATA[select:piped
0|$template_hook[profile_left_first]
1|$template_hook[profile_left_last]
2|$template_hook[profile_right_first]
3|$template_hook[profile_right_mini]
4|$template_hook[profile_right_album]
5|$template_hook[profile_right_last]]]></optioncode> <defaultvalue>0</defaultvalue> </setting> <setting varname="xblinfo_tabtitle" displayorder="15"> <datatype>free</datatype> <defaultvalue>Xbox Live Games</defaultvalue> </setting> <setting varname="xblinfo_cache_dir" displayorder="30"> <datatype>free</datatype> <validationcode><![CDATA[return (is_dir(DIR . '/' . $data . '/'));]]></validationcode> <defaultvalue>xblcache</defaultvalue> </setting> <setting varname="xblinfo_fieldid" displayorder="40"> <datatype>free</datatype> <defaultvalue>gf_xbox</defaultvalue> </setting> </settinggroup> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> <templateedits> </templateedits></product>


Bilderback, sorry if it steps on your toes as the developer. I don't mean to offend.

Bilderback
04-14-2009, 11:38 PM
No, go ahead. I have stopped development on all my game modifications as another developer is discussing integration to one of his own mods. Feel free to take what you want and hack it away.

Gamelobby
04-22-2009, 09:42 PM
Is there a way to edit this so it doesn't pull from or though "pimp my gamercard"
This mod seems to be temporarily not working much more often that it is working.!!??

Can it pull the info from Xboxlive or Mygamercard.net or ANY other way so that it actually works more than 35% of the time.?
I think the main url that needs to switch is this:
"http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag="

Can it be switched to just another simple url, or does the code need to be rewritten, or...?
Mygamercard.net is hardly ever down, but obviously Xboxlive would be even better. :)

demo7up
04-22-2009, 10:37 PM
Is there a way to edit this so it doesn't pull from or though "pimp my gamercard"
This mod seems to be temporarily not working much more often that it is working.!!??

Can it pull the info from Xboxlive or Mygamercard.net or ANY other way so that it actually works more than 35% of the time.?
I think the main url that needs to switch is this:
"http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag="

Can it be switched to just another simple url, or does the code need to be rewritten, or...?
Mygamercard.net is hardly ever down, but obviously Xboxlive would be even better. :)

Yea mine stopped working as well is there any other website that we can pull data from?

http://duncanmackenzie.net/services/XboxInfo.asmx?op=GetXboxInfo sorta explains the query ...... Maybe someone can come up with something to fix this :)

zombietom
04-23-2009, 03:48 AM
the site where it pulls from has been going on and off line ... hopefully it will stay online and the good mod will continue to work.

Gamelobby
04-24-2009, 10:09 PM
It's just offline all the time now.. bummer. :erm: :confused:

BlueNinjaGo
04-24-2009, 10:17 PM
Is there no way to pull from xbox.com? Isn't that what sites do when they create updateable sigs?

Gamelobby
04-25-2009, 02:17 AM
I thought so too.
Maybe the Duncan site has all the "other" images to form the mod correctly.??
I wish i knew how to make these mods, I would re-make this one.

On a positive note, it is working again. lol
hopefully it will keep working, cross your fingers.

Bilderback
04-26-2009, 05:18 PM
This doesnt pull any data from pimpmygamercard.com
All data is derived direct from Duncan MacKenzie Live feed which has been going up and down lately.
There has been alot of changes in the Live service lately and could be partly the problem.
I suppose one way to prevent things from going down would be to check the file
and if it returns empty from duncanmackenzie, to cancel update and use old data from local xml.

Its easy actually if you know simplexml()
This mod pulls the data using curl() which creates a local xml file.
Then uses simplexml() to output any needed data.
$xml = simplexml_load_file(THE-LOCAL-XML);

$parent = $xml->parent;
$child = $xml->parent->child;

Playa82
05-05-2009, 07:33 PM
Nice hack, but it doesn't work...

see here:

http://crackmuzik-gfx-elite.de/members/1/playa82/

Gamelobby
05-07-2009, 06:25 PM
Yea great mod, but unfortunately had to uninstall. uptime is way too low.!! :(

OcR Envy
05-08-2009, 11:49 AM
Yea great mod, but unfortunately had to uninstall. uptime is way too low.!! :(


It's not the authors fault. The XBL stream has been having problems. They have migrated to a new server.

http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=

Need to be:

http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=

Playa82
05-08-2009, 06:20 PM
Nice, it works now.

here is the new product file. i changed it.

Gamelobby
05-10-2009, 08:52 PM
It's not the authors fault. The XBL stream has been having problems. They have migrated to a new server.

I wasn't blaming the author.. it just wasn't working. lol

zombietom
05-11-2009, 01:03 AM
Thanks for the update Playa82

TheInsaneManiac
05-12-2009, 11:23 AM
This doesnt pull any data from pimpmygamercard.com
All data is derived direct from Duncan MacKenzie Live feed which has been going up and down lately.
There has been alot of changes in the Live service lately and could be partly the problem.
I suppose one way to prevent things from going down would be to check the file
and if it returns empty from duncanmackenzie, to cancel update and use old data from local xml.

Its easy actually if you know simplexml()
This mod pulls the data using curl() which creates a local xml file.
Then uses simplexml() to output any needed data.
$xml = simplexml_load_file(THE-LOCAL-XML);

$parent = $xml->parent;
$child = $xml->parent->child;
I like that idea cause it's showing up blank right now. Sometimes it isn't blank and other times it is. The cache should server other purposes besides just saving server load times. Uninstalled till fix is out.

Bilderback
05-12-2009, 04:09 PM
It may be showing blank because the API location had changed. Are you running v1.3 ?

Gamelobby
05-13-2009, 10:11 PM
Nice, it works now.

here is the new product file. i changed it.

So this 1.2 version is what we need to use instead of 1.3???
I uploaded it & dont see any changes.!?

I'm lost.. uninstalled. again. :confused:

Sugoi na
05-25-2009, 10:10 PM
All mine says is:


Reputation:
Gamer Score: Zone:


Posted exactly how it looks...

Anyone else have an idea?

Sugoi na
06-04-2009, 04:22 PM
Got love those mods marked with the "unsupported" icon >.<

Such a good mod to just let it die.

Bilderback
06-05-2009, 07:50 PM
Got love those mods marked with the "unsupported" icon >.<

Such a good mod to just let it die.

Update to v1.3 - the API changed.
Anyone is free to take over development of this Mod.

Sugoi na
06-09-2009, 07:28 PM
Update to v1.3 - the API changed.
Anyone is free to take over development of this Mod.

Unfortunatly I am on the 1.3 modification. Still receive the same errors.

DNG
06-12-2009, 11:16 AM
great mod,, i hope it works on 3.8.3

<< installing

DNG
06-12-2009, 12:00 PM
when u plan 4 the next release ?

DNG
06-18-2009, 08:35 AM
installed but not working with v3.8.3 :s

it shows blank page !

any tips!???

zombietom
06-18-2009, 02:17 PM
could be due to xbox live being down...

DNG
06-18-2009, 08:18 PM
thanks zombietom 4 ur kind reply :)

now files is written on xblcache folder but 0 bytes!!!!!!!

like this: {membername}_bungie.xml 0 bytes

whats the problem!!!?!?!?

Kottonmouth801
06-30-2009, 07:09 PM
:up::up::up::up::up:

Nice Mod.... :up::up:

DJ29Joesph
07-02-2009, 04:31 PM
You need to change the version number in the XML file so people don't think they have an old version. Thanks

Playa82
07-08-2009, 03:52 PM
doesn't work at my site now...

original'as
07-19-2009, 10:21 AM
it would be cool, then you click on a game title, it would show all user that played that game. :)

Installed works nice http://www.topzone.lt/forumas/member-original-as.html

Playa82
07-26-2009, 10:08 AM
doesn't work anymore. see here:

http://crackmuzik-gfx-elite.de/members/1/playa82/

can somebody help me please !!!

MotMann
08-17-2009, 07:45 AM
There are some Problems with the server.. when you fix that? From time to time there are no games listet.

betts02
10-18-2009, 11:21 PM
working well on v3.8.3
just want to know if its possible to use this by usergroup and not members ?
so i can have a seperate page that shows all that usergroup nd if they are online?

original'as
11-03-2009, 10:10 AM
Doesn't work anymore? :/

http://imgaming.net/forum/member.php?u=2 same on my forum takes tons of time to load ant then shows nothing more than provided by PimpMyGamercard

Bilderback
11-04-2009, 03:49 PM
When the feed from Duncan Mackenzie goes down, this Mod will not work since it has no data to retrieve.
If the Mod is enabled when Duncans feed is down, your profiles may not load - disable the Mod.
If the feed is active and still does not work, there is a misconfiguratiion somewhere or you dont meet the requirements stated in plugin description.

Not Supported
External Content
Is in Beta Stage

This will never leave beta for 2 reasons:
1) Duncans feed was for the initial testing phase of the beta and has down time.
2) vB4 is soon to be released which has an entire rewrite of code.

MotMann
11-15-2009, 09:05 AM
At that time, it would nice, that mistakes and Crashes with the Plug In "Live Topic" be deleted.

Mistakes are here to see:
https://vborg.vbsupport.ru/showpost.php?p=1751028&postcount=590

Thank's :)

Bilderback
11-15-2009, 04:34 PM
At that time, it would nice, that mistakes and Crashes with the Plug In "Live Topic" be deleted.
Mistakes are here to see:
https://vborg.vbsupport.ru/showpost.php?p=1751028&postcount=590
Thank's :)

This mod is not listed as incompatible with Live Topic.
Did you mean to post that in Gryphons thread?
https://vborg.vbsupport.ru/showthread.php?t=139958&page=68

MotMann
11-15-2009, 05:27 PM
Ups.. LoL. Yes, you're right. Sorry. I post in the wrong Thread. :-D

dannyheath
01-25-2010, 04:50 AM
are you updateing to vb 4

ti07shadow
01-28-2010, 02:57 AM
a thread that was created claimed it worked for vb4 but when I installed it and displaeyd the tab and did everything even update the profile field. it didnt work

betts02
01-28-2010, 09:48 PM
I can confim this does work on v4.0.0, You may check my site out to see it working if you wish

Gamelobby
02-01-2010, 06:22 PM
I can confim this does work on v4.0.0, You may check my site out to see it working if you wish

I see it is currently working, but will it stay working..!?
That was the problem, it did work, but not for long, it would have lots of down time.
It is a great mod, but way too much down time.

Bilderback
02-05-2010, 05:04 PM
Theres no way for it to work in vB4 due to code changes.
However, if you had the Mod installed when updating from vB3, it could possibly work.(untested)

The down time is caused by the API feed beyond my control.
I have no plans to make a vB4 version nor do I have updates in mind.
Feel free to take the code as your own and release something as I dont spend alot of time with vBulletin any longer.