The forward module does not check for the link type in the forward_link function.
This let displays forward links also on not correct locations.

Attached a patch to fix the issue.

Fabio Varesano

CommentFileSizeAuthor
forward_link.patch1.1 KBfax8

Comments

seanr’s picture

Status: Needs review » Fixed

Fixed in HEAD and 5.x. Thanks.

killes@www.drop.org’s picture

Status: Fixed » Closed (fixed)
arthurf’s picture

Status: Closed (fixed) » Active

The way this is implemented, the forward link/form is on by default. I think that it is generally better practice to have to turn it on per content type rather than off. This is a one digit fix, line 637 in HEAD:

  if ('node_type_form' == $form_id) {
    $form['workflow']['forward_display'] = array(
      '#type' => 'checkbox',
      '#title' => t('Show forwarding link/form'),
      '#return_value' => 1,
      '#default_value' => variable_get('forward_display_'. $form['#node_type']->type, '0'),
      '#description' => t('Displays the form/link to allow visitors to forward the page to a friend. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/forward' ))),
    );
  }

I just changed

      '#default_value' => variable_get('forward_display_'. $form['#node_type']->type, '1'),

to

      '#default_value' => variable_get('forward_display_'. $form['#node_type']->type, '0'),

Thanks for your work on this!

seanr’s picture

Status: Active » Closed (works as designed)

I'd prefer not to change this since every site I've used it on prefers to have it on for most if not all content types. It's configurable as is, and I prefer to leave it with the default that is least likely to need to be changed by the widest number of users.

seanr’s picture

FWIW, I'm planning on looking in to adding the list of content types to the forward settings page so it can be changed there, too. That'd save someone like you a lot of clicks. ;-)