Merge pull request #165 from voc/feature/info

Feature/info
This commit is contained in:
Andreas Hubel 2021-12-22 15:06:26 +01:00 committed by GitHub
commit 987dee2913
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 46 additions and 3 deletions

View file

@ -214,6 +214,14 @@ $CONFIG['TWITTER'] = array(
*/
$CONFIG['EMBED'] = true;
/**
* Globaler Schalter für die Raum Infos
*
* Wird diese Zeile auskommentiert oder auf False gesetzt, werden alle
* Raum Infos deaktiviert.
*/
$CONFIG['INFO'] = true;
/**
* Liste der Räume (= Audio & Video Produktionen, also auch DJ-Sets .)
@ -256,6 +264,7 @@ $CONFIG['ROOMS'] = array(
'DISPLAY' => '#rC3lounge @ mastodon/twitter',
'TEXT' => '#rC3lounge',
),
'INFO' => '',
),
'abchillgleis' => array(
'DISPLAY' => 'Abchillgleis',

View file

@ -31,7 +31,11 @@ class Relive
public function getJsonCache()
{
return sprintf('/tmp/relive-cache-%s.json', $this->getConference()->getSlug());
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
return sprintf('C:\tmp\relive-cache-%s.json', $this->getConference()->getSlug());
} else {
return sprintf('/tmp/relive-cache-%s.json', $this->getConference()->getSlug());
}
}
public function getTalks()

View file

@ -173,7 +173,6 @@ class Room
);
}
public function hasChat() {
return $this->hasTwitter() || $this->hasIrc() || $this->hasWebchat();
}
@ -183,7 +182,14 @@ class Room
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.EMBED') && $this->getConference()->get('EMBED');
}
public function hasInfo() {
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.INFO') && $this->getConference()->get('INFO');
}
public function getInfo() {
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.INFO');
}
public function hasSdVideo() {
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.SD_VIDEO');
}

View file

@ -319,7 +319,11 @@ class Schedule
public function getScheduleCache()
{
return sprintf('/tmp/schedule-cache-%s.xml', $this->getConference()->getSlug());
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
return sprintf('C:\tmp\schedule-cache-%s.xml', $this->getConference()->getSlug());
} else {
return sprintf('/tmp/schedule-cache-%s.xml', $this->getConference()->getSlug());
}
}

View file

@ -0,0 +1,10 @@
<? if($room->hasInfo()): ?>
<div class="col-xs-12">
<h3>Info about <?=h($stream->getDisplay())?></h3>
</div>
<div class="col-sm-12">
<p>
<?=$room->getInfo()?>
</p>
</div>
<? endif ?>

View file

@ -47,6 +47,11 @@
<a href="#embed" role="tab" data-toggle="tab">Embed</a>
</li>
<? endif ?>
<? if($room->hasInfo()): ?>
<li>
<a href="#info" role="tab" data-toggle="tab">Info</a>
</li>
<? endif ?>
</ul>
<div class="functions-wrap tab-content">
@ -74,5 +79,10 @@
<? require("$assemblies/embed-form.phtml") ?>
</div>
<? endif ?>
<? if($room->hasInfo()): ?>
<div role="tabpanel" class="tab-pane" id="info">
<? require("$assemblies/info.phtml") ?>
</div>
<? endif ?>
</div>
</div>