User login


Modifying a view with a views hook: example of custom empty text

From wsf_action.module:

 * Implementation of hook_views_pre_view
function wsf_action_views_pre_view(&$view) {  // don't need $items
 // in_array($view->name, $place_views)
  if (substr($view->name, 0, 6) == 'place_') {

Taxonomy_term_count_nodes gives stupid results when child terms have same nodes

The Drupal core function in taxonomy.module, taxonomy_term_count_nodes, has no check in it to remove duplicate nodes, which can happen in situations where a nodde belongs to both a child and a parent. In my opinion there should be a different function taxonomy_term_and_children_count_nodes or a flag in the function to say if nodes belonging to children terms should be counted at all, and if they are, there should be proper checking to remove duplicates.

Access a server via another server

Oh, it's that easy...

Hello Marco,

Could you give your procedure for proxying through another server? Once we have it hooked up with our server we should be able to do that.


in this way.

1) (necessary if server restricts by IP adddress) send ip of server1 to server staff

2) from your machine's shell to server 1
ssh ben@server1

3) from server1's shell to destination server

Theme a Views Table

Very useful thread, great helpful people responding to it:

How to theme view module's "table view"?

Thanks to a tip from

 * Function to handle a sample field.
function phptemplate_views_handle_field_participants_users_name($fields, $field, $data) {
  $info = $fields[$field['fullname']];

Record process of checking out code of a Drupal site so it can be played back

Agaric wants a way to say to our servers, keep track of every svn checkout done here, so we can do it again in an instant for test sites etc.


How to add CSS and Javascript just for the front page, as for a custom GMap call

You cannot call drupal_add_css, drupal_add_js, or drupal_set_html_head in any page.tpl.php files themselves. This makes sense, as the variables used to display the page have to have been loaded already for the page to start displaying.

GMap not showing up (markers and controls, but map is gray) due to validation errors

This problem is only in IE6, because it's evil.

First thing noticed: while the background was gray, and not a map, a single click to change the map style (road map, geo, or hybrid) the map would instantly appear.

So with the theme changed to bluemarine, the map shows up.

Return path module (working edition)

Due to poor reading of the issue queue AND not looking for the HEAD release, I (accidentally?) coded the fix to this myself. But actually both head and the official release are broken in different ways, so here's Agaric's service to the community.

Presumably the official version at will be working soon (version 5.x-1.1 does NOT), but until then here's a working download.

Save a file in Vim after editing and only realizing it's read only when saving

Superseded by a better way to force saving from in vi when read-only, noted in the comments and in Agaric's own post there as :w !sudo tee %

If you've used Debian or any other type of Linux or Unix-like for editing files on your server, at some point you will have done a whole bunch of editing without seeing the "READ ONLY" warning, and then... you try to save.

How to translate a Drupal site using .po (Portable Object) files

[By Thiago Bennicchio]

Hi friends,
please read the whole email before starting the work.

Now we have offline text files to translate the interface. I'm sending Judith the Portuguese file. Mathias, Leo, please tell me in which languages are you going to translate so I can send you the proper files (please reply to all so we know who's doing what).

As we talked before, we need to be very careful when dealing with this files (not to erase commas, quotes and #).

The basic structure of the files is the following:

: modules/nonon nonno ononon

Syndicate content