[wp-hackers] Link metadata?

Mike Schinkel mikeschinkel at newclarity.net
Mon Jun 15 17:17:09 GMT 2009


Casey,

Thanks for the background on the all-in-one meta table. I agree that a standardized place would benefit us both as well as benefit others who may have different needs.

As for making the links posts themselves, I considered but for my needs posts would be far too "heavy" and provide far more capability than I need. Links are the perfect structure for my needs assuming I have link_meta available. BTW, I'm already hacking posts to serve purposes other than typical blog posts, and I don't want to have to worry about yet another special post type.

But that's for the suggestions, it is definitely an option for another use-case.

BTW, Scriblio looks rather interesting, good work.  

-Mike Schinkel
Custom Wordpress Plugins
http://mikeschinkel.com/custom-wordpress-plugins

----- Original Message -----
From: "Casey Bisson" <casey.bisson at gmail.com>
To: wp-hackers at lists.automattic.com
Sent: Monday, June 15, 2009 12:27:22 PM GMT -05:00 US/Canada Eastern
Subject: Re: [wp-hackers] Link metadata?


A while ago I proposed a comments_meta table[1], and at WordCamp I was  
introduced to bbPress' meta table architecture: rather than have meta  
tables for different types of content, there's just one meta table  
that includes an extra column describing what content type the ID  
links to.

The implication for the WP world was that an additional column in the  
postmeta table could extend it to serve links and comments (and if  
we're bold, replace usermeta). Our purposes are different, but having  
a standardized place and set of functions to store metadata about  
things other than posts would deliver obvious value to both of us.

[1]: http://comox.textdrive.com/pipermail/wp-hackers/2009-May/026343.html

All of that said, have you considered adding these links as posts?  
Putting content in the posts table gets you free tools to add tags and  
other metadata, makes the content easier to search (no need for  
plugins that scatter the searching to all those other tables), and  
allows you to open up the links to comments and other social activity.

You'd have to do the hard work of making the links work well as posts,  
but everything else comes free after that (rather than having to  
continually hack the link system to accommodate the interactions you'd  
like to see). But that's not as hard as it might appear -- I did it  
with photos and library records[2] and released the plugin[3].

[2]: see http://archives.colby-sawyer.edu/archives/2552/ and http://collingswoodlib.org/library/12023/
[3]: http://about.scriblio.net/

--Casey Bisson
http://maisonbisson.com/




On Jun 15, 2009, at 2:28 AM, Mike Schinkel wrote:

> The problem arises in that there are not any fields in wp_links  
> where I can store anything to tell me which links have had their  
> screenshot generated, their title and description downloaded, nor  
> their titles and descriptions manually reviewed and edited  
> (excepting the "notes" field which IMO is not a viable candidate.)  
> Posts have wp_postmeta and Users has wp_usermeta but there is no  
> wp_linkmeta for Links. My usecase needs some metadata for workflow  
> but I'm sure there are many other uses for link metadata as well.
>
> So here are the solutions I've considered:
>
> 1.) Storing everything in a 'links_workflow' option as a serialized  
> array (this just doesn't feel right.)
> 2.) Creating a wp_linksmeta table and hoping that if WordPress ever  
> adds it they add it like what I've added (Don't want to add a table  
> but would be cleanest for SQL.)
> 3.) Adding a "link_meta" field to the wp_links table and storing  
> serialized array data for each link (This is okay, but can't do a  
> performant SQL query against.)

_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list