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

hook_settings form in cvs HEAD

I have the following code:

Does everything have to be a node?

Hi,

I'm a drupal Noob. I've been playing around with developing in Drupal for only about 2 days, and I've been busy digging through and learning the system. I'm building a new module: Associate. This is to handle displaying of specific information about a person. I don't want to create these as Drupal user accounts and use the profile module. :)

Should everything be a node in Drupal, or is it alright/wise to have data that are not nodes?
What are the benefits of making them nodes?

What is $op? — what does it stand for?

Please excuse the noobish question. For the most part I can infer the semantics of variable names which, when combined with a sufficient tenacity, helps me deconstruct the code I'm looking at. But I can't seem to figure out the significance of $op. Does this stand for something? (output is my current best guest, although I also considered ) Is it an arbitrary designation? Is it a universal convention in certain situations like $foo?. I've searched but the nature of $op makes it extremely frustrating

mulit-stage node submission

I am trying to create a module that implements a node that has a multi-stage submission process. The user fills out the node information like a regular node but upon submission they are passed to another form page which requests further information based upon the first form page they filled out.

Feed for the Aggregator???

This seemed like a silly question to me, but I looked and couldn't find it anywhere... Is there such a thing as a feed for a feeder (aggregator)? It seems redundant, but is it possible to have a feed where someone could get all of the feeds in our aggregator in one rss feed?

How to code forms in cvs head 4.7?

Could someone explain the proper way to code forms in 4.7? Some of the modules, after upgrading, use legacy form generation code, that doesn't seem to work even after enabling the Legacy module. I can't make heads or tails out of the new code.

Specifically, I'm trying to get a checkbox. I have the following code, which almost works, but doesn't actually set the value as I need it:

function image_tab_settings() {
	 // Global Image Display Settings
	 $form['imageDisplay'] = array('#type' => 'fieldset', '#title' => t('Global Image Display Settings'));
	 $form['imageDisplay']['image_tab_globally_display_images'] = array('#type' => 'checkbox', 
	 	'#title' => t('Display images globally'), 
	 	'#return_value' => TRUE,
	 	'#default_value' => variable_get('image_tab_globally_display_images', TRUE), 
	 	'#description' => t('If checked, images may be displayed with content, although some types of content may override this setting. When not checked, no images associated with any content will ever be displayed automatically.')
	 	);
	 
	 return $form;
}

I borrowed this from the new user module (line 1167). I'm trying to set the variable 'image_tab_globally_display_images'. Instead, it always returns a check, even if it's not checked.

The user module uses '#default_value', but looking at the API for theme_checkbox($element), it looks like perhaps I should use '#value' instead. However, that doesn't work either.

I've looked for some documentation about the new way that Drupal will handle forms, but haven't found any yet. Perhaps someone could point me in the right direction.

Thanks,
Aaron

Culture Fix Web Identity & Design
Digital Folk Art (my blog)

Pages

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