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

External Authentication

Hi,

One of our sites has a huge user database(with usernames and profiles). We wanted to port this information to Drupa. Previously I did this in a very naive way. I wrote a script which does bring the users and their profiles and copy them here, but the prob is with synchronzation of these websites. How can I got abt this. I did my homework but some stuff is not at all clear for me.

1) Use hook_auth to develop the authentication (Ex: imap_auth or SQL_auth).

Getting list of defined form fields

Hello All,

I am trying to use hook_form_alter to modify the settings page of modules that defines a node type. What I need to do exactly is get all the fields defined by the node type so I can show them in a select field.

Is there a way for me to achive this? I am not that experience with the form api as yet so there may be an obvious way to do this.

I am also forseeing another problem. What about modules that modify the node_form for the module, how can I get access to those extra fields?

Thanks.

allow anonymous user to vote module

is there vote module that allow anonymous user to vote? or is there a fix for Simplevote module to allow this feature?

form_values missing a value?

All,

I can't seem to put my finger on this. I have a simple form with three fields. It works perfectly, until I create a theme() function for it. Here's the form code:

    $form['term'] = array (
      '#type' => 'textfield','#title' => 'Query String',
      '#required' => TRUE,'#default_value' => $term,
      '#autocomplete_path' => 'staff/autocomplete',
      '#size' => 32,'#maxlength' => 128);
    $form['type'] = array(
      '#type' => 'select','#title' => 'Type','#default_value' => $type,
      '#options' => array ('callhistory' => t('History'),'authlog' => t('Authentication')));
    $form['when'] = array(
      '#type' => 'select','#title' => 'When','#default_value' => $when,
      '#options' => array (
          'today' => t('Today'),'yesterday' => t('Yesterday'),
          'week' => t('This Week'),'lastweek' => t('Last Week'),
          'month' => t('This Month'),'lastmonth' => t('Last Month')));
    $form['submit'] = array('#type' => 'submit','#title' => 'blah','#value' => t('Go'));

Here's the theme code:
<?php
function XXtheme_staff ($form) {
$output = '

';
$output .= form_render($form['term']);
$output .= '
';
$output .= form_render($form['type']);
$output .= '
';
$output .= form_render($form['when']);
$output .= '
';
$output .= form_render($form['submit']);

Drupal / Moodle Integration Issues for Drupal 4.7

I am experimenting with Moodle as a backend to Drupal for course management, but I've run into two limitations and I wonder if anyone is able to offer solutions...

how to disable form api check the value actually existed in the select ?

  $form[test']['pcs'] = array ('#type' => 'select', '#title' => "", '#default_value' => $node->pcs, '#options' => $pcs);
  $activeselect = module_exist('activeselect');
  if($activeselect){	
    $form['test']['pcs']['#type'] = 'activeselect';
    $form['test']['pcs']['#activeselect_path'] = 'pxxy/activeselect';
    $form['test']['pcs']['#activeselect_targets'] = "jwh";
    $form['test']['pcs']['#activeselect_extra'] = '';
  }
 
  $jwhs = jwh_all();
  ksort($jwhs);

Pages

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