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

create new node link within menu structure

I have a module with a page which lists all nodes of a custom type. I would like to add a "add node" link above the list, which would point to the same "node/add" link available under "create content".

The problem is this. The path for creating a new node is different than the page with the custom node list.

Bottom line, I would like to add one MENU_DEFAULT_LOCAL_TASK item as "List Nodes" and a second MENU_LOCAL_TASK item as "Add Node".

Does the above make sense? If so, can someone explain how this can be accomplished?

Thanks in advance.

'date' form element in 5.x

I'm trying to whip up a node type for a fairly simple inventory database where I need to record the date an item was received. The 'date' form element that I see is present in the 5.x FAPI seems nice, but I'm having trouble understanding what goes into this as the default value, and what gets returned. To me, it seems standard in Drupal that all dates are handled as timestamp values, but it seems that something different (an array?) is required for this form element.

Does any one have experience using this?

view usernode

i was trying to set a new view with a filter to selected userprofile attributes, so an user can search for like minded people. when i add a view, i got the following error messages,
Fatal error: Call to undefined function: views_handler_filter_role() in /home/mysite/public_html/modules/views/views_ui.module on line 733

i'd appreciate it very much if someone can tell me how to get around this.

thanks,
erick

organic groups - can it do this?

Hi,

I'm new to drupal but was looking at the Organic Groups module. I am looking for a module that allows me to create seperate groups for different organizations just like the following:

Organization A
Group 1
Group 2
Group 3

Organization B
Group 1
Group 2
Group 3

So the group 1 of Orgainzation A will contain different memebers to Orgainzation B.

Does that make sense? Have I found the right module?

Thanks

File submit

Hi everyone. I'm quite new to drupal and I'm writing a new content type / module. The aim is to show a spreadsheet file embedded in the browser using PHP-ExcelReader, but I'm getting confused with the file upload. I've been looking at the upload module, the filefield module and the handbooks but I don't get it. This is what I've written for the form up till now, not too much as you can see.

function spreadsheet_form(&$node) {
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#required' => TRUE,
  );

  $form['spreadsheet'] = array(
    '#type' => 'fieldset',
    '#title' => 'Spreadsheet',
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#tree' => TRUE,
  );

  $form['spreadsheet']['sfile'] = array(
    '#type' => 'file',
    '#description' => t('Select the spreadsheet file.'),
    '#required' => TRUE,
    '#tree' => FALSE,
    );
  
  $form['spreadsheet']['sbutton'] = array(
    '#type' => 'button',
    '#value' => t('Submit'),
    '#tree' => FALSE,
  );
  return $form;
} //end function spreadsheet_form

What I want to know is how to add functionality to the submit button and make a preview like in the modules I mentioned. I just want one spreadsheet per page, so when you click submit the browse form should disappear.

Active Select Question

I'm using Active Select, but I'm having some issues.

I have a setup with two hidden containers -> the first container has a list of 5 terms, and the second container has a list of hundreds of terms, many of them with numerous children. However, the active select only seems to recognize the highest level of the second container.

I'm not explaining this very well, so please take a look.

http://www.basecampmanagement.com

login: jimmy
pass: test

Pages

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