TrackBack allows back links to remote sites.
Contents
Moved from JosYule:
I've had some great feedback to the work that i've done on the trackback project so far. One of the first things i've got to fix is how the trackback.py action get called, as it was pointed out to me that they way i currently have it, it will only work for CGI based installs. It was suggested to me to use some kind of name suffix, like __trackback__ (JosYule__trackback__), which could be checked for in request.py at the same time that the XMLRPC stuff if checked (thanks OliverGraf, AdamShand and other #moin irc'ers). This suffix could be configurable as well. I'm still not sure where to save the data - this is an open question to any and all Moin devs.
The second part of the trackback stuff, is the sending of trackback pings to urls contained on a Moin page. I think the easiest way to enable this is to just write a action, SendTrackback.py. This action will also have to create some persistant data, which should be written to the same place that the trackback data is written to (i'm assuming).
Resources and Links
R 0.2 info
Added config vars: allow_trackback 0|1, trackback_suffix defaults to __trackback__, but could be whatever one wanted.
Trackback is now detected in the run() method of request.py (just after the XMLRPC detection) rather then the previous mutant GET/POST mess.
I'm going to put all the trackback related data (sent and received pings) in the data/pages/<pagename>/trackback folder. This follows how/where attachments are saved. I'm still not sure of the format for saving the trackback data. XML? RSS? Plain-text? A pickled object?
- I don't think it really matters too much. My only real request is that it's something which can be edited with a normal text editor rather then having to write a program to parse it. -- Adam
Hurm. See, just when i was all happy to go with using a pickled list of objects, you have to want to edit it by hand... I guess its back to XML then. -- JosYule
R 0.1 instructions
Please note that this code is soon to change in a pretty big way - this is just for experimenting with!!!
Add the variable allow_trackback to the config.py file. It is set to 0 by default, so if you want this to work, you also have to added the var to the moin_config.py file, and set it to 1.
Add the following line to _setup_args_from_cgi_form (from request.py), just before the return args line.
Copy trackback.py and ViewTrackbacks.py to your action directory
Apply the following diff to Page.pyHere is the diff for Page.py (from moin 1.2.x)
629a630,646 > # Trackback RDF > if config.allow_trackback: > permalink = "http://" + request.server_name + request.script_name + "/" + wikiutil.quoteFilename(self.page_name) > trackback_url = permalink + "?action=trackback" > request.write(""" > <!-- > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:dc="http://purl.org/dc/elements/1.1/" > xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> > <rdf:Description > rdf:about="%s" > dc:title="%s" > dc:identifier="%s" /> > trackback:ping="%s" > </rdf:RDF> > -->""" % (permalink, self.page_name,permalink,trackback_url)) >
UI
I would opt that TrackBack links are shown at the bottom of the page as part of the footer. If there are too much we probably can set a link to the list but I am not shure if this will really happen so perhaps we don't need this in the first release...
Perhaps make this configurable and offer a macro, too
-- FlorianFesti 2004-09-30 08:03:40
AntiSpam
At some point the ability to send trackbacks will probably need to be able to be acl'd to stop abuse. AdamShand
I'm not really clear how to plug an action into the ACL framework. Again, i'll have to look at the code. JosYule
- I doubt that ACLs can be used for this purpose as ACLs are user based.
If I understood the TrackBack Protokol right it can easily misused for spamming. To reduce this there are several possible counter measures:
Verify pings
The implementation should download the page that pings us and verify that there is a link to the page pinged.
Apply AntiSpam black list
Use anti spam list to filter unwanted pages. See AntiSpamGlobalSolution which will most likely be part of next the releases.
Revert
There should be a possibility to remove TrackBack links if they are spam. To keep soft security up this has to be logged and being able to reverted easily.
RecentChanges
I am personally not shure if TrackBack pings should be listed in the RC or not. This strongly depends on the traffic that TrackBack generates. If we don't add TrackBack pings to the common RC we need an special TrackBack RC log to check for spam. I would suggest to implement both variants and make it a configuration or even Macro parameter what the RecentChanges macro displays.
RecentChanges will be modified to easier allow external entries for AdoptedPages anyway so delay this development until the cahnges to RC are done. -- FlorianFesti 2004-09-30 08:03:40
Future Ideas
Users who are subscribed to be notified of changes should be notified of new trackbacks? AdamShand
It would be nice if trackbacks were incorporated into the RecentChanges page somehow (or something similar so site admins could keep up with what's going on). AdamShand
Both the above are kind of related. I think the email-new-trackbacks is probably more doable then the RecentChanges, but i've not even looked at the code yet. JosYule
It would be nice if there was a way to display any trackbacks inline on the page (eg. ShowTrackBacks). AdamShand
This is already in the works -- JosYule
Instead of having both a ViewTrackbacks and a SendTrackbacks action, what about just having a "Trackbacks" action which displays any trackbacks for that page and also has a form which can be used to send one? AdamShand
The SendTrackback action works 'automagically' - it parses all the hrefs on the current page, checks each one for trackback RDF and if it finds some, sends a trackback ping to the listed url. I had not intended to have an actual 'form' for sending trackbacks (see this). JosYule
- Right, sorry that makes sense. I was thinking about it from a manual point of view but of course you are correct that this is the easist way. -- Adam.
This should be implemented in a general way. For AntiSpamGlobalSolution a list of all external links is of interest, too.
What does "implemented in a general way" actually mean? JosYule
- perhaps save a list of all external links per page, like we already do it with internal links.
There should be an action that checks the whole wiki for external links and ping them. -- FlorianFesti 2004-09-30 08:03:40
Discussion
When you have a page which includes multiple other pages then you end up with multiple a trackback RDF section for each included page. I have no idea if this is legal but I suspect not. View the source of my blog pages (for an example see: AdamShand). -- Adam.
This is legal (i think ;). I know that if you use the MT popup tool to post a message to a page like yours, you are presented with a list of all the 'trackback-able' URLs that you could ping. For the plug-in that i'm planning to write, it will take the first RDF-trackback URL it finds and ping that. This actually makes me want to put the RDF output for a page at the top, rather then at the bottom, so that if someone wanted to ping your frontpage it would work, rather then pinging the first item on that page. JosYule
- Yep, you're correct again. I went poking around some typepad blogs and they do have multiple trackback entries. -- Adam.
There are some open questions about TrackBack and the WikiNature. As our pages may change the link may no longer be valid. Is there a posibility to delete TrackBack entries? The other question is if we should set the back link to the always current version of the page or the the exact version. If we set it to the exact version do we set it again for every new version of the page containing the same link?
I (and I guess some other developers are, too) am unshure about the benefit and the annoyance level of this feature. As long as TrackBack is very uncommon among wikis traffic should be quite low. Nevertheless this is a kind of experiment that will need later adjustment after we know how it really feels. -- FlorianFesti 2004-09-30 12:46:28
I've been looking at the PingBack spec (http://www.hixie.ch/specs/pingback/pingback) as an alternative to TrackBack. I thought that it it might be a bit cleaner to implement and to work into a AntiSpamGlobalSolution. I've decided that the TrackBack format is actually eaiser. TrackBack, while a more complex spec, includes all the info the server needs - blog/site name and URI, post/page name and URI, etc. I think the verify pings method as listed above is a fast and easy way to verify all TrackBack pings. I hope that this kind of validation can reduce the "annoyance level" of this kind of tool and increase its usefulness. JosYule
This project is totally rad - I'm just itching for TrackBack support - Moin deserves to be a first class blogging citizen!
Sadly, I couldn't find the latest version of the macro/action - perhaps it was left behind at JosYule?
Thanks - keep up the awesome work!
Jack <ms419@freezone.co.uk>