Go Back   Digit's Technology Discussion Forum > Community > Tutorials

Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit

View Poll Results: Do you use Google Talk?
Yes 20 90.91%
No 2 9.09%
Voters: 22. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-11-2006, 08:58 AM
sridatta's Avatar
sridatta sridatta is offline
An Esoteric Geek
 
Join Date: Mar 2006
Location: Bangalore
Posts: 285
Send a message via Yahoo to sridatta
Smile Tutorial: Create your own Gtalk Theme !!!

Guys,

This tutorial is for ppl 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 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.

Code:
%userprofile%\Local Settings\Application Data\Google\Google Talk\themes\system\chat
Now, I am using Classical Picture Theme for editing bcoz of its simplicity. Now, Copy the folder Classical Picture. Now, get back to 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) . This is the image that i used. (see attachment)

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

Code:
/* 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:
   <img class='icon' src='%userIconPath%'>
   <div class='icon'><div style='height:1px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="%userIconPath%")'></div></div>
*/

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

Code:
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

Code:
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,
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.

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

Code:
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,


Code:
  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

Code:
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. Dont panic that the changes do not happen

This ends the first part of my tutorial.

PART2:

Now, we deal with how to integrate smileys into your google talk theme. We use javascript Regular expressions to replace the charecters/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

Code:
<div class='msg Nth'><div id=message>%message%</div></div>
<div id='insert'></div>
After inserting the javascript, the new file is

Code:
<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<regular expression>, 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.

This ends part 2 of my tutorial.
__________________________________________________ _________

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.
__________________________________________________ __________

PS: This is my first tutorial. Apologies for any mistakes made. Please post your comments. Please suggest some improvements that can be made.

Quote:
Originally Posted by Asfaq, who goofed up. Sorry Sid!
Source
Asfaq: Please give credit where its due. Its not fun to rip a tut and *claim* it was your idea.
Attached Images
File Type: jpg illeana.jpg (28.0 KB, 50 views)

Last edited by Asfaq; 25-10-2007 at 09:19 AM.
Reply With Quote
  #2  
Old 08-11-2006, 09:23 AM
piyush gupta's Avatar
piyush gupta piyush gupta is offline
Wise Old Owl
 
Join Date: Sep 2005
Location: never land
Posts: 1,267
Send a message via AIM to piyush gupta Send a message via MSN to piyush gupta Send a message via Yahoo to piyush gupta
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

definately give it a try
Reply With Quote
  #3  
Old 08-11-2006, 10:56 PM
blueshift's Avatar
blueshift blueshift is offline
Wise Old Crow
 
Join Date: Apr 2005
Location: Inside the Pixel
Posts: 1,220
Send a message via Yahoo to blueshift
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

Thanks sridatta.
Reply With Quote
  #4  
Old 11-11-2006, 10:29 AM
sridatta's Avatar
sridatta sridatta is offline
An Esoteric Geek
 
Join Date: Mar 2006
Location: Bangalore
Posts: 285
Send a message via Yahoo to sridatta
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

you are welcome
Reply With Quote
  #5  
Old 15-11-2006, 07:40 PM
saurav singh saurav singh is offline
Right Off the Assembly Line
 
Join Date: Sep 2006
Posts: 1
Question Re: Tutorial: Create a google talk chat theme with desired background image and smile

thx sridatta neways ..
bt i did d same chngs u mentioned in 1st exrcse of 1st part ...bt it didnt render ny chng 4 me ......
wots wrng???????
Reply With Quote
  #6  
Old 16-11-2006, 12:54 AM
sridatta's Avatar
sridatta sridatta is offline
An Esoteric Geek
 
Join Date: Mar 2006
Location: Bangalore
Posts: 285
Send a message via Yahoo to sridatta
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

1. The changes will not be applied until you close all your opened chat windows and re-open them.
2. Be sure u have selected the right theme (The one you have modified) in settings-> Appearance
3. The image path may be incorrect. suppose if u give background image path as /images/back.jpg , then the file should be present in the folder named images in the folder in which your main.css file is present. (i.e. Resources folder)

Once recheck all these things.. Suppose if you are unable to figure out the problem, just install the theme by downloading 4m the link, and then check out whats wrong...
Reply With Quote
  #7  
Old 22-02-2007, 04:49 PM
sridatta's Avatar
sridatta sridatta is offline
An Esoteric Geek
 
Join Date: Mar 2006
Location: Bangalore
Posts: 285
Send a message via Yahoo to sridatta
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

Guyz.. is no body interested in google talk?? Or the tut is OHT?? ( Over Head Transmission )
I have compiled this thread sitting for more than 5 hrs... not even 5 ppl responded..
Please post your comments...
Reply With Quote
  #8  
Old 22-02-2007, 04:51 PM
Tech Geek's Avatar
Tech Geek Tech Geek is offline
Wise Old Owl
 
