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

how to check condition on edit, and proceed accordingly??

a user begins to edit any node. after they start that process, but before the node is presented, i need to check some conditions specific to the node and route the user accordingly.

for example: a user clicks the edit button on a node. the module checks some user perms and for an existing working copy of that node. if there is an existing copy, then direct them to that node. if there is no existing working copy, ask for comfirmation to create a new working copy and then direct them to the new working copy's edit form.

Given a node listing, how to extract information of the first node shown in the listing.

Hello,

I'm trying to extract information only from the top node that is shown in a node listing.
By first I mean first visible on the CURRENT page. If I navigate to page #6 in node listing and I have 10 teasers per page, I want to extract information about 60th node displayed.

Any suggestions how to do this?

omi

Age validation module

Is there someone working on a module to ask an anonymous user their age? And allow or deny access based on the response. I have searched the module discussion forum and have not seen anything like that. Maybe I am searching for the wrong thing. If there is not, could some one point a "newbie module developer" to the right place in the drupal index.php module load/startup to build something like that?

Thank you.

Q: Disable comments in blog nodes.

I was wondering how I would disable comments from appearing in any blog node type. I want to insert them manually and not have them automatically display. I have tried going to administer > content > configure > content types and changing it to where comments are 'disabled' however comments still show up here. Is there any other way to do this without hacking the comments module?

Thanks!

warning: in_array(): Wrong datatype for second argument

heya. i'm very new to this cms and content management in general. i've been thrown into a situation where the site i'm managing has already been developed by an outside source and am having to figure things out along the way. i've been doing all right until today. there's a news page on said site and when i try to revise the content i get the following error:

warning: in_array(): Wrong datatype for second argument in...
/webroot/modules/node.module on line 1319.

Problems adding a _form_date into a _form_hook

Hi all.

I'm building a module that adds issues (kind of small help desk). Everything works except the "last small" detail, I want to add a "resolving date" field (it saves its value on a custom table) build into the form hook function with the form_date funtion I've found on core modules as archive.module or event.module.

The form_hook function embeds the form_date function with a form_item core function. The problem is that form_item doesn't have a $name attribute to handle the new date built on the popup menus (for day and month and year).

Pages

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