Content-Type: multipart/alternative; boundary="_000_FAA7DF3F09441B4DA93A34DF745961400115F4VUEX14MB1vuadvill_" --_000_FAA7DF3F09441B4DA93A34DF745961400115F4VUEX14MB1vuadvill_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable For type, use $this->getFormats(). That will return an array that you shou= ld iterate through - some records may have multiple formats. For description, use $this->getSummary(). This will also return an array; = I'm not sure whether it's better to just pick the first value of the array = or offer multiple descriptions - in most cases there probably won't be more= than one. For site_name, use $configArray['Site']['title']. - Demian From: Byron Smith [mailto:byron@evolveplus.com.au] Sent: Wednesday, April 25, 2012 12:53 AM To: Demian Katz; 'G=F6tz Hatop' Cc: 'VuFind List' Subject: RE: [VuFind-General] Facebook like and social graph Thanks for that Demian, I have got the majority of the meta tags inserted u= sing the method you described and it seems to be working nicely. I still h= ave 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 informat= ion. The meta tags I am trying to add are: Any idea on how I could pull the required information for this? The descri= ption and type I would like to retrieve from what is appearing in the follo= wing screenshot snippet and the Site Name I was hoping to pull from the con= fig.ini. What are your thoughts? [cid:image001.gif@01CD22C0.D9174AE0] 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. As far as populating the meta tags goes, that's another job for the $addHea= der variable I mentioned earlier - you could add some code like this to the= getCoreMetadata() method of web/RecordDrivers/IndexRecord.php: $addHeader =3D $interface-> get_template_vars('addHeader'); // get existing= value, if any $addHeader .=3D 'getTitle()) . '" />'; $interface->assign('addHeader', $addHeader); // store updated value Obviously you may need to do more work to generate some of the other meta t= ags - but my point is that you need to read addHeader out of the Smarty int= erface (in case other code has already put data there), then update it, the= n write it back. - Demian 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}{$smarty.server.REQUEST_URI}
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 t= he current page? That URL is easy to generate in 1.x, and it would probabl= y be fairly straightforward to augment the record view with extra ta= gs. - Demian --_000_FAA7DF3F09441B4DA93A34DF745961400115F4VUEX14MB1vuadvill_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

For type, use $this->g= etFormats().  That will return an array that you should iterate throug= h – some records may have multiple formats.

 <= /p>

For description, use $thi= s->getSummary().  This will also return an array; I’m not sur= e whether it’s better to just pick the first value of the array or of= fer multiple descriptions – in most cases there probably won’t be = more than one.

 <= /p>

For site_name, use $confi= gArray[‘Site’][‘title’].

 <= /p>

- Demian

 <= /p>

From: Byron Sm= ith [mailto:byron@evolveplus.com.au]
Sent: Wednesday, April 25, 2012 12:53 AM
To: Demian Katz; 'G=F6tz Hatop'
Cc: 'VuFind List'
Subject: RE: [VuFind-General] Facebook like and social graph

 

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:

 

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

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

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

 

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

 

 

Regards,

 

Byron

 

 


From: Demian K= atz [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
<= o:p>

 

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

 <= /p>

As far as populating the = meta tags goes, that’s another job for the $addHeader variable I ment= ioned earlier – you could add some code like this to the getCoreMetad= ata() method of web/RecordDrivers/IndexRecord.php:

 <= /p>

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

$addHeader .=3D ‘&l= t;meta name=3D”title” content=3D”’ . htmlspecialcha= rs($this->getTitle()) . ‘” />’;

$interface->assign(= 216;addHeader’, $addHeader); // store updated value=

 <= /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 writ= e it back.

 <= /p>

- Demian

 <= /p>

From: Byron Sm= ith [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 u= sing

 

{$smarty.server.HTTP_HOST}{$smarty.server.REQU= EST_URI}

 

<div class=3D"fb-like" data-href=3D&= quot;{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" data-send= =3D"true" data-width=3D"450" data-show-faces=3D"tr= ue" data-action=3D"recommend" data-font=3D"tahoma"= ></div>

 

Is this ok to use?  I still need to find a w= ay to populate the OG meta tags in the record view so that the record forma= ts 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 recomm= end, and since we have such

>  since ever for our IR stuff, it was ea= sy. But in general, the

>  url for FB should (in my opinion) be p= ersistent and have good

>  DC metadata tags.

 

Would it make sense, in the absence of a good ext= ernal link, to recommend the current page?  That URL is easy to genera= te in 1.x, and it would probably be fairly straightforward to augment the r= ecord view with extra <meta> tags.

 

- Demian

--_000_FAA7DF3F09441B4DA93A34DF745961400115F4VUEX14MB1vuadvill_--