first stab at documentation. qf-server-cvar.txt is generated from qf-server

itself (qf-server +cvarlist 1 +quit).
This commit is contained in:
Bill Currie 2001-01-09 19:49:31 +00:00
parent 0081fb8b27
commit c7aedc8017
3 changed files with 91 additions and 0 deletions

56
cvar.php Normal file
View file

@ -0,0 +1,56 @@
<? // Preamble
$pageName = "Page Name";
$focused = "none"; // Dock icon name to gets a border
require("parts/preamble.php"); // Load most of document
?>
<?
have ('cvar');
function printRow ($flags, $name, $description)
{
echo '<TR><TD>' . $flags . '</TD><TD>' . $name . '</TD><TD>' . $description . '</TD></TR>';
}
function printArray ($cvar_list, $program)
{
tableBoxHeader ('black', tableHeadColor);
tableTitle ("cvars available in " . $program, 3, tableHeadColor);
printRow ('flags', 'name', 'description');
while (list (, $cvar) = each ($cvar_list)) {
$flags = str_replace (' ', '&nbsp;', substr ($cvar, 0, 4));
$pos = strpos ($cvar, ':');
$name = trim (substr ($cvar, 5, $pos - 6));
$description = trim (substr ($cvar, $pos + 1));
printRow ($flags, $name, $description);
}
tableBoxFooter ();
}
function printCvarlist ($program)
{
$cvar_list = file ('doc/' . $program . '-cvar.txt');
printArray ($cvar_list, $program);
}
if (strchr ($program, '.') || strchr ($program, '/')) {
echo 'Go away.';
return;
}
tableBoxHeader ('black', tableHeadColor);
tableTitle ("cvar flags", 2, tableHeadColor);
echo '<TR><TD>r</TD><TD>read only. Must be set on command line or in the config file.</TD></TR>';
echo '<TR><TD>*</TD><TD>Archived. Will be saved to config.cfg.</TD></TR>';
echo '<TR><TD>u</TD><TD>Userinfo. Changes will be sent to the server.</TD></TR>';
echo '<TR><TD>s</TD><TD>Serverinfo. Changes will be sent to the clients.</TD></TR>';
tableBoxFooter ();
echo '<P></P>';
printCvarlist ($program);
?>
<?
require("parts/postamble.php"); // Finish this sucker up
?>

34
documentation.php Normal file
View file

@ -0,0 +1,34 @@
<? // Preamble
$pageName = "Page Name";
$focused = "none"; // Dock icon name to gets a border
require("parts/preamble.php"); // Load most of document
?>
<P>cvar documentation</P>
<UL>
<?
$cvar_doc_list = array (
"qf-client-3dfx",
"qf-client-ggi",
"qf-client-glx",
"qf-client-mgl",
"qf-client-sdl",
"qf-client-sgl",
"qf-client-svga",
"qf-client-wgl",
"qf-client-x11",
"qf-server"
);
while (list (, $cdl) = each ($cvar_doc_list)) {
if (is_file ('doc/' . $cdl . '-cvar.txt')) {
echo '<LI>';
echo '<A href="/doc/' . $cdl . '-cvar.txt">' . $cdl . '</A>';
echo '</LI>';
}
}
?>
</UL>
<?
require("parts/postamble.php"); // Finish this sucker up
?>

View file

@ -31,6 +31,7 @@
menuSectionHeader ("Project", 'white', menuHeadColor, menuBgColor);
menuItemLink ("/", "Latest News");
menuItemLink ("/news.php", "Old News");
menuItemLink ("/documentation.php", "Documentation");
menuItemLink ("/screenshots.php", "Screenshots");
menuItemLink ("/files.php", "Downloads");
menuItemLink ("http://sourceforge.net/bugs/?group_id=882", "Bug Reports");