Join Date: Sep 2006
Location: Cyber Hell
Posts: 1,495
Send a message via Yahoo to Tech Geek
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

Thanks
i will try it out today night
__________________
Behind every good computer... is a jumble of wires 'n stuff
Reply With Quote
  #9  
Old 22-10-2007, 12:07 PM
indraneel indraneel is offline
Right Off the Assembly Line
 
Join Date: Oct 2007
Posts: 2
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

hi sri,
thanx a lot your tutorial was very very userful to me in creating my own custom themes! but the problem is i want to share my designed themes with my friends and even after providing online support through chat they were not able to install the themes properly...

CAN U PLZ HELP ME IN CONVERTING MY THEME TO .EXE FILE OR ANY SELF EXTRACTING FILE, which once clicked will automatically copy the file to the specified directory!
Reply With Quote
  #10  
Old 22-10-2007, 12:31 PM
azzu's Avatar
azzu azzu is offline
AJJU
 
Join Date: Aug 2006
Location: hYdErAbAd
Posts: 1,882
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

try Anything .EXE converter
sridatta after seeing Gorgeous Ileana
i think ur from ANDHRA
__________________
The Two 'G's You should always Be constant are "GOAL" and "GIRL"
Reply With Quote
  #11  
Old 22-10-2007, 12:36 PM
indraneel indraneel is offline
Right Off the Assembly Line
 
Join Date: Oct 2007
Posts: 2
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

hi azzu/sri
instead of making an .exe file (as normally users are suspicious abt .exe file) can we make it into SFX/Zip. if so any softwares which supports %user profile%, i mean which will auto extract based on windows username?
Reply With Quote
  #12  
Old 23-10-2007, 10:20 PM
salilrane's Avatar
salilrane salilrane is offline
.........Access Denied!!!
 
Join Date: Dec 2005
Location: Mumbai
Posts: 171
Send a message via Yahoo to salilrane
Default Re: Tutorial: Create a google talk chat theme with desired background image and smile

does the opposite persons see the emoticons ????

i think he may see only words


plzzz gurus clear my dbouts .........
Reply With Quote
  #13  
Old 23-10-2007, 10:56 PM
phreak0ut's Avatar
phreak0ut phreak0ut is offline
The Thread Killer >:)
 
Join Date: Apr 2006
Location: Bangalore
Posts: 1,172
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

@sridatta: EXCELLENT tutorial.
@salilrane: I had the same thing in mind. Thanks for posting. We have seen that the other person sees only text of the emoticons in case we are using something like Smiley Central.
__________________
Want to make this world a better place? Then, start seeding and don't be just a leecher
Reply With Quote
  #14  
Old 23-10-2007, 11:26 PM
ilugd's Avatar
ilugd ilugd is offline
Beware of the innocent
 
Join Date: Dec 2005
Posts: 1,021
Send a message via Yahoo to ilugd
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

he needs to have the same theme installed, i guess, but sridatta, really, really nice work.
__________________
Life is too short. Have fun.
Reply With Quote
  #15  
Old 24-10-2007, 08:40 AM
salilrane's Avatar
salilrane salilrane is offline
.........Access Denied!!!
 
Join Date: Dec 2005
Location: Mumbai
Posts: 171
Send a message via Yahoo to salilrane
Default Re: Tutorial: Create a google talk chat theme with desired background image and smile

Quote:
Originally Posted by phreak0utt
@sridatta: EXCELLENT tutorial.
@salilrane: I had the same thing in mind. Thanks for posting. We have seen that the other person sees only text of the emoticons in case we are using something like Smiley Central.

i have confirmed that opp person sees only words ..

i thnk sridatta has done excellent and forward that to google i guess

i think google people must really think of geting some more creativity in GTalk
Reply With Quote
  #16  
Old 24-10-2007, 09:49 AM
Kiran.dks's Avatar
Kiran.dks Kiran.dks is offline
Human Spambot
 
Join Date: Apr 2006
Location: Pune, India
Posts: 2,452
Send a message via MSN to Kiran.dks Send a message via Yahoo to Kiran.dks Send a message via Skype™ to Kiran.dks
Default Re: Tutorial: Create a google talk chat theme with desired background image and smile

Good one Sridatta!

And how did you read my mind? It's cool integrating Ileana into my Google talk. She is hot.

And if you are a big fan of her, do watch "Pokiri" Telugu movie. You will never forget!
__________________
Kiran Kumar R

Last edited by Kiran.dks; 24-10-2007 at 09:49 AM. Reason: Automerged Doublepost
Reply With Quote
  #17  
Old 24-10-2007, 12:43 PM
ax3's Avatar
ax3 ax3 is offline
Cool as a CUCUMBAR ! ! !
 
Join Date: Dec 2003
Posts: 4,673
Default Re: Tutorial: Create a google talk chat theme with desired background image and smile

awesome ....... i have changed it ....... thanx a lot .........
__________________
... W H O T ...
Reply With Quote
  #18  
