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

Adding user permissions to page.module

I'm trying to add the same access control features from node.module into page.module. I added an 'access content' permission, and then in page_access I added a user_access check that I copied straight out of node.module.

Neither change is working. Anonymous users can access pages (but not nodes), and there are no new permissions in the page module section of access control. I've disabled and enabled the module, and I've re-started the web server, but still no dice.

Any ideas?

Thanks

Creating a tabbed interface for searching

I'm interested in extending the search functionality to incorporate the location of nodes as well as their content. I don't want to overcomplicate the search screen, so thought perhaps adding a location section to the advanced functionality box on the search page.

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));

Pages

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