As you can see on the top right corner of Technically Personal (above the header), I have something like “767 Subscribers and Counting!!” That number is actually the coming from Feedburner. The usual Feedburner chicklet counters are boring and updated.
Few days back, I read an article on ThemeTation about How to implement Feedburner Text Counter without using any plugin whatsoever. It’s a simple and straight-forward tutorial which tweaks the Feedburner API to get the counter as a text and it worked as expected.
But then, over the next couple of days I observed that this converted text counter was showing 0 and this happened almost at the same time everyday. That is when i realized that the Feedburner counter gets reset to 0 before it gets updated with the latest value everyday. This bug is not restricted to the Text counter of Feedburner. Even the Feedburner chicklets face this issue. Normally this issue gets sorted out within a couple of hours but some times it persists and it would be embarrassing to show 0 subscriber count. The issue gets worsened if you use a caching plugin which caches the pages showing 0 subscriber count.
Have a look at the screenshot example above. Ironically, the post title of Pro Blog Design (which is one of my most favorite blogs) says “Get RSS Subscriber Count in Plain Text” and it shows 0 Subscribers (and the actual count is in excess of 4600!!)
How to Fix this 0 Subscribers Bug of Feedburner?
Assuming that you have followed ThemeTation’s approach (or something similar) to convert Feedburner Counter to Text, go to your Header.php or Sidebar.php (wherever you are displaying the Feedburner text counter) and look for the code which says
$fb = $xml->feed->entry['circulation'];
Just below this, add a line of code
$fc="XXX";
Replace XXX with a number which is realistically similar to your actual subscriber count. And again look for the code which says
echo $fb
and, replace that part with this
if ($fb=="0")
echo $fc;
else
echo $fb;
Needless to mention that this will be within the php tags.
That is it! Whenever the feed count value comes as 0, it will be replaced with the number you have defined. No more embarrassing moments!
What you think of this trick? Do you have a better and simpler fix? Let me know!