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

Trouble creating 4.6 Version of my project

my module is session_limit.modules (under 4.7)

I built it successfully, and it appeared almost instantly online under teh 4.7 modules downloads.

however, when i then made mods to the code to support the old style forms,
and tagged it against DRUPAL-4-6, I still do not see anything in the 4.6 downloads section

What am I missing?

Help getting sql results displayed using Drupal

I am writing a very simple module to learn how to code for Drupal. I am having a problem integrating the result of sql calls into html and then applying the theme to the resulting code and displaying it all. I hope this makes sense. The function included should give an idea of what I am trying to do. I have written many php websites but my coding is completely self taught and I haven't done much with the kind of stuff needed to get this working. I think the answer is probably quite simple, I am just not seeing it.

Basically what I am attempting to do is query the database to get some records and then display the data in a table much like what is displayed when you go to the administration page and it shows the access log.

Here is the funtion, it works with the exception of trying to format the output:

function pipe_show() {
// content variable that will be returned for display
$content = '';

$query = "SELECT client_fname, client_lname FROM " .
"{node_client} ";
// get the data
$queryResult = db_query($query);
while ($output = db_fetch_object($queryResult)) {
$client_fname = $output->client_fname;
$client_lname = $output->client_lname;
$content = print "

\n";
$content .= echo "
";
$content .= print "

";
$content .= echo "

";

$client_fname $client_lname

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.

Pages

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