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

how to dynamically generate form tree ?

Hi all,
I have a form which will be generated dynamically by checking more check box. The code goes like this;

If ($node->more){
$node->rows += 1;
}
for ($i = 0; $i< $node->rows; $i++){
$form[‘answers’ . $i] = array(
‘#type’ => ‘fieldset’,
‘#tree’ => true
);
} 
$form[‘more’] = array(
‘#title’ => t(‘check this if you need more answers’),
‘#type’ => ‘checkbox’,
#value’ => 0
);

My problem is which is the best way to validate, insert, update, load all these values?

Want to contribute? New module idea...

Hi all!

Would you like to contribute to Drupal with a module which would be widely used (at least I think so!)? I know there exists an audio module, but I was testing it and I don't like it much...

I launch this idea to the air because my knowledge of PHP is not enough to do it by myself. There is an audio plugin for wordpress which is really nice. The module, demo, instructions and all are here. I suggest to port it to drupal.

In a way I've done it, but not really. I use this module in article content-type embedding the flash player in the article, see an example here, but I have to copy-paste the embedding code in the article every time.

I'm thinking in someone who can develop a new module which would add the "podcast" content-type to drupal.

In the new module options there should be the possibility of setting the default colors of the player (left background, text, right background, background, left icon, etc), the default directory to store the MP3, and the default text for the download link.

When you create a new podcast-content you should be able to override the default settings and choosing an MP3 to be uploaded automatically to the MP3 folder. It would be also nice to be able to write the new post in this way:

mailsave for 4.7

A while back I wrote a module for Drupal 4.6 called "mailsave" that works with mailhandler to save attachments from emails. If you are also running image.module it automatically converts your post to an image node, and shows the picture. The module can handle multiple attachments, although only the first jpeg will be displayed.

HT Make node viewable only to user who created it?

I made a node module.

I would like:

1. A user who created the node can only view nodes he created.

2. An editor can view all nodes.

3. Nodes should not be searchable by anyone except 'view all nodes' roles.

In conjunction with an access control module, you can make 2 and 3 happen, but not seemingly 1. The view switch in hook access doesn;t really seem capable to make that happen either...

How does "Show block only for specific content type" this section of code use in Drupal5.0?

How does "Show block only for specific content type" this section of code use in Drupal5.0?

Show block only for specific content type:

$match = FALSE;
$types = array('story' => 1, 'page' => 1);
if (arg(0) == 'node' && is_numeric(arg(1))) {
  $nid = arg(1);
  $node = node_load(array('nid' => $nid));
  $type = $node->type;
  if (isset($types[$type])) {
    $match = TRUE;
  }
}
return $match;

Waits for your reply,Thanks!

Organic Groups invite customization

So what my friend and I want is a customization of the OG Invite module that allows the user to search through the database of users and based on whatever criterion present in their profiles, select the users to receive the invite to their group.

There is already a way to search through user profiles that is exactly what we want, and a way to do invitations, I'd just like to be able to combine the two of these together.

Has anyone already solved this problem?

Dave

Pages

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