[bbDev] Pingbacks and the posts table

Michael D Adams mikea at turbonet.com
Thu Jul 19 05:14:55 GMT 2007


So I'm working on adding pingback functionality (both ways) to  
bbPress and am running into a problem: how to store incoming pingbacks.

WP stores pings in the comments table (sensibly) where there are  
fields for the pinging page title and url (comment_author and  
comment_author_url).

The bbPress posts table doesn't have any such fields.  It seems we'd  
need to add three fields to the posts table to make it work without a  
bunch of ugly hacks:

post_author:  the page title
post_external_url (or something): the page url
post_type (enum or varchar): post, ping

While we're at it, it *might* be possible to get rid of the  
post_position column which is almost completely redundant with  
post_time as far as I can tell.  We use it for:

1. Grabbing first posts.  We can probably write a pretty efficient  
query to do that without it.
2. Some pagination stuff.  This is the sticky point.  I'm not sure we  
can get around it easily, and if there's not a clever solution,  
there's no point in axing it.

Any thoughts on either or both issues?

Michael


More information about the bbDev mailing list