The attached patch implements sample trackback support according to
the Six-Apart spec.

I wasn't quite sure whether trackbacks warranted their own entry type
or not (as I wanted to render them in-between regular comments in
chronological order), so currently this just implements trackbacks as
comments.

I did a local hack where the presence of a non-empty title indicates a
track-back, but I'm open to suggestions for a better approach if y'all
think a seperate entry type is better.

How to use:

- Apply patch
- Add hobix/trackbacks to hobix.yaml

Trackbacks can then be submitted to /control/trackback/cat/entry-id.

If you want, you could also add a Quick template to include the
Trackback RDF in your pages:

    trackback_rdf: |
        <% trackback_link = File.join(weblog.link,
'control/trackback/%s' % entry.id) %>
        <!--
        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
               
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/";
               xmlns:dc="http://purl.org/dc/elements/1.1/";>
        <rdf:Description
            rdf:about=""
            trackback:ping="<%= trackback_link %>"
            dc:title="<%= entry.title %>"
            dc:identifier="<%= entry.link %>"
            dc:description="<%= entry.summary %>"
            dc:creator="<%= entry.author %>"
            dc:date="<%= entry.created.xmlschema %>" />
        </rdf:RDF>
        -->

And include this template with each entry:

class Hobix::Out::Quick
    prepend_def :entry_title_erb, '<+ trackback_rdf +>'
end


Suggestions welcome, I'm sure my approach could be improved.

Leon

Attachment: hobix-trackbacks-0.1.patch
Description: Binary data

_______________________________________________
Hobix-is-the-way mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/hobix-is-the-way

Reply via email to