Content-Type: multipart/alternative; boundary="----=_NextPart_001_0168_01CD22F3.0D3F4520" ------=_NextPart_001_0168_01CD22F3.0D3F4520 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks for that Demian, I have got the majority of the meta tags = inserted using the method you described and it seems to be working nicely. I = still have three additional OG meta tags that I would like to add but I am = unsure of the function that would be required to retrieve the appropriate information. The meta tags I am trying to add are: =20 =20 Any idea on how I could pull the required information for this? The description and type I would like to retrieve from what is appearing in = the following screenshot snippet and the Site Name I was hoping to pull from = the config.ini. What are your thoughts? =20 =20 Regards, =20 Byron =20 =20 _____ =20 From: Demian Katz [mailto:demian.katz@villanova.edu]=20 Sent: Tuesday, 24 April 2012 10:43 PM To: Byron Smith; 'G=F6tz Hatop' Cc: 'VuFind List' Subject: Re: [VuFind-General] Facebook like and social graph =20 I think that looks like a reasonable solution to your problem. =20 As far as populating the meta tags goes, that=92s another job for the $addHeader variable I mentioned earlier =96 you could add some code like = this to the getCoreMetadata() method of web/RecordDrivers/IndexRecord.php: =20 $addHeader =3D $interface-> get_template_vars('addHeader'); // get = existing value, if any $addHeader .=3D =91getTitle()) . =91=94 />=92; $interface->assign(=91addHeader=92, $addHeader); // store updated value =20 Obviously you may need to do more work to generate some of the other = meta tags =96 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. =20 - Demian =20 From: Byron Smith [mailto:byron@evolveplus.com.au]=20 Sent: Monday, April 23, 2012 10:13 PM To: Demian Katz; 'G=F6tz Hatop' Cc: 'VuFind List' Subject: RE: [VuFind-General] Facebook like and social graph =20 Hi Demian, =20 I have been able to link to the current page by using=20 =20 {$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI} =20
=20 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. =20 Regards, =20 Byron =20 -----Original Message----- From: Demian Katz [mailto:demian.katz@villanova.edu]=20 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 =20 > 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. =20 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 tags. =20 - Demian ------=_NextPart_001_0168_01CD22F3.0D3F4520 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Thanks for that Demian, I have got = the majority of the meta tags inserted using the method you described and it = seems to be working nicely.=A0 I still have three additional OG meta tags that = I would like to add but I am unsure of the function that would be required to = retrieve the appropriate information.=A0 The meta tags I am trying to add = are:

 

<meta property=3D"og:description" content=3D"My description here"/>

<meta = property=3D"og:type" content=3D"Book"/>

<meta = property=3D"og:site_name" content=3D"My Site Name"/>

 

Any idea on how I could pull the = required information for this?=A0 The description and type I would like to = retrieve from what is appearing in the following screenshot snippet and the Site Name I was hoping to pull = from the config.ini.=A0 What are your thoughts?

 

 

Regards,

 

Byron

 

 


From: = Demian Katz [mailto:demian.katz@villanova.edu]
Sent: Tuesday, 24 April = 2012 10:43 PM
To: Byron Smith; 'G=F6tz = Hatop'
Cc: 'VuFind List'
Subject: Re: = [VuFind-General] Facebook like and social graph

 

I think = that looks like a reasonable solution to your problem.

 <= /o:p>

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:

 <= /o:p>

$addHeader = =3D $interface-> get_template= _vars('addHeader'); // get existing value, if any

$addHeader = .=3D ‘<meta name=3D”title” content=3D”’ . htmlspecialchars($this->getTitle()) . ‘” = />’;

$interface-&= gt;assign(‘addHeader’, $addHeader); // store updated value

 <= /o:p>

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.

 <= /o:p>

- = Demian

 <= /o:p>

From: Byron = Smith [mailto:byron@evolveplus.com.au]
Sent: Monday, April 23, = 2012 10:13 PM
To: Demian Katz; 'G=F6tz = 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}{$s= marty.server.REQUEST_URI}

 

<div class=3D"fb-like" data-href=3D"{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}&= quot; data-send=3D"true" data-width=3D"450" = data-show-faces=3D"true" data-action=3D"recommend" = data-font=3D"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:demian.katz@villanova.edu]
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

------=_NextPart_001_0168_01CD22F3.0D3F4520--