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

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

Change default field values on user registration screen

I'm trying to implement a payment system using 2Checkout. (Yes, I tried the e-commerce mod and it didn't do what I needed.) Everything is working great except that I can't figure out how to set the default field values on the user registration screen. What I want to do is take the data from their transaction over on 2checkout's site and populate the fields on the drupal registration screen with email and name. 2Checkout passes all the field values to my server when the customer is finished.

I think I know how to use php to grab the values ($_POST['username_from_2checkout']). What I need to know is where to put that value in drupal to have it show up on the registration screen in the Username: field.

I thought it would be in user.module around line 1025-26:

$default = form_textfield(t('Username'), 'name', $edit['name'], 30, 64, t('Your full name or your preferred username; only letters, numbers and spaces are allowed.'), NULL, TRUE);
$default .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 64, t('A password and instructions will be sent to this e-mail address, so make sure it is accurate.'), NULL, TRUE);

But it is not obvious to me where to put it. When I view source I see:

Clearly, there is a call on this somewhere else that formats the true html.

Request to drupal using xmlHttpRequest

Hello users..

I'm building new modules.. in this modules i'm requesting to other drupal site using xmHttRequest, but i want return from the other drupal site only body content of the especific node.

Sorry my english..

Any help
VR72

ecommerce: your wishlist

Dear All,
Please give me your wish list for ecommerce. Next week I'll be at the drupal conference. I'll try to talk to developers after enhancing the module, to include automatic debiting for paid memberships and to manage more than one role. see node 47263. I've spent a lot of time trying to get paypal subscription to work. see node 44295 but I just installed ecommerce yesterday.

Pages

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