-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvideos.php
More file actions
56 lines (52 loc) · 1.64 KB
/
videos.php
File metadata and controls
56 lines (52 loc) · 1.64 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
<?php
/**
* User: Hans-Gert Gräbe
* last update: 2020-11-06
*/
require 'vendor/autoload.php';
require_once 'helper.php';
require_once 'layout.php';
function theVideos($src,$people)
{
setNamespaces();
$graph = new \EasyRdf\Graph('http://opendiscovery.org/rdf/Presentations/');
$graph->parseFile($src);
$graph->parseFile($people);
$out='';
$out.='<h3>Videos</h3><div class="videos">';
$res = $graph->allOfType('od:Youtube-Video');
foreach ($res as $talk) {
$autoren=getAutoren($talk);
$abstract=$talk->get("dcterms:abstract");
$urlVideo=$talk->get("od:urlVideo");
$lang=$talk->get("dcterms:language");
$issued=$talk->get("dcterms:issued");
$comment=$talk->get("rdfs:comment");
$out.='<hr/>
<div itemscope itemtype="http://schema.org/CreativeWork" class="talk">
<h4>
<div class="referent"><p><strong>Author(s):</strong> '. $autoren.'</p></div></h4>';
if ($lang) {
$out.='
<div itemprop="language"><strong>Language:</strong> '.$lang.'</div>';
}
if ($abstract) {
$out.='
<div itemprop="description" class="abstract"><strong>Description:</strong> '
. $abstract .'</div>';
}
if ($comment) {
$out.='
<div itemprop="comment"><strong>Comment:</strong> '.$comment.'</div>';
}
$out.='
<div class="slides"> <p><a href="'.$urlVideo.'">Link to the Video</a></p> </div>';
$out.='
</div> <!-- end class presentation -->';
}
return '<div class="container">'.$out.'</div>';
}
$src="rdf/Videos.rdf";
$people="rdf/People.rdf";
echo showpage(theVideos($src,$people));
?>