Helo. I'm trying to port the post count rank module to drupal 4.7. I think is almost finish all the porting, but I can't make the settings page saves the postcount_rank_fieldid and postcount_rank_metrics vars.
I'm a little noob whit drupal so I can't figure where I'm wrong. Here is the code please help me.
<?php
define('PROFILE_HIDDEN',4);
function postcount_rank_help($section) {
switch($section) {
case 'admin/modules#description':
return t("This module allows you to give users a custom rank based on postcount and assign it to a custom 'list' type profile field");
break;
}
}
function postcount_rank_settings() {
$result = db_query("SELECT fid, title, options FROM {profile_fields} WHERE visibility = %d AND type = 'selection'",PROFILE_HIDDEN);
$fid = variable_get('postcount_rank_fieldid',-1);
$list_values = '';
while($field = db_fetch_array($result)) {
$options[$field['fid']] = $field['title'];
if ($field['fid'] == $fid)
$list_values = $field['options'];
}
$form['profile_field'] = array(
'#type' => 'fieldset',
'#title' => t('Postcount rank settings'),
);
if ($options){
$form['profile_field']['field'] = array(
'#type' => 'select',
'#title' => t('Profile Field'),
'#default_value' => $fid,
'#options' => $options,