| 1 | = Smiley Themes = |
| 2 | |
| 3 | One important thing to remember is that these smileys only show up on your side. Unless the person you're talking to has the same theme as you installed in the same client, it's not guaranteed that they will see the same pictures as you for the smileys. |
| 4 | |
| 5 | The way smiley themes work is quite simple. We'll use an example to explain how it works. The name of this theme will be "Hello World!". |
| 6 | |
| 7 | If we wanted to install Hello World! into pidgin, we would have to do one of two things: |
| 8 | 1. Copy a folder, whose contents are described below, into ~/.purple/smileys |
| 9 | 2. Drag a tar.gz file, whose contents are described below, onto the list of smiley themes in Tools -> Preferences |
| 10 | |
| 11 | The first thing you need to know is the contents of the tarball you drag into the smiley themes list. It contains the folder that is described in option 1 above. In our case, this folder would probably be called "Hello_World". |
| 12 | |
| 13 | Now to describe the contents of Hello_World. This folder contains all the information Pidgin needs to use your theme. It has a lot of picture files that will be how your smileys show up (to you) and a text file named "theme", which tells pidgin what to do with all those pictures. For this example, lets let our list of picture files be: |
| 14 | * happy.png |
| 15 | * sad.png |
| 16 | * grin.png |
| 17 | * hidden.png |
| 18 | * MSN_only.gif |
| 19 | * !GoogleTalk.gif |
| 20 | |
| 21 | Then let our theme file look like so: |
| 22 | {{{ |
| 23 | Name=Hello World! |
| 24 | Description=Smiley Theme How-To |
| 25 | Icon=happy.png |
| 26 | Author=Ankit Singla |
| 27 | |
| 28 | [default] |
| 29 | ! hidden.png C:-) C:) |
| 30 | sad.png :( :-( |
| 31 | happy.png :) :-) |
| 32 | grin.png :-D :-d |
| 33 | |
| 34 | #These show up only in MSN |
| 35 | [MSN] |
| 36 | sad.png :( :-( |
| 37 | happy.png :) :-) |
| 38 | grin.png :-D :-d |
| 39 | MSN_only.gif :-M :-$ |
| 40 | |
| 41 | #These show up only in XMPP |
| 42 | [XMPP] |
| 43 | sad.png :( :-( |
| 44 | happy.png :) :-) |
| 45 | grin.png :-D :-d |
| 46 | GoogleTalk :-G :T |
| 47 | }}} |
| 48 | Blank lines and lines that start with # are ignored. The # means this line is a comment. |
| 49 | |
| 50 | The first four lines are part of any theme. The first line is the name of our theme, in our case "Hello World!". This shows up in the theme selector in bold. The second line is the description of our theme. This shows up underneath the name and author in the theme selector. The third line is the icon to show in the theme selector, which is a quick way for the user to see which theme they're selecting. The last line is the author of the theme. This shows up next to the name of the theme in the theme selector. |
| 51 | |
| 52 | Next come the protocol specific sets of smileys. A set of smileys is defined in the following format: |
| 53 | {{{ |
| 54 | [<protocol>] |
| 55 | <picture to use> <text to replace> |
| 56 | . |
| 57 | . |
| 58 | . |
| 59 | }}} |
| 60 | For example: |
| 61 | {{{ |
| 62 | [MSN] |
| 63 | sad.png :( :-( |
| 64 | happy.png :) :-) |
| 65 | grin.png :-D :-d |
| 66 | MSN_only.gif :-M :-$ |
| 67 | }}} |
| 68 | This means, the first line defines which protocol this set defines. In our example, this set will define all of the MSN pictures. Each line after that specifies how to handle each picture you want to use in that protocol. The first element on this line is the name of the picture, so for our first picture, we have sad.png. This must be followed by some whitespace and then a list of strings, separated by whitespace, that will be replaced by the picture sad.png in conversation. So in our case, we're telling pidgin that if it ever sees ":(" or ":-(", it shouln't show us ":(" or ":-(". Instead, it should replace it with sad.png so we see that picture instead. |
| 69 | |
| 70 | The first set defined in a theme file is usually the default set. This is the set of smileys that pidgin uses if it doesn't find a protocol specific set for that protocol in the rest of the file. So in our file, it will use the default set for AIM, ICQ, IRC, etc. If you notice, in the default set there's a line that starts with an exclamation point. This means the smiley is hidden. If someone types the text associated with that picture, you'll see the picture, but you won't be able to pick that smiley from the smiley selector that pops up from the formatting toolbar. |
| 71 | |
| 72 | That's it! Congratulations, you know how to make a theme file. |