Return to the Iraq Body Count website.
Second, your website must allow you to upload and serve image files and JavaScript scripts. Free websites like myspace and free blogging accounts often do not allow you to do this. You can put a counter up, but you won't be able to get the scrolling headline feature. Read the really simple cut-and-paste instructions here.
In the instructions that follow, I assume that you have and know how to use a utility for unpacking Zip files, and that you know how to upload files to your website using an ftp client or some other program.
For the rest of these directions, I'll assume that you've picked a single counter. But you can repeat these steps if you want more than one.
Different counters come in zip files with different names. For the rest of this document, I'll assume that you picked the 468x60 banner with black text on a blue background. That counter is stored in a file named ibc468.zip. Save it with that name on your desktop or somewhere else handy on your local hard-drive.
ibc468.js ibc468_1.gif ibc468_2.gif ibc468_3.gif ibc468_4.gif ibc468_5.gif
If you have chosen more than one counter for your website, you can safely unpack them all into the same folder. Some counters use duplicate image files that overwrite one another, but any files that differ will have different filenames.
Before we proceed on to the next installation step, I'll pause here to explain what all these files are for.
http://www.example.com/IBC/ibc468_1.gifI assume here that you know how to use FTP or a similar tool to upload files to your website, and that you also know how to create new directories in your website.
Open the .js file in a plain-text editor, and search and replace /IBC/ with /people/~username/IBC/. Do this carefully, being sure not to change anything else. For most counters, there will be four or five occurrences of /IBC/ to change. Don't let your editor word-wrap any lines and be sure that the editor saves the file as plain text without adding any formatting. Also, be sure that it saves it with the extension .js, not .js.txt.
You can also use this technique if for some other reason you do not want to install the counters in /IBC/.
<script src="/IBC/ibc468.js"></script>Substitute the name of your .js file for ibc468.js. And if you installed the counter somewhere other than /IBC/, then change that part too.
You can put your counter wherever you want on a page, If you want to center the counter, for example, just put it in a <center> tag:
<center> <script src="/IBC/ibc468.js"></script> </center>The counters should also work correctly when placed within tables. Remember that you can only have one scrolling counter on each page: if you try to put more than one on a page none of them will work right.
Are the scrolling headlines scrolling all the way up the page? See the Known Bugs section at the end of these instructions to learn how to fix that problem.
This does not mean that you can't install more than one counter on your website. You can, and you can use different counters on different pages within your site. It is safe to unpack the zip archives of different counters into the same IBC/ directory.
If you want to alter this default behavior, you can do so by editing the .js file for your counter. Each .js file begins with the following 8 lines:
var ibc = {
// These are parameters that can be adjusted
initialDelay: 4000, // Milliseconds to wait before starting animation
restartDelay: 4000, // Milliseconds pause between repetitions
numLoops: 3, // How many times to loop through the headlines
frameLength: 50, // Milliseconds per frame
pixelsPerFrame: 2, // How much to scroll up each frame.
pauseLength: 4000, // Milliseconds to pause between individual headlines
To alter scrolling behavior, just change the numbers that appear in these lines. Note that the times are specified in milliseconds, so the pauseLength line specifies a 4000 millisecond (4 second) pause for each headline. If you want a 3 second pause, just change the number on this line to 3000. If you want the counter to scroll through the headlines just once, edit the numLoops line, changing 3 to 1. If you want it to display headlines indefinitely, then change the 3 to a very large number like 30000. (See below for a way to turn off scrolling altogether.)
The frameLength and pixelsPerFrame lines specify the speed and smoothness of the scroll. The default values specify that every 50 milliseconds, the current headline should move up by 2 pixels. Feel free to experiment with these values, but note that some browser and operating system combinations can't handle a frameLength shorter than 50 milliseconds.
When editing this file, be sure to use an editor that won't wrap the lines, that won't insert any formatting into the file (it must be a plain text file) and that won't append a .txt extension after the .js extension.
If a browser does not support JavaScript, or if the user has disabled JavaScript support in their browser (both are quite uncommon), then the scrolling counter will simply not appear. This is because you include it in your web pages with a <script> tag and browsers that don't have JavaScript support will simply ignore the tag. If the graphic design of your page depends strongly on the presence of the counter, and you belive that many of your viewers have JavaScript disabled, then this may be problematic for you.
If a user is using a browser that does support JavaScript,
but that does not have the capabilities to do scrolling
text, they will see a static counter with no scrolling
headlines. This is because the JavaScript code first checks
that the browser supports the capabilities it requires. If
the necessary capabilities are not supported, the code does
not attempt to do any scrolling. Browsers that cannot
display the scrolling headlines include Microsoft Internet
Explorer 4 and earlier, and Netscape Navigator 4 and
earlier. These browsers currently account for about 5% of
internet usage, so something like 95% of visitors to your
site should see the scrolling headlines.
Known Bugs
The following sub-sections describe the bugs we know about
in these counters.
Explanation: Modern web browsers render HTML slightly differently when it includes a DOCTYPE declaration that specifies that the HTML is written to conform to modern web standards like HTML 4 and XHTML. IE6 appears to interpret these standards differently than Netscape 7 and Opera 7 because when IE6 displays the counter in its "Standards Mode", it causes the bug described here.
Fix: No fix available, but see workaround below. If you find a fix, please let me know!
Workaround: The easiest workaround is to remove the DOCTYPE declaration from your page. I've had a report (but have not confirmed personally) that IE6 displays the counter correctly when you use an HTML Transitional DOCTYPE like this one:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.01 Transitional//EN">
If you really want to include a DOCTYPE tag in your document
(to declare it as XHTML, for example), and the one above
does not work for you, then, consider placing the counter in
a separate document and including it in your page via an
<iframe> tag.
Technical Support
Please
if you have trouble installing a counter, if the counter
isn't working correctly on your site, if you have a
suggestion for improving the counter, or if you have a
suggestion for improving these instructions.
If you're having a problem with the counter, please be sure to describe the problem in detail, tell me the name of the .zip file you downloaded, and, if possible, provide a URL where I can look at how its coming out on your site.
I'll try to respond as promptly as I can, although other commitments sometimes take me away from my e-mail for two or three days at a time. If you are unable to get a response from me, try e-mailing: