A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Monthly Archives: August 2013

Getting the Bayesian Average for rankings (PHP / MySQL)

When you need to correctly display the leader-board based on ratings, you can’t just display the average rating for each entry. ———————————— Restaurant A | 1 Vote(s) | Rating 10 ———————————— Restaurant B | 3 Vote(s) | Rating 6 | … Continue reading

Posted in Uncategorized | Leave a comment

CakePHP Facebook Component

A simple CakePHP component that uses the Facebook PHP SDK (https://github.com/facebook/facebook-php-sdk). Setup the component like this: public $components = array( ‘Facebook’ => array( ‘appId’ => ‘xxx’, ‘secret’ => ‘xxx’, ‘cookie’ => true, ‘fileUpload’ => 1, ‘canvas’ => 1, ‘fbconnect’ => … Continue reading

Posted in Uncategorized | Leave a comment

Facebook Page Tab: Remove scrollbars and auto-resize height

I have come across many ones, but this one always worked for me without problems. CSS html, body { overflow: hidden; } Put this just after the tag: <div id="fb-root"></div> Put this after you have jQuery and other libraries loaded. … Continue reading

Posted in Uncategorized | Tagged | Leave a comment