From: Demian K. <dem...@vi...> - 2012-04-24 12:43:35
|
I think that looks like a reasonable solution to your problem. As far as populating the meta tags goes, that's another job for the $addHeader variable I mentioned earlier - you could add some code like this to the getCoreMetadata() method of web/RecordDrivers/IndexRecord.php: $addHeader = $interface-> get_template_vars('addHeader'); // get existing value, if any $addHeader .= '<meta name="title" content="' . htmlspecialchars($this->getTitle()) . '" />'; $interface->assign('addHeader', $addHeader); // store updated value Obviously you may need to do more work to generate some of the other meta tags - but my point is that you need to read addHeader out of the Smarty interface (in case other code has already put data there), then update it, then write it back. - Demian From: Byron Smith [mailto:by...@ev...] Sent: Monday, April 23, 2012 10:13 PM To: Demian Katz; 'Götz Hatop' Cc: 'VuFind List' Subject: RE: [VuFind-General] Facebook like and social graph Hi Demian, I have been able to link to the current page by using {$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI} <div class="fb-like" data-href="{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" data-send="true" data-width="450" data-show-faces="true" data-action="recommend" data-font="tahoma"></div> Is this ok to use? I still need to find a way to populate the OG meta tags in the record view so that the record formats in Facebook properly. Regards, Byron -----Original Message----- From: Demian Katz [mailto:dem...@vi...] Sent: Monday, 23 April 2012 10:56 PM To: hatop@UB.Uni-Marburg.DE; Byron Smith Cc: 'VuFind List' Subject: RE: [VuFind-General] Facebook like and social graph > what fb wants, is a web page to recommend, and since we have such > since ever for our IR stuff, it was easy. But in general, the > url for FB should (in my opinion) be persistent and have good > DC metadata tags. Would it make sense, in the absence of a good external link, to recommend the current page? That URL is easy to generate in 1.x, and it would probably be fairly straightforward to augment the record view with extra <meta> tags. - Demian |