I was surprised to see the PM link in the author pane is not the same as the PM link in the links section. Can the subject and destination parameters be added to the author pane link?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ptmkenny’s picture

Project: Privatemsg » Author Pane

The author pane link is not handled by Privatemsg.

Michelle’s picture

Actually, it is: http://drupalcode.org/project/privatemsg.git/blob/refs/heads/7.x-2.x:/pr...

I've been out of this too long to know what changes need to be made but the control is in the hands of the privatemsg module.

Michelle

ptmkenny’s picture

Project: Author Pane » Privatemsg

@Michelle Sorry, my mistake-- just attempting to clean up the (quite large) Privatemsg issue queue. Moving back.

Michelle’s picture

No worries. It gets a bit confusing because I was only able to convince some of the module maintainers to host the code so I had to go look and double check that I was remembering right. :)

Michelle

ptmkenny’s picture

Status: Active » Postponed (maintainer needs more info)

Ok, I looked into this a bit more but I'm not sure exactly what you're asking. Which "links section" are you referring to?

For example, here is the "send a private message" link shown on the user account page:

/**
 * Implements hook_user_view().
 */
function privatemsg_user_view($account) {
  if (($url = privatemsg_get_link(array($account))) && variable_get('privatemsg_display_profile_links', 1)) {
    $account->content['privatemsg_send_new_message'] = array(
      '#type'   => 'link',
      '#title'  => t('Send this user a private message'),
      '#href'  => $url,
      '#weight' => 10,
      '#options' => array(
        'query' => drupal_get_destination(),
        'title' => t('Send this user a private message'),
        'attributes' => array('class' => 'privatemsg-send-link privatemsg-send-link-profile'),
      ),
    );
  }
}
topdillon’s picture

Status: Active » Postponed (maintainer needs more info)

Just in the forum. There are 2 links in the forum, one in the author pane, one in the links section. Only one has the ?destination=... in the url.

ptmkenny’s picture

Status: Postponed (maintainer needs more info) » Active
TelFiRE’s picture

Are you still needing more info? Not really sure if this was something that used to work or it it just something that hasn't been done yet? If it helps I don't see it either, I'm in a Panopoly install with Privatemsg, author pane and advanced forum.

Thanks for your efforts :D

topdillon’s picture

I opted to use the link at the bottom of the post and not use the link in the author pane. Having the destination in the url is a big deal.

ptmkenny’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
981 bytes

Ok, I think I found the problem. This worked for me; please test the patch and let me know if it works for you.

ivnish’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)
andypost’s picture

Status: Closed (outdated) » Needs review

D7 is not yet outdated