BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
1.99k stars 443 forks source link

Requesting a rewrite of the PM system, make it email-style, add an outbox, additional ignore options #1963

Open Ageless93 opened 7 years ago

Ageless93 commented 7 years ago

The PM system as it is now is a shambles. All PMs are on top of each other, they're all immediately in your face.

What I would like to get is the email system:

We can leave the ignore function enabled here.

Additionally, show by colouring the user's name red that they have us on filter, so we don't have to find that out when we try to send them something. Show the user's name in a different colour to show we have them on filter.

Ageless93 commented 7 years ago

With regards to the outbox, I got the code from Primegrid's Michael Goetz who have this in their forums. I'll add them to this thread: https://www.dropbox.com/s/k2orjgwxq5voin3/forum_pm.php?dl=0 (although the code here may not have changed, Michael didn't know for sure) https://www.dropbox.com/s/j8yv1ayly1gll1e/pm.inc?dl=0 https://www.dropbox.com/s/2nmd536jvwx3xhg/pm.php?dl=0

Michael Goetz writes:

It's one very small schema change (one column added to private_messages), and a very small number of PHP files that change. It definitely should be added to BOINC. It's a really nice improvement. All it does it set two bits in the private_messages table. One bit is set when the sender deletes the message, and the other when the recipient deletes the message. The PM isn't physically deleted until both parties delete it. It doesn't store separate copies of the PMs, so the overhead is only one byte per PM.

... Looking at the code, it looks like only html/user/pm.php and html/inc/pm.inc are affected.

Besides those two files, you may need to also modify the main private user account page as well as the forum page to call the pm_header function that displays "Inbox | Outbox | Inbox & Outbox | Write ". I don't remember if I put that in, or if it was already there beforehand. The two files that should call pm_header are html/user/forum_pm.php (three places) and html/user/pm.php (two places). If you include those, it's a total of 4 files.

He also gave me the schema needed for the database:

CREATE TABLE `private_messages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userid` int(10) unsigned NOT NULL,
  `senderid` int(10) unsigned NOT NULL,
  `date` int(10) unsigned NOT NULL,
  `opened` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `deleted_bits` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1=Deleted by recipient, 2=Deleted by sender',
  `subject` varchar(255) NOT NULL,
  `content` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `userid` (`userid`)
) ENGINE=MyISAM AUTO_INCREMENT=63862 DEFAULT CHARSET=latin1
sirzooro commented 4 years ago

+1 for adding Outbox. I wanted to return to one of emails sent to project admin, and could not do this. Fortunately in this case he replied to me with some part of my original message, so I found what I needed, but outbox would be more useful here.