webOS Nation Forums >  webOS apps and software >  webOS development > How To Get Your Avatar In The Chat & Change the Color of the Chat Balloons
How To Get Your Avatar In The Chat & Change the Color of the Chat Balloons

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/15/2009, 12:14 PM   #1 (permalink)
Member
 
sarah peterman's Avatar
 
Join Date: Jun 2009
Location: York, PA
Posts: 259
Likes Received: 0
Thanks: 32
Thanked 141 Times in 55 Posts
Default How To Get Your Avatar In The Chat & Change the Color of the Chat Balloons

How To Get Your Avatar In The Chat - UPDATED 07/24/09
This will get the avatars (both yours and theirs) in the lower right hand corner. If anyone can get it into the middle of the balloon please share how. For anyone who may have done this before the update, I've placed a ">" on the steps you'll need to do. For everyone else follow the tut like normal. Also, I'd suggest the gradient in the chat balloons all fading to one side. Looks much better that way ;-)
messaging_2009-15-07_193150.jpg

You will need to have your Pre rooted. Also, don't forget to back up everything you touch.

First step is to type:
Code:
cd /usr/palm/applications/com.palm.app.messaging/stylesheets
then:

Code:
sudo vi messaging.css
>Starting at line 139 you will see this:
Code:
.chatRow img.avatar-location {
	margin-top: -18px;
}

.chatRow img.avatar-overlay {
	margin-top: -21px;
}

.chatRow .avatar-container {
	vertical-align: middle;
	display: inline-block;
}
>Change the margins in location and overlay so that they look like this:

Code:
.chatRow img.avatar-location {                                                             
        margin-top: -39px;
}                                                                                                  
                       
.chatRow img.avatar-overlay {                                                                       
        margin-top: -42.5px;
}
>Now comment out the container:
Code:
/*.chatRow .avatar-container {  
        vertical-align: middle;   
        display: inline-block;                                       
}*/
>Next, scroll down to line 662. You'll see something like this:

Code:
.my-chat .chat-balloon-wrapper, 
.their-chat .chat-balloon-wrapper {
  padding: 1px 0;
  font-size: 18px;
  word-wrap: break-word !important;
}
>Add
Code:
padding-right: 40px;
Code:
.my-chat .chat-balloon-wrapper,            
.their-chat .chat-balloon-wrapper {                                                                 
  padding: 1px 0;                                                    
  font-size: 18px;                                                                            
  word-wrap: break-word !important;                                             
padding-right: 40px;                                                                                   
}
>Comment out line 668:

Code:
/*.their-chat .chat-balloon-wrapper {                           
        padding-right: 8px ;}*/
On line 676 you will see this:
Code:
/* Disabling MY avatar because we are not doing this for 1.0  2008-11-05*/
.my-chat .avatar-location,
.my-chat .avatar-overlay,
.my-chat .avatar-container {
	display: none;
    width: 40px;
    height: 40px;
}
Comment out
Code:
 /*.my-chat .avatar-overlay,*/
/*.my-chat .avatar-container*/
/*display: none;*/
Now save: SHIFT zz or ESC :qw

Type:

Code:
cd /usr/palm/applications/com.palm.app.messaging/app/controllers
Code:
sudo vi chatview-assistant.js
Scroll down to line 1286 and remove the /'s. Should look like this:

Code:
 msg.avatar = this.myAvatar || 'images/my-avatar.png';
Save: SHIFT zz or ESC :qw

Now you need to upload an avatar and find the image location

In terminal type:

Code:
cd /usr/palm/applications/com.palm.app.messaging/images/
Code:
sudo wget (url)
Code:
sudo mv (filename of the avatar you just downloaded) my-avatar.png
Now type:

Code:
sudo luna-send -n 1 palm://com.palm.applicationManager/rescan {}
You may need to do a full restart of the phone if after doing the above command does not add the avatar.


Change the Color of the Chat Balloons

The png's for the chat balloons are located here:

/usr/palm/applications/com.palm.app.messaging/images/chatview

