Welcome back to the "Who Sees Ads" blog. No, seriously, I'd really like to get over this now, but I guess it's all my fault if when I add features, some pesky bugs manage to sneak in :)
Some were quite trivial to fix, but I'd like to publicly thank Steffen Richter again for his help. Steffen sent me the best bug report I've had since I started to write plugins (hey, it was more than 3 years ago now!). Some bugs he reported were excellent (and unnoticed till now) catches, and he suggested bits of code that were really helpful. Steffen, thanks again!
Changelog for this (last! I promise!) version is :
- <--wsa:mystuff–> now works again. Oops :)
- I removed the so-called WP-Cache support. This plugin is just broken when it comes to keeping some parts of a page dynamic.
- There are new options, both in the admin page and the my_options.php file.
- The plugin now support rotating ads : one context, multiple codes for it, the plugin will randomly pick one of them.
For the updated documentation and download link, please visit Who Sees Ads.
Shorter URL
Want to share or tweet this post? Please use this short URL: http://ozh.in/fy
I hope it's not the last update :-(
I seem to have problems with the 'regular visitors' feature. I asked some of my blog visitors and they keep seeing the rule for non-regular visitors. We discussed this in the advanced rules blogpost before. I took a look at the code and noticed you used the variable $last for the $diff calculation, but the variable itself is never defined. Isn't that supposed to be $lasttime? Could you please have a look at that piece of code (for regular visitors) again just to set my mind at ease? :)
Thanks for the update. Too bad about the WP-Cache support, but it never worked for me anyway :-( Alas I'm completely dependent on the caching due to the visitor numbers.
Jean-Paul » I think this function *does* work.
The cookie values for last visit and page views are fetched and increment by function wp_ozh_wsa_setcookie(), which is called on hook 'plugins_loaded'
Variable $diff = $time – $last, where $time is time() as defined a line above, and $last is cookie for last visit's time as defined from cookie 4 lines above.
Check by yourself: place this file on your blog root and see what it says. If it doesn't work as expected, it must be once again a caching problem.
Hi Ozh,
For myself (Firefox, guest user) I have this:
I routed two other friends to my test page and each of them got different results. One has the empty cookie as above (and we checked both if the cookie wasn't being blocked). The other has a correct cookie set:
I'm completely lost here. From looking at my AdSense page views for the last couple of days it looks like the cookie isn't working for most of the blog users :-( It's almost the only function I need to have :)
Thanks again, appreciate your time and efforts. If you need a better bug report, please let me know!
Jean-Paul » unfortunately to this point I think I cannot be of much help. I have no idea what it could be, but there seem to be something weird with your server itself. On all my machines things work fine. FYI the cookies are perfectly stored & incremented for me on your main page, but they don't get updated on your test page. This makes totally no sense to me…