-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpresentations.php
More file actions
75 lines (71 loc) · 2.38 KB
/
presentations.php
File metadata and controls
75 lines (71 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* User: Hans-Gert Gräbe
* last update: 2020-11-06
*/
require 'vendor/autoload.php';
require_once 'helper.php';
require_once 'layout.php';
function thePresentations($src,$people)
{
setNamespaces();
$graph = new \EasyRdf\Graph('http://opendiscovery.org/rdf/Presentations/');
$graph->parseFile($src);
$graph->parseFile($people);
$out='';
$out.='<h3>Presentations</h3><div class="presentations">';
$res = $graph->allOfType('od:Presentation');
foreach ($res as $talk) {
$autoren=getAutoren($talk);
$titel=showLanguage($talk->all("dcterms:title"),"<br>");
$abstract=showLanguage($talk->all("dcterms:abstract"),"<p>");
$urlSlides=$talk->get("od:urlSlides");
$urlVideo=$talk->get("od:urlVideo");
$size=$talk->get("dcterms:extent");
$lang=$talk->get("dcterms:language");
$license=$talk->get("dcterms:rights");
$issued=$talk->get("dcterms:issued");
$comment=$talk->get("rdfs:comment");
$out.='<hr/>
<div itemscope itemtype="http://schema.org/CreativeWork" class="talk">
<h4>
<div itemprop="title" class="title">'.$titel.'</div></h4>
<div class="referent"><p><strong>Author(s):</strong> '. $autoren.'</p></div>';
if ($size) {
$out.='
<div itemprop="size"><strong>Size:</strong> '.$size.'</div>';
}
if ($lang) {
$out.='
<div itemprop="language"><strong>Language:</strong> '.$lang.'</div>';
}
if ($license) {
$out.='
<div itemprop="license"><strong>Legal Notes:</strong> '.$license.'</div>';
}
if ($abstract) {
$out.='
<div itemprop="description" class="abstract"><p><strong>Description:</strong><br/> '
. $abstract .'</p></div>';
}
if ($urlSlides) {
$out.='
<div class="slides"> <p><a href="'.$urlSlides.'">Link to the Slides</a></p> </div>';
}
if ($urlVideo) {
$out.='
<div class="slides"> <p><a href="'.$urlVideo.'">Link to the Video</a></p> </div>';
}
if ($comment) {
$out.='
<div itemprop="comment"><strong>Comment:</strong> '.$comment.'</div>';
}
$out.='
</div> <!-- end class presentation -->';
}
return '<div class="container">'.$out.'</div>';
}
$src="rdf/Presentations.rdf";
$people="rdf/People.rdf";
echo showpage(thePresentations($src,$people));
?>