Commit f14587d1 authored by Prasant Prasath's avatar Prasant Prasath
Browse files

Merge branch 'ISTWCMS-2892-fix-event-microformat' into 7.x-2.x

parents 0a1a708f 3bc80568
......@@ -678,17 +678,15 @@ function uw_ct_event_field_default_field_instances() {
'settings' => array(
'address' => array(
'show' => 1,
'text' => '<div class="location vcard">
<div class="adr">
<span class="fn">[node:field_event_location:name:0]</span>
<div class="additional">[node:field_event_location:additional:0]</div>
<div class="address-content">
<div class="steet-address">[node:field_event_location:street:0]</div>
<span class="locality">[node:field_event_location:city:0]</span>, <span class="region">[node:field_event_location:province:0]</span>
<span class="postal-code">[node:field_event_location:postal_code:0]</span>
<div class="country-name">[node:field_event_location:country_name:0]</div>
</div>
</div>
'text' => '<div property="schema:location" typeof="schema:Place">
<span property="schema:name">[node:field_event_location:name:0]</span>
<div property="schema:address" typeof="schema:PostalAddress">
<span property="schema:streetAddress">[node:field_event_location:additional:0]<br>[node:field_event_location:street:0]</span><br>
<span property="schema:addressLocality">[node:field_event_location:city:0]</span>,
<span property="schema:addressRegion">[node:field_event_location:province:0]</span>
<span property="schema:postalCode">[node:field_event_location:postal_code:0]</span><br>
<span property="schema:addressCountry">[node:field_event_location:country_name:0]</span><br>
</div>
</div>',
),
'height' => 300,
......@@ -719,17 +717,17 @@ function uw_ct_event_field_default_field_instances() {
'leaflet_map' => 'OSM Mapnik',
'popup' => array(
'show' => 1,
'text' => '<h4>[node:field_event_location:name:0]</h4>
<div class="location vcard">
<div class="adr">
<div class="additional">[node:field_event_location:additional:0]</div>
<div class="address-content">
<div class="steet-address">[node:field_event_location:street:0]</div>
<span class="locality">[node:field_event_location:city:0]</span>, <span class="region">[node:field_event_location:province:0]</span>
<span class="postal-code">[node:field_event_location:postal_code:0]</span>
<div class="country-name">[node:field_event_location:country_name:0]</div>
</div>
</div>
'text' => '<h4>[node:field_event_location:name:0]</h4>
<div class="location vcard">
<div class="adr">
<div class="additional">[node:field_event_location:additional:0]</div>
<div class="address-content">
<div class="steet-address">[node:field_event_location:street:0]</div>
<span class="locality">[node:field_event_location:city:0]</span>, <span class="region">[node:field_event_location:province:0]</span>
<span class="postal-code">[node:field_event_location:postal_code:0]</span>
<div class="country-name">[node:field_event_location:country_name:0]</div>
</div>
</div>
</div>',
),
),
......
......@@ -47,3 +47,77 @@ function uw_ct_event_node_info() {
drupal_alter('node_info', $items);
return $items;
}
/**
* Implements hook_rdf_default_mappings().
*/
function uw_ct_event_rdf_default_mappings() {
$schemaorg = array();
// Exported RDF mapping: uw_event
$schemaorg['node']['uw_event'] = array(
'rdftype' => array(
0 => 'schema:Event',
1 => 'sioc:Item',
2 => 'foaf:Document',
),
'title' => array(
'predicates' => array(
0 => 'dc:title',
1 => 'schema:name',
),
),
'created' => array(
'predicates' => array(
0 => 'dc:date',
1 => 'dc:created',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'changed' => array(
'predicates' => array(
0 => 'dc:modified',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'body' => array(
'predicates' => array(
0 => 'content:encoded',
1 => 'schema:description',
),
),
'uid' => array(
'predicates' => array(
0 => 'sioc:has_creator',
),
'type' => 'rel',
),
'name' => array(
'predicates' => array(
0 => 'foaf:name',
),
),
'comment_count' => array(
'predicates' => array(
0 => 'sioc:num_replies',
),
'datatype' => 'xsd:integer',
),
'last_activity' => array(
'predicates' => array(
0 => 'sioc:last_activity_date',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'field_event_date' => array(
'predicates' => array(
0 => 'schema:startDate',
),
),
);
return $schemaorg;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment