webOS Nation Forums >  webOS apps and software >  webOS development > HOWTO - Enable time-stamp shown on outgoing and incoming messages in chatview
HOWTO - Enable time-stamp shown on outgoing and incoming messages in chatview

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/12/2009, 04:26 PM   #1 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default HOWTO - Enable time-stamp shown on outgoing and incoming messages in chatview

- UPDATE 07-24-2009 - UPDATED AND CERTIFIED FOR Palm WebOS v1.1.0

THIS HOWTO IS CERTIFIED FOR WEBOS v1.1.0 - DO NOT USE THIS FOR OLDER VERSIONS OF WEBOS!

This HOWTO requires that you already have root access to your phone. If you need more information on how to do that search the forum.

Click Here to search for my HOWTO's and Answers for the Palm PRE!

NOTES:
This will enable a date and time-stamp on the incoming and outgoing messages in chatview for a contact.

Example Screenshot:


I'll try to make this as simple as possible.

1. Login to your Palm PRE and obtain root access.. (Again look around the forums to see how to do this)

2. Once you are at the "root@castle" prompt COPY and PASTE all of the following code into your terminal / putty / ssh window.. (These commands will make backup copies of the original files, then modify them)


** This will reboot your PRE so be sure to close all of your applications beforehand. **
Code:
#
# ENABLE TIMESTAMPS ON ALL RECEIVED MESSAGES IN CHATVIEW
#
mount -o remount,rw /
#
# RESTORE FILES
# 
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0_1 /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# BACKUP FILES
#
echo BACKING UP ORIGINAL FILES
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0_1
#
# MAKE MODIFICATIONS TO chatview-assistant.js - PART 1
#
echo MAKING MODIFICATIONS TO chatview-assistant.js - PART 1
sed -i "s/if(\!ChatFlags.isOutgoing(msg.flags) \&\& msg.deviceTimeStamp \&\& msg.timeStamp \&\& (msg.deviceTimeStamp-msg.timeStamp) > (1000\*60\*10)) {/if(1 > 0) {/g" /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# MAKE MODIFICATIONS TO chatview-assistant.js - PART 2
#
echo MAKING MODIFICATIONS TO chatview-assistant.js - PART 2
sed -i "s/if(today-msg.timeStamp <= (1000\*60\*60\*24\*2)) {/if(1 > 0) {/g" /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#
Good Luck! And Happy Hacking!!

- D2G


To restore original files use the following:
Code:
#
# DISABLE TIMESTAMPS ON ALL RECEIVED MESSAGES IN CHATVIEW
#
mount -o remount,rw /
#
# RESTORE FILES
# 
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0_1 /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#
Attached Images
File Type: jpg messaging_2009-12-07_161800.jpg (37.2 KB, 592 views) Email Attachment
__________________
---------
Click Here to search for my HOWTO's and Answers for the Palm PRE!

Last edited by d2globalinc; 07/24/2009 at 03:24 AM.
d2globalinc is offline   Reply With Quote
Old 07/12/2009, 05:00 PM   #2 (permalink)
Member
 
Bigchris's Avatar
 
Join Date: Jan 2005
Location: Southern California
Posts: 644
Likes Received: 0
Thanks: 126
Thanked 43 Times in 22 Posts
Default

YOUR BACK !!!!!! Thanks a lot... I and I'm sure a lot of others appreciate the work that you've done with your How To's.. Again, thanks..
__________________
Remember, this is my opinion ! We all have a right to our own.....

Treo's 650-800..NOW,
Palm Pre
Bigchris is offline   Reply With Quote
Old 07/12/2009, 05:03 PM   #3 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

Sweet!!! Thanks!
Webby_s is offline   Reply With Quote
Old 07/12/2009, 11:08 PM   #4 (permalink)
Member
 
Join Date: Feb 2007
Posts: 159
Likes Received: 0
Thanks: 19
Thanked 4 Times in 3 Posts
Default

D2 is the freakin man.
though is offline   Reply With Quote
Old 07/13/2009, 12:37 AM   #5 (permalink)
Member
 
TMed_ATL's Avatar
 
