Wednesday, December 17, 2008

Secret New Graphical Counters and How You Can Use Them

A year or two ago (I can't remember how long ago it was), I added support for over a dozen different, new graphical counters. Do you remember the announcement about that? If you don't, it's because it was never announced. Support was built in for the counters, but the new graphics were never officially added to the code wizard. The reason for this is that code wizard is a somewhat complex beast and I'm hesitant to toy with it and break things. I am going to release an updated version of the code wizard which will give you full access to the new graphics (it's currently in the works) , but until that time comes, you can take advantage of the new designs with just a little bit of hacking.

Here's a list of the counter styles currently available to you:

(You'll need to scroll waaaaaaaaaay down the page due to some layout issues...)

Counter GraphicCounter Style

How do I use these new styles?

It takes a bit of hacking, but it's actually pretty easy. If you're creating a new counter:

  • Go to your dashboard page
  • Select Generate HTML
  • Select Counter & Tracker Code
  • Select Odometer style
  • Click through all of the steps until you get the counter code
  • Examine the code you've created for these characters: Style=Odometer
  • Find a counter style from the list above and replace Style=Odometer with Style=57chevy (or Style=odometerblack or some other style you'd like to use -- just make sure you use the style names exactly as they are provided on this page)
  • Make sure you replace the style wherever it comes up in the code. If you are using JavaScript and HTML look closely and you will see it in there twice
That's all there is to it. You may now use this new code to create graphical counters in any of the styles above.

How do I alter an existing graphical counter?

If you're altering an existing graphical counter it's pretty similar. Look for Style=Odometer and replace it with the new style of your choosing. If your counter code doesn't contain the Style=Odometer part, you should be able to add it to your code. Just be careful to put it right after the ? (question mark) or right at the end of the code. Unless you know what you're doing, you'll want to avoid putting it right in the middle of the code, since you don't want to get too creative or you might demolish your current counter code and render it unusable. Having said that, it's a pretty simple process. Make sure you copy your old counter code to a backup file before you start making changes and you should be fine to hack on the code to your heart's content.

Please note that the first style listed (odometer) is not a new style, since it was already available, but it belongs in this list because it's the same style of counter as these new ones.

1 comment:

Anonymous said...

Olaf, you are a cool and super helpful guy. Thanks!