Tag Archives: PHP

When you output a Jump Menu from a View in Drupal 6, it displays & instead of the ampersand. Therefore ‘Terms & Conditions’ appears as ‘Terms & Conditions’ in the menu. The following bit of PHP code fixes this problem: … Continue reading

Posted in PHP, Snippet Library - PHP | Tagged , | Leave a comment

The PHP code snippet below shows how to add a GROUP BY clause to a Drupal 6 View. function hook_views_pre_execute(&$view) { switch($view->name) { case ‘Services2′: $search = array(‘ORDER BY’); $replace = array(‘GROUP BY node_data_field_parent_service.field_parent_service_nid ORDER BY’); $view->build_info['query'] = str_replace($search, $replace, … Continue reading

Posted in PHP, Snippet Library - PHP | Tagged , | Leave a comment

I was recently asked to create a mechanism in Drupal 7, so that a client could add member only content to their Drupal 7 web site. The content was to be added periodically by the company in the form of … Continue reading

Posted in PHP | Tagged , | Leave a comment

I recently had to add a member only section to a Drupal 7 web site. A problem I came across is that out of the box Drupal displays the User page after successful login and the member pages where not … Continue reading

Posted in PHP, Snippet Library - PHP | Tagged , | Leave a comment

See: http://memcached.org/ Memcache is a method for distributing memory for large scale database sites that can help improve server efficiency for PHP applications. For large scale PHP and mySQL driven sites, memcache enables distributed computing that layer requests in terms … Continue reading

Posted in General, mySQL, PHP | Tagged , , , , , | Leave a comment

phpDocumentor is an auto documentation tool for PHP. It is similar to Javadoc, and written in PHP, phpDocumentor can be used from the command line or a web interface to create professional documentation from PHP source code. See the PhpDocumentor … Continue reading

Posted in General, PHP | Tagged | Leave a comment

Version Number Release Date 1.0 08/06/1995 2.0 01/11/1997 3.0 06/06/1998 4.0 22/05/2000 4.1 10/12/2001 4.2 22/04/2002 4.3 27/12/2002 4.4 11/07/2005 5.0 13/07/2004 5.1 24/11/2005 5.2 02/11/2006 5.3 30/06/2009 5.4 01/03/2012

Posted in PHP | Tagged | 1 Comment

Rasmus Lerdorf Rasmus Lerdorf was born in Greenland in 1968, grew up in Denmark and Canada and has a Systems Design engineering degree from the University of Waterloo. In 1994 Rasmus Lerdorf created PHP.  Initially, it consisted of  a set … Continue reading

Posted in General, PHP | Tagged | Leave a comment

Gravatar is short for “Globally Recongnised Avatar”. It is an image that follows you from site to site and will appear next to your name when you publish content or comments on many blogs, forums and other websites all over … Continue reading

Posted in General | Tagged , , | 1 Comment

This PHP function takes a file size in bytes and return a human readable value in bytes, KB, MB or Gb. /** * function humanFileSize(integer $size) * * Receive the file size in bytes and return the human readable value … Continue reading

Posted in Snippet Library - PHP | Tagged , | Leave a comment