Look for chat-balloon-right.png (your chat) and chat-balloon-left.png (friend's chat).

I have both images uploaded already.


Edit them using your favorite image editor.

Now uploaded them to where ever. Copy the image location.

Go to terminal and type:

Code:
cd /usr/palm/applications/com.palm.app.messaging/images/chatview
Code:
sudo wget (url)
Now you just need to change the name.

Type:
Code:
sudo mv (filename of url) chat-balloon-right.png
Do the same for the left chat balloon.

Now type:
Code:
sudo luna-send -n 1 palm://com.palm.applicationManager/rescan {}
Here are some pictures of edited chat balloons.

messaging_2009-15-07_202633.jpgmessaging_2009-15-07_193150.jpg1247673181554imagejpeg_2.jpgmessaging_2009-15-07_124008.jpg

Kudos goes out to DJPeterman for his help with the padding <3 and to halmo20 and lilmexx323 for help with the tut after the update.

Also thanks should go out to elryon for figuring out how to center avatars and to change the location avatar locations to the left, check out his mod on page 2.

Last edited by sarah peterman; 07/24/2009 at 04:55 PM.
sarah peterman is offline   Reply With Quote
Old 07/15/2009, 01:21 PM   #2 (permalink)
Member
 
Join Date: Jun 2009
Posts: 47
Likes Received: 0
Thanks: 4
Thanked 11 Times in 3 Posts
Default

Your path is wrong for the avatar :

"cd /usr/palm/applications/com.palm.app.messaging/images/chatview/"

Should be

"cd /usr/palm/applications/com.palm.app.messaging/images/"

Otherwise, it works awesomely! Thanks for finding that Can this be put in the wiki?
optik678 is offline   Reply With Quote
Old 07/15/2009, 02:16 PM   #3 (permalink)
Member
 
sarah peterman's Avatar
 
Join Date: Jun 2009
Location: York, PA
Posts: 259
Likes Received: 0
Thanks: 32
Thanked 141 Times in 55 Posts
Default

Quote:
Originally Posted by optik678 View Post
Your path is wrong for the avatar :

"cd /usr/palm/applications/com.palm.app.messaging/images/chatview/"

Should be

"cd /usr/palm/applications/com.palm.app.messaging/images/"

Otherwise, it works awesomely! Thanks for finding that Can this be put in the wiki?

opps you are right. Fixing it now, thanks! I would love for this to be in the wiki.
sarah peterman is offline   Reply With Quote
Old 07/15/2009, 05:34 PM   #4 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

very well done. Now that this is in the developer section i am sure you will get a helping hand from some of the folk
jack87 is offline   Reply With Quote
Old 07/15/2009, 06:15 PM   #5 (permalink)
Member
 
as4life's Avatar
 
Join Date: Feb 2007
Posts: 581
Likes Received: 0
Thanks: 30
Thanked 46 Times in 35 Posts
Default

where are your pics of edited chat balloons?
as4life is offline   Reply With Quote
Old 07/15/2009, 06:28 PM   #6 (permalink)
Member
 
sarah peterman's Avatar
 
Join Date: Jun 2009
Location: York, PA
Posts: 259
Likes Received: 0
Thanks: 32
Thanked 141 Times in 55 Posts
Default

I have a work around on getting the avatars in the balloons right now. Just trying to polish a few things up.

Update has been added...

Quote:
Originally Posted by as4life View Post
where are your pics of edited chat balloons?
I have them attached now.

Last edited by sarah peterman; 07/15/2009 at 07:06 PM.
sarah peterman is offline   Reply With Quote
Old 07/15/2009, 10:05 PM   #7 (permalink)
Member
 
halmo20's Avatar
 
Join Date: Jun 2009
Posts: 115
Likes Received: 0
Thanks: 20
Thanked 13 Times in 10 Posts
Default

Awesome!!! Worked like a charm! Thanks~!


__________________
iPhone; the official phone of 'the Borg'
halmo20 is offline   Reply With Quote
Old 07/16/2009, 01:14 AM   #8 (permalink)
Member
 
MaSwaggSoSiQ's Avatar
 
Join Date: Jun 2009
Posts: 130
Likes Received: 0
Thanks: 1
Thanked 4 Times in 4 Posts
Default

i cant get past this code: sudo vi messaging.css . after i enter i get an error.. any ideas?
MaSwaggSoSiQ is offline   Reply With Quote
Old 07/16/2009, 02:50 AM   #9 (permalink)
Member
 
as4life's Avatar
 
Join Date: Feb 2007
Posts: 581
Likes Received: 0
Thanks: 30
Thanked 46 Times in 35 Posts
Default

Quote:
Originally Posted by MaSwaggSoSiQ View Post
i cant get past this code: sudo vi messaging.css . after i enter i get an error.. any ideas?
what kind of error?
as4life is offline   Reply With Quote
Old 07/16/2009, 03:00 AM   #10 (permalink)
Member
 
MaSwaggSoSiQ's Avatar
 
Join Date: Jun 2009
Posts: 130
Likes Received: 0
Thanks: 1
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by as4life View Post
what kind of error?

/bin/sh: sudo: not found
MaSwaggSoSiQ is offline   Reply With Quote
Old 07/16/2009, 12:26 PM   #11 (permalink)
Member
 
as4life's Avatar
 
Join Date: Feb 2007
Posts: 581
Likes Received: 0
Thanks: 30
Thanked 46 Times in 35 Posts
Default

Quote:
Originally Posted by MaSwaggSoSiQ View Post
/bin/sh: sudo: not found
Are you sure you cd into: /usr/palm/applications/com.palm.app.messaging/stylesheets? if so, once you cd into that directory, type ls and hit enter. Do you see the messaging.css file?
as4life is offline   Reply With Quote
Old 07/16/2009, 12:26 PM   #12 (permalink)
Member
 
sarah peterman's Avatar
 
Join Date: Jun 2009
Location: York, PA
Posts: 259
Likes Received: 0
Thanks: 32
Thanked 141 Times in 55 Posts
Default

You didn't set yourself up as root did you? If so, then you don't need the "sudo" command. Try it without the sudo command. Make one change, save it, and see if it sticks.
sarah peterman is offline   Reply With Quote
Old 07/16/2009, 12:28 PM   #13 (permalink)
Member
 
as4life's Avatar
 
Join Date: Feb 2007
Posts: 581
Likes Received: 0
Thanks: 30
Thanked 46 Times in 35 Posts
Default

Just curious, what was the original my-avatar.png?
as4life is offline   Reply With Quote
Old 07/16/2009, 12:29 PM   #14 (permalink)
Member
 
sarah peterman's Avatar
 
Join Date: Jun 2009
Location: York, PA
Posts: 259
Likes Received: 0
Thanks: 32
Thanked 141 Times in 55 Posts
Default

Quote:
Originally Posted by as4life View Post
Just curious, what was the original my-avatar.png?
There was none, just needed to be created.
sarah peterman is offline   Reply With Quote
Old 07/16/2009, 12:30 PM   #15 (permalink)
Member
 
as4life's Avatar
 
Join Date: Feb 2007
Posts: 581
Likes Received: 0
Thanks: 30
Thanked 46 Times in 35 Posts
Default

oh ok thanks!
as4life is offline   Reply With Quote
Old 07/16/2009, 12:32 PM   #16 (permalink)
Member
 
sarah peterman's Avatar
 
Join Date: Jun 2009
Location: York, PA
Posts: 259
Likes Received: 0
Thanks: 32
Thanked 141 Times in 55 Posts
Default

No problem :-)
sarah peterman is offline   Reply With Quote
Old 07/16/2009, 08:30 PM   #17 (permalink)
Member
 
