bkdelong: (Default)
[personal profile] bkdelong

Being extremely jealous of the other guys hacking apart WordPress to make it FOAF-y, I've actually done my own PHP hack. This one required nothing more than making sure the "Profile" field under the WordPress User Profile contained a one-line bio. Or...thereabouts. Then I added the "olb" property from the Bio Vocabulary.



Then I made an edit to Christoph Görn's hack of Morten Frederiksen's foaf-output plugin 1.9, (found in wp-content/plugins when installed) and added the following lines:



After the line

xmlns:dc="http://purl.org/dc/elements/1.1/"


I added:



xmlns:bio="http://purl.org/vocab/bio/0.1/"



and after the line

$rdf .= "\n\t" . '<homepage rdf:resource="' . htmlspecialchars($authordata->user_url) . '"/>';
, I added:



if($authordata->user_description)
$rdf .= "\n\n\t" . '<'bio:olb>' . htmlspecialchars($authordata->user_description) . '</bio:olb>' . "\n";



Finally, something I can hack myself. Next step is to try and add a birthdate. Not nearly as easy.




[BrainStream]
(Permanent link to this entry)

Profile

bkdelong: (Default)
bkdelong

April 2020

S M T W T F S
   1 234
567891011
12131415161718
19202122232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 18th, 2026 10:25 am
Powered by Dreamwidth Studios