We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to make new message first ? [Solution available] | Forum

Markus
Markus Jun 21 '14
How can I make new message first or on the top list instead scrolling down to get to the latest message ? any help from anyone ?
thanks
The Forum post is edited by Alia Jul 1 '14
Arash
Arash Jun 21 '14
Where do you mean? Where do you want to resort the messages?
Markus
Markus Jun 22 '14
Arash ...in mailbox .... if you have new message is going to be at the bottom your conversation if you exchange a few messages with receiver  .
The Forum post is edited by Markus Jun 22 '14
ross Team
ross Jun 23 '14
Topic was moved from General Questions.
Alia Team
Alia Jun 27 '14
Arkadius Rusnica,

File to edit: ow_plugins/mailbox/bol/message_dao.php

Function to edit:

 public function findListByConversationId( $conversationId )
    {
        $example = new OW_Example();
        $example->andFieldEqual('conversationId', (int) $conversationId);
        $example->setOrder('timeStamp');
        return $this->findListByExample($example);
    }

Modified code ( in bold):

public function findListByConversationId( $conversationId )
    {
        $example = new OW_Example();
        $example->andFieldEqual('conversationId', (int) $conversationId);
        $example->setOrder('timeStamp desc');
        return $this->findListByExample($example);
    }

Please note that this modification will be lost when you update the "Mailbox" plugin in future.

Modification was tested only on 1.6.0 version of Oxwall.
Markus
Markus Jun 27 '14
Fantastic .... it works .... Thank you Allia ..... :)