Forums

Forums


Primezilla (en)

Forum for Primezilla - Private Messages for Joomla! 1.5. Posts in english language.
Last post
Forums  » Primezilla (en)  » Change date format
adon126

adon126
8 posts
---
Location:
n.a.
30.01.2011 02:41

Change date format

Hello,

I need help in question have to go where to edit date format ?

As standard it currently appears like yyyy-mm-dd.

Thank you.

Edited by adon126 - 30.01.2011 03:49




 
adon126

adon126
8 posts
---
Location:
n.a.
30.01.2011 03:46

Re: Change date format

I've just focused on the source.

The solution for this is not to change the date format input to MySQL.

As the standard format is needed to sort the order list.

I think the solution is finding a way to change the output date from MySQL using PHP string format or else.

Is there any idea for this ?




 
adon126

adon126
8 posts
---
Location:
n.a.
31.01.2011 19:50

Re: Change date format

Here is solution:

Just have to edit two file
1. (your joomla root)\components\com_primezilla\models\inbox.php
2. (your joomla root)\components\com_primezilla\models\outbox.php

Do the same step as below:
1. Find what (as line 132 to line 140)
$selectQuery =
......

return $selectQuery;

2. Select these line, and replace with

In inbox.php:

$selectQuery = "SELECT id, user_id, user_from_id,
DATE_FORMAT( msg_date, '%d/%m/%Y') AS msg_date,
msg_time, subject, message,
flag_read, flag_answered, flag_deleted
FROM ".$db->nameQuote('#__primezilla_inbox')."
WHERE user_id = '".$_user_id."' AND flag_deleted != '1'
ORDER BY id DESC, msg_time DESC";

return $selectQuery;

In outbox.php:

$selectQuery = "SELECT id, user_id, user_to_id,
DATE_FORMAT( msg_date, '%d/%m/%Y') AS msg_date,
msg_time, subject, message,
flag_read, flag_answered, flag_deleted
FROM " . $db->nameQuote( '#__primezilla_outbox') . "
WHERE user_id = '" . $_user_id . "' AND flag_deleted != '1'
ORDER BY id DESC, msg_time DESC";

return $selectQuery;

3. It's almost done. Enjoy yourself by change '%d/%m/%Y' to your favor date format.

Edited by adon126 - 31.01.2011 19:52




 
Forums  » Primezilla (en)  » Change date format

Codingfish operates

italobikes.com
Community for friends of italian motorcycles

fuldany.de
Das soziale Netzwerk für Fulda (im Aufbau)