The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Xbox Live Recent Games in Profile Tab Details »» | |||||||||||||||||||||||||
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
Requirements
Reported Issues and planned fixes
INSTALLATION
UPGRADE:
DEMO HERE Feature Requests usergroup settings template enhancements style settings forumid settings VERSION HISTORY
Show Your Support
|
Comments |
#52
|
||||
|
||||
My bad, dude. I used the wrong variable name in the plugin.
Change the first line in Plugin Xbox Live Info Tab: Code:
if ( $vbulletin->options['xblinfo_enable_product'] AND $userinfo[ $vbulletin->options['xblinfo_fieldid'] ] ) { |
#53
|
||||
|
||||
Yup that did it.!
Thanks man Out of curiousity what/how would this work in a block on the side.? |
#54
|
||||
|
||||
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.
Code:
<?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> |
#55
|
||||
|
||||
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.
|
#56
|
||||
|
||||
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: Code:
"http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=" Mygamercard.net is hardly ever down, but obviously Xboxlive would be even better. |
#57
|
|||
|
|||
Quote:
http://duncanmackenzie.net/services/...op=GetXboxInfo sorta explains the query ...... Maybe someone can come up with something to fix this |
#58
|
||||
|
||||
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.
|
#59
|
||||
|
||||
It's just offline all the time now.. bummer. :erm:
|
#60
|
||||
|
||||
Is there no way to pull from xbox.com? Isn't that what sites do when they create updateable sigs?
|
#61
|
||||
|
||||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|