I wonder if it's absolutely necessary to ever see message list prefix "Message regarding"? When you have many site using responsive theming to accommodate mobile devices, like me, these kinds of things are a nuisance (respectively) especially in regards to table width. In the same respect appending "Anonymous" to the message subject line is a space hog and in this case redundant since there's a column for participants already. (Curious...when submitting an issue that may apply to pending patches should that go here or in the pending patch thread in question? I think the "Anonymous" issue is part of a pending patch.)

See my attachment for a visual comparison.

SL

CommentFileSizeAuthor
#2 regarding block.PNG12.27 KBSystem Lord
anonymous.PNG24.83 KBSystem Lord
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

System Lord’s picture

I can now see where "Message regarding" would be useful. On messages/view/*. I would definitely want to have "Message regarding" near the message title. And I still can. I removed "Message regarding" from the code and added a block for messages/view* only. I'm providing this to show how this could still be removed for the reasons I stated above, and provide the same message in a block.

See attachment.

SL

System Lord’s picture

FileSize
12.27 KB

Drupal is acting strange!

ptmkenny’s picture

For issues related to pending patches, all discussion about that patch should happen in the patch's issue. Otherwise, newcomers to the module are highly likely to be confused about discussions about features that are not even in the module.

System Lord’s picture

Title: Message prefix/sufix "Message regarding..." & "- Anonymous" » Message prefix "Message regarding..."
System Lord’s picture

Got it...thanks!

So for this thread I'll just focus on the revised title since I believe it's part of the stable release, and I'll post the issue about "Anonymous suffix" on the thread you referenced since it appears to be something new specific to that patch.

ptmkenny’s picture

If "Message regarding" is part of the core privatemsg module, is it possible to theme privatemsg using the various hooks in privatemsg.theme.inc?

System Lord’s picture

I'm slowly learning the howto's, but if I'm not mistaken "Message regarding" is within t() along with code. In this case 'href' => $url . '/' . t('Message regarding @node', array('@node' => $node->title)), I don't know how I could them that out other than to use a custom module.

Here's what I've done for now to the core file. Later I'll put it into a custom module.

Line: 2421
/**
 * Implements hook_node_view().
 */
function privatemsg_node_view($node, $view_mode) {
  $types = array_filter(variable_get('privatemsg_link_node_types', array()));
  if (in_array($node->type, $types) && ($view_mode == 'full' || (variable_get('privatemsg_display_on_teaser', 1) && $view_mode == 'teaser'))) {
    $url = privatemsg_get_link(user_load($node->uid));
    if (!empty($url)){
      $node->content['links']['#links']['privatemsg_link'] = array(
        'title' => t('Send message'),
-        'href' => $url . '/' . t('Message regarding @node', array('@node' => $node->title)),
+        'href' => $url . '/' . t('@node', array('@node' => $node->title)),
        'query' => drupal_get_destination(),
        'attributes' => array('class' => 'privatemsg-send-link privatemsg-send-link-node'),
      );
    }
  }
}

Note: this is not a real patch. It's just how I make my notes.

System Lord’s picture

My point about "Message regarding" is that I don't think it's necessary at all in the message list or defaulted in a new message Subject field. Subjects are not "messages regarding something". In my sample "Message regarding Poker Chips" the Subject is not about a message regarding Poker Chips. It's a Subject about Poker Chips. But, Like i mentioned above, "Message regarding" does make sense for a page title in messages/view. I have this issue marked "minor" because I have made it work for me, but I would still suggest removing "Message regarding" from the t() and adding a message/view title that states message regarding. Like in my sample.

ptmkenny’s picture

Ok, I just looked at the code for this and I don't see the problem. The "Message regarding" text only appears when the privatemsg is related to a node (@node) or comment (@comment), and in that case, it IS necessary, because it's a message about that node or comment.

If you want to do something else, that's fine, but I don't see a problem with the way the module handles this by default.

Since this uses a t() function, there is no need to hack the module to change it. You can use the String Overrides module, settings.php, or your own custom language (if you have a lot of translations).

ivnish’s picture

Status: Active » Closed (outdated)