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

Not generating content in menu callback ... whatamIdoingwrong?

I'm playing with writing a module to house lots of data from amazon. The idea is to port over what I did with JSP's some time ago ... if you look in the XML returned from the REST service, you see there's the potential for a quite extensive set of pages. They return a list of related items, a list of related browse nodes, author names, etc, all of which can link to other pages, etc. I wrote that up in JSP but I'm moving to drupal and, so, here I am.

I finally got to the page_example.module code and am mimicing that ... but ... it's not working. I'm also cross comparing with other modules. If you visit http://7gen.com/amazonstore ... you'll see the empty page. Some HTML is returned, but there's an empty body.

I know that drupal is getting into my module ... if amazonstore_page is changed to simply call drupal_access_denied() then I get a proper "access denied" page.

Here's my module:


<?php

/**
* Implementation of hook_perm().
*/
function amazonstore_perm() {
return array('access amazon store');
}

/**
* Implementation of hook_menu().
*/
function amazonstore_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'amazonstore',
'title' => t('amazon store'),
'callback' => 'amazonstore_page',
'access' => 'access amazon store'
);
}

return $items;
}

function amazonstore_page($a = 'null', $b = 'null') {

How To Add Custom Fields To profile.module Category?

Hi, I am creating a module based in profile.module, basically I need to add some customized fields to the fields I've created with profile.module, the functions I need these new fields to support are not included in profile.module and I don't want to modify profile.module but to extend it using my own module.

I am using hook_user and I'm almost there, however I am having a problem with the category groups.

Using profile.module I've created two categories: Personal and Professional.

Using my new module I am creating my custom fields in the Professional category (it is actually using the same name of category as the one created from profile.module: "Professional") and storing the new data in a separate table.

My problem is that I'm seeing two "groups" of Professional category in my form (by "group" I'm referring to a html fieldset block with "Professional" in the legend tag), both when editing (using $op='form' in hook_user) and when registering ($op='register' in hook_user).

One group of fields contains the fields created by profile.module and the other group contains the fields created by my module, but being in the same category (at least the category name is the same) they should be grouped in the same fieldset block.

I need to join these two groups, in fact I need to be able to control where my new module fields are inserted in the form, for example:

field 1 (from profile.module)

taxonomy_context block: how to make persistent/always visible?

I've searched the forums for several hours with no luck - so here goes:

Is there a way to make the most wonderful taxonomy_context menu block persistent or always visible?

Currently the menu is only visible when a node with taxonomy is actually being viewed. It disappears when you go to any navigation menu item. The menu even disappears when you are editing the node in question!

Thanks,

Theo

PostgreSQL support in Amazon Associate Tools CVS

I believe I have support for PostgreSQL in the CVS version of Amazon Associate Tools...but I don't have PostgreSQL set up anywhere, so I'm hoping someone will help shake it out (Arto?).

http://drupal.org/files/projects/amazontools-cvs.tar.gz

Question about profile.module Code

Hello, I'm studying profile.module and I have these lines of code:

question about the proper way to delete a node with cron

I am working on a module that needs to delete an extended node after 30 days. I have the cron job set up fine and I am correctly calling the hook_cron. I have debug messages going into watchdog letting me know that I am getting the proper nids of nodes that are old from an sql statement. Now I am just wondering the best way to actually delete these nodes. I looked at node_delete and it seemed to be the cleanest way to delete the node and all accompanying data.

Currently I am calling:

Pages

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