From 09c3998dc858783640d7b94517974a50327e1a81 Mon Sep 17 00:00:00 2001 From: david <> Date: Fri, 18 Jan 2002 01:13:18 +0000 Subject: [PATCH] more database interface changes for the Wiki, plus help --- LDP/lampadas/www/COPYING | 1 + LDP/lampadas/www/document_wiki_list.pl | 66 +++++++++++++++++++ LDP/lampadas/www/index.html | 1 + LDP/lampadas/www/wiki.html | 87 ++++++++++++++++++++++++++ LDP/lampadas/www/wrongpermission.html | 33 ++++++++++ 5 files changed, 188 insertions(+) create mode 100755 LDP/lampadas/www/document_wiki_list.pl create mode 100755 LDP/lampadas/www/wiki.html create mode 100755 LDP/lampadas/www/wrongpermission.html diff --git a/LDP/lampadas/www/COPYING b/LDP/lampadas/www/COPYING index 60549be5..a52b16e4 100644 --- a/LDP/lampadas/www/COPYING +++ b/LDP/lampadas/www/COPYING @@ -1,3 +1,4 @@ + GNU GENERAL PUBLIC LICENSE Version 2, June 1991 diff --git a/LDP/lampadas/www/document_wiki_list.pl b/LDP/lampadas/www/document_wiki_list.pl new file mode 100755 index 00000000..0854df55 --- /dev/null +++ b/LDP/lampadas/www/document_wiki_list.pl @@ -0,0 +1,66 @@ +#! /usr/bin/perl + +use CGI qw(:standard); +use Pg; + +$query = new CGI; + +$dbmain = "ldp"; +@row; + +# Read parameters +$doc_id = param('doc_id'); + +print header(-expires=>'now'); + +$conn=Pg::connectdb("dbname=$dbmain"); +die $conn->errorMessage unless PGRES_CONNECTION_OK eq $conn->status; + +$result = $conn->exec("SELECT title, filename FROM document WHERE doc_id = $doc_id"); +die $conn->errorMessage unless PGRES_TUPLES_OK eq $result->resultStatus; +@row = $result->fetchrow; +$title = $row[0]; +$title =~ s/\s+$//; +$filename = $row[1]; + +print "
Index "; +print "Documents "; +print "Topics "; +print "Maintainers "; +print "Editors "; +print "Statistics "; +print "Help "; + +print "
"; +print "Meta-Data\n"; +print " | "; +print "Edit\n"; + +print "
Revision | Saved | Comment | User |
---|---|---|---|
$revision | \n"; + print "$date_entered | \n"; + print "$notes | \n"; + print "$username |
The LDP is currently experimenting with Wiki-style editing for selected documents. +The Wiki functionality allows permitted users to edit documents online, using +a web interface. + +
To edit your document, click the "Edit" link in the upper right of the Meta-data +area on your document's edit page. Only the administrators and the author of a given +document can edit it. + +
You can use a simplified text based format to write your documentation, so you +do not need to use DocBook. It uses a utility called txt2db. The following excerpt +from the README for txt2db explains how to use it: + +
+TEXT FORMAT DOCBOOK OUTPUT + +=Title= <sect1><title>Title</title> + <sect1> + +=Title|id= <sect1 id='id'><title>Title</title> + <sect1> + +(works for other sect levels as well) + +==Title== <sect2><title>Title</title> + </sect2> + +===Title=== <sect3><title>Title</title> + </sect3> + +Foo <para>Foo</para> + +#Foo <orderedlist> +#Bar <listitem><para>Foo</para></listitem> +#Baz <listitem><para>Bar</para></listitem> + <listitem><para>Baz</para></listitem> + </orderedlist> + +*Foo <simplelist> +#Bar <listitem><para>Foo</para></listitem> +#Baz <listitem><para>Bar</para></listitem> + <listitem><para>Baz</para></listitem> + </simplelist> + +[[http://foo.org]] <ulink url='http://foo.org'> + <citetitle>http://foo.org</citetitle> + </ulink> + +[[http://foo.org Foo]] <ulink url='http://foo.org'> + <citetitle>Foo</citetitle> + </ulink> + +[Foo] <filename>Foo</filename> + +'''Foo''' <emphasis>Foo</emphasis> + ++ + + diff --git a/LDP/lampadas/www/wrongpermission.html b/LDP/lampadas/www/wrongpermission.html new file mode 100755 index 00000000..7f61d22d --- /dev/null +++ b/LDP/lampadas/www/wrongpermission.html @@ -0,0 +1,33 @@ + + +<foo></foo> + +Or, you can insert arbitrary DocBook. It cannot be embedded within anything +else, though. In other words, you cannot have DocBook and one of the constructs +above in the same line. + +Any text that starts with "<" is considered docbook, until the +close tag is found. Tags can be nested arbitrarily deep. It won't be wrapped +with <para> tags or anything, so you'll need to do that manually if you +insert DocBook. +
Index +Documents +Topics +Maintainers +Editors +Statistics +Help + +
You have not been granted permission to make the requested change to +the database. If you wish to obtain proper permissions, please write +David Merrill and he will set up +your permissions. + +
Please note that this is intentionally a manual process, so be patient. +You will receive confirmation by email once the permissions are established. + +
Your email must include your username. + +