hello Family Baheyeldin,

I ported this module to drupal 4.7
and fixed some issues with missing {} in sql queries

thanks for the module :D

cya tobi

Comments

Tobias Maier’s picture

another variation of profile_csv_settings()
the only change: it uses fieldsets

function profile_csv_settings() {
  $form['general'] = array(
    '#type' => 'fieldset',
    '#title' => t('General User Data'),
    '#collapsible' => true,
    '#collapsed' => true,
  );
  $form['general'][CSV_PARAM . 'uid'] = array(
    '#type' => 'checkbox',
    '#title' => t('User ID'),
    '#return_value' => 1,
    '#default_value' => variable_get(CSV_PARAM . 'uid', 0),
  );
  $form['general'][CSV_PARAM . 'name'] = array(
    '#type' => 'checkbox',
    '#title' => t('User Name'),
    '#return_value' => 1,
    '#default_value' => variable_get(CSV_PARAM . 'name', 0),
  );
  $form['general'][CSV_PARAM . 'mail'] = array(
    '#type' => 'checkbox',
    '#title' => t('User Email'),
    '#return_value' => 1,
    '#default_value' => variable_get(CSV_PARAM . 'mail', 0),
  );
  $form['profile'] = array(
    '#type' => 'fieldset',
    '#title' => t('Profile Fields'),
    '#collapsible' => true,
    '#collapsed' => true,
  );
  $result = db_query("SELECT fid, name, title FROM {profile_fields} ORDER BY fid"); 
  while ($row = db_fetch_object($result)) {
    $fld = CSV_PARAM . 'profile_' . $row->fid;
    $form['profile'][$fld] = array(
      '#type' => 'checkbox',
      '#title' => $row->title,
      '#return_value' => 1,
      '#default_value' => variable_get($fld, 0),
    );
  }
  return $form;
}
Tobias Maier’s picture

StatusFileSize
new5.35 KB

and here comes a patch
which includes this port and the fix for the date-issue

Tobias Maier’s picture

StatusFileSize
new6.11 KB

I think this is the last patch for today...

new features of this patch
* the csv file gets a header so you can see what which column means...
* settings page: every profile category is in an own fieldset

I hope you like it :)

wafaa’s picture

Status: Needs review » Fixed

fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)