Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Google Gadget help

Status
Not open for further replies.

Veken

Technical User
Oct 21, 2010
1
US
I'm having a problem tinkering with a Google Gadget used for searching Metacritic.

I've previously had some luck altering a separate search gadget for GameFAQs to work with Metacritic, but recently something changed with Metacritic and the gadget is no longer working. I've tried tinkering with it some more, but I'm really not much for coding at all so any help would be greatly appreciated.

Here's the code from the gadget I had been using (which is now broken)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs
title="Metacritic Search"
height="27"
description="A Metacritic search module."
author="Pico Mitchell modified by someone"
author_email=""
category="tools"
thumbnail=""
screenshot=""
author_affiliation="None."
title_url="[URL unfurl="true"]http://www.metacritic.com/"[/URL]
/>
<UserPref name="searchPlatform" display_name="Platform:" default_value="0" datatype="enum">
<EnumValue value="0" display_value="All Platforms"/>
<EnumValue value="1026" display_value="DS"/>
<EnumValue value="12" display_value="Game Boy Advance"/>
<EnumValue value="11" display_value="GameCube"/>
<EnumValue value="5" display_value="PC"/>
<EnumValue value="7" display_value="PlayStation 2"/>
<EnumValue value="1028" display_value="PlayStation 3"/>
<EnumValue value="1024" display_value="PSP"/>
<EnumValue value="1031" display_value="Wii"/>
<EnumValue value="13" display_value="Xbox"/>
<EnumValue value="1029" display_value="Xbox 360"/>
<EnumValue value="26" display_value="Arcade"/>
<EnumValue value="1" display_value="Dreamcast"/>
<EnumValue value="2" display_value="Game Boy"/>
<EnumValue value="9" display_value="Game Boy Color"/>
<EnumValue value="10" display_value="Genesis"/>
<EnumValue value="1006" display_value="iPhone/iPod"/>
<EnumValue value="18" display_value="Neo-Geo"/>
<EnumValue value="19" display_value="NES"/>
<EnumValue value="4" display_value="Nintendo 64"/>
<EnumValue value="6" display_value="PlayStation"/>
<EnumValue value="8" display_value="Saturn"/>
<EnumValue value="21" display_value="SNES"/>
</UserPref>
<UserPref name="formTarget" display_name="Open Results In:" default_value="_parent" datatype="enum">
<EnumValue display_value="This Window" value="_parent"/>
<EnumValue display_value="New Window" value="_blank"/>
</UserPref>
<Content type="html">
<![CDATA[
<style type="text/css">
#metacritic_module td { padding: 2px 2px 0px 3px; vertical-align: middle; }
#metacritic_module input { margin: 0px; padding: 0px; }
</style>
<script type="text/javascript">
function displaySearchBar (prefs) {
var platform = prefs.getString("searchPlatform");
var target = prefs.getString("formTarget");

var html =
'<div id="metacritic_module">' +
'<form name="metacritic_searchmodule" action="[URL unfurl="true"]http://www.metacritic.com/search/process"[/URL] target="' + target + '">' +
'<table style="width:100%" cellpadding="0" cellspacing="0" border="0">' +
'<tr>' +
'<td>' +
'<a href="[URL unfurl="true"]http://www.metacritic.com"[/URL] target="' + target + '">M</a>' +
'</td>' +
'<td width="100%">' +
'<input type="hidden" name="sort" value="relevance">' +
'<input type="hidden" name="termType" value="all">' +
'<input type="search" name="ts" style="width:100%" value="" autosave="Metacritic Search Module" results="5">' +
'<input type="hidden" name="ty" value="0">' +
'<input type="hidden" name="x" value="0">' +
'<input type="hidden" name="y" value="0">' +
'</td>' +
'<td>' +
'<input type="submit" value="Search">' +
'</td>' +
'</tr>' +
'</table>' +
'</form>' +
'</div>';

document.write(html);
}

displaySearchBar(new _IG_Prefs(__MODULE_ID__));
</script>
]]>
</Content>
</Module>

I've been using this to check changes:
http://code.google.com/apis/gadgets/docs/legacy/gs.html#GGE

If someone could tell me exactly what to change or make the changes for me, I'd appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top