Right now the the privatemsg_list_messages() is only technically running its output through the theme system. It's using theme('table') to build up the output and then printing it directly. So unless you want to override theme table, you can't significantly change the output of the thread listings (other than menu_altering or running the query twice and use privatemsg_list_alter).

This is particularly bad since the headers of the table never get themed individually (unlike the rows). The solution however is really easy, adding a simple theme function for the building of the table instead of printing it directly.

CommentFileSizeAuthor
privatemsg_theme_list.patch1.04 KBquicksketch

Comments

berdir’s picture

The idea is to do something similar to admin/node/node, with a theme function for the whole page, checkboxes for each message and a select with actions (delete, tag, ..).

#348907: Per thread/Multiple thread actions

quicksketch’s picture

Status: Needs review » Postponed

Thanks, while this is definitely a bug, I'll move to postpone, since we don't want to make a theme function only to get rid of it when #348907: Per thread/Multiple thread actions is finished. I'll take a look over there to see if I can contribute.

andypost’s picture

Another opinion - sometimes subject of message (thread) should be empty so current implementation of listing is wrong (users cant open threads because there's no subjects)

I'll try to implement different layout - my designer propose me to show trimmed version of first unread message or more...

berdir’s picture

empty subject?

The default form configuration and my validate function in the api patch don't allow that to happen...

What I've seen is that the author can be empty (for example, if I send a message to myself and visit the sent page as I'm filtered out there), that can break the display because the date will be displayed in the second column.

However, You should probably look at #348907: Per thread/Multiple thread actions, active development and almost complete rework of that page is happening there...

andypost’s picture

Yes empty subject possible by form_alter - it works

But when I get listing only author is clickable and leads me to profile page, I hack code to make date clickable to read message

@Berdir Thanx for pointing to #348907: Per thread/Multiple thread actions

berdir’s picture

Yes, but my validate function in the api patch will not allow that anymore.. So my question is, why do you need an empty title?

andypost’s picture

I need empty subject by users which in most cases lazy to fill subject, they just wanna quickly type a message to friend. Now I test popupApi to send messages from popup without leaving a page.

This feature requested by many users.

Another frequently asked feature is list messages grouping by UID a-la iphone so I talk about customizable messageList

berdir’s picture

Hm, I see.. we could set the subject to the first n characters of the text, similar to comments. I need to think about this..

PopupAp looks interesting, facebook does provide something similar..

You can search for a specific author and display only threads in which he participated, but not automatically group them.. that would be pretty hard to do, which paging, multiple authors and so on in mind..

andypost’s picture

@berdir You right, today I try facebook messages :) They work hard on usability...

Reading of messages for my project should look like

1) List of authors which user pm'ed or they pm'em to user
2) List of threads between users
3) Thread - already implemented by this module

berdir’s picture

Status: Postponed » Closed (duplicate)

Please test my patch #348907: Per thread/Multiple thread actions to see it that solves your need. I'm going to close this one as duplicate...

mrgoltra’s picture

subscribing.