There's a new function in Drupal 7: [template_process_page()][], that gets called after [template_preprocess_page()][]. This new function is where page titles and breadcrumbs will normally be added to the page.tpl.php variables. Read on for more info on how to override or remove these variables in your theme. [template_preprocess_page()]: http://api.drupal.org/api/drupal/includes--theme.inc/function/template_preprocess_node/6 "Drupal API for template_preprocess_node" [template_process_page()]: http://api.drupal.org/api/drupal/includes--theme.inc/function/template_process_page/7 "Drupal API for template_process_page"
The waybackwhenmachine is a wonderful and scary thing, and we have unearthed a couple of particularly special newsletters from 2005 ... http://web.archive.org/web/20060826140141/www.computerminds.co.uk/news0… http://web.archive.org/web/20060826140058/www.computerminds.co.uk/news0… Just imagine the possibilities of 8MB broadband, a new operating system from MS called "longhorn" (which you youngsters will know as Vista) and something called "Firefox" - that will never take off :)
Not the most exciting of articles this, but thought I would share the browser stats for the ComputerMinds site - given less than 8% of traffic is coming from IE I think you can probably draw some conclusions as to the type of visitor we get :) Firefox 54.28% Chrome 26.44% Safari 8.25% Internet Explorer 7.21% Opera 1.87% Mozilla Compatible Agent 0.83% And here is the breakdown of IE versions - note IE6 - that's...
When building forms, you will often want to only provide certain options if other options are chosen by a user. For example, there's no need to show the 'open link in new window' checkbox, if the 'make this into a link' checkbox hasn't been ticked. These kinds of dynamic forms haven't been easily available for Drupal... until now, with the #states for form elements in Drupal 7. Take a peek at this example of dynamic...
It used to be a bit of a chore to add a role a user in Drupal, but no longer! All you need to do is this (in Drupal 7): $uid = 123;// User ID of user that you want to add role to. $role_name = 'Role to add'; // The name of the role to add. if ($role = user_role_load_by_name($role_name)) { user_multiple_role_edit(array($uid), 'add_role', $role->rid); } Of course someone can still come along and screw...
Certified to Rock is a site that allows you to look-up Drupal.org user names, and see their 'certified to rock' score. CertifiedToRock.com is a way that community members and employers can get a sense of someone's involvement with the Drupal project. The site uses a custom algorithm that gathers publicly available information which is then distilled down into a score on a scale from one to eleven. I've been wanting to build an easy way...
There are a number of scenarios where you might want to log email being sent by Drupal; perhaps locally during development or for urgent debugging on a live site. There are a number of options available for Drupal email logging, and this article will cover four of the most common ways: Using Devel module. Drupal logging modules: Maillog/Mail Developer, Mail Logger Drupal re-routing modules: Reroute Email, Advanced Mail Reroute SMTP server redirection We'll look at...
What are CTools Dependencies? One of several helpers included in the ctools module, ctools dependency is described on the module page itself as "a simple form widget to make form items appear and disappear based upon the selections in another item". It's designed to make it easy and quick to hide/show form elements based on the value of other form elements in the browser using javascript. This article was written in reference to Drupal 6...
There may be better ways to do this, but suppose you want to get Aegir to provision a lot of sites, maybe from a list you've got in CSV file, then you can now use Feeds! The Aegir feeds module exposes the key details to feeds, so that it can create site nodes. Whip yourself up a feed importer preset with the source of your choice, create site nodes and map your values to the...
Views is the king in Drupal land when it comes to making lists of your data, rightly so, it does a wonderful job of making it easy to choose the data you want to list. It also allows you to render your list in various forms, lists, tables. RSS feeds or even jump menus. So if you want to make a list and render it as CSV or XML, then you naturally turn to views...