Join Date: May 2009
Location: ATL/ Athens, GA
Posts: 413
Likes Received: 0
Thanks: 61
Thanked 27 Times in 24 Posts
Default

Thank you once again. You make it almost too painless!!
__________________
SCK Manager
TMed_ATL is offline   Reply With Quote
Old 07/13/2009, 12:54 AM   #6 (permalink)
Member
 
Join Date: Jun 2009
Posts: 347
Likes Received: 0
Thanks: 9
Thanked 101 Times in 41 Posts
Default

Anyway to make it so it isn't in italics... but still have it show in italics when you get the message late due to service or whatever...?
dhMassacre is offline   Reply With Quote
Old 07/26/2009, 06:42 PM   #7 (permalink)
skp
Member
 
Join Date: Nov 2007
Posts: 33
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Anybody know where the original thread for this hack is? Somebody modified the way it was displayed a little and I wanted to get the code for it again.
skp is offline   Reply With Quote
Old 08/05/2009, 02:44 PM   #8 (permalink)
Member
 
Join Date: Jul 2009
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

BOTH Text Forwarding AND Time Stamp on Incoming Outgoing Messsages?

I have discovered that this is not possible to for BOTH the text forwarding AND time stamp to coexist on your Palm Pre. So, I modified your post to combine the coding from both:

#
# ENABLE TXT AND EMAIL MESSAGE FORWARDING
#
mount -o remount,rw /
#
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js_1-1-0 /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# BACKUP FILES
#
echo BACKING UP ORIGINAL FILES
cp /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js_1-1-0
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0

#
# MAKE MODIFICATIONS TO messaging-luna-service.js
#
echo MAKING MODIFICATIONS TO messaging-luna-service.js
sed -i "s/telephonyIdentifier: 'palm:\/\/com.palm.telephony',/telephonyIdentifier: 'palm:\/\/com.palm.telephony',\n\
forwardIdentifier: 'palm:\/\/com.palm.applicationManager',\n\
\n\
forwardMessage: function(sceneController,messageText) {\n\
return sceneController.serviceRequest(MessagingMojoService.forwardIdentifier,{\n\
method: 'launch',\n\
parameters: {\n\
id: 'com.palm.app.messaging',\n\
params: {\n\
messageText: 'FWD: '+messageText\n\
}\n\
}\n\
});\n\
},\n\
/g" /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js
#
# MAKE MODIFICATIONS TO chatview-assistant.js
#
echo MAKING MODIFICATIONS TO chatview-assistant.js
sed -i "s/MessagingUtils.simpleListClick(this.controller.get(event.originalEvent.target), \"chatRow\", function(targetRow){/if (!mmsImageTarget \&\& !mmsVideoTarget \&\& !mmsVcardTarget \&\& !mmsVcalTarget) {\n\
MessagingMojoService.forwardMessage(this.controller, event.item.messageText);\n\
}\n\
\n\
MessagingUtils.simpleListClick(this.controller.get(event.originalEvent.target), \"chatRow\", function(targetRow){/g" /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# MAKE MODIFICATIONS TO chatview-assistant.js - PART 1
#
echo MAKING MODIFICATIONS TO chatview-assistant.js - PART 1
sed -i "s/if(\!ChatFlags.isOutgoing(msg.flags) \&\& msg.deviceTimeStamp \&\& msg.timeStamp \&\& (msg.deviceTimeStamp-msg.timeStamp) > (1000\*60\*10)) {/if(1 > 0) {/g" /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# MAKE MODIFICATIONS TO chatview-assistant.js - PART 2
#
echo MAKING MODIFICATIONS TO chatview-assistant.js - PART 2
sed -i "s/if(today-msg.timeStamp <= (1000\*60\*60\*24\*2)) {/if(1 > 0) {/g" /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#

All credit to d2globalinc!
CAdkins is offline   Reply With Quote
Old 09/29/2009, 04:36 PM   #9 (permalink)
Member
 
Join Date: May 2007
Posts: 15
Likes Received: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Default

has there been an update for WebOS 1.2???
darock231 is offline   Reply With Quote
Old 09/29/2009, 04:45 PM   #10 (permalink)
Member
 
Join Date: Sep 2009
Posts: 2
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thx
KonTra is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0