
The articles on this page are ComputerMinds' contribution to the Planet Drupal aggregated article feed. Planet Drupal is intended to collate interesting and useful Drupal content from around the web.
[varnish]: https://www.varnish-cache.org/ [monit]: http://mmonit.com/monit/ We put almost all of our Drupal sites behind the excellent [Varnish HTTP accelerator][varnish], and it gives us a massive performance boost for most site visitors. However it seems to have a tendency to crash without warning and occasionally just dies, leaving our sites down. We workaround this issue by using another piece of useful kit, called [Monit][monit], that keeps an eye on processes on your server and restarts them if...
We recently needed to migrate all our sites on one physical server to another server, there were more than 200 sites, and they were all hosted with Aegir. The old server was to be decommissioned, so we had to move all of Aegir's data about the site to the new server import into a new Aegir master on the new server. We also needed to do this with as small amount of downtime as possible...
As the year draws to a close we thought it would be appropriate to look back at an exciting year in for Drupal modules, and to list our top 5 Drupal modules of 2011. To qualify for the list the module had to have it's first release in 2011, and have a Drupal 7 version - other than that, anything goes. Workbench The workbench module attempts to provide the sort of editorial interface that many...
Drupal 7 brought us Entities, and with them the powerful [Field API][] for 'storing, loading, editing, and rendering field data.' attached to them. If you're managing everything through 'manage fields' and 'manage display' tabs of your content type, then every part of that process is rather wonderfully taken care of for you. [Field API]: http://api.drupal.org/api/drupal/modules--field--field.module/group/field/7 We often, however, come across the need to render a field outside the context of it's entity. A common example might include rendering a node's author in a sidebar block. Sure, modules like Panels and CCK Blocks will do this for you, but doing it manually is actually not that hard.
Most projects start with you trying out something locally, getting it working and then after some initial testing you might then want to publish the project on Drupal.org. Sandboxes are a great way to throw up some code and the perfect place to pop random code that others might find useful or a project that you just don't want to maintain. If you go and create one on Drupal.org then you'll get helpful instructions for...
In Drupal 6, if you called node_load then what you'd be returned would be your own copy of the node to change and modify as you pleased, but in Drupal 7 this was changed. By default, what you actually get back from a node_load is essentially a reference to a global singleton for that node. This has the interesting side effect of meaning that if you change anything in the node object, you are probably...
Here's a quick follow-up to my original post on Dynamic forms in Drupal 7, as a reply to Wappie08, who asked me about combining conditions in the #states array to add increased control over the display of your form elements. The question: Hi James Williams, I read your blog post about d7 & #states in the FAPI which is really cool! One problem is that the information is also listed in the drupal.org example module...
The code that runs http://api.drupal.org is of course Drupal, and it is essentially just scanning the code it's told to and displaying it in a nice format. You can quite easily set up your own API site that you can use to scan your own custom code, or if you're a module developer, your module's documentation (you do have documentation in the code right?) I'm going to outline how we can use Drupal and Jenkins...
Drupal 7's database layer is awesome, it is built upon PDO and one of the great things about PDO is named placeholders, they allow you to build queries like: $unsafestring = "this string can contain quotes: ' or other things"; $query = db_select('table') ->fields('table') ->condition('field', $unsafestring); The SQL that is sent to the database is: SELECT table.* FROM table WHERE (field = :db_condition_placeholder_0) This is sent along with the contents of $unsafestring to replace the...
[Aegir][aegir] is a very clever Drupal hosting system built using Drupal and Drush. It is divided into two parts: the frontend and the backend. The frontend is essentially just a standard Drupal site that stores its data in the database and then some drush scripts that manipulate the data. The backend (provision) is just a collection of drush scripts, and it stores its data in [Aegir contexts][aegir_contexts] which are essentially just arrays of data stored...