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

How to create a menu programmatically?

Hello everyone,

When we use hook_menu to create a menu item, and if we use NORMAL_MENU_ITEM, it adds it to the "navigation" menu.

1) Is it possible add it to another menu?
2) How can we actually create another menu programmatically?

Many thanks,

Hubert.

Need help generating dynamic form elemtents - form api 2.0

I have a module with a simple form running on Drupal 5.x. At the base level, all it needs to do is the user selects an item from a drop-down menu, hits a button, and a list of items is returned. The returned items need to be editable (i.e. textfields). I have looked at the multi-step form documentation, I have looked through what seems like hundreds of forum posts trying to wrap my head around how this should work. Right now, I'm using regular buttons instead of submits, and catching the input in my _validate() function. That part works fine.

What I'm having difficulty with is generating the new form elements that are returned from the database call. Here's some sample code that illustrates what I have right now.

function my_form()
{
$form['view'] = array(
'#type' => 'fieldset',
'#title' => 'View Mode',
'#collapsible' => TRUE,
'#collapsed' => FALSE
);

$form['view']['categories'] = array(
'#type' => 'select',
'#title' => t('Categories: '),
'#options' => $categories
);

$form['view']['view_cat_items'] = array(
'#type' => 'button',
'#value' => t('View all items in category'),
'#submit' => FALSE,
'#button_type' => 'submit',
);

Drupal VB error

Hi
When I'm trying to create a new forum in vbulletin I receive the following error:
Fatal error: Class 'vB_DataManager_forum' not found in /var/www/.../html/v1/vb/includes/functions.php on line 103

line in functions.php looks like this: $object = new $classname($registry, $errtype);

pls anyone help me

thx

Using the Project Module for non-cvs projects

I'm using 4.7.x and starting to play with the Project module so that I can use it properly when I start on an upcoming project.
It will be used on a project that will not have a cvs, but I would still like to take advantage of the nice looking and easy to use (for the user) release section on the project page instead of just attaching the file to the node. :)
FYI: I'm using godaddy, and I don't have command-line access to my host's web server.

I guess what I'm asking is...is there a way to make a release node without using cvs?

Where did $_SESSION go?

We have an intranet where users login and once logged in their details are stored in $_SESSION['i_user']. I want my module to check if users are already logged into the intranet, if they are then use the $_SESSION['i_user'] info to log then into drupal.

So i have started by trying to use the hook_init() hook. see below

Provide an extra filter for the Views module

Hello folks.
I am using drupal to build a magazine website. In this magazine every column is supervised by an editor.
I am trying to build a module based on a custom table associating each 'editor' user to a 'coumn' term. This module should also provide a filter for the 'views' module, thus I can filter the articles and send them to the appropriate editor.
How do I provide a filter for the views module?
Cheers,
Davide

Pages

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