Hack 38 Post a Guide Remotely

figs/moderate.giffigs/hack38.gif

Customize the guide-writing experience with a remote posting form.

If you're a guide-writing junkie or thinking about becoming one, you may want to create your own page so you can control the posting experience for yourself. You can add a guide-writing form to your own web site, customize it, and even offer it to your visitors as a convenience.

38.1 The Code

This is just standard HTML, so create a file called remote_guide.html with the following form:

<html>
<body>
<form method=post action="http://amazon.com /exec/obidos/guide-preview/">

<!-- Visible Form Fields -->
Title:<br>
<input type=text name="guide.title" size=50 value=""><br><br>
Qualifications:<br>
<input type=text name="guide.qualifications" size=50 value=""><br><br>
Guide:<br>
<textarea name="guide.text" cols=80 rows=10></textarea><br><br>

<!-- Hidden Form Fields -->
<input type=hidden name="guide.author" value="insert Amazon ID ">
<input type=hidden name="guide.format.asin-link" value="<a href=&quot;[RETURN]
/exec/obidos/ASIN/%s/102-4471056-3284920&quot;>'%s'</A>">
<input type=hidden name="guide.format.heading-link" value=[RETURN]
"<a href=&quot;#guide.heading.%03d&quot;><b class=sans>%s</b></a>">

<input type="submit" value="Add Guide">
</form>
</body>
</html>

The only changes to Amazon's form are the addition of the full URL in the form's action attribute, and of your Amazon ID [Hack #43] to the guide.author hidden field.

38.2 Running the Hack

Since the code is standard HTML, you can open remote_guide.html in any browser locally, or include the code in any existing web page. Click Add Guide, and you'll be taken to a preview page where you'll be notified of any errors. You can also double-check everything before you approve it. (You'll be required to sign in with your Amazon account at this point, if you're not already signed in.) If others will be posting guides from this form, change the guide.author form field type from hidden to text. This will allow anyone to add a guide if they know their Amazon ID.