Mercurial > hg > batmud > maputils
diff www/loc.php @ 2620:164aa519640d
Use 'author' instead of 'creator' or 'coder'.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 16 Feb 2024 23:50:59 +0200 |
parents | 7758acc2fc41 |
children | 06b7c448338b |
line wrap: on
line diff
--- a/www/loc.php Fri Feb 16 23:06:27 2024 +0200 +++ b/www/loc.php Fri Feb 16 23:50:59 2024 +0200 @@ -16,7 +16,7 @@ ]; -function printTitleLink($afilter, $filter, $coders, $desc, $qname, $qclass) +function printTitleLink($afilter, $filter, $authors, $desc, $qname, $qclass) { global $setName; @@ -24,7 +24,7 @@ if ($afilter) $s = "f=".$filter; - if (!$coders) + if (!$authors) { if ($s !== "") $s .= "&"; $s .= "s"; @@ -102,8 +102,8 @@ { if (preg_match("#^([a-z]{1,15})#i", $tmpName, $matches)) { - $coderName = $matches[1]; - $coderName = strtoupper(substr($coderName, 0, 1)).strtolower(substr($coderName, 1)); + $authorName = $matches[1]; + $authorName = strtoupper(substr($authorName, 0, 1)).strtolower(substr($authorName, 1)); $wizTable = apcu_fetch("wizTable"); if (empty($wizTable)) @@ -114,7 +114,7 @@ } else { - $coderName = "???"; + $authorName = "???"; mpError("Invalid wizard name."); } } @@ -156,11 +156,11 @@ if (isset($data["name"])) { $idx = strtolower($data["name"][0]); - if (isset($coderName)) + if (isset($authorName)) { - foreach ($data["coders"] as $coder) + foreach ($data["authors"] as $author) { - if ($coderName == $coder["name"]) + if ($authorName == $author["name"]) $alphaTable[$idx][] = $data; } } @@ -193,7 +193,7 @@ " onload=\"mapOnLoad()\""); echo - "<h1>".$mtitle."BatMUD".(isset($coderName) ? " by ".chentities($coderName) : "")."</h1>\n". + "<h1>".$mtitle."BatMUD".(isset($authorName) ? " by ".chentities($authorName) : "")."</h1>\n". "<form action=\"?\" method=\"get\">\n". "<div class=\"controls\">\n"; @@ -227,24 +227,24 @@ // -// Wizard/coder/creator information box +// Wizard/author/creator information box // -if (isset($coderName)) +if (isset($authorName)) { - if (isset($wizTable[$coderName]) && count($wizTable[$coderName]) > 1) + if (isset($wizTable[$authorName]) && count($wizTable[$authorName]) > 1) { // Profile picture - //$imageURL = $wizImageURL.(qcheck($wizTable[$coderName], "imageURL", $imageName) ? $imageName : "unknown.png"); + //$imageURL = $wizImageURL.(qcheck($wizTable[$authorName], "imageURL", $imageName) ? $imageName : "unknown.png"); $imageURL = $wizImageURL."unknown.png"; echo "<div class=\"wizInfoBox\">\n". - " <div class=\"wizImage\"><img src=\"".$imageURL."\" alt=\"".$coderName."\" /></div>\n". + " <div class=\"wizImage\"><img src=\"".$imageURL."\" alt=\"".$authorName."\" /></div>\n". " <div class=\"wizInfo\">\n". - " <h2>".$coderName."</h2>\n"; + " <h2>".$authorName."</h2>\n"; // Description block - if (qcheck($wizTable[$coderName], "desc", $str)) + if (qcheck($wizTable[$authorName], "desc", $str)) { // Handle special tags $str = preg_replace("/\~([A-Z][a-z]+)\~/i", "<a href=\"?a=\${1}\">\${1}</a>", $str); @@ -256,12 +256,12 @@ } // Links, etc. - echo " [<a href=\"".mpFingerURL($coderName)."\">Finger</a>]\n"; + echo " [<a href=\"".mpFingerURL($authorName)."\">Finger</a>]\n"; - if (qcheck($wizTable[$coderName], "homeURL", $s)) + if (qcheck($wizTable[$authorName], "homeURL", $s)) { if ($s == "bat") - $s = "https://wiz.bat.org/~".strtolower($coderName)."/"; + $s = "https://wiz.bat.org/~".strtolower($authorName)."/"; echo " [<a href=\"".$s."\">Homepage</a>]<br />\n"; } @@ -379,18 +379,18 @@ } // Coder / society names - if (count($iv["coders"]) > 0 && $showCoders) + if (count($iv["authors"]) > 0 && $showCoders) { $fs = []; - foreach ($iv["coders"] as $name) + foreach ($iv["authors"] as $name) { - // Tags/flags of this coder in relation to the area + // Tags/flags of this author in relation to the area switch ($name["flags"]) { - case CREATOR_ORIG: $qs = "title=\"Original creator\" class=\"wizorig\""; break; - case CREATOR_RECODER: $qs = "title=\"Converter, recoder\" class=\"wizrecoder\""; break; - case CREATOR_MAINTAINER: $qs = "title=\"Maintainer\" class=\"wizmaintainer\""; break; - case CREATOR_EXPANDER: $qs = "title=\"Implemented new content, expansion(s)\" class=\"wizexpander\""; break; + case AUTHOR_ORIG: $qs = "title=\"Original creator\" class=\"wizorig\""; break; + case AUTHOR_RECODER: $qs = "title=\"Converter, recoder\" class=\"wizrecoder\""; break; + case AUTHOR_MAINTAINER: $qs = "title=\"Maintainer\" class=\"wizmaintainer\""; break; + case AUTHOR_EXPANDER: $qs = "title=\"Implemented new content, expansion(s)\" class=\"wizexpander\""; break; default: $qs = ""; } @@ -403,7 +403,7 @@ echo "<div class=\"locCoders\">".implode(", ", $fs)."</div>"; } - if (/* isset($coderName) && */ $iv["added"] > 0) + if (/* isset($authorName) && */ $iv["added"] > 0) { echo "<div class=\"locAdded\">".mpLocFormatTime($iv)."</div>"; }