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

module settings

I'm trying to add a configure page for my module.

In the menu function I have:

$items[] = array('path' => 'admin/blog_list',
'title' => t('Blog List'),
'callback' => 'blog_list_manage',
'access' => user_access('administer blog list'),
'weight' => 7);

And for the function blog_list_manage I have:

noteworthy problems developers are working on

I've been following the developer thread and find it's a good way to find out about important problems in Drupal code. Just this morning I found out that if you enable clean url's, links will break you move subdirectories. This would be a big problem for me. I decided to start this thread because there have been quite a few problems that I've learned about this way instead of the hard way.
(I'll describe the problem in more detail in the following comment.)

Forms API and the missing fields

I am writing a new module that makes extensive use of hook_nodeapi to attach an arbitrary number of images to an existing nodetype. The code works fine except for one *very* frustrating problem that I can't for the life of me figure out.

I modify the existing forms using hook_form_alter().
If I enter data into my new fields, and click submit, everything works fine.

If I click preview, my problems begin:
All of the form elements are rendered correctly on the HTML form, but if I click preview or submit again, their values are not added to $node and my application fails.

The form element is set up in hook_form_alter() as follows:

    $form['nodeimages']['nodeimage']['#tree'] = TRUE;
    $form['nodeimages']['nodeimage']['new']['caption'] = array(
        '#type' => 'textfield',
        '#title' => t('Caption'),
        '#default_value' => $node->nodeimage['new']['caption'],
        '#size' => 40,
        '#maxlength' => 255);

I don't know if I am missing something important here, but at what point to the values in $_POST get added to $node (if ever)? If they don't, how do I go about accessing them from within the Drupal framework.

I have scoured the forums and looked at some of the other modules that ship with 4.7, but I can't seem to find an obvious cause/solution.

If anyone can point out what I am missing, I will really appreciate it.

Create dynamic menu with products and taxonomy?

Hi :)

I'm currently creating a webshop with the eCommerce module and have met some problems. I'd like to organize my products in categories and then create a dynamic javascript menu that lists the actual categories.

This question actually consist of two parts:

1. How do I organize my products in categories?
I'm using the taxonomy module to organize my flexinodes, but when I create a new product, I cannot choose a taxonomy the same way I can with regular nodes / flexinodes.

Single Sign On solutions -- relative advantages and disadvantages

I'm in the midst of looking at different single sign on solutions, and I'm looking for some feedback on the relative advantages and disadvantages of the existing options -- and/or pointers toward resources I've overlooked.

Here are some of the options on my short list (in no particular order):

.

Currently, I'm looking most closely at OpenID and PubCookie. The eventual goal from all this is to create and document a system that allows single sign on between multiple Drupal sites, and Drupal sites and sites created in other open source apps. Ideally, these apps can reside on different servers, and in different domains (one of the key advantages of OpenID).

Simplenews -- relative urls

I have begun using Simplenews which appears to be just the thing I need.

However, I want to add dynamic content to the emails, like the "upcoming events" block. So I put in a php snippet. This works fine.

The problem I am having is that the urls are not absolute. The link is "node/17" because this is all the event module does with it. The full url is added later in the page construction process.

Any suggestions?

Pages

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