Changes between Version 9 and Version 10 of Development/Styles

Nov 27, 2006 1:10:16 PM (13 years ago)



  • Development/Styles

    v9 v10  
    66A new major feature of Colloquy 2 are the extensible conversation styles. Styles are simple OS X bundles wraped around a [wiki:Development/Styles/CSS CSS file] file (at minimum) or a CSS file and a [wiki:Development/Styles/XSL XSL file]. Knowing this, the fact that Colloquy uses XML (see the [wiki:Development/Styles/LogFileFormat Transcript file format]) to store chat messages that come in over the network is no surprise to some. Pairing these three technologies gives us great flexibility when processing and displaying a message on screen. 
     8One way to create a new style is to copy the folder of an existing style, rename the copy to the name of your new style, and edit the info.plist to reflect the new name. Then, in Colloquy, do a /reload styles to have it show up in the app.  Note that if you want to use an XSL file and the style you started with didn't include one, you can grab that from inside the app bundle. (You can look inside bundles by right-clicking on them and selecting "show bundle content".) 
    810The process of formatting a message follows these steps, start to finish. First, wrap the message in a simple XML envelope, encoding any special characters and representing IRC styling as XHTML. This XML envelope gets transformed with the curent style's XSL file (or a built-in default XSL file). The resulting transformation from the XSL on the XML should be XHTML that can then be rendered with help from the style's CSS file. Rendering is done via Apple's Safari (!WebKit) engine—so the possibilities are endless (evidenced by the built-in iChat-like Bubbles style).