This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Adding head content: hooks not working

I'm hacking around with devel.module trying to integrate sortable.js into it. Everything would be fine, except I cannot inject the Javascript include into the head.

I tried
drupal_set_html_head('<script type="text/javascript" src="/modules/devel/sortable.js"></script>');
in devel_query_table first, and when that didn't work
drupal_add_js('/modules/devel/sortable.js');
(which I didn't use at first as I didn't want the unnecessary JS file it would also include)

strange error that I get a lot

Greetings all.,
I created some forms that enter info into a database, and they worked perfect until tonight when I started getting the following error message. Rather annoying...

warning: Invalid argument supplied for foreach() in C:\Inetpub\root\includes\form.inc on line 337.
warning: array_shift() [function.array-shift]: The argument should be an array in C:\Inetpub\root\includes\form.inc on line 469.

Field list not updated and fields not added with flexinode

Hi

I installed Drupal 4.7 and flexinode cvs. Activation went fine, but I'm not able to add a field for a new content type. Creating a new content type works fine. Can anyone help me?

Thanks
mediaman

Worldpay.module updated for Drupal 4.7

Hi Guys,

Just in case anyone is looking for a Drupal 4.7 version of the WORLDPAY.MODULE...an updated version of the worldpay.module for Drupal 4.7 is available in my sandbox. (There seems to be something wrong/new with the Contributions system on Drupal.org - I can't update the module as normal). Click to download the updated version.

Mailman Mailing List

Hi;

My mailman mailing list got error.
May be i didn't understand the installing..

How to-do this with Forms API

I'm building a Wordpress-to-Drupal migration module and want to have user interface like this: the first tab (path 'admin/wp2drupal') would contain configuration form (connection settings, character encoding etc.) and the second tab (path 'admin/wp2drupal/results') will inform the end user about the migration process - what went alright, what went wrong etc.

In the wp2drupal_menu hook, I construct paths like this:

    // Top-level item
    $items[] = array(
      'path' => 'admin/wp2drupal',
      'title' => t('Import from Wordpress'),
      'callback' => 'wp2drupal_settings',
      'access' => user_access('import from wordpress')
    );
    
    // Tabs
    $items[] = array(
      'path' => 'admin/wp2drupal/settings',
      'title' => t('Settings'),
      'access' => user_access('import from wordpress'),
      'type' => MENU_DEFAULT_LOCAL_TASK
    );

    $items[] = array(
      'path' => 'admin/wp2drupal/results',
      'title' => t('Results'),
      'callback' => 'wp2drupal_results',
      'access' => user_access('import from wordpress'),
      'type' => MENU_LOCAL_TASK
    );

In the wp2drupal_settings callback function, I contruct quite a large form and submits it to admin/wp2drupal/results using

$form['#action'] = url('admin/wp2drupal/results');

Then, I created sumbit-handling function like this:

<?php
function wp2drupal_submit($form_id, $form_values) {

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions