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

How to tell what the active item is?

How can I tell what the active node is, or more specifically what the category is of the active item? I tried a global $node, but it didn't seem to be available.

help!

User centric and cateogry centric views

There are a bunch of great mods out their finding more ways for users to get content. I think the workspace.mod and mypage.mod views are great and am looking forward to trying out sections. There is also books (in core), series, and articles- not sure how they are all separate. I'd like to find ways for users to relate to content better. More like a friendster type trees where you can see how users are related, how their posts are related to topics-vocabs, etc. Then it would be great if users could create views for others to see.

Proposal for clearer maintainership information

Here's a proposal to make it clearer and easier to find out and maintain the information

  • who wrote module/theme/engine/translation/whatever XYZ?
  • and even more important: who currently maintains it?

How to post new module

I try to get write access to CVS using http://drupal.org/cvs-account. I posted request but I've not received any response. I have also created my new project where is link to CVS. I expect that is link to your CVS which I cannot write in.

Am I doing something wrong?

Tomas

a basic mailman module, with an email user thrown in

I had been assured that developing a module which would send new users the mailman confirmation email was easy. And it was.

I had also been told that writing a module which would add a email form for the user profile page would be easy. It was, after figuring out what the global variables are.

Really, its two different modules, but I didn't see much point splitting them for my own purposes. Maybe it'll be useful for someone else. Developed on 4.5.

 function mailmanbasic_user($op, &$edit, &$user, $category)
{

 if($op=='insert')
  {
   mail("list-join@democracyformo.com", " ", " ","From: {$user->mail}\r\n");
  }

$user_profile = $user;
global $user; //user looking at page
 if ($op == 'view' && $user->uid > 0)
  {
        global $edit;

/*      dprint("<pre>");
        dprint_r($user);
        dprint('\n');
//      dprint_r($edit);
        dprint("</pre>"); */

        if($edit['subject'] && $edit['message'])
        {
          mail($user_profile->mail, $edit['subject'], $edit['message'], "From: {$user->name} <{$user->mail}>\r\n");
         return array(t('Email Sent') => t("Your email with the subject <strong>{$edit['subject']}</strong> was sent to {$user_profile->name}."));
        }
        else {
        $output = form_textfield("Subject", "subject", '', 25, 100);
        $output .= form_textarea("Message", "message", '', 80,8);
        $output .= form_submit("Submit");
        $output = form($output);
        return array(t('Send Email') => $output);
        }
  }

}

Some of the lines have been word-wrapped, I'm not sure if this will have any effect.

In block, how to find out current category?

I'm making a module that will make a few blocks. I want the content of the blocks to very based on what the category of the current focused item is. For instance, if there is a story about cats on the main page, i want the auxillary blocks to have information about cats. How do I tell in the sidebar if the main main item has changed?

help!

thanks!

Pages

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