Rating System for ASSTR Authors

Do you want to get page view stats for your stories but can't get ASSTR to send them to you? Did you ever want to allow people to rate your stories? If so, I've got a FREE tool for you to use provided your author your stories in HTML.

Here is all you need to do:

  1. The first step is to add your page to the index. This is very simple. You view the page on ASSTR in your web browser and cut the URL from your web browser window and paste it into the corresponding question on the add page. You should also enter the subject and description. Again, you may choose to cut and paste this from your story. Then check the boxes to categorize the story and hit the "submit" button. Be sure to properly categorize things. Right now, you can not make changes once the story is submitted since you are doing this anonymously. Alternately, you can login before submitting your stories and they will be recorded as being submitted by you. The login page includes a link to show you all the stories you submitted which is a convenient way to see the ratings and page visits for your stories.
  2. After you submit the story, A confirmation screen will display with links to add an additional page or go search the index. On the lower left hand side of the screen on that confirmation page, you will see ID=some number (eg. ID=1). Make note of that number.
  3. Insert the following in the <head> section of the story you you added to the index in 1 above:
    <script language="javascript" src="http://www.bunzilla.us/asstr/Vote.js" 
     type="text/javascript"></script>
  4. add the following to the <body> tag of your html document:
    onload="LoadVoting(<id>)"
    Where <id> is the ID number from step 2 above.
    Example where the <id> is 24:
    <body onload="LoadVoting(24)>
  5. add the following to your document where ever you want the voting bar to appear. It is recommended that you place the vote link at the bottom of your story so that people can vote when they finish reading it:
    <div id="vote"></div>
    Since this is an ordinary div, you can apply whatever stylesheets or layout you want to if if you desire.
  6. save your document and upload it to ASSTR and you should be all set with a vote bar inserted

Below is a complete document example with the specific items highlighted. This is very minimalistic to show you where the various tags would go in a standard file. The ASSTR meta tags are also shown for completeness. No doubt you would include additional stylesheets and other formatting for your page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>DOCUMENT TITLE</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <META NAME="shs-title" CONTENT="DOCUMENT TITLE">
 <META NAME="shs-author" CONTENT="AUTHOR NAME">
 <META NAME="shs-summary" CONTENT="DESCRIPTION">
 <META NAME="shs-keywords" CONTENT="KEYWORDS">
 <script language="javascript" src="http://www.bunzilla.us/asstr/Vote.js" 
  type="text/javascript"</script>
</head>
<body onload="LoadVoting(24)">

    <h1>DOCUMENT TITLE</h1>

    <p>STORY PARAGRAPH 1</p>
  
    <p>STORY PARAGRAPH 2</p>
    
    <p>STORY PARAGRAPH n</p>

    <div id="vote"></div>
</body>
</html>

Alternate approach #2. You have a lot more to insert into your document, but it has the advantage in that it doesn't rely on javascript and will work for people without scripting enabled and you can embed the voting buttons where ever you want in your document (eg. not limited to a horizontal bar). The down side is that when they submit, they will leave your page and go to the thank you page. In addition it won't count page visits unless you still include the javascript and onload sections from above.

  1. add your page to the index as was done in 1 above
  2. The story has been added to the index once you hit submit. A confirmation screen will display with links to add an additional page or go search the index. On the lower left hand side of the screen on that confirmation page, you will see ID=some number (eg. ID=1). Make note of that number.
  3. Insert the following in your document wherever you want:
    <form action="http://www.bunzilla.us/asstr/vote.aspx">
           <input type="hidden" name="id" value="<id>"> Worst
           <input type="radio" name="vt" value="1">1</input>
           <input type="radio" name="vt" value="2">2</input>
           <input type="radio" name="vt" value="3">3</input>
           <input type="radio" name="vt" value="4">4</input>
           <input type="radio" name="vt" value="5">5</input> best
           <input type="submit">Vote</input>
          </form>
    
    where <id> is the number from step 2 above.
  4. save your document and upload it to ASSTR and you should be all set with a vote bar inserted


Alternate approach #3. It simpler but ASSTR has included HTTP headers that block authors from using iFrames for both documents on other sites and documents on asstr itself. so it only works on a limited number of browsers. I wouldn't recommend this approach uness ASSTR removes some of the headers that block iframes. It is likely newer versions of browsers will all start honoring the headers that block iframes which means over time this may become more problematic.

  1. add your page to the index as was done in 1 above
  2. The story has been added to the index once you hit submit. A confirmation screen will display with links to add an additional page or go search the index. On the lower left hand side of the screen on that confirmation page, you will see ID=some number (eg. ID=1). Make note of that number.
  3. Insert the following in your document wherever you want the voting bar to display:
    <iframe src="http://www.bunzilla.us/asstr/view.aspx?ID=<id>" 
            width="100%" height="40"></iframe>
    where <id> is the number from step 2 above.
  4. save your document and upload it to ASSTR and you should be all set with a vote bar inserted


Note, if you are someone who isn't up to writing HTML but want to use this. There is really nothing to html. Instead of putting your story in a plane text document, just cut and paste the full example shown under the first approach into an empty text document. Replace the <id> with the number as indicated and then replace the stuff in upper case with the particulars of your story. Then save your document with the .htm extenstion instead of .txt. If you don't build a web front end, you can still upload html files to the ftp and they should still display ok.


Some final notes. Right now, pages can be added to the index annonymously. Since we don't know who added them, you can go back and edit them and we don't know which ones are your stories. Sometime in the next few weeks, I'll add an optional login capability to enable people to be able to go back in and update their documents. Im also thinking I would give you a cusom view to see all your stories so it would be easier to see their ratings and counts at a glance. For now, you just have to view them on the search page. I will enhance the system further depending if it looks like anyone is using it. It should be possible to show the current counts and score on the vote bar etc. I also have a thought that I would let people create their own favorites list and then allow users to see those lists. The concept is that you might find people with a common interest and their top picks might be things you are particularly interested in. Right now, I'm just in the process of adding the vote button to all my stories and adding a few enhancements. I also have to go back and rewrite one of my stories. I had just completed it and in some late night coding hell I accidently deleted it. It was on a USB flash and I've tried a dozen undelete programs. So now Im going to have to resort to rewriting it from memory. I'll be splitting my time between enhancements and writing.

Go To Top