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

Add term via module.

I am wanting to create a term for each node added with my module. I have tried a simple insert into term_data but this does not add to the taxonomy.

Any ideas?

How to hook insert/update/delete on "extension" type module

I have almost done small module which should have expand core menu.module with field CSS class. I only need hook on menu.module insert item, update item and delete item functions. How can I hook my insert/update/delete function on this menu.module functions?

I have inspiration from this issue http://drupal.org/node/54946.
There is code (menu_item_class.module):

<?php
// $Id$

/**
* @file
* User defined classes to each menu item
* http://drupal.org/node/54946
*/

/**
* Implementation of hook_help().
*/
function menu_item_class_help($section) {
switch ($section) {
case 'admin/help#menu_item_class':
$output = '

User defined classes to each menu item

';
return $output;
case 'admin/modules#description':
return 'User defined classes to each menu item';
}
}

/**
* Implementation of hook_form_alter().
*/
function menu_item_class_form_alter($form_id, &$form) {
if ('menu_edit_item_form' == $form_id) {
$mid = $form['mid']['#value'];
if (!empty($mid) && $mid != 0) {
$class = db_fetch_array(db_query('SELECT class FROM {menu_item_class} WHERE mid = %d', $mid));
}
else {
$class = '';
}
$form['class'] = array(
'#type' => 'textfield',
'#title' => t('CSS class'),
'#default_value' => $class,
'#description' => t('Individual CSS class for menu item. Applied only if not empty.'),

Paid memberships module -- wishlist

We are trying to get a paid memberships module made for 4.7 working with ecommerce.

Scott White is working on a memberships module in his spare time.

Scott indicated he is working on 4.7 and within the ecommerce suite. Gordon and everyone are already working to make address not required.

Below is a wishlist for this module.

CCK module documentation ???

Where can i fint it ???

I tested some stuff and i still dont understand the difference between the three forms of Integer and Decimal fields. Why do you need those if u can use Text : Select list / Check boxes&radio buttons / Text Field ???
The "Autocomplete Text Field" was another thing that i didnt fully understand...

Could anyone explain to me ?

uploading with ajax, I don't get it

I want to have a user upload an image with their new node and use that image as it's icon.
I need to move the uploaded file to it's own directory, resize it, and put it into the page.

I have mimicked the upload.module form set to look the same as the "File attachments" and the file uploads fine. But I don't understand how to access that file from here. I looked at the handbook but am unsure how to get the file location and perform actions on it. Should I do everything in the hook_validate() function?

Hide input forrmats

Hi all. Is there a method to disable the choice about input formats in a
node ?

I have my node type (zbnews), my module (zbnews.module) and a new input
formats for it (zbnews-inputformat). Now In the "add" form I want to
disable the choice of input formats or display only "zbnews-inputformat"
input format.

Is this possible ?

Tnx.

Pages

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