Changes between Version 3 and Version 4 of Development/Styles


Ignore:
Timestamp:
Aug 3, 2006 5:09:39 AM (13 years ago)
Author:
colloquy
Comment:

fixed typo and outdated Apple url

Legend:

Unmodified
Added
Removed
Modified
  • Development/Styles

    v3 v4  
    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 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. 
    77 
    8 The process of formatting a message follows these steps, start to finish. Frist, 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). 
     8The process of formatting a message follows these steps, start to finish. Frist, 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). 
    99 
    1010The anatomy of a complex style is as follows, with optional elements italicized: 
     
    1414The Variants folder inside the Resources is a great way to provide subtile variations upon the main CSS that gives the end user more choice. These variants show up as a sub-menu of the style, named exactly as they are in the variants folder (or keyed upon that name to a translation in the users localization Variants.strings). Any images you wish to use should also be bundles in the Resources folder and referenced relatively through the HTML or CSS. 
    1515 
    16 For examples of various styles, look inside Colloquy's application bundle in the "Contents/Resources/Styles" folder. You will find the Standard and Bland styles use the built-in "default.xsl" file, while the Bubbles and Novel style use custom XSL files. Colloquy also uses the standard [http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/Concepts/infoplist.html#//apple_ref/doc/uid/20001121/CJBEJBHH Info.plist keys] defined by Apple, namely CFBundleName and CFBundleIdentifier. 
     16For examples of various styles, look inside Colloquy's application bundle in the "Contents/Resources/Styles" folder. You will find the Standard and Bland styles use the built-in "default.xsl" file, while the Bubbles and Novel style use custom XSL files. Colloquy also uses the standard [http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html Info.plist keys] defined by Apple, namely CFBundleName and CFBundleIdentifier. 
    1717 
    1818----