kadukeitor / internal_messages

..my owncloud 's apps :-)
8 stars 10 forks source link

Time an date set incorrectly in messages #6

Open GnaXi opened 11 years ago

GnaXi commented 11 years ago

Hi,

I've been playing around with the app for a bit now and discovered that the time and date is incorrect for all messages. It is showing like this: time and date

Has something been set incorrectly or am I missing something?

TwoPhased commented 11 years ago

I have a similar issue with the internal messages app, the date often says 01/01/1970, but after logging out and in again, the date changes to the current date and time. HoW to fix that?

By the way GnaXi, I see that your message doesn't show the user photo either.

Here's how to fix that:

  1. open terminal as root
  2. type & enter: nano /path_to_server/www/owncloud/apps/internal_messages/templates/part.messages.php
  3. copy this line:
    echo "<td><img id=message_photo src=". OC::$WEBROOT . '/index.php/apps/user_photo/ajax/showphoto.php?user=' . $message['message_owner']."></td>" ;
  4. scroll to line 25 of part.messages.php
  5. replace the (old) string with the one you've copied (new)
  6. save & exit nano
    Done!

    Examples (replace "old" line on rule # 25 with "new" line)

    old:
    echo "<td><img id=message_photo src=". OC_App::getAppWebPath('user_gravatar') . '/ajax/showphoto.php?user=' . $message['message_owner']."></td>" ;

    new:
    echo "<td><img id=message_photo src=". OC::$WEBROOT . '/index.php/apps/user_photo/ajax/showphoto.php?user=' . $message['message_owner']."></td>" ;

    As it seems, internal messages (in fact owncloud/apps/internal_messages/templates/part.messages.php) was set for gravatar, not for user_photo app.

Peace! TwoPhased