public function route($action) { switch ($action) { case 'click': case 'view': /* Counter update stats */ $this->core->stats($action); break; case 'position': /* Notes: * Accurate ad views does not work when linking to this file to show the ads. * The URL should look something like: * http://bb3.mobi/ads/position?p=position_id&f=forum_id&u=user_id * The Javascript code should look like this: * <script src="http://bb3.mobi/ads/position?display=js&p=position_id&f=forum_id&u=user_id"></script> * * Be warned that this won't work with certain advertisements (like ones that already output via javascript such as Adsense). */ $this->core->viewlink(); break; case 'my': $this->core->my(); break; } }