Using java scripts for message styles

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
negoo_
Harmless
Posts: 3
Joined: Fri Dec 01, 2006 3:01 am

Using java scripts for message styles

Postby negoo_ » Fri Dec 01, 2006 3:08 am

Hello,

This is my first attempt at creating a message style for adium, and I would love to insert a javascript that would affect an element in the header part.

Infortunately, I have tried all I could imagine without having it working at all. So, does anyone know how to insert a javascript for this particular part of the style ?

Thank you for your answers

Olivier

User avatar
Catfish_Man
Cocoaforge Admin
Posts: 1203
Joined: Thu Dec 02, 2004 6:30 am
Location: Portland, Oregon
Contact:

Postby Catfish_Man » Fri Dec 01, 2006 5:08 am

I suggest examining Renkoo, as it uses quite a bit of javascript. I'm also examining some possible improvements to using js in message styles for 1.0, so this could get easier :)

negoo_
Harmless
Posts: 3
Joined: Fri Dec 01, 2006 3:01 am

Postby negoo_ » Fri Dec 01, 2006 5:31 pm

Yeah ! I did it ! thank you for your help. There is the final result :
Image

I intended it to be strictly personal as I have not asked all permissions, but if some of you like it, I will share.

Designed to match the iTunes inspired list style

User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Postby The_Tick » Fri Dec 01, 2006 5:34 pm

That's neat looking.

bburky
Latté
Posts: 66
Joined: Mon Dec 27, 2004 9:18 pm

Postby bburky » Sat Dec 02, 2006 12:16 am

That looks really great. If you don't mind sharing it I would even use it for a bit to see if I like it. The only odd thing is the check boxes, maybe the little triangle in a circle from iTunes (to link to the music store) could be used instead. Checkboxes look a bit odd. Otherwise that's really great.

df0notfound
Latté
Posts: 72
Joined: Tue Dec 20, 2005 7:41 pm

Postby df0notfound » Sat Dec 02, 2006 3:08 am

My new theme using JS
Image
Chromo™ Enabled!
To go with my Chromo™ screensaver

Expect it on xtras before the end of the weekend
Last edited by df0notfound on Sat Dec 02, 2006 11:39 pm, edited 1 time in total.

User avatar
bgannin
Growl Team
Posts: 1817
Joined: Thu Dec 02, 2004 8:11 am
Location: ..here
Contact:

Postby bgannin » Sat Dec 02, 2006 3:56 am

negoo_ wrote:I intended it to be strictly personal as I have not asked all permissions, but if some of you like it, I will share.


You should (though I agree with changing the checkbox, it makes for a confusing look as a user might be tempted to click and it will not make sense why nothing happens)
Try my software!

#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?

User avatar
Catfish_Man
Cocoaforge Admin
Posts: 1203
Joined: Thu Dec 02, 2004 6:30 am
Location: Portland, Oregon
Contact:

Postby Catfish_Man » Sat Dec 02, 2006 6:24 am

If anyone has any comments on javascript in message views, please get in touch with me about it. Things I have been considering include a library of useful js functions, or exposing pieces of the message system to javascript. I have the latter working in a prototype; when messages are added, Adium calls addMessages() and passes an array of AIContentObjects. The addMessages() function then can call things like messages[i].sender(), messages[i].asHTML(), and so on. If I get some time, and if this design works for our partners on the message view format, I will work on splitting Template.html into Template.html and Template.js, so that people can use custom js without overriding the basic page structure.

negoo_
Harmless
Posts: 3
Joined: Fri Dec 01, 2006 3:01 am

Postby negoo_ » Sat Dec 02, 2006 4:38 pm

Thank you for your comments. Yes, you're right, the arrow would be more clear so i made the change. I will submit it to the extras, but i have thought that it would be cool to see your icon with a perspective effect like in coverflow and i would like to add it before. But i have not found a pre-made script and i'm not that good at java, so it will take a bit more time.

Also, separating template.js would be extra cool


Return to “Adium”

Who is online

Users browsing this forum: Google [Bot]