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

can't capture variables sent by form[]

Hi,

i got this really strange beginners problem. I want to use a form and then capture and store variables from it. But i can never capture forms variable althou they can be seen with print_r function. Please help me to capture it.

Here is the code i use for form generation:

 //form for variable setting.
 $forma[urly] = array(
 '#type' => 'textfield',
 '#title' => t('Enter Yahoo news URL'),
 '#default_value' => 'http://www.yahoo.org/',
 '#maxlenght' => '333',
 );
 $forma['submit'] = array('#type' => 'submit', '#value' => t('Save new settings.'));

 //let's add this form to output
 $output .= drupal_get_form('my_form', $forma);

and above it i try to capture $_POST[edit][urly] with this code:

 //$output .= '<pre>' .  print_r ($_POST) . '</pre>'; //debug line
 $output .= 'XX'. $_POST['edit']['urly'] . 'XX'; //debug line
 variable_set('importNewsURLyahoo',$_POST['edit']['urly']);
 $output .= variable_get('importNewsURLyahoo','Variable never been set before.');

print_r if uncommented shows:

Array
(
    [edit] => Array
        (
            [urly] => http://www.yahoo.org/dcsd
            [form_id] => my_form
        )

    [op] => Save new settings.
)

Please tell me how to access that urly field variable.

Thank you and sorry if it's more PHP than drupal related problem ;-)

File Server / Download modules? Any Available?

Hi all.

I am relatively new to the Drupal community and am looking for a decent FileServer / Download module to host and distribute some rather large family videos.

Are there any such modules around?

Thanks.

Populating user info in location.module from ldap

Good afternoon, everyone,
I am trying to figure out a way to populate the user "Location" information from our LDAP entry.

Below are my LDAP mappings:
'streetaddress' => array('text', 'textfield', t('Address'), 64, 64),
'l' => array('text', 'textfield', t('City'), 64, 64, t('Your city or other location')),
'st' => array('text', 'textfield', t('State'), 4, 2, t('Your state or province')),
'postalCode' => array('text', 'textfield', t('Postal Code'), 7, 5, t('Your Zip or Postal code')),

cck scalability

I'm looking at the mysql tables for cck. It seems to me, with my very limited knowledge, that a custom node, where all fields are stored in one table, would run faster than cck.

Is this right?

I know flexinode reputedly had problems with scaling due to inner joins for every field you have. I read that cck was supposed to be somewhat better.

From that, I would conclude that a custom node is faster than a cck node.

Does this sound right?

Logout

Hello

I have situation where multiple users use same computer and users have different privileges. Is there a way to automatic logout when internet browser is closed or how this can be done.

cck: Should I use cck or write my own custom node using node_example.module?

Do you think I should use cck or write my own custom node using node_example.module?

One person wrote on a thread that surely writing your own module is quicker than figuring cck out. That makes sense to me. I've had a lot of trouble trying to get cck to work.

I do not know php. Yesterday I began modifying node_example.module (available in api docs) to add my own fields and to theme the output. I was making good headway and learning a lot about how Drupal and php work. To me this is a big plus in writing my own node versus using cck.

also
It seems to me cck is still undergoing major changes and if I have my content in cck it may be prone to bugs or upgrade problems. (Flexinode users have been left behind in 4.7 since it's not fully updated.) With a simple module that I understand I presumably could upgrade it myself to 4.8.

On the other hand, perhaps in modifying node_example.module I may introduce security issues or scalability issues that I am ignorant of.

Also cck may have better interfaces with other modules.

The 2 custom nodes I want to write are (1) a review module. (Think for example, a restaurant review.) and (2) a listing module (Think for example, a listing of a house for sale.)

It seems to me quite a few programmers are using cck when they certainly are capable of writing their own node modules.

Opinions and advice are appreciated.

Pages

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