Installed the 12/23/08 dev version on Drupal 6. Ended up not implementing it on my site because the link on the profile page wasn't controllable. I'm using Content Profile and have a enough stuff on an user's profile page that having the link at the very bottom, it gets lost. I'd need the ability to move it up on the page via a weight setting.
Also, the link isn't wrapped in a div so, there's no way to easily address it in CSS and alter the text size/appearance or make any adjustments.

Comments

mark.’s picture

Would it be possible to add a class?

Line 1404 of the privatemsg.module is where the link is created:

        $account->content['privatemsg_send_new_message'] = array(
          '#type'   => 'markup',
          '#value'  => l(t('Send this user a message'), $url, array('query' => drupal_get_destination())),
          '#weight' => 10,
        );
berdir’s picture

Version: 6.x-1.x-dev »
Status: Active » Needs review
StatusFileSize
new2.22 KB

Added a class to profile, node and comment links.

berdir’s picture

#2: send_link_class.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, send_link_class.patch, failed testing.

mark.’s picture

My fix was to wrap the link in a div, by appending the html. That way you can add as many classes or wrapping divs that you could ever need to style it properly:

Before:

 $account->content['privatemsg_send_new_message'] = array(
          '#type'   => 'markup',
          '#value'  => l(t('Send this user a message'), $url, array('query' => drupal_get_destination())),
          '#weight' => 10,
        );

After fix:

$account->content['privatemsg_send_new_message'] = array(
          '#type'   => 'markup',
          '#value'  => '<div class="profile_msg">'.l(t('Send this user a message'), $url, array('query' => drupal_get_destination())).'</div>',
          '#weight' => -9,
        );
berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new2.45 KB

Hm, actually, I think we should convert it to a user_profile_item, then it is styled similiar to all other things on the user profile and it is easy to override through http://api.drupal.org/api/drupal/modules--user--user-profile-item.tpl.php/6.

Status: Needs review » Needs work

The last submitted patch, send_link_class_profile_item.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review

#6: send_link_class_profile_item.patch queued for re-testing.

berdir’s picture

#6: send_link_class_profile_item.patch queued for re-testing.

berdir’s picture

Status: Needs review » Fixed

Commited zo 6.x-2.x and 7.x-1.x. Thanks for testing and reviewing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.