wiki | forum | trac | otrs | joomla | tech blog | mailman | bewelcome Branches: test.bw | alpha.bw | www.bw Participate: download | get involved

Ticket #474 (new new feature)

Opened 5 months ago

Last modified 2 months ago

Messages Application in Rox

Reported by: lemon-head Assigned to: lemon-head
Priority: major Milestone: 0.5.2-long
Component: unknown Version:
Keywords: Cc:
Follow up needed: test Frequently reported: 1
Announce on BW: 0

Description

Yes, time to move to Rox!

I will use again the RoxPageView mechanism .. it turns out to work quite well :)

Change History

03/22/08 06:38:22 changed by lemon-head

[4378] - first taste of messages application

http://test.bewelcome.org/messages

03/22/08 06:38:30 changed by lemon-head

  • owner set to lemon-head.
  • status changed from new to assigned.

04/04/08 03:52:29 changed by lemon-head

  • follow_up changed from none to test.

Please test, and then give it some layout-love!

(Don't move to alpha for now!)

04/04/08 07:43:26 changed by feuerdaemon

Bug: Drafts are also listed in the tab "sent"
Bug: Click on "mailbox" on any shown message produce a error message (Notice: Trying to get property of non-object in /var/www/test_html/build/messages/messages.view.php on line 202) -> It cannot get the other member name "Messages between and henri ( = myself)".
Bug: After sending a Message "Message date : 0000-00-00 00:00:00"
Question: Why is there a edit button for sent messages?
Suggestion: Maybe impelment a function to resend a message.

But so far it works fine. Tested with Acc Henri on WinXP FF 2.0.0.13 IE 6.0.2900.2180

04/04/08 12:17:59 changed by lemon-head

I will try to fix these things.

Please have a special look at what happens with your form input when you are logged out, when your session is expired, or when you resend the form.

04/04/08 13:37:52 changed by lemon-head

Some things should be fixed now.

For testing expired sessions, you can delete your sidTB cookie and then send the form.

04/21/08 17:40:44 changed by feuerdaemon

Workes fine so far. Tested with Kubuntu 7.10 FF 2.0.0.13, WinXP FF 2.0.0.13, MS IE 6

Maybe add a button to be able to delete the messages, would be very nice. But the rest is working.

04/21/08 17:43:30 changed by lemon-head

cool

Could you have a look at the old messages application, and make a list of what is different, or what is still missing in the new one? I'm sure there must be more things to do :)

04/21/08 17:46:36 changed by lemon-head

ah, one thing i have to remember is to check if after logout and login it is still the same person writing!

04/21/08 21:27:31 changed by lemon-head

  • milestone changed from unassigned to Applications using Rox Framework.

05/09/08 09:24:03 changed by philipp

  • milestone changed from Applications using Rox Framework to 0.5.2-long.

Milestone Applications using Rox Framework deleted

06/22/08 16:48:58 changed by globetrotter_tt

I am not sure if it's good to display the whole content of each single message in the received/send folder.

Better: Display only the 100 first characters - Even better: Add a subject field to every message

  • The delete and mark spam button are missing.
  • The checkbox to select a message are missing
  • It is not possible to sort your messages anymore
  • The layout cold also be improved. (padding!, confusing from/to)

I have worked a bit on my local BW on this, but i need some help some with php :-(

06/22/08 21:16:31 changed by lemon-head

I am not sure if it's good to display the whole content of each single message in the received/send folder. Better: Display only the 100 first characters

yes. And ideally break at a space or linebreak, not at a character.
This is what I was playing with on localhost. It counts words, not characters.
Even better would be to count the characters, but break the words..

class MailboxWidget extends ItemlistWithPagination
{
    ....
    protected function tableCell_title($message)
    {
        $link = 'messages/'.$message->id;
        $text = $message->Message;
        $text_fragments = preg_split("/(\s)/", $text, -1, PREG_SPLIT_DELIM_CAPTURE);
        if (count($text_fragments) > 38) {
            $text = implode('', array_slice($text_fragments, 0, 35)).' ...';
        }
        echo '
        <a href="'.$link.'">'.$text.'</a>';
    }
    ....
}


Even better: Add a subject field to every message

this will need modifications in the DB, and also the mailbot. And, for existing messages we don't have a subject field. I suggest we do this when the rest is finished.


The delete and mark spam button are missing.

You mean, in the list, or in the single message view? We need both, I think.


The checkbox to select a message are missing

For the list, something like this will do:
(If this is for more than one list, then add it to class MailboxWidget?)

class MailboxWidget extends ItemlistWithPagination
{
    ....
    protected function getTableColumns()
    {
        return array(
            'checkbox' => 'Select',   // or choose a different column title...
            'contact' => 'From/To',
            'title' => 'Text',
            'dateSent' => 'Date'
        );
    }
    
    protected function tableCell_checkbox($message)
    {
        echo '<input type="checkbox" name="'.$message->id.'"/>';
    }
    
    function render()
    {
        echo '
        <form method="post" ...>';
        
        parent::render();
        
        echo '
        <select ..> ... </select>
        <input type="submit" .../>
        </form>';
    }
    ....
}


It is not possible to sort your messages anymore

Ok, this is less trivial. You/We need to change the way the mailbox widget obtains its messages. This is a good idea anyway, because currently it is only sub-efficient. The key methods in MailboxWidget? / ItemlistWithPagination? are

  • getAllItems()
  • getItemsInRange($begin, $count)
  • getItemsTotalCount()

Ideally, we would set a $widget->mailbox = $model->getReceivedMailbox($username);. Then, inside MailboxWidget?, we can write

class MailboxWidget extends ItemlistWithPagination
{
    ....
    protected function getItemsTotalCount() {
        return $this->mailbox->getMessagesTotalCount();
    }
    
    protected function getItemsInRange($begin, $count) {
        return $this->mailbox->getMessagesInRange($begin, $count);
    }
    ....
}

Somehow the mailbox has to be implemented somewhere. This could happen as a new class for every mailbox, or as using class PrefixWrap (I can explain that, if you want).


The layout cold also be improved. (padding!, confusing from/to)

Ok, that's why you are working on it :)


I have worked a bit on my local BW on this, but i need some help some with php :-(

If you have specific questions, feel free to ask!

btw, this trac comment with quotes looks incredibly ugly. Even plain text is nicer! (could be partly my fault, the trac css..)

06/23/08 18:06:12 changed by globetrotter_tt

  • owner changed from lemon-head to globetrotter_tt.
  • status changed from assigned to new.

06/23/08 18:07:52 changed by globetrotter_tt

  • status changed from new to assigned.

06/23/08 18:08:07 changed by globetrotter_tt

  • owner changed from globetrotter_tt to globetrotter_tt, lemon-head.
  • status changed from assigned to new.

06/23/08 19:06:25 changed by globetrotter_tt

  • owner changed from globetrotter_tt, lemon-head to globetrotter_tt.
  • status changed from new to assigned.

06/23/08 19:07:18 changed by globetrotter_tt

  • owner changed from globetrotter_tt to lemon-head.
  • status changed from assigned to new.
Trac Customization: trac stylesheet
SourceForge.net Logo