Skip to main content
Topic: Personal messages (Read 13851 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Personal messages

Reply #15

Shouldn't topics be like the topics table which means is_new should be a separate, per user, table? I like keeping the first message as the topic id. Makes sense.

Also makes sense to not add another attachments table. I do think that there needs to be a "link" table or two. This would make the attachments table more robust at least. You would have a msg_attach table and a pm_attach table which would just be pm_id, attach_id and msg_id, attach_id. Though, that might be another topic for discussion.

Re: Personal messages

Reply #16

There is no need to have that level of denormalization in the pm conversation tables. In fact, should make it an item to remove said denormalization in the main messages table. It breaks, often. Would like it to stop breaking.

Re: Personal messages

Reply #17

Quote from: Joshua Dickerson – Shouldn't topics be like the topics table which means is_new should be a separate, per user, table?
This table is slightly different from the topics one: each record is "per-user", so there is no need for another table.
The id_member is the member participating in the conversation and receiving or sending a certain message, so the is_new is really already related to a certain message belonging to a certain member.

Quote from: Joshua Dickerson – Also makes sense to not add another attachments table. I do think that there needs to be a "link" table or two. This would make the attachments table more robust at least. You would have a msg_attach table and a pm_attach table which would just be pm_id, attach_id and msg_id, attach_id. Though, that might be another topic for discussion.
Dunno, I have not yet thought about it, but I would invert the link between messages and attachments: it's not the attachment that is associated to a message, but the message that has a set of attachments (please consider my mind is currently a little fuzzy and I'm not sure what I'm typing LOL).
Then, each attachment can have a "privacy level" that can be everybody, only registered, only buddies (for example, and when buddies will be enough flexible to allow create multiple groups, then you will be able to pick one or more groups)... slightly OT here. LOL

NOO!!
 emanuele wants to break things!! :P j/k
Bugs creator.
Features destroyer.
Template killer.

Re: Personal messages

Reply #18

Quote from: emanuele – Yesterday before going bed I had a sort of thought (that's usually scary), then I forgot until now (that's normal instead), so I'm not completely sure of what I'm going to write.

rofl You are so funny! I wonder what easter eggs are in ElkArte! Must be a lot!  :D

Re: Personal messages

Reply #19

Any bug you find is an easter egg (with some nog)! :P
Bugs creator.
Features destroyer.
Template killer.

Re: Personal messages

Reply #20

Since I was stuck on the overhaul of the templating, I started looking into this.
Expect bugs, lots of them! :P
Bugs creator.
Features destroyer.
Template killer.

Re: Personal messages

Reply #21

Nice start on a badly needed overhaul !   The PM area is kind of a classic spaghetti code, it works well, but it was fragile to work on / update.  So glad this will get redone for 1.1  :)


Re: Personal messages

Reply #22

TBH I'm a little lost with that as well now... LOL
I'm not in a good period coding-wise. :'(

I don't know exactly why, but I think because I tend to spend too much time thinking how to make things "right", losing sight of the goal.
Bugs creator.
Features destroyer.
Template killer.

Re: Personal messages

Reply #23

Everybody needs some focusing. No need to fix something that ain't broken should help.

Re: Personal messages

Reply #24

No need to fix what is not broken...
1) PMs are broken, so they should be fixed (broken in the sense of bad design and terribly complex coding).
2) By this idea, we'd be fine with SMF 1.1: it worked, it was not broken, why should have been fixed at all? ;)

Development means "fix" what is not broken to improve it and make it more usable. If we (anyone that develops) don't break anything, we are simply not doing our "job". :P

Of course IMO.
Bugs creator.
Features destroyer.
Template killer.

Re: Personal messages

Reply #25

I agree that is some ugly code, it really is  :'(  So although it may not be broken in the sense that it works, it is broken in the sense that it is not maintainable nor extensible.

You honestly can't figure out what some of it is doing without running a debugger, its gnarly knotted up code, with super crappy variable names.  I remember "fixing" a bunch of strange things in it for 1.0, and did some minor structural things, probably added a few comments as pointers of what the heck was going on. 

I think some things we may consider dropping:
Do we need the option to not to save your sent messages?
Do we need all those view modes, notably drop all at once?

Re: Personal messages

Reply #26

Yep and yep, from me.
In particular the second one is a pain to deal with.

Also, another thing that is blocking me is the way the messages are rendered in the template. At the moment they are following the Display_Controller trick loading the request in a global and using a function to loop through the callback in the template. Aggravated by the fact that there are two: one for the "discussions" and one for the messages...
Bugs creator.
Features destroyer.
Template killer.

Re: Personal messages

Reply #27

After finding a problem, the next step in development is to break it down in to smaller problems. Tackle it as one small problem at a time and commit those. I think that will help your momentum.

Re: Personal messages

Reply #28

Dont mind me if you have time for it. I didnt say you need not improve ot or develop it further. ;)

Re: Personal messages

Reply #29

If dropping all at once helps, I'd say do it.  I don't think typical email clients do that (and thats kind of what PM's realy are) where as conversation and one at a time are normal.