sarah peterman's Avatar
 
Join Date: Jun 2009
Location: York, PA
Posts: 259
Likes Received: 0
Thanks: 32
Thanked 141 Times in 55 Posts
Default

Any recent changes to the tutorial will happen here at the pre dev wiki.
sarah peterman is offline   Reply With Quote
Thanked By: czarphanguye
Old 07/16/2009, 10:07 PM   #18 (permalink)
Member
 
MaSwaggSoSiQ's Avatar
 
Join Date: Jun 2009
Posts: 130
Likes Received: 0
Thanks: 1
Thanked 4 Times in 4 Posts
Default

can someone please provide a step process from beginning to end if im already in root and dont need to use sudo. is it the same process or are the codes different?
MaSwaggSoSiQ is offline   Reply With Quote
Old 07/16/2009, 10:39 PM   #19 (permalink)
Member
 
Join Date: Jun 2009
Posts: 102
Likes Received: 0
Thanks: 16
Thanked 12 Times in 9 Posts
Default

i wonder if someone that knows what they're doing (meaning not me ) can add this mod as a patch to the modifications available through quilt on gitorious.... that way it can easily be added and rolled back via quilt when there are OS updates from palm- just in case this mod ends up breaking something after an update.

pre dev wiki: Applying Patches

^^ that's what i'm talking about
Ricyteach is offline   Reply With Quote
Old 07/17/2009, 12:06 AM   #20 (permalink)
Member
 
MaSwaggSoSiQ's Avatar
 
Join Date: Jun 2009
Posts: 130
Likes Received: 0
Thanks: 1
Thanked 4 Times in 4 Posts
Default

i am havin the hardest time with this. i have changed everything changeable on his phone but this coding is not workin for me. im using putty and i cannot even get to the messaging files ....
MaSwaggSoSiQ is offline   Reply With Quote
Reply

 

Tags
avatar, chat, css, messaging, my avatar

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0