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

Is there a not-too-difficult way to split up data amongst user groups

Say that I want to create user groups where each class is its own user group. And I each want them to view their own data but not somebody elses. How would I accomplish that? I want each class to read its own announcements, its own forum data, etc etc. Is there something I can do with taxonomy to make that happen? I don't really want to have to build custom modules for everything or hack a bunch of modules to get this accomplished.

Thanks!

Jay

How do I weight nodes?

I have a page on my site where I show nodes of a certain category and right now they're in order of date. Is there a way to make them in order of their weight and add a weight (like with blocks) to each node? Does that make sense?

simplenews and full name field when suscribing

I already have a form that I was using to suscribe to a newsletter (using webform module) and I read in the simplenews features that you can suscribe
"to the newsletters is managed through blocks, and/or a subscription form, and/or a custom page" but I can't find how to connect them... :-\

Is there a setting or a way to add an edit field for "Full Name" when suscribing to the newsletter?.. OR how can I use the webform I already have?

Thanks!

Function to get the Drupal Version?

Just curious are there any functions or variables to get the Drupal's version in place? This could be very useful when people try to develop a version-independent module.

Stock Module

Has anyone been able to, or will we soon be able to implement the stock and stock.api module into 4.7?

hook_nodeapi and form validation

I am using Drupal 4.7b4 and am having a problem with hook_nodeapi('validate'...) that I am really hoping someone can shed some light on.

I am using hook_nodeapi and hook_form_alter to add an image upload function to some of my existing nodetypes. My code works fine except if I preview a node before submitting it.

The problem is that hook_nodeapi('validate'...) is being called multiple times. My code looks as follows:

case 'validate':
if ($file = file_check_upload('nodeimage_upload'))
{
   $file = file_save_upload('_upload', _get_filename($file->filename), FILE_EXISTS_RENAME);
   ...
}

The first time $op='validate' is called, everything works fine, except that file_save_upload() removes the temporary file created when the node is submitted.
What this means is that for every subsequent call of hook_nodeapi('validate'...), I get the following error:
"The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename."

I have read the forums and everthing else that I can find in the docs and I still cant find out how to fix my problem. Very similar code in 4.6 worked fine. Is this a bug, a new feature introduced in 4.7 or simply a huge gap in my understanding?

The sequence of nodeapi calls I am getting is as follows:

  • load
  • prepare
  • validate
  • view
  • validate

Pages

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