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

How can I create tabs in my settings area

All I can say is that figuring out how to develop in drupal appears to be a pretty steep learning curve. I have spent hours trying to figure out how to create tabs in my settings screen, but can't seem to get it. I added my questions as comments to the code.

Here is what I have:
function poker_menu($may_cache) {
$items = array();
if ($may_cache) {
// This part works.
$items[] = array('path' => 'poker', 'title' => t('Poker Rankings'),
'callback' => 'poker_page',
'access' => user_access('access poker'));

// This part doesn't work and I have not figured out how to activiate it.
// What I want are tabs called list players. create league, create tournament
// and add player on my settings screen.
// I have a settings function written and it appears on the admin menu under settings and works,
// but the tabs don't get created.
$items[] = array('path' => 'create_league', 'title' => t('list players'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
$items[] = array('path' => 'add_league', 'title' => t('create league'),
'callback' => 'user_admin', 'access' => $admin_access,
'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'add_tourney', 'title' => t('create turnament'),
'callback' => 'user_admin', 'access' => $admin_access,
'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'add_player', 'title' => t('add player'),

empty form_select (or) form_checkboxes

I have been using Drupal CVS

and one of my users (they are testing it) pointed out that if he does not select any of the choices in the checkboxes It gives an Illegeal Choice.

I changed the checkboxes to form_select (after trying for 1 hr), still the same error exists.

Then I checked the forums and found that its a problem with 4.5 and 4.6

Has someone fixed this in CVS???

How to update a database field in settings menu

I tried searching, but the forum search is pretty weak. I need to update a field from what I am updating in the settings menu. The following is from the gallery module:

$form['gallery_drupal_dir'] = array(
'#type' => 'textfield',
'#title' => t('Location of Drupal'),
'#default_value' => variable_get('gallery_drupal_dir', '/'),
'#description' => t('Path to your drupal directory, relative to the root of your website. Please include a trailing slash ("/").'),
);

How to create a menu like the settings menu

I want to create a menu in the admin portion of a module I am working on that looks just like the menu for the settings page in version 4.7. The new page allows you to have the following for example:
General settings
Error handling
.....

When you click on one of the items, it exapnds the form open beneath it. How is this done? I have greped the code and can't find it. Can someone point me to the code I should be looking at to replicate this functionality?

Thanks

Norm

Use Taxonomy or Make my own table?

Hey,

I am interested in creating a module that will include a new node type. This node will basically be the same as a story except will have many extra attributes to define it (think dozens of checkboxes, radio buttons, drop down menus, etc.) and maybe an extra textfield.

It sounds as though the module will need an extra database table to hold the textfield, but what would the advantages/disadvantages to using taxonomy to keep track of the attributes be rather than just using my own table?

Captcha help

Can someone please help me with setting up the captcha module?
My problem is that I have downloaded it and installed it sucsessfully, but when I add a /fonts directory, and I in the settings I specify /fonts as my dircory for fonts, it doesn't work. An image of what the system says it here:

Pages

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