I just opened my wheelie bin and a wasp flew out. What kind of sick person would throw a wasp in a bin? 1 day ago



Jun 10
3rd

Adding a Heat Map to WordPress


ClickHeat ScreenshotWanting to learn a bit more about the visitors to this site, I thought installing a heat map on the site would be a good start.

I initially used PicNet Mouse Eye Tracking – this is free, but an advert for the service appears at the foot of your site. However, I soon came across the OpenSource ClickHeat. You can use this on any kind of site and is a PHP-based installation.

After much gnashing of teeth, here’s how I got it installed…

  • Download the latest version of ClickHeat and unzip it
  • Install this into a folder on your server
  • Now, from the address bar of your browser, open up the folder. e.g. If you installed it to www.mysite.com/clickheat, you’d go to this directory in your address bar.
  • This will start the installer. I found errors straight away – make sure the config, log and cache folders are writeable.
  • Done. You simply need to add the code to start tracking – return to the ClickHeat folder to access your heat map and make settings changes.

To test it’s working, simply append ?debugclickheat to the end of any of your sites URLs.

For WordPress, there is a plugin available, but I couldn’t get this to work. Instead I added the JavaScript (which is generated from the ClickHeat admin screen) directly to my footer.php file in the theme folder, wrapping it in a check to ensure that an admin isn’t signed in (so it doesn’t track my clicking!).

One more problem I cam across – in the ClickHeat admin screens I kept getting the following error…

Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /xxx/clickheat/index.php  on line 51

Obviously, I’ve replaced the directory path with “xxx” for security reasons.

After some searching around, I decided the best solution was to make a modification to the ClickHeat code itself. Open up the index.php file within the ClickHeat folder and attempt to find the line that starts with the following…

if (@ini_get('zlib.output_compression')

Before this line, add the following…

ob_end_clean();

And that’s worked for me.

I’ll report back on how I get on with ClickHeat.


Share this on del.icio.us Digg this! Email this Share this on Facebook Share this on LinkedIn Send this page to Print Friendly Share this on Reddit Share it on StumbleUpon Tweet This!


May 10
30th

Things that I learnt holding my first competition


I’ve never run a competition before and, thanks to Creative, my first opportunity has just concluded.

And what did I learn?

Well, a lot. First of all, the questions I should be asking the prize providers. Instead I kept badgering them as I kept asking some pretty basic questions…

  • When do you want the competition to start?
  • How long do you want the competition to run for
  • Are the prizes all for one person, all a “first” prize, or staged (first prize, second prize, etc)
  • How long until delivery
  • What will you provide if a product is no longer available?

Whilst running the competition I kept an eye on the entries to ensure that I wasn’t receiving multiple entries per person or household. And, after only 24 hours, I appeared to have found a problem – 3 people, each with an AOL email address, and the same IP address. Suspicious? It looked like it to me.

However, the fact that AOL is their ISP is the key here – they use a proxy-based system, meaning that many users may share the same IP address. Wikipedia has discussed such an issue before on their own site.

The database I created to hold winner details held a name, address, email, competition answer and IP address. Based on the AOL problems I now realise that I should also store a time stamp and user agent. I’ll be making these changes for next time.

I did a lot of work on the competition coding to ensure SQL injection problems. None-the-less I realised a few days ago that although the competition entry form disappears after the closing date, the code to submit the form details into the database still exists. This means that a third party script could inject entries (although not anything that would affect security) after this time. Again, this will now be fixed for future.

Lastly, I had so many entries that just trying to keep track of “rule breakers” became a lot, lot harder – more work on flagging such things at the point of competition entry will be useful, and I feel an automated email coming on!

Meanwhile, I have contacted the 3 winners and am just awaiting a confirmation of their postal addresses before details are announced.


Share this on del.icio.us Digg this! Email this Share this on Facebook Share this on LinkedIn Send this page to Print Friendly Share this on Reddit Share it on StumbleUpon Tweet This!


Dec 09
11th

Plugin error “cannot yet handle MBCS in html_entity_decode”


Today I’ve had reported to me that one of my plugins (Simple Twitter Link – but I’m sure this equally occur in others) is generating the error “cannot yet handle MBCS in html_entity_decode”. In fact, it generates it about 200 times.

The problem? Well, it’s a bug in version 4 of PHP, so there’s not much I can do about it (sorry!). It’s fixed in PHP 5, though.

One suggested solution is to force your server to use PHP 5 – many have version 5 installed, but just not set as the default. To do this simply put AddType application/x-httpd-php5 .php in the first line of your .htaccess file.

I use html_entity_decode for the post title. At the moment I do this whether you ask for the title or not – I’ll make a change for the future to ONLY do this if requested. That way you can omit the title to prevent this error from occurring. This will definitely also affect Simple Social Bookmarks and Simple Facebook Link.



Share this on del.icio.us Digg this! Email this Share this on Facebook Share this on LinkedIn Send this page to Print Friendly Share this on Reddit Share it on StumbleUpon Tweet This!
54 queries in 1.244 seconds.