adds archive.org images
This commit is contained in:
parent
2cb3287c85
commit
ded1d57d16
|
@ -12,6 +12,7 @@ class Module extends AbstractModule
|
||||||
const MEDIA_TYPE = [
|
const MEDIA_TYPE = [
|
||||||
'video' => 'Video',
|
'video' => 'Video',
|
||||||
'audio' => 'Audio',
|
'audio' => 'Audio',
|
||||||
|
'image' => 'Image',
|
||||||
];
|
];
|
||||||
|
|
||||||
const RATIOS = [
|
const RATIOS = [
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Archive.org media for Omeka S
|
# Archive.org media for Omeka S
|
||||||
|
|
||||||
[Archive.org media] is a module for [Omeka S] that integrates [Archive.org] media.
|
[Archive.org media] is a module for [Omeka S] that integrates [Archive.org]
|
||||||
|
video and audio media.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Panaorama viewer custom */
|
/* Panaorama viewer custom */
|
||||||
@media screen {
|
@media screen {
|
||||||
.panorama-viewer {
|
.archive_org {
|
||||||
/* width: 600px; */
|
/* width: 600px; */
|
||||||
/* height: 400px; */
|
/* height: 400px; */
|
||||||
}
|
}
|
|
@ -31,7 +31,7 @@ class ArchiveOrgBlockForm extends Form
|
||||||
'name' => 'o:block[__blockIndex__][o:data][width]',
|
'name' => 'o:block[__blockIndex__][o:data][width]',
|
||||||
'type' => Element\Number::class,
|
'type' => Element\Number::class,
|
||||||
'options' => [
|
'options' => [
|
||||||
'label' => 'Video width in pixels',
|
'label' => 'Width in pixels',
|
||||||
],
|
],
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
'min' => '100',
|
'min' => '100',
|
||||||
|
@ -42,7 +42,7 @@ class ArchiveOrgBlockForm extends Form
|
||||||
'name' => 'o:block[__blockIndex__][o:data][ratio]',
|
'name' => 'o:block[__blockIndex__][o:data][ratio]',
|
||||||
'type' => Element\Select::class,
|
'type' => Element\Select::class,
|
||||||
'options' => [
|
'options' => [
|
||||||
'label' => 'Video ratio',
|
'label' => 'Ratio',
|
||||||
'value_options' => Module::RATIOS,
|
'value_options' => Module::RATIOS,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -56,7 +56,8 @@ class ArchiveOrg extends AbstractBlockLayout
|
||||||
|
|
||||||
$html = '';
|
$html = '';
|
||||||
$html .= $view->blockAttachmentsForm($block);
|
$html .= $view->blockAttachmentsForm($block);
|
||||||
$html .= '<a href="#" class="collapse" aria-label="collapse"><h4>' . $view->translate('Options'). '</h4></a>';
|
$html .= '<a href="#" class="collapse" aria-label="collapse"><h4>';
|
||||||
|
$html .= $view->translate('Options'). '</h4></a>';
|
||||||
$html .= '<div class="collapsible" style="padding-top:6px;">';
|
$html .= '<div class="collapsible" style="padding-top:6px;">';
|
||||||
$html .= $view->formCollection($form);
|
$html .= $view->formCollection($form);
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
|
@ -1,22 +1,21 @@
|
||||||
<div class="pannemmul-wrap" style="position:relative;">
|
<div class="archive_org-wrap" style="position:relative;">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($title !== false && $title !== "") {
|
if ($title !== false && $title !== "") {
|
||||||
$title = sprintf('<p id="panorama-viewer-title">%s</p>', $title);
|
$title = sprintf('<p id="achive_org_media-title">%s</p>', $title);
|
||||||
} else {
|
} else {
|
||||||
$title = false;
|
$title = false;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<?php if ($media_type != "audio") { ?>
|
||||||
<style>
|
<style>
|
||||||
#<?= $id ?> {
|
#<?= $id ?> {
|
||||||
height: <?= $height ?>px;
|
height: <?= $height ?>px;
|
||||||
width: <?= $width ?>px;
|
width: <?= $width ?>px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<?php } ?>
|
||||||
<div class="pannellum-wrap">
|
|
||||||
<?php if ($media_type == "video") { ?>
|
|
||||||
|
|
||||||
<iframe
|
<iframe
|
||||||
id="<?= $id ?>"
|
id="<?= $id ?>"
|
||||||
|
@ -24,20 +23,7 @@
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
webkitallowfullscreen="true"
|
webkitallowfullscreen="true"
|
||||||
mozallowfullscreen="true"
|
mozallowfullscreen="true"
|
||||||
allowfullscreen >;
|
allowfullscreen >
|
||||||
</iframe>
|
</iframe>
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
<?php if ($media_type == "audio") { ?>
|
|
||||||
|
|
||||||
<iframe
|
|
||||||
src="<?= $url ?>"
|
|
||||||
frameborder="0"
|
|
||||||
webkitallowfullscreen="true"
|
|
||||||
mozallowfullscreen="true"
|
|
||||||
allowfullscreen >;
|
|
||||||
</iframe>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue