By adding parsing support for {BIBLIONUMBER} to the SearchForTitleIn system preference, we can enable support for APIs (like Facebook, Twitter, etc) that could point back to the items detail page for a title. Example code to put into SearchForTitleIn (place after </ul> that comes with default): </div></div><div class="detailtagcell"> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://opac.mylibrary.tld/bib/{BIBLIONUMBER}" show_faces="true" width="450" font=""></fb:like> <div><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://opac.mylibrary.tld/bib/{BIBLIONUMBER}" data-text="I'm reading this" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div></div><div><div><ul> Replace "http://opac.mylibrary.tld" with your OPAC base URL, and for Twitter, adjust the data-text attribute to whatever you like (you can parse in {TITLE} and {AUTHOR}, but beware character limits!)
Whoops, my mistake... </ul> must be added to make this work: Revised sample code: </ul></div></div><div class="detailtagcell"> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://opac.mylibrary.tld/bib/{BIBLIONUMBER}" show_faces="true" width="450" font=""></fb:like> <div><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://opac.mylibrary.tld/bib/{BIBLIONUMBER}" data-text="I'm reading this" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div></div><div><div><ul>
Created attachment 4032 [details] [review] signed off patch
Patch itself passes QA. Particular applications, like Facebook 'like' links and such may still require refinement, but are outside the immediate scope of this enhancement (which is just the parsing of {BIBLIONUMBER}). Tested with NULL and incorrect biblionumber values in the URL; 404 page returns as expected.
Pushed, please test
opac-MARCdetail.pl and opac-ISBDdetail also need a fix.
I tried- but I need more than copy paste to make it work - so it's on Ian to update.
This appears to be working. Closing.