[wp-hackers] Trackback and Pingback in WordPress

Michel Valdrighi michelv at gmail.com
Thu Dec 9 14:56:41 UTC 2004


On Wed, 08 Dec 2004 14:58:51 -0800, Matt Mullenweg <m at mullenweg.com> wrote:
> > Any ideas on how we can keep the post time to a minimum?  A site with 10
> > links to 10 different sites would take a while to post, searching for PB
> > and TB on each one.  Perhaps we could save the entry, then redirect the
> > poster to a list of all the links with a "Ping" checkmark next to each.
> > It could attempt to send a Trackback, and if no Trackback URI is found,
> > attempt to send a Pingback.  Or maybe the other way around.
> 
> Right now we attempt to redirect them before we do all the boring ping
> stuff. If they have buffering this doesn't work though.
> 
> We should combine the lookups, there's no reason to request X links for
> pingback and then request the same X links for enclosures. Ideally:
> 
> * Set very low timeout, like around a second
> * Do HEAD request first
>    * If audio/*, video/*, etc and on the same domain, enclose
>    * If link was marked up with rel="enclosure", enclose\
>    * If x-pingback: header, pingback it
> * If text/* or application/xhtml+xml grab first 10k then
>    * Look for pingback <meta>, if there send and move on
>    * Look for rel="trackback"
>    * Look for trackback RDF

Ideally, we could also make the poster choose on which links these
autodiscovery ops are done.

Say, instead of having a field to input trackback URIs, you would have
a button that reads "Choose links to trackback / pingback". This
button would trigger a little window, or display of a div, that lists
the links in the post (a simple preg matching all the <a> with their
link text) and checkboxes for each ping op.
In the options, you could set WP to automatically try
trackback/pingback autodiscovery on links, in which case the
checkboxes would be all checked by default.
Back to the little pinging choices window: it would also have a little
'X' button or whatever, that means 'never do these on this URL' or
'never do these on this domain name'. So in case you happen to
frequently link to news sites that are not C|Net, you'll never have to
wait for WP to try to pingback them all.
Such a list of 'banned' domains could be edited in the options.

The same idea applies to enclosures, with a button that allows you to
select the media links to enclose.

-- 
Michel Valdrighi
Devéloppeur Web Intraordinaire
http://zengun.org/weblog/



More information about the hackers mailing list