diff options
author | Naglfar <naglfar@tilde.institute> | 2021-01-11 20:52:06 +0100 |
---|---|---|
committer | Naglfar <naglfar@tilde.institute> | 2021-01-11 20:52:06 +0100 |
commit | 412d6cd0427f54846fe4a809fe1bc20deb7fab98 (patch) | |
tree | 602802b4d742407b218ab01ac5277d952b11ccf8 | |
parent | bf0d6e35c962691a13c1d6f6e40cf24cf1b31f51 (diff) | |
download | MightyWVMS-412d6cd0427f54846fe4a809fe1bc20deb7fab98.tar.gz |
Add canonical url
-rw-r--r-- | divs/footer.php | 2 | ||||
-rw-r--r-- | divs/head.php | 3 | ||||
-rw-r--r-- | divs/sidebar.php | 4 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | php/rd-procedures.php | 6 | ||||
-rw-r--r-- | php/wd-procedures.php | 4 | ||||
-rw-r--r-- | php/ws-procedures.php | 4 | ||||
-rw-r--r-- | theme/mwvms.php | 2 |
8 files changed, 14 insertions, 13 deletions
diff --git a/divs/footer.php b/divs/footer.php index e8bbc20..52becc2 100644 --- a/divs/footer.php +++ b/divs/footer.php @@ -1 +1 @@ -<?php printf("<a href='%s'>%s</a>\n", $wsdata[5], $wsdata[6]) ?> +<?php printf("<a href='%s'>%s</a>\n", $wsdata[7], $wsdata[8]) ?> diff --git a/divs/head.php b/divs/head.php index 6b90913..7fff23c 100644 --- a/divs/head.php +++ b/divs/head.php @@ -1,7 +1,8 @@ <head> <title><?php printf("%s - %s", $vdata[2], $wsdata[0]) ?></title> - <meta name="description" content="<?php echo $wsdata[4] ?>" /> + <meta name="description" content="<?php echo $wsdata[6] ?>" /> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="/theme/body-wrapper.css"/> <link rel="shortcut icon" href="/theme/favicon.ico" type="image/x-icon"> + <link rel="canonical" href="<?php echo $wsdata[1] ?>"> </head> diff --git a/divs/sidebar.php b/divs/sidebar.php index 38fa099..fda8422 100644 --- a/divs/sidebar.php +++ b/divs/sidebar.php @@ -1,9 +1,9 @@ <div id="sidebar-related">Related videos</div> <?php foreach($vindex as $i => $value) - if($value != $vid && $i < $wsdata[2]) + if($value != $vid && $i < $wsdata[3]) { - $rdata = file($dpath.$wsdata[3].'/toc/'.$value, FILE_IGNORE_NEW_LINES); + $rdata = file($dpath.$wsdata[4].'/toc/'.$value, FILE_IGNORE_NEW_LINES); printf("<div class='sidebar-thumb'><img alt='' src='thumbnails/%s.png'/></div>\n", $value); printf("<div class='sidebar-data'>\n"); diff --git a/index.php b/index.php index f4618c2..1912636 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ require 'php/rd-procedures.php'; #video management (Read data) require 'php/wd-procedures.php'; #video management (Write/update data) ?> <!DOCTYPE html> -<html lang="<?php echo $wsdata[3] ?>"> +<html lang="<?php echo $wsdata[4] ?>"> <?php require 'divs/head.php' ?> <body> <div id="body-wrapper"> diff --git a/php/rd-procedures.php b/php/rd-procedures.php index d2bfe11..da53160 100644 --- a/php/rd-procedures.php +++ b/php/rd-procedures.php @@ -1,5 +1,5 @@ <?php -$vindex = file($dpath.$wsdata[3].'/toc.mvms', FILE_IGNORE_NEW_LINES); +$vindex = file($dpath.$wsdata[4].'/toc.mvms', FILE_IGNORE_NEW_LINES); # default video $vid = $vindex[0]; @@ -13,6 +13,6 @@ if(!empty($vdata[1])) if($vdata[1] == $value) $vid = $value; -$vdata = file($dpath.$wsdata[3].'/toc/'.$vid, FILE_IGNORE_NEW_LINES); -$cindex = file($dpath.$wsdata[3].'/'.$channel, FILE_IGNORE_NEW_LINES); +$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 ab344b6..768a44d 100644 --- a/php/wd-procedures.php +++ b/php/wd-procedures.php @@ -1,7 +1,7 @@ <?php $vdata[0]+=1; -file_put_contents($dpath.$wsdata[3].'/toc/'.$vid, implode(PHP_EOL, $vdata)); +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[3].'/'.$cpath.$vid); +$vdata[] = file_get_contents($dpath.$wsdata[4].'/'.$cpath.$vid); ?> diff --git a/php/ws-procedures.php b/php/ws-procedures.php index d1536e7..9a0fce4 100644 --- a/php/ws-procedures.php +++ b/php/ws-procedures.php @@ -4,7 +4,7 @@ $wsdata = file($dpath.'/'.$common, FILE_IGNORE_NEW_LINES); # Language overwritten by the browser preference if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) - $wsdata[3] = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0,2); + $wsdata[4] = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0,2); -$wsdata = array_merge($wsdata, file($dpath.$wsdata[3].'/'.$common, FILE_IGNORE_NEW_LINES)); +$wsdata = array_merge($wsdata, file($dpath.$wsdata[4].'/'.$common, FILE_IGNORE_NEW_LINES)); ?> diff --git a/theme/mwvms.php b/theme/mwvms.php index a61064f..d00c824 100644 --- a/theme/mwvms.php +++ b/theme/mwvms.php @@ -13,7 +13,7 @@ $im = imagecreate(266, 66); $background = imagecolorallocate($im, 0, 0, 0); $text_color = imagecolorallocate($im, 255, 255, 255); // Add the text -imagettftext($im, $fontsize, $angle, $x, $y, $text_color, $wsdata[1], $wsdata[0]); +imagettftext($im, $fontsize, $angle, $x, $y, $text_color, $wsdata[2], $wsdata[0]); // Set the content-type header('Content-Type: image/png'); |