I want to add information to the <head> section of image pages. For example, in my current (non-piwigo) web site, I output information like:
<meta name="geo.position" content="-112.093667; 27.188833"/>
<meta name="geo.region" content="MEX-BCS"/>
<meta name="geo.placename" content="Isla San Marcos, BCS, Mexico"/>
<meta name="keywords" content="BCS, Isla San Marcos, MEX, Mexico"/>
<meta name="description" content="Gypsum Mine, Mexico, BCS, Isla San Marcos, MEX, "/>
This is generated from IPTC fields. I have both Advanced Metadata and Add <head> Element installed, but I have no idea how to use these to generate code like what is displayed above.
Any help/examples would be appreciated. I'm running 2.4.1
-- Geoff
Last edited by geoffschultz (2012-07-15 14:21:25)
Offline
From what I can see, this plugin simply outputs the text within the text box and that you can't imbed any PHP code. Is that correct?
-- Geoff
Last edited by geoffschultz (2012-07-16 13:41:21)
Offline
geoffschultz wrote:
From what I can see, this plugin simply outputs the text within the text box and that you can't imbed any PHP code. Is that correct?
-- Geoff
yes
Offline
for use this plugin paste only
<meta name="geo.position" content="-112.093667; 27.188833"/>
<meta name="geo.region" content="MEX-BCS"/>
<meta name="geo.placename" content="Isla San Marcos, BCS, Mexico"/>
<meta name="keywords" content="BCS, Isla San Marcos, MEX, Mexico"/>
<meta name="description" content="Gypsum Mine, Mexico, BCS, Isla San Marcos, MEX, "/>
in the admin part and it's ok
Offline
I need to generate these <meta> fields using IPTC data. Is there anyway to do this?
-- Geoff
Offline
geoffschultz wrote:
I need to generate these <meta> fields using IPTC data. Is there anyway to do this?
-- Geoff
The IPTC are in database ?
Offline
ddtddt wrote:
geoffschultz wrote:
I need to generate these <meta> fields using IPTC data. Is there anyway to do this?
-- GeoffThe IPTC are in database ?
No, but they're being pulled out by Advanced Metadata.
Offline
geoffschultz wrote:
ddtddt wrote:
geoffschultz wrote:
I need to generate these <meta> fields using IPTC data. Is there anyway to do this?
-- GeoffThe IPTC are in database ?
No, but they're being pulled out by Advanced Metadata.
Advanced Metadata add IPTC in database ? no ?
Offline
I would have thought so, but when I look at the amd_* tables, I don't see any data stored in the database. I'm quite surprised & don't know how it works.
-- Geoff
Offline
geoffschultz wrote:
I would have thought so, but when I look at the amd_* tables, I don't see any data stored in the database. I'm quite surprised & don't know how it works.
-- Geoff
I notifie grum
Offline
AMD provide some function that you can use in a personnal plugin, and it might be possible to do what you want but I have to take a look to see how to do it. I'll try to give an answer this we.
Offline
the geo.position meta tag is automatically added by rv map & earth
for example:
<meta name=geo.position content=41.350367;-72.405239>
Offline
I also generate the following elements:
<meta name="geo.region" content="MEX-BCS"/> <meta name="geo.placename" content="Isla San Marcos, BCS, Mexico"/>
The comes from the
CountryCode: 2#100
ProvinceState: 2#95
CountryName: 2#101
City: 2#90
-- Geoff
Last edited by geoffschultz (2012-07-26 12:23:15)
Offline
Assuming you have AdvancedMetaData installed.
With LocalFileEditor, go on the personnal plugin tab.
Put this:
<?php // call function when metadata are loaded (triggered on the picture page only) add_event_handler('amd_jpegMD_loaded', 'metaDataLoaded'); // add <meta> to header with metadata from picture function metaDataLoaded($jpegMD) { global $template; $null=null; $nfo=$jpegMD->getTag('magic.GPS.LatitudeNum')->getValue().';'.$jpegMD->getTag('magic.GPS.LongitudeNum')->getValue(); $template->block_html_head(null, "<meta name='geo.position' content='$nfo'>", $null, $null); } ?>
Don't forget to activate the personnal plugin.
The example provides you the code to add geolocalisation from magic metadata, there's now no difficulties to add another info.
You'll found the complete list of known identifier in the metadata tab of the plugin (and if any question about the plugin, please open a dedicated topiv)
Offline
grum,
Thanks so very much for the reply. That's exactly what I was looking for!
-- Geoff
Offline