summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaglfar <naglfar@tilde.institute>2021-01-12 19:47:21 +0100
committerNaglfar <naglfar@tilde.institute>2021-01-12 19:47:21 +0100
commitf33dd412056f3ee762513d40030f134e7b8ccb9b (patch)
tree30909208870de010b19dbe8f4f90fd4b3dff9b70
parent62caca0d8e0307e7a25ddbd0d560b13235ad19bf (diff)
downloadMightyWVMS-f33dd412056f3ee762513d40030f134e7b8ccb9b.tar.gz
Use video for title only on its own page
-rw-r--r--index.php2
-rw-r--r--php/definitions.php1
-rw-r--r--php/rd-procedures.php3
-rw-r--r--php/wd-procedures.php5
4 files changed, 10 insertions, 1 deletions
diff --git a/index.php b/index.php
index cd760d0..0fe6136 100644
--- a/index.php
+++ b/index.php
@@ -8,7 +8,7 @@ require 'php/wd-procedures.php'; #video management (Write/update data)
<!DOCTYPE html>
<html lang="<?php echo $wsdata[4] ?>">
<head>
- <title><?php printf("%s - %s", $vdata[2], $wsdata[0]) ?></title>
+ <title><?php printf("%s - %s", $title, $wsdata[0]) ?></title>
<meta name="description" content="<?php echo $wsdata[6] ?>" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" href="/theme/body-wrapper.css" type="text/css">
diff --git a/php/definitions.php b/php/definitions.php
index f1909ed..ab82199 100644
--- a/php/definitions.php
+++ b/php/definitions.php
@@ -3,4 +3,5 @@ $dpath = 'data/';
$common = 'common.mvms'; # common header/footer contents
$channel = 'channel'; # Channel index
$cpath = 'mvms/'; # Path of the contents
+$title = 0;
?>
diff --git a/php/rd-procedures.php b/php/rd-procedures.php
index 70ba50c..9f4d586 100644
--- a/php/rd-procedures.php
+++ b/php/rd-procedures.php
@@ -10,7 +10,10 @@ $vdata = explode('/', $_SERVER['REQUEST_URI']);
/* 2 security check */
if(!empty($vdata[1]))
if(in_array($vdata[1], $vindex))
+ {
$vid = $vdata[1];
+ $title = 1;
+ }
$vdata = file($dpath.$wsdata[4].'/toc/'.$vid, FILE_IGNORE_NEW_LINES);
$cindex = file($dpath.$wsdata[4].'/'.$channel, FILE_IGNORE_NEW_LINES);
diff --git a/php/wd-procedures.php b/php/wd-procedures.php
index 768a44d..d42de46 100644
--- a/php/wd-procedures.php
+++ b/php/wd-procedures.php
@@ -4,4 +4,9 @@ file_put_contents($dpath.$wsdata[4].'/toc/'.$vid, implode(PHP_EOL, $vdata));
$vdata[1] = date('M j, Y', $vdata[1]);
$vdata[] = file_get_contents($dpath.$wsdata[4].'/'.$cpath.$vid);
+
+if($title)
+ $title = $vdata[2];
+else
+ $title = $wsdata[5];
?>