Any coders out there?

New Member
πŸ’» Oldtimer
Joined
Mar 6, 2003
Messages
3,999
Best answers
0
Location
New York
I'm in need of some assitance with a gadget for iGoogle. Since I can't code to save my life I'm trying to alter this search tool to search other sites (example: Amazon) but I'm failing pretty miserably. How would I go about doing that?

http://picomitchell.googlepages.com/gamefaqssearch_module.xml

Person who answers this gets promoted to admin, for real. I'm not kidding.
Yes I am
 
New Member
πŸ’» Oldtimer
Joined
Mar 6, 2003
Messages
3,999
Best answers
0
Location
New York
Yea, it's funny with xml I guess. Try hosting it somewhere like mediafire. Or a screenshot works too.
 
Former Forcepit Member :(
βœ”οΈ HL Verified
πŸ’» Oldtimer
Joined
Aug 21, 2006
Messages
1,717
Best answers
0
Location
korriban
i see i must conver with a friend about this will get back to you later
 
Dudemeister
β˜… Black Lounger β˜…
βœ”οΈ HL Verified
πŸš‚ Steam Linked
πŸ’» Oldtimer
Joined
Jan 16, 2007
Messages
1,672
Best answers
0
Doesn't look that hard to do, just replace the platform types, with the search categories from amazon.
Code:
http://www.gamefaqs.com/search/index.html?game=soul&platform=5&s=s
would be the link for searching the word "soul" on the pc platform. And if you noticed:
Code:
EnumValue value="5" display_value="PC"
The code under <Content type="html"> most likely generates the link using the 'searchPlatform' value and the searched word.
So for Amazon, for example, the search link for the word 'shirt' under the men's category would be:
Code:
http://www.amazon.com/s/ref=nb_ss_a?url=node%3D1040658&field-keywords=shirt&x=0&y=0
Modified for the xml file:
Code:
EnumValue value="1040658" display_value="Men's"
The only thing you have to do is match the link generation code to the gamefaqs.com link and modify it for amazon.

Would've helped you more, but i don't know xml. xD
 
New Member
πŸ’» Oldtimer
Joined
Mar 6, 2003
Messages
3,999
Best answers
0
Location
New York
I'm assuming all I need is the correct 'form action' link with the userprefs set to 'All Departments' on the Amazon site by default, but I don't think I did it right.
 
New Member
πŸ’» Oldtimer
Joined
Mar 6, 2003
Messages
3,999
Best answers
0
Location
New York
Nice. It's bringing up a page, just not the right page.

Example, searching devil may cry:
Code:
http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%253Daps&field-keywords=devil+may+cry&x=0&y=0
vs
Code:
http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Daps&field-keywords=devil+may+cry&x=0&y=0
The first one brings up irrelevant items, the second one is a normal search directly from their site. The only difference I see in the links is the '25' right before the '3Daps'.

Any idea what's causing that?
 
Dudemeister
β˜… Black Lounger β˜…
βœ”οΈ HL Verified
πŸš‚ Steam Linked
πŸ’» Oldtimer
Joined
Jan 16, 2007
Messages
1,672
Best answers
0
It seems that special characters within the values of those inputs are translated in % and the hex number of the character's ascii code, and that the '3D in the link is actually the number 61, as in the ascii code for '='.
Anyways, FIXORED.

http://files.filefront.com/13738039
 
New Member
πŸ’» Oldtimer
Joined
Mar 6, 2003
Messages
3,999
Best answers
0
Location
New York
Sexy. Thanks a lot <3

I'm trying to do one for Metacritic as well, but if you'd like to help me with that also I'll love you forever.
 
Former Forcepit Member :(
βœ”οΈ HL Verified
πŸ’» Oldtimer
Joined
Aug 21, 2006
Messages
1,717
Best answers
0
Location
korriban
I say promotion for viper LAL FP sounds nice xD
 
New Member
πŸ’» Oldtimer
Joined
Mar 6, 2003
Messages
3,999
Best answers
0
Location
New York
For anyone interested in using these, all you need to do is host it somewhere where you can link directly to it. Then modify this url to include your link:

Code:
http://fusion.google.com/add?source=atgs&moduleurl=YOURLINKHERE
Don't forget to make sure to change the extensions from .txt to .xml
 
Dudemeister
β˜… Black Lounger β˜…
βœ”οΈ HL Verified
πŸš‚ Steam Linked
πŸ’» Oldtimer
Joined
Jan 16, 2007
Messages
1,672
Best answers
0
Amazon Search
Metacritic Search
^XML versions for lazy people.
Note, these are not made by me. The author and original file info are in the file itself, you just have to know where to look.
 
New Member
πŸ’» Oldtimer
Joined
Mar 6, 2003
Messages
3,999
Best answers
0
Location
New York
Bumping this thread for more assistance.

Metacritic changed its layout or something behind the scenes, so my gadget broke. Really have no clue what to do to get it to work again.

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="http://www.metacritic.com/"
/>
<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="http://www.metacritic.com/search/process" target="' + target + '">' +
'<table style="width:100%" cellpadding="0" cellspacing="0" border="0">' +
'<tr>' +
'<td>' +
'<a href="http://www.metacritic.com" 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>
So, that's the current code from the gadget, I don't know what changed with Metacritic or what to change on the gadget to get it to work again. Any smart people feel like giving me a hand?
 

Users who are viewing this thread

Top Bottom