So, i couldnt find anything about how to submit a module, or what INSTALL/README type files were needed (and how to write them...)

Anyone tell me how?

You can get the module here: http://83.88.179.12/emailpage.module

It has no install, just copy to the modules dir in the usuall manner and then go enable it and adjust it's settings.

Nick

Comments

droopy’s picture

I could use the module. Is it supposed to work with 4.4? The module installed without complaining but no admin option showed up and no link appeared on the nodes.

Nick Wilson’s picture

Yes, i've commented out the help function now, (apparently there is some bug that needs to be worked on in the core sys) so it should work just fine now...

You'll get a link on the nav menu near 'create content' and on full nodes (as opposed to main page teasers...)

Let me know how it goes, and if anyone can tell me how to submit it.. that'd be great..

Nick

droopy’s picture

Thanks, Nick. I've got it working here. I like the addition of the counter. I've used an image in the node links to save space.

Also, would it be possible to allow the sender to add their own message to the email?

Nick Wilson’s picture

Odd, works great for my site and my wifes recipe site? - Maybe it has somthing todo with the fact that your nodes are forum topics?

Here's the function responsible for generating the link next to the 'add comment' on nodes:

<code>
function emailpage_link($type, $node=0, $main=0) {
  $links=array();
  if (($type == "system")) {
  // URL, page title, func called for page content, arg, 1 = don't disp menu
    menu("emailpage", t("email this page"), "emailpage_page", 1, 0);
  }

  if($main!=1) { // we only add this link to the full node, not teasers
                 // on main page
  $links[] = l(t("email this page"), "emailpage", array("title" => t("Email this page to a friend")), NULL);
  return $links;
  }
}

Anyone see the problem?

>>own message

Sure, maybe as an optional in the settings. The reason i've not done so is that those kind of scripts can be used maliciously to send hate mail etc, AND IT WILL COME FROM YOUR SITE! ;-)

Nick

Nick Wilson’s picture

Here's the site i have it working on:
http://www.ivana.dk/node/view/26

My own is in production, but it works just the same...

ADDED
I just enabled the forum on my site, works fine.....
Also, r u sure you have the latest file? - try and copy what i have there now to your modules dir... let me know! ;)

http://83.88.179.12/emailpage.module

Nick

droopy’s picture

Sorry, I'm causing confusion. I went back and changed that comment. I had removed the help function but did not realize that you had made other changes. It looks like it's working very well. Thanks.

Nick Wilson’s picture

Hey, glad you like it!

Apparently there was somting similar in 4.2 but i really wanted to try my hand at it and do one from scratch...

Nick

Nick Wilson’s picture

So, it's close to being done. I'd still like to know the proceedure for submitting it to the drupal project...

Nick

koorneef’s picture

You can ask Dries for a CVS account for the contributions repository.
(with your preferred username and password)
If I remember correctly his email address is: dries AT drop DOT org

robertdouglass’s picture

I'm running into the problem that this test in the code always fails, and the user cannot send mail:
if(!user_validate_mail($_POST['edit']['emailpage_addy']) && $_POST['edit']['emailpage_sender'] && $_COOKIE['referer']) {


Anybody have any suggestions? (yes cookies are set in my browser).

Nick Wilson’s picture

If this is to do with the version that you can now download on the Releases page, would you be very kind and Submit an Issue?

I will follow up as soon as I can.

Thx

Nick

Nick Wilsdon’s picture

One of my guys has has put together a module and wanted to contribute it (http://drupal.org/node/37665). We went through the documentation 10x before finding this post!

The Real Nick_W ;)