Old 24-10-2007, 03:07 PM
evewin89's Avatar
evewin89 evewin89 is offline
In The Zone
 
Join Date: Sep 2007
Posts: 278
Default Re: Tutorial: Create a google talk chat theme with desired background image and smile

i'll try,hop it'll work...
__________________
Evil Lives 4ever......
Reply With Quote
  #19  
Old 24-10-2007, 03:14 PM
Gigacore's Avatar
Gigacore Gigacore is offline
Dreamweaver
 
Join Date: Aug 2006
Location: Bangalore
Posts: 3,783
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

nice, thankx for sharing with us . . . .
__________________
Today's noobs are tomorrow's geeks. Don't make fun of them.. encourage them. - Gigacore

Follow me on twitter.com/gigacore
Reply With Quote
  #20  
Old 24-10-2007, 03:23 PM
almighty's Avatar
almighty almighty is offline
Back in Power
 
Join Date: Jun 2007
Location: Jampot
Posts: 530
Send a message via Yahoo to almighty
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

Hey sridatta
I am using it since a yr
i got it from some other forum... of course thats made by u only

Thanks !!!
__________________
¡uʍop ǝpısdn ɹoʇıuoɯ ʎɯ pǝuɹnʇ oɥʍ ¡ʎǝɥ
Reply With Quote
  #21  
Old 24-10-2007, 03:56 PM
harryneopotter's Avatar
harryneopotter harryneopotter is offline
Alpha Geek
 
Join Date: Feb 2007
Posts: 775
Send a message via Yahoo to harryneopotter
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

hey ... its good ... thnx bro
Reply With Quote
  #22  
Old 24-10-2007, 08:08 PM
Kiran.dks's Avatar
Kiran.dks Kiran.dks is offline
Human Spambot
 
Join Date: Apr 2006
Location: Pune, India
Posts: 2,452
Send a message via MSN to Kiran.dks Send a message via Yahoo to Kiran.dks Send a message via Skype™ to Kiran.dks
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

Asfaq,

The source which you mentioned looks like "Sridatta's" website. His signature mentioned websites and your mentioned source is same.
__________________
Kiran Kumar R
Reply With Quote
  #23  
Old 25-10-2007, 09:21 AM
Asfaq's Avatar
Asfaq Asfaq is offline
Keyboard addict
 
Join Date: Feb 2007
Location: Bombay, India
Posts: 84
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

^ I know.. thanks for bringing that to my notice.. I goofed up, my bad! Apologies Sid.
__________________
Not admin anymore, plz send all admin related queries to Raaabo or Fatbeing.

Last edited by Asfaq; 25-10-2007 at 09:21 AM. Reason: Automerged Doublepost
Reply With Quote
  #24  
Old 25-10-2007, 09:57 AM
Gigacore's Avatar
Gigacore Gigacore is offline
Dreamweaver
 
Join Date: Aug 2006
Location: Bangalore
Posts: 3,783
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

^ lol bro . . mistakes will happen. . . you dont need to ask apology for this

come on sid . . . cheer up
__________________
Today's noobs are tomorrow's geeks. Don't make fun of them.. encourage them. - Gigacore

Follow me on twitter.com/gigacore
Reply With Quote
  #25  
Old 25-10-2007, 10:00 AM
Kiran.dks's Avatar
Kiran.dks Kiran.dks is offline
Human Spambot
 
Join Date: Apr 2006
Location: Pune, India
Posts: 2,452
Send a message via MSN to Kiran.dks Send a message via Yahoo to Kiran.dks Send a message via Skype™ to Kiran.dks
Default Re: Tutorial: Create a google talk chat theme with desired background image and smile

Quote:
Originally Posted by Asfaq
^ I know.. thanks for bringing that to my notice.. I goofed up, my bad! Apologies Sid.
No problem mate.
__________________
Kiran Kumar R
Reply With Quote
  #26  
Old 25-10-2007, 09:41 PM
New's Avatar
New New is offline
Alpha Geek
 
Join Date: Jun 2007
Location: Bangalore
Posts: 790
Default Re: Tutorial: Create a google talk chat theme with desired background image and smileys.

Nice tut..Thanks...
Will give one try..
Reply With Quote
  #27  
Old 02-01-2010, 03:46 PM
dreams's Avatar
dreams dreams is offline
Gracias Senor
 
Join Date: Apr 2005
Location: Heven & Hell
Posts: 752
Default Re: Tutorial: Create a google talk chat theme with desired background image and smile

gud one..even thought y google has left gtalk in developments. but lazy in trying ur methods.
__________________
iPT 2G(S) - 8GB - JBn
iPhone 3GS 16GB - JBn
MAC OSx86 on P4 2.4Ghz
HTC Touch - Elfin - P3452 - WM 6.5

- Dont Dre@m... Juz Chase it -
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump





Upcoming Events

Thinkdigit  
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.