[wp-hackers] Improving Pingback Excerpts

Mark Jaquith mark.wordpress at txfx.net
Tue Feb 15 20:06:11 GMT 2005


While it's really cool how Pingback can find the link on the page and 
grab a surrounding excerpt, I think there could be further improvements 
on the process.  If the link is near the start of an entry, the title, 
date, and possibly text of a previous post might get included in the 
excerpt.  If it is near the end of an entry, all sorts of other stuff 
could get included.

There may be no way around this... but I just thought I'd throw that 
thought out there.

Could we use <p> </p> as boundaries?  Like... only include text within 
the same paragraph that the link is in?  It may never be perfect, as you 
can't control how other sites present their entries, but I think it 
could make some educated guesses as to where the post's boundaries are.  
Another thing would be to consider <h2> or <h3> to be a boundary, so 
that the title or date don't get included, and to consider all <div>s to 
be boundaries as well.

Thoughts?  Is this even the right forum for this issue?


More information about the hackers mailing list