Click Fraud Protection
PHP related blog, freelancer to hire!


Geotagging script

PHP Geotagging script Script converts visitor’s ip adress into : country code (2 and 3 letter ISO code) full english country name region code and name currency code used in this country postal code gps coordinates area code dma code metro code and BONUS overall statitics about

Read more

How set active item in primary links menu in Drupal

I wanted to set item to be active from my module. After research i found quite easy way to do it. I found theme_links() which are preparing menu to be displayed. Copy that into template.php in your theme folder. My function is quite simple: function YOURTHEMENAME_links($links, $attributes

Read more

How to modify Drupal Views SQL

I wanted to sort my views result on field which doesn’t exists in db table, so my idea was to use: SELECT … WHERE field IN (value1, value2) … ORDER BY field = value1 DESC, field = value2 DESC  etc Which orders my elements exactly as I

Read more

PHP Mail problem on Ubuntu

I’ve installed fresh version of Ubuntu 9.04 with Lamp, but I couldn’t send emails outside. Problem was SMTP auth of outgoing server, spending time found who made my day. Thanks

Read more

Why do I receive an “Operation aborted” error message when I visit a Web page in Internet Explorer?

I did really simple application, but still under IE7 it was crashing with Operation aborted. First “You can turn off friendly HTTP error messages in Internet Explorer. This workaround still lets the error message appear. However, Internet Explorer does not move away from the page after the

Read more

Zend_db_table how to find row by multiple columns?

Maybe should dig more in ZF API, but found simple solution: class YourClass extends Zend_Db_Table_Abstract { public function findOneByParams(array $params) { // prepare query $query = $this->select(); // add our terms foreach ($params as $param => $value) { $query->where($param.’ = ?’, $value); } // find row $row

Read more

Enable spell check in Firefox

How to enable spell checking in Firefox? Enable built-in functionality Type in address bar about:config Then in next window type layout.spellcheckDefault When option appear below double click on it and change value to be 2 Install any dictionary add-on for firefox you like from Restart browser

Read more

Session time out in Symfony

Quick solution in symfony 1.0.xx all: .settings: timeout: 86400 Just be careful because if you set to false it will disable sessions

Read more

Symfony – Sorting elements in filters (foreign table)

Today i found nice and simple solution how to filter elements in dropdown when you specify filter for field which is forgeign key. Simple go and edit Peer class of table you want to have things sorted. class [YOURTABLE]Peer extends Base[YOURTABLE]Peer { public static function addSelectColumns(Criteria $criteria)

Read more

Internet Explorer 8 and backward compatibility on code-diesel

“With the release of Internet Explorer 8, the issue of compatibility has again become a concern for web developers. If your website does not display correctly in IE8, you have a choice of either updating your website to support the latest Web standards or you can force

Read more
Page 4 of 512345