Category Archives: drupal

Custom Views exposed form for Drupal

Take a look at views.module, add a line you will be able to get all the themes


$form['#theme'] = views_theme_functions('views_exposed_form', $view, $display);
drupal_set_message('

' . var_export($form['#theme'], true));

For an example result:
array (
0 => 'views_exposed_form__client_showcase__page',
1 => 'views_exposed_form__page',
2 => 'views_exposed_form__default',
3 => 'views_exposed_form__client_showcase',
4 => 'views_exposed_form',
)


A small drupal MySQL snippet


select uid, (select value from profile_values where fid=24 and uid=pv.uid) as c_bpartner_id, value from profile_values pv where uid in (select uid from profile_values where fid=24) and fid=17 order by c_bpartner_id


Disable subject field in Drupal comment

modulename.install

<?php

function modulename_update_6203(){

    $items = array();

    $types = node_get_types('types', NULL, TRUE);

    foreach($types as $type) {        

        variable_set('comment_subject_field_'. $type->type, 0);

    }

    return $items;

}