      _______                          .__ .__   .__   .__                 
      \      \    ____   __ __ _______ |__||  |  |  |  |__|  ____    ____  
      /   |   \ _/ __ \ |  |  \\_  __ \|  ||  |  |  |  |  | /  _ \  /    \ 
     /    |    \\  ___/ |  |  / |  | \/|  ||  |__|  |__|  |(  <_> )|   |  \
     \____|__  / \___  >|____/  |__|   |__||____/|____/|__| \____/ |___|  /
    =========\/======\/=================================================\/==
  v0.01 04/JUL/2007 (C) Copyright 2007-2007 Scott D. Yelich SOME RIGHTS RESERVED
 .,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.-*~'`^`'~*-,._.,-*~'`^`'~*-,. 



This is the "INSTALL" file for the Neurillion free web page counter "multi" v1 
http://www.neurillion.com/p/33/counters/multi/v1/INSTALL

The software is released under Creative Commons - Attribution 3.0 unported 
see: http://creativecommons.org/licenses/by/3.0/legalcode

This counter requires sqlite3 to be available.  Although it's possible
to include the single amalgamated sqlite3.h file and compile, the
current configuration uses sqlite3 as a library.  A version after v1
will have details on using the amalgamated sqlite3.h file to compile.

As with the other v1 counters, the name of the database needs to be
edited directly in the code (Counter.cpp).  Remember -- both the file
and the directory must be writable by the process running the counter.

The counter source is in the "src" sub directory.  There is a unix
makefile in the directory.  It will compile the component classes and
link the final program with -lsqlite3 for you.

After the program has compiled successfully, the resulting binary
needs to be put into a location where it may be executed via a URL.
Please refer to your web server manual for information on how to
enable this.

That takes care of the server side, but AJAX also requires a client
side config -- this is accomplished via the following few steps:

(1)  Add the following inside the <head> section of an HTML page:

  <script type="text/javascript" src="/path/to/qOnload.js"></script>
  <script type="text/javascript" src="/path/to/Sajax.js"></script>
  <script type="text/javascript" src="/path/to/AjaxCounter.js"></script>
  <script type="text/javascript" src="/path/to/initAjaxCounter.js"></script>

(2) Add the AJAX itself to the HTML:

  <div id="myidX" onmouseover="ajaxcounter.hit('myidX');">


That's it.  Now, the "AjaxCounter.js" file has some assumptions built in 
about setting colors and stuff, but that can be modified as desired.  
Additionally, the trigger may be anything you wish, not just "onmouseover"
 etc.

One issue is that this uses a single object for all AjaxCounters (on a
page) and so there is not only an issue with concurrency at the server
side with multiple uses calling the page hit at the same time, but if
there is more than one ajax counter on the same page (as with the
example), it's possible for multiple returns to come back at the same
time.  A better method for separating the returns will be implemented
in later versions.


Enjoy!

Scott
