This tutorial is for anyone who is bored with Classical google talk themes and waiting for something new and innovative… In short.. You can create your own google talk theme… have a look at this gtalk window..!!
This tutorial consists of two independent parts.
1. How to add a background Image to your google talk chat window??
2. How to get smileys in chat windows without any external software addon??
PART 1:
The word “theme” in my usage refers a chat window theme. This is not for the external appearance of Google talk.
Starting with, First we need to have a copy of already existing Google talk theme. We modify and add extra features to it and then make the new theme.
Finding a Gtalk theme:
Copy and paste the following address in your My Computer Address bar.
%userprofile%\Local Settings\Application Data\Google\Google Talk\themes\system\chat
I am using Classical Picture Theme for editing because of its simplicity. Now, Copy the folder Classical Picture and get back to the grand parent directory. i.e. Themes. (use Up button twice).
Navigate to user directory. Create a folder named chat in it. Paste the folder here. Rename the folder to something else (say MyTheme)
Note: Renaming is mandatory because you can never see duplicate themes in google talk.
Now our theme folder is MyTheme. Open the folder, Navigate to Contents->Resources. Here is where we work with.
Now, Create a directory named Images Copy the Desired image which you want the background to be, into the images directory. Rename the image as back.jpg
Note: The size of the image should be properly chosen (300 X 225 is decent).
The settings of the chat window are present in main.css file. Open the file in Text editor or a HTML editor that support CSS preferably.
Now, the code will look something like this
/* Ensure that our assumptions about the default browser colors are correct. */
BODY { color: #000000; background-color: #FFFFFF; }
BODY a:link { color: #0000FF; }
BODY a:hover { color: #0000FF; }
BODY a:active { color: #0000FF; }
BODY a:visited { color: #800080; }BODY {
margin: 6px;
}
DIV#content {
font: 12px Arial;
}
DIV#insert {
display: none;
}
DIV.system1st {
margin: 4px 0px 4px 0px;
}
DIV.systemNth {
margin: 4px 0px 4px 0px;
}
/* Two ways to do icons with these rules:
Some code here
*/
DIV.chat .icon {
}
DIV.chat DIV.msg {
margin: 0px 0px 0px 0px;
}
DIV.chat DIV.Nth {
margin: 5px 0px 0px 0px;
}
DIV.chat SPAN.salutation {
font-weight: bold;
}
DIV.out {
text-align: left;
}
DIV.out .icon {
float: left;
margin: 2px 5px 0px 0px;
}
DIV.in {
text-align: left;
}
DIV.in .icon {
float: left;
margin: 2px 5px 0px 0px;
}
DIV.clear {
clear: both;
height: 1px;
overflow: hidden;
}
DIV.break {
height: 1px;
margin: 3px 0px 4px 0px;
overflow: hidden;
}
Add the background url property to the BODY class so that the code look like this
BODY
{
margin: 6px;
background-image: url("images/back.jpg");
}
Note: You can always place the comments in css files for future reference like this
/* Background image url is given relative to the main.css file. Since, we placed image renamed to back.jpg in images folder, we give the url as images/back.jpg. */
Now, we have successfully inserted the background image. But, the problem is, the image scrolls up with the text and repeats!!
If you want the image to stick to the background completely, add the background:fixed property to the first line of the code so that the modified code looks like
BODY { color: #000000; background-color: #FFFFFF; background:fixed; }
Now, the background image is set. Let us now browse through some of the other useful settings that we can easily understand.
Change the link color:
In the following code,
BODY a:link { color: #0000FF; }
BODY a:hover { color: #0000FF; }
BODY a:visited { color: #800080; }
Link color is specified in the first line. When mouse pointer is over the link, It changes to the color specified in hover. The color of the visited link is given in third line.
Note: The color is specified by hexadecimal code. (#RRGGBB).
For each color, 00 is minimum and FF is maximum. If you are not sure of which color to use, follow this awesome link : Color codes
The other classes convey their respective meanings as follows
DIV.system1st : Division settings For first system message (like User is offline.)
DIV.systemNth : For next system messages
DIV.chat DIV.msg : For the 1st user message(which we type)
DIV.chat DIV.Nth : For the next user messages(which we type)
Change the margins of Divisions:
The margins are important for good look. You can set the text borders in all the above tags.
margin: 4px 120px 4px 0px;
/* Top Right Bottom Left */
I have set Right margin as 120 in order to prevent the text overlapping on the image.
Change the Font style and Color:
DIV.out : Settings for the text of Outgoing messages
DIV.out .icon : Settings for the icon of Outgoing messages
DIV.in : Settings for the text of incoming messages
DIV.in .icon :Settings for the icon of incoming messages
Now, If you want to change the font and color for the total theme, add the following class into your code.
* {
font:10pt Lucida Sans;
color: #800000;
}
If you want different font colors for incoming and outgoing messages, then add the above properties independently to DIV.out and DIV.in classes. Do not include the above code now
DIV.in {
text-align: left;
font: 10pt Lucida Sans;
color: #800000;
}
DIV.out {
text-align: left;
font: 10pt Lucida Sans;
color: #00f0ff;
}
Add Border to image Icons:
If you want to add border to the image icons, then add one line to modify DIV.out .icon & DIV.out .icon class like this,
DIV.out .icon {
border: 3px solid #FFF;
float: left;
margin: 2px 5px 0px 0px;
}
Modify Text Alignment:
If you apply the inbuilt chat theme, PingPong Picture, we observe that outgoing messages are left aligned and incoming messages are right-aligned.
This alignment can be set by modifying the align/float property of DIV.in and DIV.in.icon tags. Make both values simultaneously to “right” i.e. the code look something like this
DIV.out {
text-align: right;
font:10pt Lucida Sans;
color: #800000;
}
DIV.out .icon {
border: 3px solid #FFF;
float: right;
margin: 2px 5px 0px 0px;
}
After all the editing is done, save the css file.
Now, To Apply the theme,first close all the chat windows. Go to Settings in Gtalk Main window, navigate to Appearance, and in chat theme, Select MyTheme (or the name of the folder that you created earlier). Now, reopen the chat window to see the changes
Note: Whenever you edit the css file, note that the changes will not be applied until you close and re-open the chat window. Don’t panic that the changes do not happen.
PART2:
Now, we deal with how to integrate smileys into your google talk theme. We use javascript Regular expressions to replace the characters/symbols into smileys. If you are not familiar with the regular expressions, then refer to this superb site. Link
Now, we do work with one of the 6 html files present in the theme folder and finally replace everything with almost the same code.
Open the NextContent.html file in the outgoing folder. You need to add a javascript code which uses regular expressions for finding the smiley symbols and replace them with corresponding smileys. The NextContent.html before editing looks something like this
<div class='msg Nth'><div id=message>%message%</div></div> <div id='insert'></div>
After inserting the javascript, the new file is
<div class='msg Nth'><div id=message>%message%</div></div>
<div id='insert'></div>
<img src="images/smile.gif" width="1" height="1" style="display:none;" onload="
var smiley = document.getElementById('message').parentNode.innerHTML;
smiley = smiley.replace(/onload/g, 'onclick'); smiley = smiley.replace(/id=message/g, 'id=smiley');
smiley= smiley.replace(/>:-?\)</g, '><img src=images/1.gif style=display:inline;><');
smiley= smiley.replace(/>:\(</g, '><img src=images/2.gif style=display:inline;><');
smiley= smiley.replace(/>;\)</g, '><img src=images/3.gif style=display:inline;><');
smiley= smiley.replace(/>:-?a{0}D</g, '><img src=images/4.gif style=display:inline;><');
smiley= smiley.replace(/>\;\;\)</g, '><img src=images/5.gif style=display:inline;><');
smiley= smiley.replace(/>:-?\/</g, '><img src=images/7.gif style=display:inline;><');
smiley= smiley.replace(/>X-\(</g, '><img src=images/14.gif style=display:inline;><');
smiley= smiley.replace(/>B-\)</g, '><img src=images/16.gif style=display:inline;><');
smiley= smiley.replace(/>:\(\(</g, '><img src=images/20.gif style=display:inline;><');
smiley= smiley.replace(/>:\)\)</g, '><img src=images/21.gif style=display:inline;><');
document.getElementById('message').parentNode.innerHTML=smiley;
">
Note: Always insert the code after the insert division tag.
For simplicity, i have not included all the smiley symbols. The replace function syntax is as follows
replace(source, destination)
If you want to add more smileys, just write a regular expression for that smiley symbol and add a replace line to it. Add the corresponding smiley image into the Images folder.
Finally, save the file, Copy the content that you added extra to the NextContent.html file, now paste the same code in the same area in all the remaining 5 files.
Resources/Status.html
Resources/NextStatus.html
Resources/Outgoing/Content.html
Resources/Outgoing/NextContent.html (Just now added
)
Resources/Incoming/Content.html
Resources/Incoming/NextContent.html
Now, again close the chat windows, re-open them and test the smileys.. If you have followed the process correctly, then you are done!! You can see smileys in your chat window.
MyTheme
I have created a theme for myself with hundreds of smileys. I want to share that with you people and listen to comments and suggestions.
Download it from here
The features of the theme are
1. Can be installed with a single click. Just run the MyTheme.exe file.
2. Lots of smileys integrated.
3. All the smiley codes are scripted in a help file which can be found in Start Menu Programs\Dash\MyTheme\
4. Includes an utility to change the background of the chat window to ur desired one.

October 24, 2007 at 7:12 pm
sir i have installed the theme provided by u
but i cant understand how to use the smileys
can u mail me in detail
i will thankful to u
October 25, 2007 at 11:14 am
you can find complete help in startmenu->programs->DaSh->MyTheme-> Help.pdf file..
October 30, 2007 at 4:58 pm
HI,
i have tried ur trick but i could not change background picture & smiley option
so can u explain in details for change to background picture
& siley option
October 30, 2007 at 9:48 pm
please post the error which you are getting here…
otherwise, install the software MyTheme (link is provided below the tutorial) and follow the instructions…
December 25, 2007 at 3:54 pm
i like a gtalk background setting…
March 16, 2008 at 10:25 am
Hi i like the Program u had done..
But can i ask u some thing is this Graphics and animations possible to view for me only or is it Integrated to the others Chat box also(they also could view my background wen i am chating them)
thankz for this awsome release.
waiting for ur response,
yzak
March 19, 2008 at 11:49 pm
I have gtalk installed in my computer when i opened a chat window it is not displaying my profile image and the person with whom i am chating. I am not sure why this is happening.Is it due to the usage of “Windows XP SP2″ Operating System .Even i tried reinstalling gtalk but still it is not showing profile images in chat window.
Even i tried changing theme i.e, setting background image but this is also not working.But if i change the background color i am able to see the changes.
Can u explain me what the reason would be.
July 13, 2008 at 6:35 pm
the download link is currupt. installation file shows error. is there any other link of “Mytheme”. need this. thanks
July 16, 2008 at 3:07 pm
Hi.. download from http://www.sridatta.com/software/MyTheme.exe
August 22, 2008 at 10:36 pm
Hi,
I can’t change the background because I’m using a computer which has controlled access permissions to C drive. Is there an alternative?
Thanks,
PS
September 10, 2008 at 7:51 pm
hey amazing yaar…………….
u software guys rock!!
cheers……
We guys r gonna come up with a community where u guys can code in collaboration wid other ppl arnd the world and such open source software will get their credit…..
Do visit us in some days- http://www.planetaikon.com
September 12, 2008 at 9:22 am
Very Nice to see like this
September 29, 2008 at 12:11 am
Dear Sridatta,
Thanks for the pain you have taken to explain each step. I have run the exe file. I could see only the image but not any smileys over there. One more thing is, only I coould see the image but not the person whom I’m talking with. Please can you clarify? How can we incorporate smileys?
Thanks a lot for the information you have provided. Simply wonderful.
Mrithyunjaya
October 1, 2008 at 11:27 am
hi all
i am facing problem while doing the setting for smiley
its not working. i changed background successfully
i have placed smile.gif,1.gif,2.gif………21.gif in images folder
and changed the content of five files listed above
please guide
thanks
October 6, 2008 at 5:47 pm
i donn’t know how to instrall background photo? if u know give me the instruction!
October 7, 2008 at 9:20 pm
@Mrithyu – The smileys are replaced client side. If you would like your friend to see the smileys, then he should also install the MyTheme plugin.
@Asmita – Either you or I might be missing some steps. All the steps I have guided through will be installed automatically when you install the EXE file. So, Install it and check where did you go wrong.
@Nyi – Please refer to the Help file present in Start->Programs->DaSh->MyTheme->Help
November 20, 2008 at 8:43 pm
how to uninstall it??
November 28, 2008 at 5:32 am
i hv installed da theme but i don noe all da smileys . So plz can u mail me all …. ”
:B ” r fine but i want smthing lyk ” :gn , :wa , :ilu ” etc ..
November 30, 2008 at 4:54 pm
SIR,
really getting a personalized theme in gtalk…is something i’m enjoying more than chat
December 29, 2008 at 12:01 am
i’v been using this mytheme for 1 year..but recently i had a virus in my system..it was eradicated but many components stopped working..including showing of smileys in chat window..i’v reinstalled vrything but still no luck ..can u help me out?? …i even checked the code u’ve given ..but i think this is gotta do with some registry problem..
neways thnx for wonderful work..
February 6, 2009 at 4:54 pm
waoooooooow. the theme worked. now i’ll try to add smileys. hope it works too.thank u so much
February 6, 2009 at 5:13 pm
the smileys didnt work. Do i have to add the image in the images folder with img/1.2.3…..14.gif as their names?
can you please give a detailed explanation for it.
February 11, 2009 at 1:02 am
Link is not accessible..
403
February 11, 2009 at 6:55 pm
Link is broken.
403
Can we get the updated one plz?
March 13, 2009 at 6:16 pm
I have already tried it all through. But I found that appearance does not affect my contacts’ view. No matter how I changed in my main.css, they still view my chat window on their sides as default style. So is it an usual?