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

Module supplying code only...

HI

I am looking at creating a module for phpAdsNew that just supplies code to the drupal system so it would be available in my template. Considering it wouldn't have any relation to a node, is there anything special I must do?

Save to db from module Settings page

On my module settings page, I need the user to enter data that will be saved directly to a custom db table.

Normally we use form_select to create the select field, and the 3rd value of that is typically variable_get(a,b). But that value updates to the {variables} table; I really do want to put my values in a separate table.

Is there a way to do this with form_select? If not, can anyone give me a few pointers on how to approach this?

Requirement for modules to have child/parent relationships (one to many)

I have a requirement to create some custom modules to manage a Project that has multiple Tasks associated with it, (think of a Brochure with multiple sections that are tasks), im thinking of making the "tasks" out of flexinode so its easy to create new ones and maybe even the Project (or "Brochure") itself out of flexinode, but -

How do I run an external program

Ok, I feel really stupid when reviewing existing modules. I have spent several days now on trying to learn some php and module development and I have hacked existing modules to try to accomplish what I want. I know it isn't right, but need some guidance.

All I want to do is to run a program as a node. phpATM specicifically. I am not een looking to hand off accounts or anything, just run it. Here is my module code, but I just get a blank screen:

<?php
// $Id: phpatm.module

function _phpatm_all() {}

/**
* Implementation of hook_help
*/
function phpatm_help($section) {
switch($section) {
case 'admin/modules#description':
return t('Integration with phpATM');
}
}

/**
* Implementation of phpatm_perm
*/
function phpatm_perm() {
return array('access phpatm');
} // function phpatm_perm

/**
* Implementation of hook_menu
*/
function phpatm_menu($may_cache) {
$items = array();

if ($may_cache) {
$items[] = array('path' => 'phpatm',
'title' => t('phpATM'),
'callback' => '_phpatm_all',
'access' => user_access('access gallery'),
'type' => MENU_NORMAL_ITEM);
}

return $items;
}

/**
* Main phpatm display page
*/
function phpatm_page() {
require_once('/phpATM/index.php');
drupal_set_html_head(implode("\n",$css));

why hook_form_alter instead of hook_nodeapi with $op='form' ?

Hi,

I recently made a nodeapi centric module. While I started working on it I was expected
to find a 'form' as $op which will simply merge the returned form with the one created
by other modules using hook_form .

Can someone explain why instead this has been implemented with the hook_form_alter?

Thanks
Fabio

Review Module

Hello all,

Does any of you guy know of a music review module? I've seen book review modules - and movie reviews, but not a music reviews!

Has anyone heard about such a module?

JonasB

Pages

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