Tigerfish blogs http://tiger-fish.com/blog/Drupal%20Planet en Drupal 6: Loop through a db_query result more than once http://tiger-fish.com/blog/drupal-6-loop-through-dbquery-result-more-once <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> Ever wondered how to loop through the same database query resultset twice, resetting the pointer to the beginning, instead of having to redo the query? Let&#039;s try it. </div> </div> </div> <p>Drupal 6 has a lot of database API commands, although one common task that continues to come up is how to get results out of a query more than once, without repeating the query. I've not seen this documented elsewhere so I thought it was worth noting.</p> <h3>Why bother?</h3> <p>Excellent question. Shouldn't I have written a better query? Our need was to go through the resultset from the db_query and work out the highest and lowest values, then, perform some complex maths on each row that depended on knowing the highest and lowest values.</p><p><a href="http://tiger-fish.com/blog/drupal-6-loop-through-dbquery-result-more-once" target="_blank">read more</a></p> http://tiger-fish.com/blog/drupal-6-loop-through-dbquery-result-more-once#comments Drupal Drupal Development PHP Web Development Drupal Planet Tue, 17 Jan 2012 15:11:45 +0000 Chris 192 at http://tiger-fish.com Writing Drupal documentation with PHPDoc http://tiger-fish.com/blog/writing-drupal-documentation-phpdoc <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> A quick summary of how to document your code properly, to act as a reference when you need to PHPDoc your functions. </div> </div> </div> <p class="lead-in-copy">Documenting your Drupal code using PHPDoc is part of building any kind of Drupal site that involves writing code, whether you're writing a mega-module like <a href="http://drupal.org/project/views">views</a>, or just writing a quick front-end theme. This quick reference guide will get you going, or act as a simple refresher if you haven't done it for a while.</p><p><a href="http://tiger-fish.com/blog/writing-drupal-documentation-phpdoc" target="_blank">read more</a></p> http://tiger-fish.com/blog/writing-drupal-documentation-phpdoc#comments Drupal Development PHP Web Development Drupal Planet Thu, 12 Jan 2012 17:24:36 +0000 Chris 191 at http://tiger-fish.com Speeding up SimpleTest on Drupal 7 http://tiger-fish.com/blog/speeding-simpletest-drupal-7 <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> Ever wondered why SimpleTest runs are much slower in Drupal 7 compared to their Drupal 6 counterparts? The answer lies in the way that SimpleTest creates lots of test tables, which is slow in Drupal 7 due to changing to InnoDB as the MySQL table type default. </div> </div> </div> <p>Ever wondered why SimpleTest runs are much slower in Drupal 7 compared to their Drupal 6 counterparts? The answer lies in the way that SimpleTest creates lots of test tables, which is slow in Drupal 7 due to changing to InnoDB as the MySQL table type default.</p><p><a href="http://tiger-fish.com/blog/speeding-simpletest-drupal-7" target="_blank">read more</a></p> http://tiger-fish.com/blog/speeding-simpletest-drupal-7#comments Drupal Development Drupal Planet Tue, 10 Jan 2012 17:05:27 +0000 Craig 183 at http://tiger-fish.com Setting up JetBrains PhpStorm for use as a Drupal IDE http://tiger-fish.com/blog/setting-jetbrains-phpstorm-use-drupal-ide <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> Find out how to bend the excellent PhpStorm IDE to Drupal&#039;s coding standards, really quickly and painlessly. </div> </div> </div> <p class="lead-in-copy">JetBrains PhpStorm, is, surprisingly, an incredible IDE, and works extremely well for Drupal development. We took some time to go through all the various custom settings and get things set up to obey Drupal's coding standards, so we thought we'd share.</p><p><a href="http://tiger-fish.com/blog/setting-jetbrains-phpstorm-use-drupal-ide" target="_blank">read more</a></p> http://tiger-fish.com/blog/setting-jetbrains-phpstorm-use-drupal-ide#comments Drupal Drupal Development PHP Web Development Website Drupal Planet Thu, 01 Dec 2011 15:01:12 +0000 Chris 188 at http://tiger-fish.com Drupal 6: How to completely remove blocks from the block admin page http://tiger-fish.com/blog/drupal-6-how-completely-remove-blocks-block-admin-page <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> Giving clients access to the block admin page, which is usually filled with blocks that really aren&#039;t relevant can be confusing, here&#039;s how to get rid of them. </div> </div> </div> <p>It has been a bugbear for a while, sitting in a client meeting, running them through how the block system works and being confronted with a list of system blocks that have no bearing on the site. </p> <p>Having to explain 'just ignore those' is annoying for us, and confusing for them. The fix is pretty simple really, just drop this bit of code into your theme: </p><p><a href="http://tiger-fish.com/blog/drupal-6-how-completely-remove-blocks-block-admin-page" target="_blank">read more</a></p> http://tiger-fish.com/blog/drupal-6-how-completely-remove-blocks-block-admin-page#comments Drupal Drupal Design Drupal Development PHP Web Development Website Drupal Planet Thu, 18 Aug 2011 15:57:09 +0000 Paul 182 at http://tiger-fish.com DrupalCon curry night, Tuesday 23rd August http://tiger-fish.com/blog/drupalcon-curry-night-tuesday-23rd-august <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> Tuesday night is the unofficial DrupalCon curry night. If you feel like joining us, check out this post to find out where to express your interest! </div> </div> </div> <p class="lead-in-copy">The evening of Tuesday 23rd August will be the unofficial DrupalCon curry night. Together with <a href="http://twitter.com/#!/niklp">NikLP</a>, we are planning to bring together all those who love both Drupal AND curry. After all, London has some of the best of the country's curry houses, so bring an iron stomach (just kidding, as curry doesn't have to be violently hot, if you don't like that sort of thing) and let's eat!</p><p><a href="http://tiger-fish.com/blog/drupalcon-curry-night-tuesday-23rd-august" target="_blank">read more</a></p> http://tiger-fish.com/blog/drupalcon-curry-night-tuesday-23rd-august#comments Drupal Marketing Online Marketing Social Media Social Networking Social Networks Tigerfish Drupal Planet Mon, 08 Aug 2011 13:00:38 +0000 Chris 181 at http://tiger-fish.com Drupal: non-static method krumo::dump cannot be called statically http://tiger-fish.com/blog/drupal-non-static-method-krumodump-cannot-be-called-statically <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> Having problems using krumo() or dpm() in your development build? This solution could be worth a try. </div> </div> </div> <p class="lead-in-copy">If you are seeing the error "non-static method krumo::dump cannot be called statically" you might, like me, be wondering what the hell that means. Alternatively you might not even be seeing the error, or noticing that it's happening. Sometimes krumo output won't be all nice and clickable, like it usually is.</p> <p>The problem looks a bit like this:</p> <p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://tiger-fish.com/files/tigerfish/blogs/otto/krumo-issue.jpg" alt="Screenshot of krumo problem" width="543" height="362" /></p><p><a href="http://tiger-fish.com/blog/drupal-non-static-method-krumodump-cannot-be-called-statically" target="_blank">read more</a></p> http://tiger-fish.com/blog/drupal-non-static-method-krumodump-cannot-be-called-statically#comments Drupal Drupal Development PHP Web Development Drupal Planet Fri, 05 Aug 2011 11:14:16 +0000 Chris 180 at http://tiger-fish.com Drupal: Help bring Drupal CRM to life at DrupalCon London http://tiger-fish.com/blog/drupal-help-bring-drupal-crm-life-drupalcon-london <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> Drupal CRM has been in the pipeline for some time now, but DrupalCon London is the pivotal moment in its early development. Find out why! </div> </div> </div> <p class="lead-in-copy">Drupal has no native CRM system. But it should have one. Drupal CRM (known by various other names including DropCRM and DCRM) is the attempt to rectify this situation, and at <a href="http://london2011.drupal.org">DrupalCon London</a> this year, I propose that the very first code is to be created and used as a springboard to kickstart development work.</p><p><a href="http://tiger-fish.com/blog/drupal-help-bring-drupal-crm-life-drupalcon-london" target="_blank">read more</a></p> http://tiger-fish.com/blog/drupal-help-bring-drupal-crm-life-drupalcon-london#comments CMS Drupal Drupal Design Drupal Development PHP Web Design Web Development Drupal Planet Sat, 30 Jul 2011 00:26:04 +0000 Chris 179 at http://tiger-fish.com Moving Drupal forwards: Document or die http://tiger-fish.com/blog/moving-drupal-forwards-document-or-die <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> A rant on how Drupal&#039;s documentation philosophy needs to improve to take the ecosystem forwards. </div> </div> </div> <p class="lead-in-copy">Drupal's documentation is terrible. I'm not talking about Drupal core. I think leaps and bounds have been made there over recent years, although there is still more to do. I am pointing the finger directly at Drupal contributed modules. What sort of state are things in? Why are they in such a state? What can we do as a community to improve things?</p><p><a href="http://tiger-fish.com/blog/moving-drupal-forwards-document-or-die" target="_blank">read more</a></p> http://tiger-fish.com/blog/moving-drupal-forwards-document-or-die#comments Drupal Drupal Design Drupal Development Web Development Drupal Planet Thu, 07 Jul 2011 12:20:34 +0000 Chris 178 at http://tiger-fish.com Drupal 7: Debugging SQL queries http://tiger-fish.com/blog/drupal-7-debugging-sql-queries <div class="field field-type-text field-field-summary"> <div class="field-items"> <div class="field-item odd"> So your SQL query is not working, but everything looks good and you can&#039;t spot the error. How do you take control and find out what&#039;s wrong? </div> </div> </div> <p class="lead-in-copy">In <a href="http://drupal.org">Drupal 7</a>, suppose you're using the excellent <a href="http://drupal.org/developing/api/database">DBTNG</a> to write your own database query. Something's wrong, but you can't see what it is, and you've lost some of the control of the earlier, more primitive database layer. So how do you go about finding what's wrong?</p><p><a href="http://tiger-fish.com/blog/drupal-7-debugging-sql-queries" target="_blank">read more</a></p> http://tiger-fish.com/blog/drupal-7-debugging-sql-queries#comments Drupal Drupal Development PHP Web Development Drupal Planet Thu, 09 Jun 2011 12:16:55 +0000 Chris 176 at http://tiger-fish.com