Hacks > RDF/ATOM S2 Style
This style is written in S2
and is intended to be used with LiveJournal
or LJ-derived sites. It must, at the very least, support the
core
layer.
It renders any view as an ATOM feed. The ATOM core
is augmented with a variety of schemas to supply more info (like moods and comments).
It uses the following namespaces:
The following information is included:
- Per page (atom:feed):
- atom:title - title of the journal
- atom:tagline - "subtitle" of the journal
- atom:link - rel=alternate, href=url of the journal
- atom:generator - string stating that LiveJournal and this style were used to generate this feed
- rss:image - the default userpic of the journal being viewed (not included for the friends page)
- rss:url - location of the userpic
- rss:title - title of journal
- rss:link - url of journal
- rss:width - width of the image, in pixels
- rss:width - height of the image, in pixels
- Per entry (atom:entry):
- atom:title - entry title, stripped of HTML
- atom:id - href=permalink to this entry
- atom:link - rel=alternate href=permalink to this entry
- atom:link - rel=prev href=previous entry
- atom:link - rel=next href=next entry
- atom:author - the author of the entry
- atom:content - type=text/html, mode=escaped, contains the post itself
- atom:issued - when this entry was first posted
- atom:modified - when it was modified. currently bogus and the same as issued
- lj:mood - mood string
- lj:music - music string
- slash:comments - number of comments
- blogcomments:comments - comments to this entry
- Per comment (blogcomments:comment):
- atom:title - comment title (subject), stripped of HTML
- blogcomments:name - username of the poster
- blogcomments:url - permalink to the comment
- blogcomments:date - when the comment was posted
- blogcomments:body - the actual text of the comment
- blogcomments:comments - any repplies to this comment
You can download the source or
view a highlighted version.
To use it on LiveJournal:
- You must have a paid account
- (This and the next two steps are optional if you're using LiveJournal)
Go to your layers
and create a new top-level layer of type layout
- Click on edit
- Replace the default stuff with the source.
- Go to your styles
- Create a new style. The name and language don't matter.
- Select the layer you just created from the
Layout dropdown and click Change.
OR, if you didn't create your own layer (skipped the last three steps) select Other ... and enter the
layer id 3770393.
- Ignore the
Language, Theme, and User dropdowns. Just click Save Changes
- You can now view any journal page in this style by appending s2id=xxxxxxx to the query string (replace the x's with the number of
the style you just created). For example:
http://www.livejournal.com/users/atrustheotaku/?s2id=5922201
or
http://www.livejournal.com/users/atrustheotaku/?auth=digest&s2id=5922201
If you find a bug or would like to make a suggestion, please e-mail me.
This style is licensed under the LGPL.
Created with the help of LiveJournal
editing tools.