display naming

This commit is contained in:
MaZderMind 2014-10-01 14:58:31 +02:00
parent bf4c140f54
commit 1e9f8cd6bf
5 changed files with 29 additions and 8 deletions

View file

@ -7,8 +7,8 @@ RewriteCond %{REQUEST_FILENAME} !-l
# / -> index.php - room/streams list
# /room/ -> room.php - list of qualities/formats
RewriteRule ^(saal1|saal2|saalg|saalz)/?$ room.php?room=$1 [L]
# /room/ -> formats.php - list of qualities/formats
RewriteRule ^(saal1|saal2|saalg|saalz)/?$ formats.php?room=$1 [L]
# /room/format/ -> player.php - native av-player for room
RewriteRule ^(saal1|saal2|saalg|saalz)/(hd|hq|lq|audio|slides)/?$ player.php?room=$1&format=$2&language=native [L]

View file

@ -14,5 +14,11 @@ echo $tpl->render(array(
'subtitle' => ucfirst($room),
'room' => $room,
'formats' => array('hd','hq','lq','audio','slides'),
'formats' => array(
'hd' => 'FullHD',
'hq' => 'High Quality',
'lq' => 'Low Quality',
'audio' => 'Audio-Only',
'slides' => 'Slide-Images + Audio',
),
));

View file

@ -10,5 +10,12 @@ echo $tpl->render(array(
'baseurl' => baseurl(),
'title' => 'Rooms',
'rooms' => array('saal1','saal2','saalg','saalz','launge','sendezentrum'),
'rooms' => array(
'saal1' => 'Saal 1',
'saal2' => 'Saal 2',
'saalg' => 'Saal G',
'saalz' => 'Saal Z',
'launge' => 'Launge',
'sendezentrum' => 'Sendezentrum',
),
));

8
template/formats.phtml Normal file
View file

@ -0,0 +1,8 @@
<ul>
<? foreach($formats as $format => $display): ?>
<li class="<?=h($format)?>">
<a href="<?=h(link_player($room, $format))?>"><?=h($display)?></a>
(<a href="<?=h(link_player($room, $format, true))?>">translated</a>)
</li>
<? endforeach ?>
</ul>

View file

@ -1,8 +1,8 @@
<ul>
<? foreach($formats as $format): ?>
<li class="<?=h($format)?>">
<a href="<?=h(link_player($room, $format))?>"><?=h(ucfirst($format))?></a>
(<a href="<?=h(link_player($room, $format, true))?>">translated</a>)
<? foreach($rooms as $room => $display): ?>
<li class="<?=h($room)?>">
<a href="<?=h(link_room($room))?>"><?=h($display)?></a>
(<a href="<?=h(link_room($room, true))?>">translated</a>)
</li>
<? endforeach ?>
</ul>