Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Commit of recent work in preperation for Kiriwrite 0.5.0
authorkirinji <kirinji@b7d4c41f-bb2b-0410-be1d-d0fb2b8774c1>
Sun, 16 Aug 2009 22:13:02 +0000 (22:13 +0000)
committerkirinji <kirinji@b7d4c41f-bb2b-0410-be1d-d0fb2b8774c1>
Sun, 16 Aug 2009 22:13:02 +0000 (22:13 +0000)
43 files changed:
CHANGELOG
Documentation/English (British)/developer-chapter1-kiriwritecompileloadhash.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter2-addinputbox.html
Documentation/English (British)/developer-chapter3-guidance.html
Documentation/English (British)/developer-chapter3.html
Documentation/English (British)/developer-chapter4-addpage.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-clearflag.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-clearpages.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-errorflag.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-errormessage.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-finish.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-getoptions.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-guidance.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-initialise.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-languagestrings.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-loadsettings.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-new.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-outputall.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4-outputpage.html [new file with mode: 0644]
Documentation/English (British)/developer-chapter4.html
Documentation/English (British)/developer-chapter5.html
Documentation/English (British)/developer-chapter6.html [new file with mode: 0644]
Documentation/English (British)/developer-introduction.html
Documentation/English (British)/developer.html
Documentation/English (British)/style.css
Documentation/English (British)/user-all.html [deleted file]
Documentation/English (British)/user-chapter1-installerscript.html
Documentation/English (British)/user-chapter1-installingkiriwrite.html
Documentation/English (British)/user-chapter2-compiling.html
Documentation/English (British)/user-chapter3.html
Documentation/English (British)/user-chapter4-modperl.html
INSTALL
TODO
cgi-files/Modules/Database/MySQL5.pm
cgi-files/Modules/Database/SQLite.pm
cgi-files/Modules/Presentation/HTML4S.pm
cgi-files/Modules/System/Common.pm
cgi-files/Modules/System/Compile.pm
cgi-files/Modules/System/Settings.pm
cgi-files/install.cgi
cgi-files/kiriwrite.cgi
cgi-files/lang/en-GB.lang
cgi-files/page.html

index f9e2937..a4beff9 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,17 @@
+Changes since version 0.4.0
+===========================
+- Added Output module system. You can now do whatever you need with the
+  pages once they have been compiled through the Output module system.
+  The original functionality of writing pages to the output directory is
+  in the Normal.pm file in the Modules/System directory.
+- Fixed problem in installer script which wouldn't show a more helpful
+  error message when trying to load CGI::Lite.
+- Fixed problem where pages that are compiled when there is no template 
+  database are not written to the output directory even though a file 
+  with the page filename given is created.
+- Optimise the code using for getting the list of database, presentation
+  and output modules.
+
 Changes since version 0.3.0
 ===========================
 
diff --git a/Documentation/English (British)/developer-chapter1-kiriwritecompileloadhash.html b/Documentation/English (British)/developer-chapter1-kiriwritecompileloadhash.html
new file mode 100644 (file)
index 0000000..1c8e529
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 1.43: kiriwrite_compile_loadhash</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               &nbsp;\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">1.43 kiriwrite_compile_loadhash</span><br><br>\r
+\r
+kiriwrite_compile_loadhash loads the hash that is used for the output module. This is a temporary subroutine which should not reappear in the next release of Kiriwrite.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    kiriwrite_compile_loadhash(hash);\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    kiriwrite_compile_loadhash(%hash);\r
+</div>\r
+\r
+<br>\r
+\r
+hash<br>\r
+Specifies the hash which contains the settings for the output module.<br><br>\r
+               </div>\r
+       </body>\r
+</html>\r
index 3758924..fecd6dc 100644 (file)
@@ -30,7 +30,7 @@ Adds an input box.<br><br>
 <span class="heading">Usage:</span><br><br>\r
 \r
 <div class="code">\r
-    $kiriwrite_presmodule->addinputbox(&quot;inputbox&quot;, { Size => &quot;64&quot;, MaxLength => &quot;128&quot;, Style => &quot;inputbox&quot;, Value => &quot;Default&quot; });\r
+    $kiriwrite_presmodule->addinputbox(&quot;inputbox&quot;, { Size => &quot;64&quot;, MaxLength => &quot;128&quot;, Style => &quot;inputbox&quot;, Value => &quot;Default&quot;, Password => 0 });\r
 </div>\r
 \r
 <br>\r
@@ -62,6 +62,10 @@ Specifies the following options as a hash in any order.<br><br>
         <td class="tabledata">Value</td>\r
         <td class="tabledata">Specifies the value of the input box.</td>\r
     </tr>\r
+    <tr>\r
+        <td class="tabledata">Password</td>\r
+        <td class="tabledata">Specifies if this input box is for a password.</td>\r
+    </tr>\r
 </table>\r
                </div>\r
        </body>\r
index e4e8f24..6461438 100644 (file)
@@ -17,7 +17,7 @@ Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> |
                <div class="pageinformation">\r
                        <span class="pagetitle">3.1 Guidance</span><br><br>\r
 \r
-When creating a new database module to be used in Kiriwrite, the following is required.<br><br>\r
+When creating a new database module to be used in Kiriwrite, the following is required:<br><br>\r
 \r
 When creating a new database module, at the top of the page the following should be inserted:<br><br>\r
 \r
@@ -39,7 +39,7 @@ When creating a new database module, at the top of the page the following should
 \r
 <br>\r
 \r
-Replace (modulename) with the name of the module like MySQL5 (which means MySQL database server version 5.x). When specifying the module name it should be the name of the format (MySQL) and version (5 as in 6.x).<br><br>\r
+Replace (modulename) with the name of the module like MySQL5 (which means MySQL database server version 5.x). When specifying the module name it should be the name of the format (MySQL) and version (5 as in 5.x).<br><br>\r
 \r
 'use strict' and 'use warnings' isn't required but it is generally accepted that Perl scripts and modules should have 'use strict' and 'use warnings' lines written.<br><br>\r
 \r
index 6a38e8f..d33a13e 100644 (file)
@@ -17,7 +17,7 @@ Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> |
                <div class="pageinformation">\r
                        <span class="pagetitle">Chapter 3: Database Module</span><br><br>\r
 \r
-The subroutines listed here in this chapter are used by the database module. The database module allows the data in the database to be easily manipulated. There are two types of database module with one being a server-based module and a file-based module. Both modules do not use all the subroutines but those subroutines which are not used.<br><br>\r
+The subroutines listed here in this chapter are used by the database module. The database module allows the data in the database to be easily manipulated. There are two types of database module with one being a server-based module and a file-based module. Both module types do not use all the of subroutines available.<br><br>\r
 \r
 An example of a file-based database module is the SQLite module and an example of a server-based database module is the MySQL5 module (which is a database module for the MySQL 5.x database servers).<br><br>\r
 \r
diff --git a/Documentation/English (British)/developer-chapter4-addpage.html b/Documentation/English (British)/developer-chapter4-addpage.html
new file mode 100644 (file)
index 0000000..7a7b9f9
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.6: addpage</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.6 addpage</span><br><br>\r
+\r
+Adds a page for outputting later through the outputall subroutine.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->addpage(options);\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->addpage({ Page => &quot;index.html &quot;, Data => &quot;Page Data &quot;, Title => &quot;Page Title &quot;, Section =>  &quot;Page Section &quot;, LastModified => $lastmodified, Database => &quot;database &quot;});\r
+</div>\r
+\r
+<br>\r
+\r
+options<br>\r
+Specifies the options as a hash.<br><br>\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Value</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Page</td>\r
+        <td class="tabledata">Specifies the filename of the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Data</td>\r
+        <td class="tabledata">Specifies the data for the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Title</td>\r
+        <td class="tabledata">Specifies the title of the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Section</td>\r
+        <td class="tabledata">Specifies the section name of the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">LastModified</td>\r
+        <td class="tabledata">Specifies the date of when the page was last modified.</td>\r
+    </tr>\r
+</table>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-clearflag.html b/Documentation/English (British)/developer-chapter4-clearflag.html
new file mode 100644 (file)
index 0000000..0fb2d3a
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.12: clearflag</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.12 clearflag</span><br><br>\r
+\r
+Clears the error message flag and the error message itself.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->clearflag;\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->clearflag;\r
+</div>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-clearpages.html b/Documentation/English (British)/developer-chapter4-clearpages.html
new file mode 100644 (file)
index 0000000..4856fcc
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.9: clearpages</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.9 clearpages</span><br><br>\r
+\r
+Clears all of the pages.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->clearpages();\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->clearpages();\r
+</div>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-errorflag.html b/Documentation/English (British)/developer-chapter4-errorflag.html
new file mode 100644 (file)
index 0000000..706150b
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.10: errorflag</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.10 errorflag</span><br><br>\r
+\r
+Returns an error flag (if any).<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->errorflag;\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->errorflag;\r
+</div>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-errormessage.html b/Documentation/English (British)/developer-chapter4-errormessage.html
new file mode 100644 (file)
index 0000000..1007a66
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.11: errormessage</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.11 errormessage</span><br><br>\r
+\r
+Returns an error message (if any).<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->errormessage;\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->errormessage;\r
+</div>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-finish.html b/Documentation/English (British)/developer-chapter4-finish.html
new file mode 100644 (file)
index 0000000..64c1487
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.14: finish</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.14 finish</span><br><br>\r
+\r
+Close anything that was open (such as handles for database servers or files).<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->finish;\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->finish;\r
+</div>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-getoptions.html b/Documentation/English (British)/developer-chapter4-getoptions.html
new file mode 100644 (file)
index 0000000..d7a2485
--- /dev/null
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.5: getoptions</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.5 getoptions</span><br><br>\r
+\r
+Gets the options that will be used in the compile pages confirmation screen.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->getoptions();\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    %options = $kiriwrite_outputmodule->getoptions();\r
+</div>\r
+\r
+<br>\r
+\r
+In the getoptions subroutine, you build a hash up which is to be returned when the subroutine is finished.<br><br>\r
+\r
+<div class="code">\r
+    $options{seperatedirdatabase}{type} = &quot;checkbox&quot;;<br>\r
+    $options{seperatedirdatabase}{string} = languagestrings(&quot;seperatedirdatabase&quot;);\r
+</div>\r
+\r
+<br>\r
+\r
+After the internal name of the option, you specify the type of option (and the options that go with that type of option):<br><br>\r
+\r
+checkbox<br>\r
+Specifies that a checkbox should be added.<br><br>\r
+\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Value</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">string</td>\r
+        <td class="tabledata">Specifies the description for the option.</td>\r
+    </tr>\r
+</table>\r
+\r
+<br>\r
+\r
+textbox<br>\r
+Specifies that a text box should be added.<br><br>\r
+\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Value</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">string</td>\r
+        <td class="tabledata">Specifies the description for the text box.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">value</td>\r
+        <td class="tabledata">Specifies the default value of the text box.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">size</td>\r
+        <td class="tabledata">Specifies the size of the text box.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">maxlength</td>\r
+        <td class="tabledata">Specifies the maximum size of the value.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">password</td>\r
+        <td class="tabledata">Specifies the text box is a password box.</td>\r
+    </tr>\r
+</table>\r
+\r
+<br>\r
+\r
+combobox<br>\r
+Specifies that a drop down box should be added.<br><br>\r
+\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Value</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">optionnames</td>\r
+        <td class="tabledata">The names for the options in the drop down box with each name separated by a pipe ( | )</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">optionvalues</td>\r
+        <td class="tabledata">The values for the options in the drop down box with each value separated by a pipe. ( | )</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">string</td>\r
+        <td class="tabledata">Specifies the string to provide a description of the drop down box.</td>\r
+    </tr>\r
+</table>\r
+\r
+<br>\r
+\r
+radio<br>\r
+Specifies that a option button should be added.<br><br>\r
+\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Value</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">StartFrom</td>\r
+        <td class="tabledata">Specifies which filter entry to start from.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Limit</td>\r
+        <td class="tabledata">Specifies how many filters should be retrieved.</td>\r
+    </tr>\r
+</table>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-guidance.html b/Documentation/English (British)/developer-chapter4-guidance.html
new file mode 100644 (file)
index 0000000..57c7429
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite - Developer Documentation - 4.1: Guidance</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <a href="index.html">Index</a> | <a href="features.html">Features</a> | <a href="screenshots.html">Screenshots</a> | <a href="download.html">Download</a> | <a href="documentation.html">Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       When creating a new output module to be used in Kiriwrite, the following below is required.<br><br>\r
+When creating a new output module, at the top of the page the following should be inserted at the very minimum using the Normal module as an example:<br><br>\r
+\r
+<div class="code">\r
+package Modules::Output::Normal;<br><br>\r
+use strict;<br>\r
+use warnings;<br>\r
+use Encode qw(decode_utf8);<br>\r
+use Tie::IxHash;<br><br>\r
+our $VERSION = "0.5.0";<br>\r
+my ($pages, %pages);<br>\r
+my $error_flag = 0;<br>\r
+my $error_message = "";<br>\r
+my $language_name = "";<br>\r
+my %optionshash = ();<br><br>\r
+tie(%pages, "Tie::IxHash");\r
+</div>\r
+<br><br>\r
+\r
+If a subroutine is not needed then create the subroutine which is not needed and insert the return command for that subroutine. \r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-initialise.html b/Documentation/English (British)/developer-chapter4-initialise.html
new file mode 100644 (file)
index 0000000..7fc2386
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.3: initialise</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                        <div class="sponsorbox">\r
+                            <div class="message">\r
+                                <b>Kiriwrite is hosted by</b><br>\r
+                                <a href="http://developer.berlios.de" title="BerliOS Developer"> <img src="http://developer.berlios.de/bslogo.php?group_id=8884" width="124px" height="32px" border="0" alt="BerliOS Developer Logo"></a>\r
+                            </div>\r
+                        </div><br>\r
+                       <span class="pagetitle">4.3 initialise</span><br><br>\r
+\r
+Initialise the output module.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->initialise();\r
+</div>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->initialise();\r
+</div>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-languagestrings.html b/Documentation/English (British)/developer-chapter4-languagestrings.html
new file mode 100644 (file)
index 0000000..0cfd8e4
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.13: languagestrings</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.13 languagestrings</span><br><br>\r
+\r
+Returns language strings that are used in this module.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->languagestrings(langstring);\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->languagestrings(&quot;languagestring&quot;);\r
+</div>\r
+\r
+<br>\r
+\r
+langstring<br>\r
+Specifies the name of the language string to use.\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-loadsettings.html b/Documentation/English (British)/developer-chapter4-loadsettings.html
new file mode 100644 (file)
index 0000000..68d4dd4
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.4: loadsettings</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.3 loadsettings</span><br><br>\r
+\r
+Loads the settings for the output module and processes the options from the hash. Input validation of the options received from the hash should be done in this subroutine.<br><br>\r
+\r
+<div class="warningbox">\r
+    <div class="message warning">\r
+<b>Warning</b><br><br>\r
+Any values passed to this subroutine should be input validated before they are used.\r
+    </div>\r
+</div>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->loadsettings(language, options);\r
+</div>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->loadsettings(&quot;en-GB&quot;, %options);\r
+</div>\r
+language<br>\r
+Specifies the language strings to be used.<br><br>\r
+options<br>\r
+Specifies the options for the output module as a hash.\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-new.html b/Documentation/English (British)/developer-chapter4-new.html
new file mode 100644 (file)
index 0000000..551919c
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.2: new</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                        <div class="sponsorbox">\r
+                            <div class="message">\r
+                                <b>Kiriwrite is hosted by</b><br>\r
+                                <a href="http://developer.berlios.de" title="BerliOS Developer"> <img src="http://developer.berlios.de/bslogo.php?group_id=8884" width="124px" height="32px" border="0" alt="BerliOS Developer Logo"></a>\r
+                            </div>\r
+                        </div><br>\r
+                       <span class="pagetitle">4.2 new</span><br><br>\r
+\r
+Create a new instance of the output module.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    Module::Output::Normal->new();\r
+</div>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+$kiriwrite_outputmodule = Module::Output::Normal->new();\r
+</div>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-outputall.html b/Documentation/English (British)/developer-chapter4-outputall.html
new file mode 100644 (file)
index 0000000..1e0452f
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.8: outputall</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.8 outputall</span><br><br>\r
+\r
+Outputs all of the pages.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->outputall(options);\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->outputall();\r
+</div>\r
+\r
+<br>\r
+\r
+options<br>\r
+Specifies the following options as a hash.<br><br>\r
+\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Value</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">FinishedProcessing</td>\r
+        <td class="tabledata">Indicate that this is the last time that outputall is going to be called.</td>\r
+    </tr>\r
+</table>\r
+               </div>\r
+       </body>\r
+</html>\r
diff --git a/Documentation/English (British)/developer-chapter4-outputpage.html b/Documentation/English (British)/developer-chapter4-outputpage.html
new file mode 100644 (file)
index 0000000..e098283
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - 4.7: outputpage</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">4.7 outputpage</span><br><br>\r
+\r
+Outputs a page.<br><br>\r
+\r
+<span class="heading">Parameters:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->outputpage(options);\r
+</div>\r
+\r
+<br>\r
+\r
+<span class="heading">Usage:</span><br><br>\r
+\r
+<div class="code">\r
+    $kiriwrite_outputmodule->outputpage({ Page => &quot;Page Name&quot;, Data => &quot;Lots of Page Data Here&quot;, Title => &quot;Page Title&quot;, });\r
+</div>\r
+\r
+<br>\r
+\r
+options<br>\r
+Specifies the following options as a hash in any order.<br><br>\r
+\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Value</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Page</td>\r
+        <td class="tabledata">Specifies the filename of the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Data</td>\r
+        <td class="tabledata">Specifies the data for the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Title</td>\r
+        <td class="tabledata">Specifies the title of the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Section</td>\r
+        <td class="tabledata">Specifies the section name of the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">LastModified</td>\r
+        <td class="tabledata">Specifies the date of when the page was last modified.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Database</td>\r
+        <td class="tabledata">Specifies the name of the database for the page.</td>\r
+    </tr>\r
+</table>\r
+               </div>\r
+       </body>\r
+</html>\r
index d301113..72eb1ca 100644 (file)
@@ -3,7 +3,7 @@
        <head>\r
                <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
                <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
-               <title>Kiriwrite Documentation - Developer Documentation - Chapter 4: Kiriwrite Page Format</title>\r
+               <title>Kiriwrite Documentation - Developer Documentation - Chapter 4: Output Modules</title>\r
        </head>\r
        <body>\r
                <div class="menubarback">\r
@@ -15,36 +15,13 @@ Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> |
                        </div>\r
                </div>\r
                <div class="pageinformation">\r
-                       <span class="pagetitle">Chapter 4: Kiriwrite Page Format</span><br><br>\r
+                       <span class="pagetitle">Chapter 4: Output Modules</span><br><br>\r
 \r
-The Kiriwrite page format is the page format that is used internally for displaying the generated content from the presentation module.<br><br>\r
+The subroutines listed here in this chapter are used by the output module. The output module allows control over the pages that have been compiled. Most output modules do not tend to use all the subroutines that are available to it.<br><br>\r
 \r
-It is stored in the page.html file and can be changed to show the generated content from the presentation module in a different way. Typically the page format would be formatted as the style the presentation module would output.<br><br>\r
+An example of a output module is the Normal module which duplicates the functionality of outputting the pages to the output directory which couldn't be altered before version 0.5.0 of Kiriwrite.<br><br>\r
 \r
-The content generated from the presentation module and other information (such as page title) can be inserted into the page.html file by using the tags below:<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Tag</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:menu&gt;</td>\r
-        <td class="tabledata">Writes the menu where this tag is specified.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:imagespath&gt;</td>\r
-        <td class="tabledata">Writes the URI path the images directory.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:title&gt;</td>\r
-        <td class="tabledata">Writes the title of the page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagedata&gt;</td>\r
-        <td class="tabledata">Writes the page data generated by the presentation module.</td>\r
-    </tr>\r
-</table>\r
+When the output module is loaded the subroutines for it can be called from the $kiriwrite_outputmodule scalar only when the pages are being compiled.\r
                </div>\r
        </body>\r
 </html>\r
index 32b3d35..8adb92c 100644 (file)
@@ -3,7 +3,7 @@
        <head>\r
                <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
                <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
-               <title>Kiriwrite Documentation - Developer Documentation - Chapter 5: Languages</title>\r
+               <title>Kiriwrite Documentation - Developer Documentation - Chapter 5: Kiriwrite Page Format</title>\r
        </head>\r
        <body>\r
                <div class="menubarback">\r
@@ -15,17 +15,36 @@ Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> |
                        </div>\r
                </div>\r
                <div class="pageinformation">\r
-                       <span class="pagetitle">Chapter 5: Languages</span><br><br>\r
+                       <span class="pagetitle">Chapter 5: Kiriwrite Page Format</span><br><br>\r
 \r
-The language files that are used by Kiriwrite are stored in the 'lang' directory. The language filenames used are typically formatted as ISO 639-1 codes with the “local” dialect appened to it.<br><br>\r
+The Kiriwrite page format is the page format that is used internally for displaying the generated content from the presentation module.<br><br>\r
 \r
-An example of this is English (British), as it is the English language it begins with the ISO 639-1 code of en and is then appended with -GB for the “local” dialect making it en-GB. Typically if it's a language specific for a country the local dialect is in capitals, while variations of the language are typically in small letters.<br><br>\r
+It is stored in the page.html file and can be changed to show the generated content from the presentation module in a different way. Typically the page format would be formatted as the style the presentation module would output.<br><br>\r
 \r
-When translating Kiriwrite to another language, the default language of Kiriwrite is English (British). This is the en-GB.xml file in the 'lang' directory and will always contain the most recent language strings. However, if there are already completed and translated files in other languages, you can base the translation from that language if it is easier that way.<br><br>\r
+The content generated from the presentation module and other information (such as page title) can be inserted into the page.html file by using the tags below:<br><br>\r
 \r
-The settings in the 'about' tag provide information about the language file. 'name' specifies the name of the language, 'creator' specifies who created the language file while 'mailaddress' specifies an e-mail address (if desired).<br><br>\r
-\r
-The remaining tags contain all of the strings that are used within Kiriwrite.\r
+<table class="infotable">\r
+    <tr>\r
+        <td class="tableheading">Tag</td>\r
+        <td class="tableheading">Description</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">&lt;kiriwrite:menu&gt;</td>\r
+        <td class="tabledata">Writes the menu where this tag is specified.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">&lt;kiriwrite:imagespath&gt;</td>\r
+        <td class="tabledata">Writes the URI path the images directory.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">&lt;kiriwrite:title&gt;</td>\r
+        <td class="tabledata">Writes the title of the page.</td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">&lt;kiriwrite:pagedata&gt;</td>\r
+        <td class="tabledata">Writes the page data generated by the presentation module.</td>\r
+    </tr>\r
+</table>\r
                </div>\r
        </body>\r
 </html>\r
diff --git a/Documentation/English (British)/developer-chapter6.html b/Documentation/English (British)/developer-chapter6.html
new file mode 100644 (file)
index 0000000..433b240
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+       <head>\r
+               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
+               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
+               <title>Kiriwrite Documentation - Developer Documentation - Chapter 6: Languages</title>\r
+       </head>\r
+       <body>\r
+               <div class="menubarback">\r
+                       <div class="menubar">\r
+                               <span class="apptitle">Kiriwrite</span>\r
+                               <a href="index.html">Index</a> | <a href="user.html">User \r
+Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> | \r
+<a href="developer.html">Developer Documentation</a>\r
+                       </div>\r
+               </div>\r
+               <div class="pageinformation">\r
+                       <span class="pagetitle">Chapter 6: Languages</span><br><br>\r
+\r
+The language files that are used by Kiriwrite are stored in the 'lang' directory. The language filenames used are typically formatted as ISO 639-1 codes with the “local” dialect appened to it.<br><br>\r
+\r
+An example of this is English (British), as it is the English language it begins with the ISO 639-1 code of en and is then appended with -GB for the “local” dialect making it en-GB. Typically if it's a language specific for a country the local dialect is in capitals, while variations of the language are typically in small letters.<br><br>\r
+\r
+When translating Kiriwrite to another language, the default language of Kiriwrite is English (British). This is the en-GB.xml file in the 'lang' directory and will always contain the most recent language strings. However, if there are already completed and translated files in other languages, you can base the translation from that language if it is easier that way.<br><br>\r
+\r
+The settings in the 'about' tag provide information about the language file. 'name' specifies the name of the language, 'creator' specifies who created the language file while 'mailaddress' specifies an e-mail address (if desired).<br><br>\r
+\r
+The remaining tags contain all of the strings that are used within Kiriwrite.\r
+               </div>\r
+       </body>\r
+</html>\r
index 4eb1a90..510257d 100644 (file)
@@ -20,7 +20,7 @@ This documentation provides information about the following: <br>
 \r
 <ul>\r
 <li>Internal Kiriwrite subroutines</li>\r
-<li>Application programming interfaces (APIs) for the database and presentation modules.</li>\r
+<li>Application programming interfaces (APIs) for the database, presentation and output modules.</li>\r
 <li>The Kiriwrite page format.</li>\r
 <li>The language strings used in Kiriwrite for the language files.</li>\r
 </ul>\r
index 2b20c6a..f1dc783 100644 (file)
@@ -65,6 +65,7 @@ The Developer Documentation contains information on how to create presentation m
 &nbsp;<a href="developer-chapter1-kiriwriteoutputconfig.html">1.40 kiriwrite_output_config</a><br>\r
 &nbsp;<a href="developer-chapter1-kiriwriteoutputpage.html">1.41 kiriwrite_output_page</a><br>\r
 &nbsp;<a href="developer-chapter1-kiriwriteprocessconfig.html">1.42 kiriwrite_processconfig</a><br>\r
+&nbsp;<a href="developer-chapter1-kiriwritecompileloadhash.html">1.43 kiriwrite_compile_loadhash</a><br>\r
 <a href="developer-chapter2.html">Chapter 2: Presentation Module</a><br>\r
 &nbsp;<a href="developer-chapter2-guidance.html">2.1 Guidance</a><br>\r
 &nbsp;<a href="developer-chapter2-new.html">2.2 new</a><br>\r
index d35374c..4a4ca72 100644 (file)
@@ -113,6 +113,8 @@ body {
 
 .code {
        background-image: url('images/messageback.png');
+       background-repeat: repeat-x;
+       background-position: top;
        background-color: #307070;
        border-color: #70D0D0;
        border-style: solid;
diff --git a/Documentation/English (British)/user-all.html b/Documentation/English (British)/user-all.html
deleted file mode 100644 (file)
index fd8083f..0000000
+++ /dev/null
@@ -1,1321 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
-<html>\r
-       <head>\r
-               <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">\r
-               <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">\r
-               <title>Kiriwrite Documentation -  - User Documentation</title>\r
-       </head>\r
-       <body>\r
-               <div class="menubarback">\r
-                       <div class="menubar">\r
-                               <span class="apptitle">Kiriwrite</span>\r
-                               &nbsp;\r
-                       </div>\r
-               </div>\r
-               <div class="pageinformation">\r
-                       <span class="pagetitle">User Documentation</span><br>\r
-\r
-The User Documentation contains information on how to install Kiriwrite, operate Kiriwrite, solutions to common problems that occur while using Kiriwrite and tips on using Kiriwrite.\r
-\r
-<br><br>\r
-\r
-<span class="heading">Contents</span><br>\r
-\r
-<a href="user-preface.html">Preface</a><br>\r
-<a href="user-introduction.html">Introduction</a><br>\r
-<a href="user-chapter1.html">Chapter 1: Installation</a><br>\r
-&nbsp;<a href="user-chapter1-obtainingkiriwrite.html">1.1: Obtaining Kiriwrite</a><br>\r
-&nbsp;<a href="user-chapter1-installingkiriwrite.html">1.2: Installing Kiriwrite</a><br>\r
-&nbsp;<a href="user-chapter1-installerscript.html">1.3: Kiriwrite Installer Script</a><br>\r
-<a href="user-chapter2.html">Chapter 2: Operation</a><br>\r
-&nbsp;<a href="user-chapter2-databases.html">2.1: Databases</a><br>\r
-&nbsp;<a href="user-chapter2-pages.html">2.2: Pages</a><br>\r
-&nbsp;<a href="user-chapter2-filters.html">2.3: Filters</a><br>\r
-&nbsp;<a href="user-chapter2-templates.html">2.4: Templates</a><br>\r
-&nbsp;<a href="user-chapter2-compiling.html">2.5: Compiling</a><br>\r
-<a href="user-chapter3.html">Chapter 3: Kiriwrite Settings</a><br>\r
-<a href="user-chapter4.html">Chapter 4: Usage Tips</a><br>\r
-&nbsp;<a href="user-chapter4-securing.html">4.1: Securing your Kiriwrite installation</a><br>\r
-&nbsp;<a href="user-chapter4-renaming.html">4.2: Renaming the Kiriwrite script (kiriwrite.cgi)</a><br>\r
-&nbsp;<a href="user-chapter4-removing.html">4.3: Removing unneeded modules and language files</a><br>\r
-<a href="user-chapter5.html">Chapter 5: Troubleshooting</a><br>\r
-<a href="user-chapter6.html">Chapter 6: Contributing to Kiriwrite</a>\r
-<hr>\r
-<span class="pagetitle">Preface</span><br><br>\r
-Kiriwrite originally came into existence in 2003 when I was designing a new layout for my personal website (Kirinji's Pad) and found that I had so many pages to edit, I had to find an easier way of editing the website layout as I needed to and apply those changes to all of the pages on the website very quickly.<br><br>\r
-As I was designing my website using an advanced free ware text-editor (at it's time) which allowed me to create a template and create pages as I needed which was great, until I wanted to redesign the website. At that point I had around 50 pages which had to be changed and became somewhat time consuming.<br><br>\r
-That was when I wrote the original Kiriwrite script which was coded pretty much to my own needs and wasn't really well organised and was coded in Perl (although not that brilliantly as strict and warnings weren't used since I was learning Perl at the time) and by the time I finished coding it, I was able to do what I needed to do with Kiriwrite.<br><br>\r
-Around the end of 2005 (and after a two-year spell at St. Austell College which is now Cornwall College St. Austell) I decided to rewrite the Kiriwrite code because the original Kiriwrite did not do any input validation and so little of the code was commented which meant I forgot what everything did and I wanted to add some new features which would become useful in the future.<br><br>\r
-The rewritten Kiriwrite version was pretty much done in October 2006, following a suggestion from a good friend I decided to replace the flat-file based system which I used since the original Kiriwrite with a file-based database system called SQLite. Once that was done pretty much around the end of January 2007, I then separated the database code, presentation code and language strings into separate modules and files which meant that a MySQL 5.x server-based database could be used instead of file-based SQLite. The presentation code used to render internal output from Kiriwrite was separated and placed in the HTML4S (HTML 4.01 Strict) presentation module. The language strings that was hard-coded were separated and placed in the English (British) language file.<br><br>\r
-After some minor tweaks, the rewritten Kiriwrite code was pretty much ready and once the documentation was written Kiriwrite was ready for release. What I would like to see in the future for Kiriwrite is to make it work with mod_perl and add some extra customisable features as some settings are currently hard-coded when they could very well not be hard-coded.<br><br>\r
-I leave you with some advice, if you are going to design a website which uses a white background don't assume everyone will use a white background by default if no colour is specified and actually declare it as white background in the Cascading Style Sheet markup. You'd be amazed at how many commercial websites and some personal websites (that expect you to have) assume you have a white background when really you have a teal coloured background.<hr>\r
-<span class="pagetitle">Introduction</span><br><br>\r
-Kiriwrite is a web-based (browser-based) interface for creating pages for websites, intended for those who know how to create pages by hand and want to accelerate the process of (re)designing a static-only website.<br><br>\r
-The documentation is split into three parts, the user documentation (which is this part), the developer documentation (for writing new modules or language files) and the tutorial documentation (the basics and how to use Kiriwrite).<br><br>\r
-Although Kiriwrite isn't limited for creating pages for websites (as in you can create other types of text-based formats), Kiriwrite is primarily intended for creating pages for websites.<br><br><hr>\r
-<span class="pagetitle">Chapter 1: Installation</span><br><br>\r
-Before Kiriwrite can be used, Kiriwrite needs to be installed properly and this involves obtaining the code from a source package or from a Subversion<sup>1</sup> repository, copying the needed files into the correct place, setting the correct permissions on the files and running the installation script.<br><br>\r
-\r
-<div class="warningbox">\r
-    <div class="message warning">\r
-        <span class="warningtext">\r
-            <b>Warning</b><br>\r
-            Please be aware (for this version), that Kiriwrite <b>is intended to be used on a private web server and not on a public web server unless it is properly secured down</b> because by default anyone can run Kiriwrite and manipulate the data already there. Suggested methods of securing down your Kiriwrite installation are available in Chapter 4: Usage Tips.\r
-        </span>\r
-    </div>\r
-</div>\r
-\r
-<br>\r
-\r
-This chapter is split into two parts with the first part explaining on how to obtain Kiriwrite and the second part explaining on how to install Kiriwrite.<br><br>\r
-\r
-<div class="footnote"></div>\r
-<sup>1</sup> Subversion is a version control system which tracks changes to data stored in the repositories and allows easy updating of source code after the source code is checked out.<hr>\r
-<span class="pagetitle">1.1 Obtaining Kiriwrite</span><br><br>\r
-Kiriwrite can be obtained either through the Subversion repository or extracted from a source archive that is available on Kiriwrite homepage.<br><br>\r
-<span class="heading">1.1.1: Archive Extraction</span><br><br>\r
-The contents of the Kiriwrite archive can be extracted using gzip if it's a Gzip archive, bzip2 if it's a Bzip2'ed archive, 7za if it's a 7-Zip archive and unzip if it's a ZIP archive.<br><br>\r
-Bear in mind the following is done from a command console. GUI interfaces can also do the same as preformed here and mainly involves opening the archive and clicking on the Extract/Extract All button or simply dragging the folder containing from out of the archive (usually making a copy of the contents in the archive).<br><br>\r
-\r
-<div class="messagebox">\r
-    <div class="message note">\r
-        <b>Note</b><br>\r
-        The naming convention of the Kiriwrite archives go as the following:<br><br>\r
-        <div class="code">\r
-            kiriwrite-x.y.z(-e).arc\r
-        </div>\r
-        <br>\r
-        Where x is the major version, y is the minor version and z is the revision with (-e) meaning a very tiny modification that had to be done that did not merit an increment to the revision number.\r
-    </div>\r
-</div>\r
-\r
-<br>\r
-\r
-When downloading an archive, the archive can be checked (by downloading the file with the same name but with .sha256 or .md5 added to the end of it) using shasum<sup>1</sup> or md5sum by doing the following to ensure it is downloaded correctly:<br><br>\r
-\r
-<div class="code">\r
-    shasum -a 256 kiriwrite-x.y.z(-e).arc<br>\r
-    md5sum kiriwrite-x.y.z(-e).arc\r
-</div>\r
-\r
-<br>\r
-\r
-shasum or md5sum should then generate the SHA-256 or MD5 checksum that should match the one that appears in the file with .sha256 or .md5 appended to it. If it does not match (and the file containing the sha256 or md5sum hash is the correct version) then the archive should be downloaded again and repeat the same process.<br><br>\r
-To extract the gzip archive, the following command should be preformed when switched to the correct directory to extract from.<br><br>\r
-\r
-<div class="code">\r
-    gzip -d -c <i>(path)</i>/kiriwrite-0.1.0.tar.gz | tar -xv\r
-</div>\r
-\r
-<br>\r
-\r
-A list of files that have been extracted will then appear with the contents of the archive appearing in the directory that the archive was extracted to.<br><br>\r
-To extract the bzip2 archive, the following command should be preformed when switched to the correct directory to extract from.<br><br>\r
-\r
-<div class="code">\r
-    bzip2 -d -c <i>(path)</i>/kiriwrite-0.1.0.tar.bz2 | tar -xv\r
-</div>\r
-\r
-<br>\r
-\r
-A list of files that have been extracted will then appear with the contents of the archive appearing in the directory that the archive was extracted to.<br><br>\r
-To extract the ZIP archive, the following command should be preformed when switched to the correct directory to extract from.<br><br>\r
-\r
-<div class="code">\r
-    unzip <i>(path)</i>/kiriwrite-0.1.0.zip\r
-</div>\r
-\r
-<br>\r
-\r
-A list of files that have been extracted will then appear with the contents of the archive appearing in the directory that the archive was extracted to.<br><br>\r
-To extract the 7Zip archive, the following command should be preformed when switched to the correct directory to extract from.<br><br>\r
-\r
-<div class="code">\r
-    7za e <i>(path)</i>/kiriwrite-0.1.0.7z\r
-</div>\r
-\r
-<br>\r
-\r
-A list of files that have been extracted will then appear with the contents of the archive appearing in the directory that the archive was extracted to.<br><br>\r
-\r
-<span class="heading">1.1.2: Subversion Access</span><br><br>\r
-Kiriwrite can also be obtained through checking out the code from the Subversion repository.<br><br>\r
-\r
-<div class="messagebox">\r
-    <div class="message note">\r
-        <b>Note</b><br>\r
-        Bear in mind that the code that is in the Kiriwrite Subversion repository is normally unstable and could very well cause unexpected problems (such as warnings that appear in the web server error log that can be easily fixed and alterations to the database structure which requires an upgrade script which hasn't been written yet for that particular version yet).\r
-    </div>\r
-</div>\r
-\r
-<br>\r
-\r
-Kiriwrite can be obtained from the Subversion repository by doing the following in a command console after selecting the correct directory to put it in:<br><br>\r
-\r
-<div class="code">\r
-    svn checkout svn://svn.berlios.de/kiriwrite/trunk\r
-</div>\r
-\r
-<br>\r
-\r
-A list of files then appear as they are received from the Subversion repository and placed in the directory the command console is currently in. To update the code stored locally with code that is in the Kiriwrite Subversion repository this command should be done after changing to the directory where the local copy of the Kiriwrite Subversion code is:<br><br>\r
-\r
-<div class="code">\r
-    svn update\r
-</div>\r
-\r
-<br>\r
-\r
-A list of files will then appear showing which files has been updated.\r
-\r
-<div class="footnote"></div>\r
-<sup>1</sup> The version of shasum talked about here is the shasum script that is used by the Digest::SHA::PurePerl Perl module which can produce checksums in SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 which can be installed via CPAN.<hr>\r
-<span class="pagetitle">1.2.1 Copying files</span><br><br>\r
-Before Kiriwrite can be used, the files need to be copied to the correct place. After extracting the archive, the structure of the extracted archive should be like this:<br><br>\r
-<b>Documentation</b> – Documentation that is available in several languages.<br>\r
-<b>cgi-files</b> – The main Kiriwrite script, associated modules, installer script and language files.<br>\r
-&nbsp;<b>Modules</b> – Modules for Kiriwrite are stored here.<br>\r
-&nbsp;&nbsp;<b>Database</b> – Database modules are stored here.<br>\r
-&nbsp;&nbsp;<b>Presentation</b> – Presentation modules are stored here.<br>\r
-&nbsp;<b>db</b> – Default database directory (for file based Database modules).<br>\r
-&nbsp;<b>lang</b> – The directory for language files in Kiriwrite.<br>\r
-&nbsp;<b>lib</b> - Library files that are used by Kiriwrite.<br>\r
-&nbsp;<b>output</b> – The output directory when pages are compiled.<br>\r
-<b>misc</b> – Miscellaneous files (mainly for developers).<br>\r
-<b>non-cgi-files</b> – Non CGI files that need to be placed outside of the cgi-bin folder.<br><br>\r
-The files in the cgi-files folder should be copied to the cgi-bin<sup>1</sup> folder<sup>2</sup> and the files in the non-cgi-files folder should be copied to a folder which can be accessed from the web server.<br><br>\r
-<span class="heading">1.2.2 Setting Permissions</span><br><br>\r
-The following permissions should be set for the files that have been copied to the cgi-files directory (the following file list should apply to those running *nix/BSD systems):<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Filename</td>\r
-        <td class="tableheading">Owner</td>\r
-        <td class="tableheading">Group</td>\r
-        <td class="tableheading">Others</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><i>(Top Directory)</i></td>\r
-        <td class="tabledata">RWX</td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><b>Modules</b></td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><b>Modules/Database</b></td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Modules/Database/MySQL.pm</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Modules/Database/SQLite.pm</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><b>Modules/Presentation</b></td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Modules/Presentation/HTML4S.pm</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><b>db</b></td>\r
-        <td class="tabledata">RWX</td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><b>output</b></td>\r
-        <td class="tabledata">RWX</td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><b>lang</b></td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata">RX</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">lang/*.lang</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata"><b>lib</b></td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">lib\*.lib</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">kiriwrite.cgi</td>\r
-        <td class="tabledata">RWX</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">install.cgi</td>\r
-        <td class="tabledata">RWX</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">page.html</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata">R</td>\r
-        <td class="tabledata"><i>None</i></td>\r
-    </tr>\r
-</table>\r
-\r
-<br><br>\r
-\r
-R = Read, W = Write, X = Execute/Allow directory listing<br><br>\r
-For the non-cgi files folder, read only permissions should be set on all files (and read and allow directory listings for directories) as no writing should be needed.<br><br>\r
-Once this is done, the installer script can be run by browsing to URI location of where the files in the cgi-files directory were in place and adding install.cgi to the end of it.<br><br>\r
-<div class="footnote"></div>\r
-<sup>1</sup>The cgi-bin folder is used for storing scripts that use the Common Gateway Interface (CGI). CGI scripts are typically associated with Perl scripts but can also be C++, C, Python, shell script and many others.<br>\r
-<sup>2</sup>Some servers are configured so that CGI scripts can run from any directory so in this case Kiriwrite doesn't have to be placed in the cgi-bin directory.<hr>\r
-<span class="pagetitle">1.3 Kiriwrite Installer Script</span><br><br>\r
-After pointing your browser to the installer script, a page appears which guides you through configuring the settings for Kiriwrite.<br><br>\r
-At the top of the page a drop down box is available to change the language of the installer script to another language which is more easier to understand, simply select the language from the drop down box and click on the Switch button, the script will then switch to the selected language.<br><br>\r
-The installer script will preform three tests, the first being to check if all the needed modules are there, the second test is to check if the modules needed for the database modules are there and finally a test to check if the directories have their correct permissions set.<br><br>\r
-Before the settings can be configured, checks are made to make sure that all of the needed modules are installed properly. If any of the needed modules are missing an error message will appear saying that one or more of the required Perl modules is missing and will need to be installed which can be done from the CPAN interface.<br><br>\r
-The installer script then checks to see if at least of the Perl modules for the database modules are installed. If none of the Perl modules needed for the database modules are found then an error message will appear saying that none of the Perl modules needed for the database modules are installed and will need to be installed which can be done from the CPAN interface.<br><br>\r
-Finally, the installer script then checks to see if the directories have the minimum correct permissions set. If one or more of the directories has an error, then a message appears saying to make sure that the correct permissions are set.<br><br>\r
-\r
-<div class="messagebox">\r
-    <div class="message hint">\r
-        <b>Hint</b><br>\r
-        More information on solving problems that occur while installing Kiriwrite can be found in Chapter 5: Troubleshooting.\r
-    </div>\r
-</div>\r
-\r
-<br>\r
-\r
-When the installer finds that everything is fine in regards to Perl modules and file permissions, a form appears allowing to configure the Kiriwrite installation to specific needs. Some default values are given which will work with the file-based database modules.<br><br>\r
-The configuration settings in detail:<br><br>\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Directory</td>\r
-        <td class="tabledata">Specifies the database directory to use for storing databases that are created by the file-based database modules. This option is ignored by the server-based modules.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Output Directory</td>\r
-        <td class="tabledata">Specifies the output directory to use to store the compiled pages.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Images (URI path)</td>\r
-        <td class="tabledata">Specifies the Images (URI path) to use for displaying images when using the page template with Kiriwrite.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Text Area Columns</td>\r
-        <td class="tabledata">Specifies the width of the text area when editing notes, pages and templates.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Text Area Rows</td>\r
-        <td class="tabledata">Specifies the height of the text area when editing notes, pages and templates.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Date Format</td>\r
-        <td class="tabledata">Specifies the date format to use when list the pages from the database. A selection of date formats are available from the drop down box or a custom one can be entered into the text box next to the drop down box.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Language</td>\r
-        <td class="tabledata">Specifies the system language to use in Kiriwrite. If the language used in the installer script is available as language to use in Kiriwrite then that language will be selected by default.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Presentation Module</td>\r
-        <td class="tabledata">Specifies the presentation module to use in Kiriwrite.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Module</td>\r
-        <td class="tabledata">Specifies the database module to use in Kiriwrite. SQLite is a file-based database module which uses the database directory and the SQLite Perl module while MySQL5 is a server-based database module which uses a MySQL 5.x server from the MySQL Perl module.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-The following options are used only by the server-based database modules:<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Server</td>\r
-        <td class="tabledata">Specifies the database server to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Port</td>\r
-        <td class="tabledata">Specifies the database port to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Protocol</td>\r
-        <td class="tabledata">Specifies the database protocol to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Name</td>\r
-        <td class="tabledata">Specifies the database name to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Username</td>\r
-        <td class="tabledata">Specifies the database username to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Password</td>\r
-        <td class="tabledata">Specifies the database password to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Table Prefix</td>\r
-        <td class="tabledata">Specifies the table prefix to use. Multiple Kiriwrite installations can use the same server database so long as the table prefix is different.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-There is an option that is enabled by default to attempt to delete the installation script after the configuration file has been written since the installation script would no longer be needed after that. Unchecking the box for this option disables this.<br><br>\r
-Click on the Save Settings button to write the configuration file or the Reset Settings button to restore the settings to their default values.<br><br>\r
-After clicking on the Save Settings button, some checks are made to make sure that data passed is correct, the configuration file is written (and the installer script deleted if requested) and a message appears saying that Kiriwrite can now be used by clicking on the link at the bottom of the page.\r
-<hr>\r
-<span class="pagetitle">Chapter 2: Operation</span><br><br>\r
-Now that Kiriwrite is installed and working, this chapter is about operating Kiriwrite. This chapter is split into five parts:<br>\r
-\r
-<ul>\r
-<li>Databases, how to add a database, edit a database and delete a database.</li>\r
-<li>Pages, Selecting a database, creating, editing and deleting pages, deleting, moving, copying and editing multiple pages.</li>\r
-<li>Filters, adding a filter, editing a filter and deleting a filter.</li>\r
-<li>Templates, adding a template, editing a template and deleting a template.</li>\r
-<li>Compiling, compiling one, selected or all databases and cleaning the output directory.</li>\r
-</ul><hr>\r
-<span class="pagetitle">2.1 Databases</span><br><br>\r
-Databases are used for storing the pages that are created in Kiriwrite. Before pages can be stored in a database, a database has to be created.<br><br>\r
-The default view when you run the Kiriwrite script is to show the list of databases. If there are no databases available, then a message appears saying that there are no databases than can be used.<br><br>\r
-<span class="heading">2.1.1 Add a database</span><br><br>\r
-To add a database, from the View Databases sub-menu click on the 'Add Database' link, a form then appears allowing to enter the information about the new database.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Settings</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Name</td>\r
-        <td class="tabledata">Specifies the database name of the new Kiriwrite database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Description</td>\r
-        <td class="tabledata">Specifies the description of the new Kiriwrite database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Categories</td>\r
-        <td class="tabledata">Specifies the categories the database should belong to.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Notes</td>\r
-        <td class="tabledata">The notes that gives information about the database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Filename</td>\r
-        <td class="tabledata">Specifies the database filename to use. If nothing is entered for the filename than an attempt to automatically generate a filename will be done.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-To add the database with the settings given, click on the 'Add Database' button and a confirmation message should then appear saying that the database has been added and offering a link back to the list of databases. To clear the settings, click on the 'Clear values' button.<br><br>\r
-\r
-<span class="heading">2.2 Edit a database</span><br><br>\r
-To edit a database, click on the 'Edit' link opposite the name and description of the database you want to edit. A form then appears similar to the form for adding a database.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Settings</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Name</td>\r
-        <td class="tabledata">Specifies the new database name of the Kiriwrite database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Description</td>\r
-        <td class="tabledata">Specifies the new description of the Kiriwrite database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Categories</td>\r
-        <td class="tabledata">Specifies the new categories the database should belong to.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Notes</td>\r
-        <td class="tabledata">The notes that gives information about the database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Filename</td>\r
-        <td class="tabledata">Specifies the database filename to use.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-To edit a database with the new settings given click on the 'Edit Database' button and a confirmation message should appear saying that the database has been edited and offering a link back to the database list. Clicking on the 'Restore current settings' button will undo any changes and revert to the currently used settings.<br><br>\r
-\r
-<span class="heading">2.3 Delete a database</span><br><br>\r
-To delete a database, click on the 'Delete' link opposite. A message then appears asking if the selected database should be deleted. Clicking on the 'Yes, delete the database' button will delete the database and display a confirmation message saying that the selected database has been deleted offering a link to return to the database list. Clicking on 'No, return to the database list.' link will make it return to the database list.<br><br>\r
-\r
-<div class="warningbox">\r
-    <div class="message warning">\r
-        <span class="warningtext">\r
-            <b>Warning</b><br>\r
-            When a database is deleted, the pages in the database are deleted as well.\r
-        </span>\r
-    </div>\r
-</div><hr>\r
-<span class="pagetitle">2.2 Pages</span><br><br>\r
-\r
-Pages are used for storing information that is relevant to that page.<br><br>\r
-\r
-Pages can be access from the 'View Pages' menu link. As no database is selected, a drop down box will appear listing the databases that are available, select a database and then click on the View button. A list of pages for that database will then appear and if there are no pages in the database a message will appear saying that no pages exist in this database.<br><br>\r
-\r
-To view the next (or previous list) of pages, click on the relevant link at the top of the page and to view a specific list of pages, select the list page number in the drop down menu box at the top of the page and click on the Show button.<br><br>\r
-\r
-<span class="heading">2.2.1: Creating a page</span><br><br>\r
-A page can be created in the selected database by clicking on the 'Add Page' link in the View Pages sub-menu, a form then appears allowing to enter the information about the new page.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database</td>\r
-        <td class="tabledata">Specifies the database that the page is being added to.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Name</td>\r
-        <td class="tabledata">Specifies the name of the new page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Description</td>\r
-        <td class="tabledata">Specifies the description of the new page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Section</td>\r
-        <td class="tabledata">Specifies the section name of the new page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Template</td>\r
-        <td class="tabledata">Specifies the page template to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Filename</td>\r
-        <td class="tabledata">Specifies the page filename to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Content</td>\r
-        <td class="tabledata">Specifies the content of the page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Settings</td>\r
-        <td class="tabledata">Specifies if the page name and section should be used for the title.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-The following Kiriwrite tags can be used with the page content to automatically place information such as page name, description and section:<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Tag</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagetitle&gt;</td>\r
-        <td class="tabledata">Places the page title here. The format of the page title can be changed using the Page Settings value.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagename&gt;</td>\r
-        <td class="tabledata">Places the page name here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagedescription&gt;</td>\r
-        <td class="tabledata">Places the page description here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagesection&gt;</td>\r
-        <td class="tabledata">Places the page section here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autosection&gt;</td>\r
-        <td class="tabledata">Places the automatic page section here.<br><br>\r
-            <div class="messagebox">\r
-                <div class="message note">\r
-                    <b>Note</b><br>\r
-                    If there is a page section then the page section will appear bracketed. If Information was the page section then the automatic page section name would be '(Information)' and if the page section name is blank then no brackets will appear and will be blank.\r
-                </div>\r
-            </div>      \r
-        </td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autotitle&gt;</td>\r
-        <td class="tabledata">Places the automatic page title here. This combines the section name and page name with brackets around them and a dash separating them with '(Section Name – Page Name)' being the example. The format can be changed by changing the Page Settings value.</td>\r
-    </tr>\r
-\r
-</table>\r
-\r
-<br>\r
-\r
-After entering the needed page information, the page can be added to the selected database by clicking on the 'Add Page' button and then a confirmation message would appear saying that the selected page has been added and offering a link to return to the page list for the selected database. The new page settings can be cleared by clicking on the 'Reset Settings' button.<br><br>\r
-\r
-<span class="heading">2.2.2: Editing a page</span><br><br>\r
-\r
-To edit a page, click on the 'Edit' link opposite the page filename you want to edit. A form then appears that is similar for adding a page.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database</td>\r
-        <td class="tabledata">Specifies the database that the page is being edited from.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Name</td>\r
-        <td class="tabledata">Specifies the new name of the page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Description</td>\r
-        <td class="tabledata">Specifies the new description of the page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Section</td>\r
-        <td class="tabledata">Specifies the new section name of the page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Template</td>\r
-        <td class="tabledata">Specifies the new page template to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Filename</td>\r
-        <td class="tabledata">Specifies the new page filename.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Content</td>\r
-        <td class="tabledata">Specifies the new content of the page.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Settings</td>\r
-        <td class="tabledata">Specifies if there should be a new page name and section setting.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-The following Kiriwrite tags are used for when adding a page can also be used when editing a page:<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Tag</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagetitle&gt;</td>\r
-        <td class="tabledata">Places the page title here. The format of the page title can be changed using the Page Settings value.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagename&gt;</td>\r
-        <td class="tabledata">Places the page name here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagedescription&gt;</td>\r
-        <td class="tabledata">Places the page description here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagesection&gt;</td>\r
-        <td class="tabledata">Places the page section here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autosection&gt;</td>\r
-        <td class="tabledata">Places the automatic page section here.<br><br>\r
-            <div class="messagebox">\r
-                <div class="message note">\r
-                    <b>Note</b><br>\r
-                        If there is a page section then the page section will appear bracketed. If Information was the page section then the automatic page section name would be '(Information)' and if the page section name is blank then no brackets will appear and will be blank.\r
-                </div>\r
-            </div>\r
-\r
-        </td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autotitle&gt;</td>\r
-        <td class="tabledata">Places the automatic page title here. This combines the section name and page name with brackets around them and a dash separating them with '(Section Name – Page Name)' being the example. The format can be changed by changing the Page Settings value.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-After entering the new information, the page can be edited by clicking on the 'Edit Page' button and a confirmation message appears saying that the page has been edited and offering a link back to the list of pages for the currently selected database. Clicking on the 'Restore current settings' button will undo any changes and revert to the current page settings.<br><br>\r
-\r
-<span class="heading">2.2.3: Deleting a page</span><br><br>\r
-\r
-To delete a page, click on the 'Delete' link opposite the page filename you want to delete, a message then appears asking to confirm that page will be deleted. Clicking on the 'Yes, delete the page' button will delete the page and offer a link back to the list of pages for the selected database. Clicking on the 'No, return to the page list for the (database name) database.' link will return to the list of pages for the selected database.<br><br>\r
-\r
-<span class="heading">2.2.4: Delete multiple pages</span><br><br>\r
-\r
-To delete multiple pages from the selected database click on the check-box that is to the left of the page filenames you want to delete and then click on the 'Delete Selected' button at the top of the page, a form will then appear asking to confirm if the selected pages listed should be deleted.<br><br>\r
-\r
-Clicking on the 'Yes, delete the selected pages' button will display a confirmation message saying that the selected pages were deleted offering a link back to the list of pages for the selected database. Clicking on the 'No, return to the page list for the (database name) database.' will return to the list of pages for the selected database.<br><br>\r
-\r
-<span class="heading">2.2.5: Move multiple pages</span><br><br>\r
-\r
-To move multiple pages from the selected database click on the check-box that is to the left of the page filenames you want to delete and then click on the 'Move Selected' button at the top of the page, a form will then appear asking to select which database the selected pages should go to and confirm that those pages are being moved to the new database.<br><br>\r
-\r
-Clicking on the 'Move selected pages' button will display a confirmation message saying that the selected pages were moved to the new database selected offering a link back to the selected database that the pages were moved from and a link to the selected database where the pages have moved to. Clicking on the 'Return to the page list for the (database name) database' will return to the list of pages in the selected database.<br><br>\r
-\r
-<span class="heading">2.2.6: Copy multiple pages</span><br><br>\r
-\r
-To copy multiple pages from the selected database click on the check-box that is to the left of the page filenames you want to copy and then click on the 'Copy Selected' button at the top of the page, a form will then appear asking to select which database the selected pages should be copied to and confirm that those pages are being copied to the new database.<br><br>\r
-\r
-Clicking on the 'Copy selected pages' button will display a confirmation message saying that the selected pages were copied to the new database selected offering a link back to the selected pages that the pages were copied from and a link to the selected database where the pages have been copied to. Clicking on the 'Return to the page list for the (database name) database.' will return to the list of pages in the selected database.<br><br>\r
-\r
-<span class="heading">2.2.7: Edit multiple pages</span><br><br>\r
-\r
-To edit multiple pages from the selected database click on the check-box that is to the left of the page filenames you want to edit and then click on the 'Edit Selected' button at the top of the page, a form will then appear that allows certain settings of each page to be edited as shown in the table below:<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Section</td>\r
-        <td class="tabledata">Specifies the new page section to be used on the selected pages.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Template</td>\r
-        <td class="tabledata">Specifies the new page template to be used on the selected pages.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Page Settings</td>\r
-        <td class="tabledata">Specifies the new page settings to be used on the selected pages.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-Each setting that needs to be changed needs to have the check-box on the left of the name needs to be checked otherwise the change will not take effect. This is done to make sure that only the selected page settings are changed.<br><br>\r
-Clicking on the 'Edit selected pages' button will display a confirmation message saying that the selected pages were edited offering a link back to the list of pages in the selected database, clicking on the 'Clear values' button will clear the currently selected values and clicking on the 'Return to the page list for the '(database name)' database.' link will return to the page list for selected database.<hr>\r
-<span class="pagetitle">2.3 Filters</span><br><br>\r
-\r
-Filters allows text to be easily replaced by looking for certain words, tag or phrase and then replacing it with another set of words, tag or phrase.<br><br>\r
-\r
-The list of filters can be viewed by clicking on the 'View Filters' link. If the filter database doesn't exist than a message will appear saying that the filter database doesn't exist and will be created when a filter is added or if the filter database does exist but there are no filters then a message appears saying that there is no filters in the filter database.<br><br>\r
-\r
-When compiling the pages, the order of the filters list is determined by the filter priority number with the lower numbers being processed first and the filters with the higher filter priority numbers being processed last.<br><br>\r
-\r
-To view the next (or previous list) of filters, click on the relevant link at the top of the page and to view a specific list of filters, select the list page number in the drop down menu box at the top of the page and click on the Show button.<br><br>\r
-\r
-<span class="heading">2.3.1 Add a filter</span><br><br>\r
-\r
-To add a filter click on the 'Add Filter' link on the View Filters sub-menu, a form then appears allowing to enter the information about the new filter.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Find...</td>\r
-        <td class="tabledata">Specifies the find setting to search text for.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Replace With...</td>\r
-        <td class="tabledata">Specifies the replace setting to replace the text with if the search text is found.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Priority</td>\r
-        <td class="tabledata">Specifies the priority of the filter.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Notes</td>\r
-        <td class="tabledata">Specifies the notes for this filter.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-After entering the needed filter information, the filter can be added by clicking on the 'Add Filter' button which displays a confirmation message saying that the filter has been added to the filter database and offering a link back to the list of filters in the filter database. Clicking on the 'Clear values' button will clear any of the filter settings that have been entered and clicking on the 'Return to the filter list.' link will return to the list of filters in the filter database.<br><br>\r
-\r
-<span class="heading">2.3.2 Edit a filter</span><br><br>\r
-To edit a filter click on the 'Edit' link opposite the filter you want to edit. A form then appears that is similar to adding a filter.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Find...</td>\r
-        <td class="tabledata">Specifies the new find setting to search text for.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Replace With...</td>\r
-        <td class="tabledata">Specifies the new replace setting to replace the text with if the search text is found.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Priority</td>\r
-        <td class="tabledata">Specifies the new priority of the filter.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Notes</td>\r
-        <td class="tabledata">Specifies the new notes for this filter.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-To update the information about the filter, click on the 'Edit Filter' button and a confirmation message should appear saying that the selected filter was edited offering a link back to the list of filters in the filter database. Clicking on the 'Restore current settings' will undo any changes made and will revert the currently used filter settings and clicking on the 'Return to the filter list.' link will return to the list of filters in the filter database.<br><br>\r
-\r
-<span class="heading">2.3.3 Delete a filter</span><br><br>\r
-\r
-To delete a filter click on the 'Delete' link opposite the filter you want to delete. A form then  appears asking to confirm the deletion of the selected filter. Clicking on the 'Yes, delete the selected filter' button will display a confirmation message saying that the selected filter was deleted. Clicking on the 'No, return to the filter list.' link will return to the list of filters in the filter database.<hr>\r
-<span class="pagetitle">2.4 Templates</span><br><br>\r
-\r
-Templates allows pages to use a common layout which is used to keep a consistent layout on a website or keep the format of documentation pages the same. Templates also allow small tweaks to the page layout to be made without needing to edit each page so the change is reflected in all of the pages by simply changing the template layout and then recompile the pages.<br><br>\r
-\r
-The list of templates can be accessed by clicking on the 'View Templates' link. A list of templates from the template database should then appear. If the template database does not exist then a message will appear saying that the template database does not exist and will be created when a template is added. If no templates exist in the template database then a message appears saying that there are no templates in the template database.<br><br>\r
-\r
-To view the next (or previous list) of templates, click on the relevant link at the top of the page and to view a specific list of templates, select the list page number in the drop down menu box at the top of the page and click on the Show button.<br><br>\r
-\r
-<span class="heading">2.4.1 Add a template</span><br><br>\r
-\r
-To add a template to the template database click on the 'Add Template' link from the View Templates sub-menu, a form then appears allowing to enter the new information about the template.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Name</td>\r
-        <td class="tabledata">Specifies the template name to be used.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Description</td>\r
-        <td class="tabledata">Specifies the template description to be used.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Filename</td>\r
-        <td class="tabledata">Specifies the template filename to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Layout</td>\r
-        <td class="tabledata">Specifies the content of the template layout.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-The following Kiriwrite tags can be used with the template layout to automatically place information such as page content, name, description and section:\r
-\r
-<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Tag</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagecontent&gt;</td>\r
-        <td class="tabledata">Places the page content here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagetitle&gt;</td>\r
-        <td class="tabledata">Places the page title here. The format of the page title can be changed using the Page Settings value.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagename&gt;</td>\r
-        <td class="tabledata">Places the page name here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagedescription&gt;</td>\r
-        <td class="tabledata">Places the page description here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagesection&gt;</td>\r
-        <td class="tabledata">Places the page section here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autosection&gt;</td>\r
-        <td class="tabledata">Places the automatic page section here.<br><br>\r
-            <div class="messagebox">\r
-                <div class="message note">\r
-                    <b>Note</b><br>\r
-                    If there is a page section then the page section will appear bracketed. If Information was the page section then the automatic page section name would be '(Information)' and if the page section name is blank then no brackets will appear and will be blank.\r
-                </div>\r
-            </div> \r
-        </td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autotitle&gt;</td>\r
-        <td class="tabledata">Places the automatic page title here. This combines the section name and page name with brackets around them and a dash separating them with '(Section Name – Page Name)' being the example. The format can be changed by changing the Page Settings value.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-After entering the needed template information, click on the 'Add Template' button to display a confirmation message saying that add the template to the list of templates in the template database and offering a link back to the list of templates in the template database. Clicking on the 'Clear values' button will clear all of the template settings entered. Clicking on the 'Return to the template list.' link will return to the list of templates in the template database.<br><br>\r
-\r
-<span class="heading">2.4.2 Edit a template</span><br><br>\r
-To edit a template click on the 'Edit' link opposite the template name you want to edit, a form then appears that is similar to adding a template.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Name</td>\r
-        <td class="tabledata">Specifies the new template name to be used.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Description</td>\r
-        <td class="tabledata">Specifies the new template description to be used.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Filename</td>\r
-        <td class="tabledata">Specifies the new template filename to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Template Layout</td>\r
-        <td class="tabledata">Specifies the new content of the template layout.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-The Kiriwrite tags used when adding a template can also be used when editing a template.\r
-\r
-<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Tag</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagecontent&gt;</td>\r
-        <td class="tabledata">Places the page content here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagetitle&gt;</td>\r
-        <td class="tabledata">Places the page title here. The format of the page title can be changed using the Page Settings value.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagename&gt;</td>\r
-        <td class="tabledata">Places the page name here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagedescription&gt;</td>\r
-        <td class="tabledata">Places the page description here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:pagesection&gt;</td>\r
-        <td class="tabledata">Places the page section here.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autosection&gt;</td>\r
-        <td class="tabledata">Places the automatic page section here.<br><br>\r
-            <div class="messagebox">\r
-                <div class="message note">\r
-                    <b>Note</b><br>\r
-                    If there is a page section then the page section will appear bracketed. If Information was the page section then the automatic page section name would be '(Information)' and if the page section name is blank then no brackets will appear and will be blank.\r
-                </div>\r
-            </div> \r
-        </td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">&lt;kiriwrite:autotitle&gt;</td>\r
-        <td class="tabledata">Places the automatic page title here. This combines the section name and page name with brackets around them and a dash separating them with '(Section Name – Page Name)' being the example. The format can be changed by changing the Page Settings value.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-After editing the information about the template, the template can be edited by clicking on the 'Edit Template' button which will display a confirmation message saying that the template information was edited offering a link back to the list of templates in the template database. Clicking on the 'Restore current settings' button will undo any changes and revert to the currently used settings. Clicking on the 'Return to the template list.' will return to the list of templates in the template database.<br><br>\r
-\r
-<span class="heading">2.4.3 Delete a template</span><br><br>\r
-\r
-To delete a template click on the 'Delete' link opposite the template name you want to delete, a message then appears asking to confirm the deletion of the selected template. Clicking on the 'Yes, delete the template' button will display a confirmation message saying that the selected template has been deleted offering a link back to the list of templates in the template database. Clicking on the 'No, return to the template list.' link will return to the list of templates in the template database.<hr>\r
-<span class="pagetitle">2.5 Compiling</span><br><br>\r
-\r
-Compiling combines the page data with the template layout and the filters that are in the filter database to create pages as if they were created manually.<br><br>\r
-\r
-To compile the pages from their databases, click on the 'Compile Pages' menu link. A list of databases will then appear which can be compiled. If no databases are available then a message will appear saying that no databases are available.<br><br>\r
-\r
-<span class="heading">2.5.1 Compiling a database</span><br><br>\r
-\r
-To compile a database, click on the 'Compile' link opposite the database name you want to compile, a message then appears asking if the database should really be compiled. Clicking on the 'Compile Database' button will display a log of pages that have been compiled and any error messages that might appear with the link to return to the list of databases to compile at the end of the log. <br><br>\r
-\r
-When compiling a database, the template being used on the pages in the database selected can be overridden. To override the templates being used, click on the 'Override the template being used' box and select the template to override with.<br><br>\r
-\r
-Clicking on the 'Return to the compile database list.' will return to the list of databases to compile.<br><br>\r
-\r
-<span class="heading">2.5.2 Compiling multiple databases</span><br><br>\r
-\r
-To compile multiple databases click on the check-box to the left of the database name for each database that should have its pages compiled and click on the 'Compile Selected' button which will display a message asking to confirm if the selected databases shown should be compiled. Clicking on the 'Compile Selected Databases' button will display a log of pages that have been compiled and any error messages that might appear with the link to return to the list of databases to compile at the end of the log. <br><br>\r
-\r
-When compiling a database, the templates being used on the pages in the databases selected can be overridden. To override the templates being used, click on the 'Override the template being used' box and select the template to override with.<br><br>\r
-\r
-Clicking on the 'Return to the compile database list.' will return to the list of databases to compile.<br><br>\r
-\r
-<span class="heading">2.5.3 Compiling all databases</span><br><br>\r
-\r
-To compile all of the available databases click on the 'Compile All' link in the Compile Pages sub-menu which will display a message asking to confirm if all of the databases should have its pages compiled. Clicking on the 'Compile All Databases' button will display a log of pages that have been compiled and any error messages that might appear with the link to return to the list of databases to compile at the end of the log.<br><br>\r
-\r
-When compiling a database, the templates being used on the pages in all of the databases can be overridden. To override the templates being used, click on the 'Override the template being used' box and select the template to override with.<br><br>\r
-\r
-Clicking on the 'Return to the compile database list.' link will return to the list of databases to compile.<br><br>\r
-\r
-<span class="heading">2.5.4 Cleaning the output directory</span><br><br>\r
-\r
-Cleaning the output directory removes all of the contents that is in the output directory. To clean the output directory click on the 'Clean Output Directory' link which will display a message asking to confirm that the output directory should be cleaned. Clicking on the 'Yes, clean output directory' will display a confirmation message saying that the output directory was cleaned. Clicking on the 'Return to the compile database list.' link will return to the list of databases to compile.<hr>\r
-<span class="pagetitle">Chapter 3: Kiriwrite Settings</span><br><br>\r
-\r
-The settings that are used in Kiriwrite can be viewed by clicking on the 'View Settings' link in the menu which will display a list of settings that are currently in use.<br><br>\r
-\r
-<span class="heading">3.1 Editing the settings</span><br><br>\r
-\r
-To edit the settings, click on the 'Edit Settings' link in the View Settings sub-menu, a form then appears allowing the settings in Kiriwrite to be edited.<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Directory</td>\r
-        <td class="tabledata">Specifies the database directory to use for storing databases that are created by the file-based database modules. This option is ignored by the server-based modules.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Output Directory</td>\r
-        <td class="tabledata">Specifies the output directory to use to store the compiled pages.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Images (URI path)</td>\r
-        <td class="tabledata">Specifies the Images (URI path) to use for displaying images when using the page template with Kiriwrite.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Text Area Columns</td>\r
-        <td class="tabledata">Specifies the width of the text area when editing notes, pages and templates.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Text Area Rows</td>\r
-        <td class="tabledata">Specifies the height of the text area when editing notes, pages and templates.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Date Format</td>\r
-        <td class="tabledata">Specifies the date format to use when list the pages from the database. A selection of date formats are available from the drop down box or a custom one can be entered into the text box next to the drop down box.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Language</td>\r
-        <td class="tabledata">Specifies the system language to use in Kiriwrite. If the language used in the installer script is available as language to use in Kiriwrite then that language will be selected by default.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Presentation Module</td>\r
-        <td class="tabledata">Specifies the presentation module to use in Kiriwrite.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Module</td>\r
-        <td class="tabledata">Specifies the database module to use in Kiriwrite. SQLite is a file-based database module which uses the database directory and the SQLite Perl module while MySQL5 is a server-based database module which uses a MySQL 5.x server from the MySQL Perl module.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-The following options are used only by the server-based database modules:<br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Setting</td>\r
-        <td class="tableheading">Description</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Server</td>\r
-        <td class="tabledata">Specifies the database server to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Port</td>\r
-        <td class="tabledata">Specifies the database port to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Protocol</td>\r
-        <td class="tabledata">Specifies the database protocol to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Name</td>\r
-        <td class="tabledata">Specifies the database name to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Username</td>\r
-        <td class="tabledata">Specifies the database username to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Password</td>\r
-        <td class="tabledata">Specifies the database password to use.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">Database Table Prefix</td>\r
-        <td class="tabledata">Specifies the table prefix to use. Multiple Kiriwrite installations can use the same server database so long as the table prefix is different.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-To save the new settings, click on the 'Change Settings' button which will display a confirmation message saying that the settings were changed and will take effect on the next page load of Kiriwrite offering a link back to the updated list of settings. Clicking on the 'Restore current settings' button will undo any changes made and will restore the current settings. Clicking on the 'Return to the list of settings.' link will return to the list of currently used settings.<hr>\r
-<span class="pagetitle">Chapter 4: Usage Tips</span><br><br>\r
-This chapter mainly contains usage tips in securing your Kiriwrite installation and small features which may be useful for some users.<br><br>\r
-\r
-<div class="specific apache132x">\r
-   In this chapter, directory specific settings used in Apache is .htaccess. Typically, if the web server software is configured to check a file other than .htaccess then a different filename would be used (and would be blocked from being accessed from the web server).\r
-</div>\r
-<hr>\r
-<span class="pagetitle">4.1 Securing your Kiriwrite installation</span><br><br>\r
-\r
-This section is about securing your Kiriwrite installation.<br><br>\r
-\r
-<span class="heading">4.1.1 HTTP Authentication</span><br><br>\r
-\r
-HTTP Authentication allows users who only know the correct username and password to access pages that are not available to the public. HTTP Authentication is done by the following if you're using Apache 1.3.x/2.x from a command console:<br><br>\r
-\r
-<div class="code">\r
-    htpasswd -c .htpasswd username\r
-</div>\r
-\r
-<br>\r
-\r
-The -c switch specifies that a password file should be created called .htpasswd (although can be called something else), while username is the username of the login (which can be something else other than username), after pressing enter a password prompt then appears asking for a password to be entered the same twice.<br><br>\r
-\r
-After the .htpasswd file is created, the file should be copied to a location that cannot be accessed from a URI resource (such as outside the htdocs/web documents directory) and then create a .htaccess file (if it doesn't exist) pointing to the password file with the following directives as an example.<br><br>\r
-\r
-<div class="code">\r
-    AuthUserFile /home/www/website/private/.htpasswd<br>\r
-    AuthType Digest<br>\r
-    AuthName “Private Area”\r
-</div>\r
-\r
-<br>\r
-\r
-The AuthUserFile directive should point to the htpasswd file that was created earlier on. The AuthType directive specifies the authentication type to use and AuthName specifies the name of the area to appear when entering the username and password.<br><br>\r
-\r
-<span class="heading">4.1.2 IP Address Filtering</span><br><br>\r
-\r
-IP Address filtering allows certain IP addresses or hosts to be blocked from access and allowing everyone else access or blocking everyone from access and allowing certain IP addresses or hosts in. Typically when using Kiriwrite, the best method would be the white list method where everyone is blocked from access and only certain IP addresses or hosts can be allowed access.<br><br>\r
-\r
-To setup a white list, open the .htaccess file and insert the following (if it already exists) if you're using Apache 1.3/2.x:<br><br>\r
-\r
-<div class="code">\r
-    Order Deny, Allow<br>\r
-    Deny from all<br>\r
-    Allow from 127.0.0.1\r
-</div>\r
-\r
-<br>\r
-\r
-This example denies everyone and then only allows 127.0.0.1 (which is the computer the web server is running from which tends to be the machine you're using on a personal installation). Multiple Allow commands can be entered which allows multiple hosts.<br><br>\r
-\r
-More information on using Allow and Deny can be found in the Apache 1.3/2.x Documentation.<hr>\r
-<span class="pagetitle">4.2 Renaming the main Kiriwrite script (kiriwrite.cgi)</span><br><br>\r
-\r
-While the Kiriwrite script can be used as kiriwrite.cgi, the script has been designed so that it can work if it's renamed to something else such as docmake.cgi, private.cgi or even flyingrhinos.cgi. This can simply be done by renaming the script to whatever name is needed.<br><br>\r
-\r
-<div class="warningbox">\r
-    <div class="message warning">\r
-        <span class="warningtext">\r
-            <b>Warning</b><br>\r
-            Bear in mind that no matter what the script filename is called, it will always look for configuration file as kiriwrite.xml, the modules in the Modules directory and the language files in the lang directory.\r
-        </span>\r
-    </div>\r
-</div>\r
-<hr>\r
-<span class="pagetitle">4.3 Removing unneeded modules and language files</span><br><br>\r
-\r
-As Kiriwrite uses a modular system for manipulating the databases, outputting the pages internally by Kiriwrite and language files for each language used, space can be recovered by removing unneeded modules from the Modules directory and language files from the lang directory.<br><br>\r
-\r
-To make sure that the currently used database module, presentation module and language file are not deleted from their directories. Check which ones should be kept by clicking on the 'View Settings' menu link.<hr>\r
-<span class="pagetitle">Chapter 5: Troubleshooting</span><br><br>\r
-<span class="heading">5.1 Common Problems</span><br><br>\r
-\r
-<table class="infotable">\r
-    <tr>\r
-        <td class="tableheading">Problem</td>\r
-        <td class="tableheading">Symptom</td>\r
-        <td class="tableheading">Solution</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When installing, some of the needed Perl modules have the word 'Error' next to them.</td>\r
-        <td class="tabledata">The needed Perl modules are more than likely not installed.</td>\r
-        <td class="tabledata">Install the needed Perl modules from the CPAN archive using the CPAN command interface.<sup>1</sup></td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When installing, an error message appears saying that none of the needed Perl modules for the database modules are installed.</td>\r
-        <td class="tabledata">The needed Perl module(s) (or the Perl module needed specifically for that certain database module) are more than likely not installed.</td>\r
-        <td class="tabledata">Install the needed Perl modules from the CPAN archive using the CPAN command interface.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When installing, an error message appears saying that some of the directories and files have invalid permissions set.</td>\r
-        <td class="tabledata">The directories and/or files have invalid permissions set.</td>\r
-        <td class="tabledata">Change the permissions on the directories and/or files so that are the correct permissions needed.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When installing, no database or presentation modules appear in the list of available database or presentation modules.</td>\r
-        <td class="tabledata">The modules weren't copied or were copied to the wrong directories.</td>\r
-        <td class="tabledata">Copy or move the database modules to the correct directory.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When installing, no languages appears in the languages selection list.</td>\r
-        <td class="tabledata">The language files weren't copied or were copied to the wrong location.</td>\r
-        <td class="tabledata">Copy or move the language files to the correct directory.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the configuration file does not exist.</td>\r
-        <td class="tabledata">The configuration file has been deleted or the installation script wasn't run.</td>\r
-        <td class="tabledata">Run the installer script (again).</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the configuration file has invalid permissions set.</td>\r
-        <td class="tabledata">The configuration file has invalid permissions set.</td>\r
-        <td class="tabledata">Change the permissions on the configuration file so that it can be read.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the database module does not exist.</td>\r
-        <td class="tabledata">The database module has been deleted or renamed.</td>\r
-        <td class="tabledata">Run the installer script (again).<br>\r
-            Check if the Modules and Modules/Database directory have the correct permissions set so that they can be read.\r
-        </td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the database module has invalid permissions set.</td>\r
-        <td class="tabledata">The database module has invalid permissions set.</td>\r
-        <td class="tabledata">Change the permissions on the database module so that they can be read (execute permissions not usually needed).</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the presentation module does not exist.</td>\r
-        <td class="tabledata">The presentation module has been deleted or renamed.</td>\r
-        <td class="tabledata">Run the installer script (again).<br>\r
-            Check if the Modules and Modules/Presentation directory have the correct permissions set so that they can be read.\r
-        </td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the presentation module has invalid permissions set.</td>\r
-        <td class="tabledata">The presentation module has invalid permissions set.</td>\r
-        <td class="tabledata">Change the permissions on the presentation module so that they can be read (execute permissions not usually needed).</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the language file does not exist.</td>\r
-        <td class="tabledata">The language file does not exist.</td>\r
-        <td class="tabledata">Run the installer script (again).<br>\r
-            Check if the lang directory has the correct permissions set so that they can be read.\r
-        </td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When starting Kiriwrite, a critical error message appears saying that the language file has invalid permissions set.</td>\r
-        <td class="tabledata">The language file has invalid permissions set.</td>\r
-        <td class="tabledata">Change the permissions on the language file so that they can be read.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When viewing the list of databases, an error message appears saying that the permissions of the database directory is invalid.</td>\r
-        <td class="tabledata">The database directory has incorrect permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read and write) on the database directory.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When viewing the template database, an error message appears saying the permissions of the template database is invalid.</td>\r
-        <td class="tabledata">The template database has invalid permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read and write) on the template database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When viewing the filter database, an error message appears saying that the permissions of the filter database is invalid.</td>\r
-        <td class="tabledata">The filter database has invalid permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read and write) on the filter database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When compiling the pages, an error message appears saying that the output directory has invalid permissions set.</td>\r
-        <td class="tabledata">The output directory has invalid permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read and write) on the output directory.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When compiling the pages, certain pages do not change when the pages are edited.</td>\r
-        <td class="tabledata">The pages have invalid permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read and write) on those pages which have invalid permissions set.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When compiling the pages, the template database has invalid permissions set.</td>\r
-        <td class="tabledata">The template database has invalid permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read) on the template database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When compiling the pages, the filter database has invalid permissions set.</td>\r
-        <td class="tabledata">The filter database has invalid permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read) on the template database.</td>\r
-    </tr>\r
-    <tr>\r
-        <td class="tabledata">When saving the new settings, an error message appears saying that the configuration file has invalid permissions set.</td>\r
-        <td class="tabledata">The configuration file has invalid permissions set.</td>\r
-        <td class="tabledata">Set the correct permissions (read and write) on the configuration file and then change the permissions back to read-only after saving the new settings.</td>\r
-    </tr>\r
-</table>\r
-\r
-<br>\r
-\r
-<div class="footnote"></div>\r
-\r
-<sup>1</sup>The CPAN (Comprehensive Perl Archive Network) command interface is normally included with Perl installations and will normally require superuser (root) permissions.<hr>\r
-<span class="pagetitle">Chapter 6: Contributing to Kiriwrite</span><br><br>\r
-\r
-<span class="heading">6.1: Contributing</span><br><br>\r
-\r
-You can contribute to Kiriwrite in many different ways like the following examples:\r
-<ul>\r
-    <li>Translate Kiriwrite (program or documentation) so that it can be used your own local language.</li>\r
-    <li>Add functionality to Kiriwrite.</li>\r
-    <li>Write a presentation or database module.</li>\r
-    <li>Report a bug or fault (either with Kiriwrite itself or the documentation).</li>\r
-    <ul><li>\r
-        When reporting a bug, you should give the version number of Kiriwrite, what operating system you are using, what web server you are using and the version of it, the version of Perl you are using (and if possible the version of the Perl module that is causing the bug), what the error message of the bug is and how to recreate the bug (if possible).\r
-    <li></ul>\r
-</ul>\r
-\r
-For more information on how to contribute to Kiriwrite visit http://xestia.co.uk/kiriwrite or visit the BerliOS project site at http://developer.berlios.de/projects/kiriwrite . A list of stuff that needs doing can be found in the TODO file in the Kiriwrite package (remember to check the latest Kiriwrite package's TODO file for the latest on what needs doing).\r
-               </div>\r
-       </body>\r
-</html>\r
index 3b1736b..4b8eda5 100644 (file)
@@ -75,6 +75,10 @@ The configuration settings in detail:<br><br>
         <td class="tabledata">Database Module</td>\r
         <td class="tabledata">Specifies the database module to use in Kiriwrite. SQLite is a file-based database module which uses the database directory and the SQLite Perl module while MySQL5 is a server-based database module which uses a MySQL 5.x server from the MySQL Perl module.</td>\r
     </tr>\r
+    <tr>\r
+        <td class="tabledata">Output Module</td>\r
+        <td class="tabledata">Specifies the output module to use in Kiriwrite. Normal is the only one available and replicates the hard coded functionality that was in Kiriwrite before version 0.5.0.</td>\r
+    </tr>\r
 </table>\r
 \r
 <br>\r
index 22a4b65..c900d5b 100644 (file)
@@ -22,6 +22,7 @@ Before Kiriwrite can be used, the files need to be copied to the correct place.
 &nbsp;<b>Modules</b> – Modules for Kiriwrite are stored here.<br>\r
 &nbsp;&nbsp;<b>Database</b> – Database modules are stored here.<br>\r
 &nbsp;&nbsp;<b>Presentation</b> – Presentation modules are stored here.<br>\r
+&nbsp;&nbsp;<b>Output</b> – Output modules are stored here.<br>\r
 &nbsp;<b>db</b> – Default database directory (for file based Database modules).<br>\r
 &nbsp;<b>lang</b> – The directory for language files in Kiriwrite.<br>\r
 &nbsp;<b>lib</b> - Library files that are used by Kiriwrite.<br>\r
@@ -81,6 +82,18 @@ The following permissions should be set for the files that have been copied to t
         <td class="tabledata">R</td>\r
         <td class="tabledata"><i>None</i></td>\r
     </tr>\r
+    <tr>\r
+        <td class="tabledata"><b>Modules/Output</b></td>\r
+        <td class="tabledata">RX</td>\r
+        <td class="tabledata">RX</td>\r
+        <td class="tabledata"><i>None</i></td>\r
+    </tr>\r
+    <tr>\r
+        <td class="tabledata">Modules/Output/Normal.pm</td>\r
+        <td class="tabledata">R</td>\r
+        <td class="tabledata">R</td>\r
+        <td class="tabledata"><i>None</i></td>\r
+    </tr>\r
     <tr>\r
         <td class="tabledata"><b>db</b></td>\r
         <td class="tabledata">RWX</td>\r
index ca09dbb..94856a7 100644 (file)
@@ -25,6 +25,8 @@ To compile the pages from their databases, click on the 'Compile Pages' menu lin
 \r
 To compile a database, click on the 'Compile' link opposite the database name you want to compile, a message then appears asking if the database should really be compiled. Clicking on the 'Compile Database' button will display a log of pages that have been compiled and any error messages that might appear with the link to return to the list of databases to compile at the end of the log. <br><br>\r
 \r
+The output module selected is the default output module selected in the settings menu. To change the output module, select the output module from the drop down box and then click on the Select button that is next to it. The page will then refresh showing specific options for that output module.<br><br>\r
+\r
 When compiling a database, the template being used on the pages in the database selected can be overridden. To override the templates being used, click on the 'Override the template being used' box and select the template to override with.<br><br>\r
 \r
 Clicking on the 'Return to the compile database list.' will return to the list of databases to compile.<br><br>\r
@@ -33,6 +35,8 @@ Clicking on the 'Return to the compile database list.' will return to the list o
 \r
 To compile multiple databases click on the check-box to the left of the database name for each database that should have its pages compiled and click on the 'Compile Selected' button which will display a message asking to confirm if the selected databases shown should be compiled. Clicking on the 'Compile Selected Databases' button will display a log of pages that have been compiled and any error messages that might appear with the link to return to the list of databases to compile at the end of the log. <br><br>\r
 \r
+The output module selected is the default output module selected in the settings menu. To change the output module, select the output module from the drop down box and then click on the Select button that is next to it. The page will then refresh showing specific options for that output module.<br><br>\r
+\r
 When compiling a database, the templates being used on the pages in the databases selected can be overridden. To override the templates being used, click on the 'Override the template being used' box and select the template to override with.<br><br>\r
 \r
 Clicking on the 'Return to the compile database list.' will return to the list of databases to compile.<br><br>\r
@@ -41,6 +45,8 @@ Clicking on the 'Return to the compile database list.' will return to the list o
 \r
 To compile all of the available databases click on the 'Compile All' link in the Compile Pages sub-menu which will display a message asking to confirm if all of the databases should have its pages compiled. Clicking on the 'Compile All Databases' button will display a log of pages that have been compiled and any error messages that might appear with the link to return to the list of databases to compile at the end of the log.<br><br>\r
 \r
+The output module selected is the default output module selected in the settings menu. To change the output module, select the output module from the drop down box and then click on the Select button that is next to it. The page will then refresh showing specific options for that output module.<br><br>\r
+\r
 When compiling a database, the templates being used on the pages in all of the databases can be overridden. To override the templates being used, click on the 'Override the template being used' box and select the template to override with.<br><br>\r
 \r
 Clicking on the 'Return to the compile database list.' link will return to the list of databases to compile.<br><br>\r
index 3866336..3477364 100644 (file)
@@ -76,6 +76,10 @@ To edit the settings, click on the 'Edit Settings' link in the View Settings sub
         <td class="tabledata">Database Module</td>\r
         <td class="tabledata">Specifies the database module to use in Kiriwrite. SQLite is a file-based database module which uses the database directory and the SQLite Perl module while MySQL5 is a server-based database module which uses a MySQL 5.x server from the MySQL Perl module.</td>\r
     </tr>\r
+    <tr>\r
+        <td class="tabledata">Output Module</td>\r
+        <td class="tabledata">Specifies the output module to use in Kiriwrite. Normal is the functionality that was hard-coded into Kiriwrite before version 0.5.0.</td>\r
+    </tr>\r
 </table>\r
 \r
 <br>\r
index 3f555f9..e137130 100644 (file)
@@ -20,7 +20,7 @@ Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> |
 Kiriwrite under mod_perl 2.x can be made a little bit faster by pre-loading modules when the Apache Web Server starts up. After installing Kiriwrite and making sure that it runs properly, insert the following line into your httpd.conf file/VirtualHost section:<br><br>\r
 \r
 <div class="code">\r
-PerlModule CGI::Lite DBI DBD::SQLite Tie::IxHash Encode\r
+PerlModule CGI::Lite DBI DBD::SQLite Tie::IxHash Encode Hash::Search\r
 </div>\r
 <br>\r
 \r
diff --git a/INSTALL b/INSTALL
index 7edbf9c..623db42 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -2,4 +2,7 @@ For information on installing Kiriwrite, see Chapter 1: Installation in
 the User Documentation in the Documentation directory. 
 
 mod_perl 2.x users please pay attention to the specific information for 
-installing Kiriwrite under mod_perl 2.x in this Chapter.
\ No newline at end of file
+installing Kiriwrite under mod_perl 2.x in this Chapter.
+
+Mac OS X users should also read the section specific for Mac OS X users
+in this Chapter as well.
\ No newline at end of file
diff --git a/TODO b/TODO
index 605ece4..c2fafe2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,16 +6,18 @@ Changes for future releases
 
 - Allow different encoding formats to be used when compiling instead of 
   UTF-8 which will probably be implemented within the output modules.
+- Code optimisation where the if statements are condensed into one line so
+  that less space is used among other improvements.
 
-Changes for 0.5.0
-=================
+Changes implemented in 0.5.0
+============================
 
-- Implement Output Module system.
+- Implemented Output Module system.
 
 Changes implemented in 0.3.0
 ============================
 
-- Add the ability to switch off and on a filter.
+- Added the ability to switch off and on a filter.
 - Removed CGI.pm from the installer script.
 - Added ability to change the amount of pages, templates and filters that
   can be viewed.
index 74a69a4..5c1e5d9 100644 (file)
@@ -35,7 +35,7 @@ use DBI qw(:sql_types);
 
 # Set the following values.
 
-our $VERSION   = "0.1.0";
+our $VERSION   = "0.5.0";
 my ($options, %options);
 my $database_handle;
 my $statement_handle;
@@ -1683,6 +1683,7 @@ sub getpageinfo{
                                "PageContent"           => $pagedata,
                                "PageSettings"          => $pagesettings,
                                "PageLastModified"      => $class->dateconvert($pagelastmodified),
+                               # ADD PageLastModifiedInternal
                        );
 
                        $page_found = 1;
index 0a88d27..6fc34b4 100644 (file)
@@ -35,7 +35,7 @@ use DBI qw(:sql_types);
 
 # Set the following values.
 
-our $VERSION   = "0.2.0";
+our $VERSION   = "0.5.0";
 my ($options, %options);
 my $database_handle;
 my $statement_handle;
@@ -1313,14 +1313,14 @@ sub getpageinfo{
                        # Put the values into the page hash.
        
                        %database_page = (
-                               "PageFilename"          => $pagefilename,
-                               "PageName"              => $pagename,
-                               "PageDescription"       => $pagedescription,
-                               "PageSection"           => $pagesection,
-                               "PageTemplate"          => $pagetemplate,
-                               "PageContent"           => $pagedata,
-                               "PageSettings"          => $pagesettings,
-                               "PageLastModified"      => $class->dateconvert($pagelastmodified),
+                               "PageFilename"                  => $pagefilename,
+                               "PageName"                      => $pagename,
+                               "PageDescription"               => $pagedescription,
+                               "PageSection"                   => $pagesection,
+                               "PageTemplate"                  => $pagetemplate,
+                               "PageContent"                   => $pagedata,
+                               "PageSettings"                  => $pagesettings,
+                               "PageLastModified"              => $class->dateconvert($pagelastmodified)
                        );
        
                        $page_found = 1;
index 44801ee..99fb0ea 100644 (file)
@@ -30,7 +30,7 @@ use warnings;
 
 # Set the following values.
 
-our $VERSION = "0.1.0";
+our $VERSION = "0.5.0";
 my $pagedata = "";
 my $tablevel = 0;
 
@@ -1035,6 +1035,7 @@ sub addinputbox{
 # MaxLength    Specifies the maximum length of the input text box.             #
 # Style                Specifies the CSS style to use.                                 #
 # Value                Specifies a value for the input box.                            #
+# Password     Specifies the input box is a password box.                      #
 #################################################################################
 
        # Get the options recieved.
index 061d2e2..a7a7a8f 100644 (file)
@@ -200,6 +200,7 @@ sub kiriwrite_settings_load{
                "system_language"               => $config{config}{system_language},
                "system_presmodule"             => $config{config}{system_presmodule},
                "system_dbmodule"               => $config{config}{system_dbmodule},
+               "system_outputmodule"           => $config{config}{system_outputmodule},
                "system_datetime"               => $config{config}{system_datetime},
 
                "display_textarearows"          => $config{config}{display_textarearows},
@@ -621,7 +622,7 @@ sub kiriwrite_error{
                "blankfilename", "blankvariable", "fileexists", "internalerror", "invalidoption", "invalidaction", "invalidfilename", "invalidmode", "invalidutf8", "invalidvariable", "variabletoolong",
 
                # Specific error messages.
-               "blankcompiletype", "blankdatabasepageadd", "blankdirectory", "blankfindfilter", "blankdatetimeformat", "browsenumbertoolong", "browsenumberinvalid",  "databaseconnectionerror", "databasecategoriestoolong", "databasecopysame", "databasealreadyexists", "datadirectorymissing", "datadirectoryinvalidpermissions", "databasedescriptiontoolong", "databasefilenameinvalid", "databasefilenametoolong", "databaseerror", "databaseinvalidpermissions", "databasenameinvalid", "databasenametoolong", "databasenameblank", "databasemissingfile", "databasemovemissingfile", "databasenorename", "databasemovesame", "dbmoduleblank", "dbmoduleinvalid", "dbdirectoryblank", "dbdirectoryinvalid", "dbmodulemissing", "filtercountinvalid", "filtercounttoolong", "filtersdatabasenotcreated", "filtersdbdatabaseerror", "filtersdbpermissions", "filtersdbmissing", "filteridblank", "filterdoesnotexist", "filteridinvalid", "filteridtoolong", "findfiltertoolong", "filterpriorityinvalid", "filterpriorityinvalidchars", "filterprioritytoolong", "invalidcompiletype", "invalidpagenumber", "nopagesselected",  "invaliddirectory", "invaliddatetimeformat", "invalidlanguagefilename", "languagefilenamemissing", "moduleblank", "moduleinvalid",      "newcopydatabasedatabaseerror", "newcopydatabasedoesnotexist", "newcopydatabasefileinvalidpermissions", "newmovedatabasedatabaseerror", "newmovedatabasedoesnotexist", "newmovedatabasefileinvalidpermissions", "nodatabasesavailable", "nodatabaseselected", "noeditvaluesselected", "oldcopydatabasedatabaseerror", "oldcopydatabasedoesnotexist", "oldcopydatabasefileinvalidpermissions", "oldmovedatabasedatabaseerror",   "oldmovedatabasedoesnotexist", "oldmovedatabasefileinvalidpermissions", "outputdirectoryblank", "outputdirectoryinvalid", "outputdirectorymissing", "outputdirectoryinvalidpermissions", "overridetemplatevalueinvalid", "overridetemplatetoolong", "overridetemplateinvalid",  "presmoduleblank", "presmoduleinvalid", "presmodulemissing", "pagecountinvalid", "pagecounttoolong",  "pagefilenamedoesnotexist", "pagefilenameexists", "pagefilenameinvalid", "pagefilenametoolong", "pagefilenameblank", "pagetitletoolong", "pagedescriptiontoolong", "pagesectiontoolong", "pagedatabasefilenametoolong", "pagesettingstoolong", "pagesettingsinvalid", "pagetemplatefilenametoolong", "replacefiltertoolong", "servernameinvalid", "servernametoolong", "serverdatabasenameinvalid", "serverdatabasenametoolong", "serverdatabaseusernameinvalid", "serverdatabaseusernametoolong", "serverdatabasepasswordtoolong", "serverdatabasetableprefixinvalid", "serverdatabasetableprefixtoolong", "serverportnumberinvalid", "serverportnumberinvalidcharacters", "serverportnumbertoolong", "serverprotocolnametoolong", "serverprotocolinvalid", "templatecountinvalid", "templatecounttoolong", "templatenameblank", "templatefilenameexists", "templatefilenameinvalid", "templatedatabaseerror", "templatedatabaseinvalidpermissions", "templatedatabaseinvalidformat", "templatedirectoryblank", "templatedirectoryinvalid", "templatedatabasenotcreated", "templatefilenametoolong", "templatenametoolong", "templatedescriptiontoolong", "templatedatabasemissing", "templatedoesnotexist", "templatefilenameblank", "textarearowblank", "textarearowtoolong", "textarearowinvalid", "textareacolblank", "textareacoltoolong", "textareacolinvalid"
+               "blankcompiletype", "blankdatabasepageadd", "blankdirectory", "blankfindfilter", "blankdatetimeformat", "browsenumbertoolong", "browsenumberinvalid",  "databaseconnectionerror", "databasecategoriestoolong", "databasecopysame", "databasealreadyexists", "datadirectorymissing", "datadirectoryinvalidpermissions", "databasedescriptiontoolong", "databasefilenameinvalid", "databasefilenametoolong", "databaseerror", "databaseinvalidpermissions", "databasenameinvalid", "databasenametoolong", "databasenameblank", "databasemissingfile", "databasemovemissingfile", "databasenorename", "databasemovesame", "dbmoduleblank", "dbmoduleinvalid", "dbdirectoryblank", "dbdirectoryinvalid", "dbmodulemissing", "filtercountinvalid", "filtercounttoolong", "filtersdatabasenotcreated", "filtersdbdatabaseerror", "filtersdbpermissions", "filtersdbmissing", "filteridblank", "filterdoesnotexist", "filteridinvalid", "filteridtoolong", "findfiltertoolong", "filterpriorityinvalid", "filterpriorityinvalidchars", "filterprioritytoolong", "invalidcompiletype", "invalidpagenumber", "nopagesselected",  "invaliddirectory", "invaliddatetimeformat", "invalidlanguagefilename", "languagefilenamemissing", "moduleblank", "moduleinvalid",      "newcopydatabasedatabaseerror", "newcopydatabasedoesnotexist", "newcopydatabasefileinvalidpermissions", "newmovedatabasedatabaseerror", "newmovedatabasedoesnotexist", "newmovedatabasefileinvalidpermissions", "nodatabasesavailable", "nodatabaseselected", "noeditvaluesselected", "oldcopydatabasedatabaseerror", "oldcopydatabasedoesnotexist", "oldcopydatabasefileinvalidpermissions", "oldmovedatabasedatabaseerror",   "oldmovedatabasedoesnotexist", "oldmovedatabasefileinvalidpermissions", "outputmodulenametoolong", "outputmodulenameinvalid", "outputdirectoryblank", "outputdirectoryinvalid", "outputdirectorymissing", "outputdirectoryinvalidpermissions", "overridetemplatevalueinvalid", "overridetemplatetoolong", "overridetemplateinvalid",  "presmoduleblank", "presmoduleinvalid", "presmodulemissing", "pagecountinvalid", "pagecounttoolong",  "pagefilenamedoesnotexist", "pagefilenameexists", "pagefilenameinvalid", "pagefilenametoolong", "pagefilenameblank", "pagetitletoolong", "pagedescriptiontoolong", "pagesectiontoolong", "pagedatabasefilenametoolong", "pagesettingstoolong", "pagesettingsinvalid", "pagetemplatefilenametoolong", "replacefiltertoolong", "servernameinvalid", "servernametoolong", "serverdatabasenameinvalid", "serverdatabasenametoolong", "serverdatabaseusernameinvalid", "serverdatabaseusernametoolong", "serverdatabasepasswordtoolong", "serverdatabasetableprefixinvalid", "serverdatabasetableprefixtoolong", "serverportnumberinvalid", "serverportnumberinvalidcharacters", "serverportnumbertoolong", "serverprotocolnametoolong", "serverprotocolinvalid", "templatecountinvalid", "templatecounttoolong", "templatenameblank", "templatefilenameexists", "templatefilenameinvalid", "templatedatabaseerror", "templatedatabaseinvalidpermissions", "templatedatabaseinvalidformat", "templatedirectoryblank", "templatedirectoryinvalid", "templatedatabasenotcreated", "templatefilenametoolong", "templatenametoolong", "templatedescriptiontoolong", "templatedatabasemissing", "templatedoesnotexist", "templatefilenameblank", "textarearowblank", "textarearowtoolong", "textarearowinvalid", "textareacolblank", "textareacoltoolong", "textareacolinvalid"
 
        );
 
index a578401..bc8b4f2 100644 (file)
@@ -6,7 +6,34 @@ use warnings;
 use Exporter;
 
 our @ISA = qw(Exporter);
-our @EXPORT = qw(kiriwrite_compile_makepages kiriwrite_compile_all kiriwrite_compile_list kiriwrite_compile_clean kiriwrite_compile_clean_helper);
+our @EXPORT = qw(kiriwrite_compile_getoutputmodules kiriwrite_compile_makepages kiriwrite_compile_all kiriwrite_compile_list kiriwrite_compile_clean kiriwrite_compile_clean_helper kiriwrite_compile_loadhash);
+
+my %formdata = ();
+
+sub kiriwrite_compile_getoutputmodules{
+#################################################################################
+# kiriwrite_compile_getoutputmodules: Gets the list of available output modules.#
+#                                                                              #
+# Usage:                                                                       #
+#                                                                              #
+# @outputmodules = kiriwrite_compile_getoutputmodules;                         #
+#################################################################################
+
+       my (@outputmoduleslist, @outputmoduleslist_final);
+       my $outputmodulefile;
+
+       opendir(OUTPUTMODULEDIR, "Modules/Output");
+       @outputmoduleslist = grep /m*\.pm$/, readdir(OUTPUTMODULEDIR);
+       closedir(OUTPUTMODULEDIR);
+
+       foreach $outputmodulefile (@outputmoduleslist){
+               $outputmodulefile =~ s/.pm$//;
+               push(@outputmoduleslist_final, $outputmodulefile);
+       }
+
+       return @outputmoduleslist_final;
+
+}
 
 sub kiriwrite_compile_makepages{
 #################################################################################
@@ -24,12 +51,20 @@ sub kiriwrite_compile_makepages{
 #                      really be done.                                         #
 # override             Specifies if the template should be overriden.          #
 # overridetemplate     Specifies the name of the template to override with.    #
+# outputmodule         Specifies the output module.                            #
 # selectedlist         Specifies the databases to compile from as an array.    #
 #################################################################################
 
        # Get the values that have been passed to the subroutine.
 
-       my ($type, $confirm, $override, $override_template, @selectedlist) = @_;
+       my ($type, $confirm, $override, $override_template, $outputmodule, @selectedlist) = @_;
+       #my $type = shift;
+       #my $confirm = shift;
+       #my $override = shift;
+       #my $override_template = shift;
+       #my $outputmodule = shift;
+       #my @selectedlist = shift;
+       #my %formdata = shift;
 
        # Check if the confirm value is more than one
        # character long.
@@ -120,12 +155,51 @@ sub kiriwrite_compile_makepages{
 
        }
 
+       if (!$outputmodule){
+               $outputmodule = $main::kiriwrite_config{'system_outputmodule'};
+       }
+
+       # Check if the output module name is valid.
+
+       my $outputmodule_maxlength_check = kiriwrite_variablecheck($outputmodule, "maxlength", 64, 1);
+
+       if ($outputmodule_maxlength_check eq 1){
+
+               # The length of the output module name is too
+               # long so return an error.
+
+               kiriwrite_error("outputmodulenametoolong");
+
+       }
+
+       my $outputmodule_filename_check = kiriwrite_variablecheck($outputmodule, "filename", "", 1);
+
+       if ($outputmodule_maxlength_check eq 1){
+
+               # The length of the output module name is too
+               # long so return an error.
+
+               kiriwrite_error("outputmodulenameinvalid");
+
+       }
+
+       # Set up the output module.
+
+       ($outputmodule) = $outputmodule =~ m/^(.*)$/g;
+       my $outputmodulename = "Modules::Output::" . $outputmodule;
+       eval "use " . $outputmodulename;
+       my $kiriwrite_outputmodule = $outputmodulename->new();
+       my ($outputmodule_options, %outputmodule_options);
+       tie(%outputmodule_options, "Tie::IxHash");
+       $kiriwrite_outputmodule->initialise();
+       %outputmodule_options = $kiriwrite_outputmodule->getoptions();
+
        # Check if the action to compile the databases
        # has been confirmed.
 
        if ($confirm eq 1){
 
-               # The action to compile the datavases has
+               # The action to compile the databases has
                # been confirmed.
 
                # Define some variables for later.
@@ -142,11 +216,11 @@ sub kiriwrite_compile_makepages{
                my @findfilter;
                my @replacefilter;
                my @templateslist;
-               my @pagedirectories;
                my @database_filters;
                my $warning_count               = 0;
                my $error_count                 = 0;
                my $pages_count                 = 0;
+               my $page_compile_errorflag      = 0;
                my $filter;
                my $filters_count               = 0;
                my $filters_find_blank_warning  = 0;
@@ -156,15 +230,6 @@ sub kiriwrite_compile_makepages{
                my $database_name;
                my $page_filename;
                my $page_filename_check;
-               my $page_filename_char          = "";
-               my $page_filename_directory;
-               my $page_filename_length        = 0;
-               my $page_filename_seek          = 0;
-               my $page_filename_dircount      = 0;
-               my $page_filename_exists        = 0;
-               my $page_filename_permissions   = 0;
-               my $page_directory_name;
-               my $page_directory_path;
                my $page_name;
                my $page_description;
                my $page_section;
@@ -189,7 +254,34 @@ sub kiriwrite_compile_makepages{
                my $information_prefix          = $main::kiriwrite_lang{compile}{informationprefix};
                my $error_prefix                = $main::kiriwrite_lang{compile}{errorprefix};
                my $warning_prefix              = $main::kiriwrite_lang{compile}{warningprefix};
-               my $filehandle_page;
+
+               # Get the settings for the output module and load them into the
+               # output module.
+
+               use Hash::Search;
+               my $hs = new Hash::Search;
+
+               $hs->hash_search("^outputmodule_", %formdata);
+
+               my %outputmodulesettings = $hs->hash_search_resultdata;
+               my $language_name = $main::kiriwrite_config{'system_language'};
+
+               $kiriwrite_outputmodule->loadsettings($language_name, %outputmodulesettings);
+
+               # Check if the settings for the output module were loaded correctly.
+
+               if ($kiriwrite_outputmodule->errorflag eq 1){
+
+                       # The settings for the output module were not loaded correctly
+                       # so return an error.
+
+                       kiriwrite_error("outputmodulesettingerror", $kiriwrite_outputmodule->errormessage);             
+
+               }
+
+               $kiriwrite_outputmodule->clearflag;
+
+               # Write a page title and start the box for the data list.
 
                $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{compiledatabases}, { Style => "pageheader" });
                $main::kiriwrite_presmodule->addlinebreak();
@@ -464,6 +556,10 @@ sub kiriwrite_compile_makepages{
 
                foreach $database (@selectedlist){
 
+                       # Clear the error flag for the output module.
+
+                       $kiriwrite_outputmodule->clearflag;
+
                        # Check if the database filename and length
                        # are valid.
 
@@ -567,6 +663,15 @@ sub kiriwrite_compile_makepages{
 
                        foreach $page (@databasepages) {
 
+                               # Clear the error flag for the output module..
+
+                               $kiriwrite_outputmodule->clearflag;
+
+                               # Reset certain values.
+
+                               $page_autotitle = "";
+                               $page_autosection = "";
+
                                # Get information about the page.
 
                                %page_info = $main::kiriwrite_dbmodule->getpageinfo({ PageFilename => $page });
@@ -615,7 +720,7 @@ sub kiriwrite_compile_makepages{
 
                                        $page_final = $page_content;
 
-                               } elsif ($page_template eq "!none"){
+                               } elsif ($templates_skip eq 1 || $page_template eq "!none"){
 
                                        $page_final = $page_content;
 
@@ -702,130 +807,34 @@ sub kiriwrite_compile_makepages{
 
                                }
 
-                               # Process the page filename and check what directories
-                               # need to be created.
-
-                               $page_filename_length = int(length($page_filename));
-
-                               do {
-
-                                       $page_filename_char = substr($page_filename, $page_filename_seek, 1);
-
-                                       # Check if a forward slash appears and add it to
-                                       # the list of directories array.
-
-                                       if ($page_filename_char eq '/'){
+                               # Convert the date into a format that can be used by Kiriwrite.
 
-                                               # Append the directory name to the list of
-                                               # directories array.
+                               # PUT SOME CODE HERE! XO
 
-                                               $pagedirectories[$page_filename_dircount] = $page_filename_directory;
-                                               $page_filename_directory        = "";
-                                               $page_filename_char             = "";
-                                               $page_filename_dircount++;
+                               $kiriwrite_outputmodule->addpage({ Page => $page_filename, Data => $page_final, Title => $page_name, Section => $page_section, LastModified => $page_lastmodified, Database => $database });
 
-                                       } else {
-
-                                               # Append the character to the directory/filename.
-
-                                               $page_filename_directory = $page_filename_directory . $page_filename_char;
-
-                                       }
-
-                                       $page_filename_seek++;
+                               # Check if any errors occured while adding the page.
 
-                               } until ($page_filename_length eq $page_filename_seek);
-
-                               foreach $page_directory_name (@pagedirectories){
-
-                                       # Check if the directory name is undefined and if it
-                                       # is then set it blank.
-
-                                       if (!$page_directory_name){
-                                               $page_directory_name = "";
-                                       }
-
-                                       if (!$page_directory_path){
-                                               $page_directory_path = "";
-                                       }
+                               if ($kiriwrite_outputmodule->errorflag eq 1){
 
-                                       # Check if the directory exists and create 
-                                       # the directory if it doesn't exist.
-
-                                       $page_directory_path = $page_directory_path . '/' . $page_directory_name;
-
-                                       mkdir($main::kiriwrite_config{"directory_data_output"} . '/' . $page_directory_path);
-
-                               }
-
-                               # Check if the file already exists and if it does then check
-                               # the permissions of the file and return an error if the
-                               # permissions set are invalid.
-
-                               $page_filename_exists = kiriwrite_fileexists($main::kiriwrite_config{"directory_data_output"} . '/' . $page_filename);  
-
-                               if ($page_filename_exists eq 0){
-
-                                       # The page filename exists, so check if the permissions given are
-                                       # valid.
-
-                                       $page_filename_permissions = kiriwrite_filepermissions($main::kiriwrite_config{"directory_data_output"} . '/' . $page_filename, 1, 1);
-
-                                       if ($page_filename_permissions eq 1){
-
-                                               # The file has invalid permissions set.
-
-                                               $main::kiriwrite_presmodule->addtext($error_prefix . kiriwrite_language($main::kiriwrite_lang{compile}{pageinvalidpermissions}, $page_filename));
-                                               $main::kiriwrite_presmodule->addlinebreak();
-                                               $error_count++;
-
-                                               # Reset certain values.
-
-                                               $page_autotitle = "";
-                                               $page_autosection = "";
-                                               $page_filename_seek = 0;
-                                               $page_filename_dircount = 0;
-
-                                               $page_filename_directory = "";
-                                               $page_directory_path = "";
-                                               $page_directory_name = "";
-                                               @pagedirectories = ();
-                                               
-                                               next;
-
-                                       }
+                                       $main::kiriwrite_presmodule->addtext($error_prefix . kiriwrite_language($main::kiriwrite_lang{compile}{pagenotwritten}, $page_filename, $kiriwrite_outputmodule->errormessage));
+                                       $main::kiriwrite_presmodule->addlinebreak();
+                                       $error_count++;
+                                       next;
 
                                }
 
-                               # Reset certain values.
-
-                               $page_autotitle = "";
-                               $page_autosection = "";
-                               $page_filename_seek = 0;
-                               $page_filename_dircount = 0;
-
-                               $page_filename_directory = "";
-                               $page_directory_path = "";
-                               $page_directory_name = "";
-                               @pagedirectories = ();
+                               $kiriwrite_outputmodule->outputpage({ Page => $page_filename, Data => $page_final, Title => $page_name, Section => $page_section, LastModified => $page_lastmodified, Database => $database });
 
-                               # Write the file to the output directory.
+                               if ($kiriwrite_outputmodule->errorflag eq 1){
 
-                               ($page_filename) = $page_filename =~ m/^(.*)$/g;
-                               ($main::kiriwrite_config{"directory_data_output"}) = $main::kiriwrite_config{"directory_data_output"} =~ m/^(.*)$/g;
-
-                               open($filehandle_page, "> ",  $main::kiriwrite_config{"directory_data_output"} . '/' . $page_filename) or ($main::kiriwrite_presmodule->addtext($error_prefix . kiriwrite_language($main::kiriwrite_lang{compile}{pagenotwritten}, $page_filename, $!)), $main::kiriwrite_presmodule->addlinebreak(), $error_count++, next);
-
-                               if (!$page_final){
-
-                                       $page_final = "";
+                                       $main::kiriwrite_presmodule->addtext($error_prefix . kiriwrite_language($main::kiriwrite_lang{compile}{pagenotwritten}, $page_filename, $kiriwrite_outputmodule->errormessage));
+                                       $main::kiriwrite_presmodule->addlinebreak();
+                                       $error_count++;
+                                       next;
 
                                }
 
-                               binmode $filehandle_page, ':utf8';
-                               print $filehandle_page $page_final;
-                               close($filehandle_page);
-
                                # Write a message saying the page has been compiled. Check
                                # to see if the page name is blank and write a message
                                # saying there's no page name.
@@ -844,6 +853,19 @@ sub kiriwrite_compile_makepages{
 
                        }
 
+                       # Output all the pages (if required).
+
+                       $kiriwrite_outputmodule->outputall();
+
+                       if ($kiriwrite_outputmodule->errorflag eq 1){
+
+                               $main::kiriwrite_presmodule->addtext($error_prefix . kiriwrite_language($main::kiriwrite_lang{compile}{outputallerror}, $page_filename, $kiriwrite_outputmodule->errormessage));
+                               $main::kiriwrite_presmodule->addlinebreak();
+                               $error_count++;
+                               next;
+
+                       }
+
                        # Write a message saying that the database has
                        # been processed.
 
@@ -852,9 +874,26 @@ sub kiriwrite_compile_makepages{
 
                }
 
+               # This is the last time outputall is going to be called.
+
+               $kiriwrite_outputmodule->outputall({ FinishedProcessing => 1 });
+
+               if ($kiriwrite_outputmodule->errorflag eq 1){
+
+                       $main::kiriwrite_presmodule->addtext($error_prefix . kiriwrite_language($main::kiriwrite_lang{compile}{outputallerror}, $page_filename, $kiriwrite_outputmodule->errormessage));
+                       $main::kiriwrite_presmodule->addlinebreak();
+                       $error_count++;
+                       next;
+
+               }
+
                # Disconnect from the database server.
 
-               $main::kiriwrite_dbmodule->disconnect();
+               $main::kiriwrite_dbmodule->disconnect;
+
+               # Run the finish subroutine for the output module.
+
+               $kiriwrite_outputmodule->finish;
 
                $main::kiriwrite_presmodule->addhorizontalline();
                $main::kiriwrite_presmodule->addtext(kiriwrite_language($main::kiriwrite_lang{compile}{compileresults}, $pages_count, $error_count, $warning_count));
@@ -878,6 +917,14 @@ sub kiriwrite_compile_makepages{
                my @template_list;
                my $template_filename;
                my $template_file;
+               my @outputmodule_comboboxnames;
+               my @outputmodule_comboboxvalues;
+               my $outputmodule_comboboxname;
+               my $outputmodule_comboboxvalue;
+               my $outputmodule_selected       = 0;
+               my $combobox_count              = 0;
+               my $outputmoduleslist_name;
+               my $option_name;
                my %template_info;
                my %template_dblist;
                tie(%template_dblist, "Tie::IxHash");
@@ -1025,17 +1072,60 @@ sub kiriwrite_compile_makepages{
                        $main::kiriwrite_dbmodule->disconnecttemplate();
                        $main::kiriwrite_dbmodule->disconnect();
 
+                       # Get the list of output modules.
+
+                       my @outputmoduleslist = kiriwrite_compile_getoutputmodules;
+
                        # Write out a form asking the user to confirm if the
                        # user wants to compile the selected database.
 
                        $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{compiledatabase}, { Style => "pageheader" });
+
+                       # Write out a form selecting the output module.
+
+                       $main::kiriwrite_presmodule->startform($main::kiriwrite_env{"script_filename"}, "POST");
+                       $main::kiriwrite_presmodule->addlinebreak();
+                       $main::kiriwrite_presmodule->addhiddendata("mode", "compile");
+                       $main::kiriwrite_presmodule->addhiddendata("action", "compile");
+                       $main::kiriwrite_presmodule->addhiddendata("type", "single");
+                       $main::kiriwrite_presmodule->addhiddendata("database", $databasefilename);
+                       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{selectoutputmodule});
+                       $main::kiriwrite_presmodule->addselectbox("outputmodule");
+
+                       # Process the output modules found.
+
+                       foreach $outputmoduleslist_name (@outputmoduleslist){
+
+                               # Print each option and check if the module name is the selected module.
+
+                               if ($outputmodule eq $outputmoduleslist_name){
+
+                                       $main::kiriwrite_presmodule->addoption($outputmoduleslist_name, { Value => $outputmoduleslist_name, Selected => 1 });
+
+                               } else {
+
+                                       $main::kiriwrite_presmodule->addoption($outputmoduleslist_name, { Value => $outputmoduleslist_name });
+
+                               }
+
+                       }
+
+                       $main::kiriwrite_presmodule->endselectbox();
+                       $main::kiriwrite_presmodule->addtext(" | ");
+                       $main::kiriwrite_presmodule->addsubmit($main::kiriwrite_lang{compile}{selectbutton});
+                       $main::kiriwrite_presmodule->endform();
+
+                       # Write out another form for compiling the pages.
+
                        $main::kiriwrite_presmodule->startform($main::kiriwrite_env{"script_filename"}, "POST");
                        $main::kiriwrite_presmodule->startbox();
                        $main::kiriwrite_presmodule->addhiddendata("mode", "compile");
                        $main::kiriwrite_presmodule->addhiddendata("action", "compile");
                        $main::kiriwrite_presmodule->addhiddendata("type", "multiple");
+                       $main::kiriwrite_presmodule->addhiddendata("outputmodule", $outputmodule);
                        $main::kiriwrite_presmodule->addhiddendata("id[1]", $databasefilename);
                        $main::kiriwrite_presmodule->addhiddendata("name[1]", "on");
+                       $main::kiriwrite_presmodule->addhiddendata("count", 1);
                        $main::kiriwrite_presmodule->addhiddendata("confirm", 1);
                        $main::kiriwrite_presmodule->addlinebreak();
                        $main::kiriwrite_presmodule->addtext(kiriwrite_language($main::kiriwrite_lang{compile}{compiledatabasemessage}, $database_name));
@@ -1065,6 +1155,80 @@ sub kiriwrite_compile_makepages{
 
                        }
 
+                       # Print out the list of options for the output module.
+
+                       $main::kiriwrite_presmodule->addlinebreak();
+                       $main::kiriwrite_presmodule->addlinebreak();
+                       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{outputmodulesettings}, { Style => "smallpageheader" });
+                       $main::kiriwrite_presmodule->addlinebreak();
+
+                       foreach $option_name (keys %outputmodule_options){
+
+                               $main::kiriwrite_presmodule->addlinebreak();
+
+                               # Check if the option is a checkbox option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "checkbox"){
+
+                                       $main::kiriwrite_presmodule->addcheckbox("outputmodule_" . $option_name, { OptionDescription => $outputmodule_options{$option_name}{string} });
+
+                               }
+
+                               # Check if the option is a string option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "textbox"){
+
+                                       if (!$outputmodule_options{$option_name}{password}){
+                                               $outputmodule_options{$option_name}{password} = 0;
+                                       }
+
+                                       $main::kiriwrite_presmodule->addtext($outputmodule_options{$option_name}{string} . " ");
+                                       $main::kiriwrite_presmodule->addinputbox("outputmodule_" . $option_name, { Size => $outputmodule_options{$option_name}{size}, MaxLength => $outputmodule_options->{$option_name}{maxlength}, Value => $outputmodule_options{$option_name}{value}, Password => $outputmodule_options{$option_name}{password} });
+
+                               }
+
+                               # Check if the option is a combobox option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "combobox"){
+
+                                       $combobox_count         = 0;
+
+                                       @outputmodule_comboboxnames = split(/\|/, $outputmodule_options{$option_name}{optionnames});
+                                       @outputmodule_comboboxvalues = split(/\|/, $outputmodule_options{$option_name}{optionvalues});
+
+                                       $main::kiriwrite_presmodule->addtext($outputmodule_options{$option_name}{string} . " ");
+                                       $main::kiriwrite_presmodule->addselectbox("outputmodule_" . $option_name);
+
+                                       foreach $outputmodule_comboboxname (@outputmodule_comboboxnames){
+
+                                               $main::kiriwrite_presmodule->addoption($outputmodule_comboboxname, { Value => $outputmodule_comboboxvalues[$combobox_count] });
+                                               $combobox_count++;
+
+                                       }
+
+                                       $main::kiriwrite_presmodule->endselectbox;
+
+                               }
+
+                               # Check if the option is a radio option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "radio"){
+
+                                       # Check if the selected value is blank and if it is then
+                                       # set it to 0.
+
+                                       if (!$outputmodule_options{$option_name}{selected}){
+                                               $outputmodule_selected = 0;
+                                       } else {
+                                               $outputmodule_selected = 1;
+                                       }
+
+                                       $main::kiriwrite_presmodule->addradiobox("outputmodule_" . $outputmodule_options{$option_name}{name}, { Description => $outputmodule_options{$option_name}{string}, Value => $outputmodule_options{$option_name}{value}, Selected => $outputmodule_selected });
+
+                               }
+
+                       }
+
                        $main::kiriwrite_presmodule->addlinebreak();
                        $main::kiriwrite_presmodule->addlinebreak();
                        $main::kiriwrite_presmodule->addsubmit($main::kiriwrite_lang{compile}{compiledatabasebutton});
@@ -1176,11 +1340,64 @@ sub kiriwrite_compile_makepages{
 
                        }
 
+                       # Get the list of output modules.
+
+                       my @outputmoduleslist = kiriwrite_compile_getoutputmodules;
+
                        # Write out the form for compiling the database.
 
                        $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{compileselecteddatabases}, { Style => "pageheader" });
+
+                       # Write out a form selecting the output module.
+
+                       $main::kiriwrite_presmodule->startform($main::kiriwrite_env{"script_filename"}, "POST");
                        $main::kiriwrite_presmodule->addlinebreak();
+                       $main::kiriwrite_presmodule->addhiddendata("mode", "compile");
+                       $main::kiriwrite_presmodule->addhiddendata("action", "compile");
+                       $main::kiriwrite_presmodule->addhiddendata("type", "multiple");
+
+                       $database_count = 0;
+
+                       # Write out the list of databases to compile.
+
+                       foreach $database (keys %database_list){
+
+                               $database_count++;
+
+                               $main::kiriwrite_presmodule->addhiddendata("id[" . $database_count . "]", $database_list{$database}{Filename});
+                               $main::kiriwrite_presmodule->addhiddendata("name[" . $database_count . "]", "on");
+
+                       }
+
+                       $main::kiriwrite_presmodule->addhiddendata("count", $database_count);
+                       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{selectoutputmodule});
+                       $main::kiriwrite_presmodule->addselectbox("outputmodule");
+
+                       # Process the output modules found.
+
+                       foreach $outputmoduleslist_name (@outputmoduleslist){
+
+                               # Print each option and check if the module name is the selected module.
+
+                               if ($outputmodule eq $outputmoduleslist_name){
+
+                                       $main::kiriwrite_presmodule->addoption($outputmoduleslist_name, { Value => $outputmoduleslist_name, Selected => 1 });
+
+                               } else {
+
+                                       $main::kiriwrite_presmodule->addoption($outputmoduleslist_name, { Value => $outputmoduleslist_name });
+
+                               }
+
+                       }
+
+                       $main::kiriwrite_presmodule->endselectbox();
+                       $main::kiriwrite_presmodule->addtext(" | ");
+                       $main::kiriwrite_presmodule->addsubmit($main::kiriwrite_lang{compile}{selectbutton});
+                       $main::kiriwrite_presmodule->endform();
+
                        $main::kiriwrite_presmodule->addlinebreak();
+
                        $main::kiriwrite_presmodule->startform($main::kiriwrite_env{"script_filename"}, "POST");
                        $main::kiriwrite_presmodule->startbox();
                        $main::kiriwrite_presmodule->addhiddendata("mode", "compile");
@@ -1195,7 +1412,7 @@ sub kiriwrite_compile_makepages{
 
                        $database_count = 0;
 
-                       # write out the list of databases to compile.
+                       # Write out the list of databases to compile.
 
                        foreach $database (keys %database_list){
 
@@ -1316,6 +1533,81 @@ sub kiriwrite_compile_makepages{
                        $main::kiriwrite_dbmodule->disconnecttemplate();
                        $main::kiriwrite_dbmodule->disconnect();
 
+                       # Print out the list of options for the output module.
+
+                       $main::kiriwrite_presmodule->addlinebreak();
+                       $main::kiriwrite_presmodule->addlinebreak();
+                       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{outputmodulesettings}, { Style => "smallpageheader" });
+                       $main::kiriwrite_presmodule->addlinebreak();
+
+                       foreach $option_name (keys %outputmodule_options){
+
+                               $main::kiriwrite_presmodule->addlinebreak();
+
+                               # Check if the option is a checkbox option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "checkbox"){
+
+                                       $main::kiriwrite_presmodule->addcheckbox("outputmodule_" . $option_name, { OptionDescription => $outputmodule_options{$option_name}{string} });
+
+                               }
+
+                               # Check if the option is a string option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "string"){
+
+                                       if (!$outputmodule_options{$option_name}{password}){
+                                               $outputmodule_options{$option_name}{password} = 0;
+                                       }
+
+                                       $main::kiriwrite_presmodule->addtext($outputmodule_options{$option_name}{string} . " ");
+                                       $main::kiriwrite_presmodule->addinputbox("outputmodule_" . $option_name, { Size => $outputmodule_options{$option_name}{size}, MaxLength => $outputmodule_options->{$option_name}{maxlength}, Value => $outputmodule_options{$option_name}{value}, Password => $outputmodule_options{$option_name}{password} });
+
+                               }
+
+                               # Check if the option is a combobox option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "combobox"){
+
+                                       $combobox_count         = 0;
+
+                                       @outputmodule_comboboxnames = split(/\|/, $outputmodule_options{$option_name}{optionnames});
+                                       @outputmodule_comboboxvalues = split(/\|/, $outputmodule_options{$option_name}{optionvalues});
+
+                                       $main::kiriwrite_presmodule->addtext($outputmodule_options{$option_name}{string} . " ");
+                                       $main::kiriwrite_presmodule->addselectbox("outputmodule_" . $option_name);
+
+                                       foreach $outputmodule_comboboxname (@outputmodule_comboboxnames){
+
+                                               $main::kiriwrite_presmodule->addoption($outputmodule_comboboxname, { Value => $outputmodule_comboboxvalues[$combobox_count] });
+                                               $combobox_count++;
+
+                                       }
+
+                                       $main::kiriwrite_presmodule->endselectbox;
+
+                               }
+
+                               # Check if the option is a radio option.
+
+                               if ($outputmodule_options{$option_name}{type} eq "radio"){
+
+                                       # Check if the selected value is blank and if it is then
+                                       # set it to 0.
+
+                                       if (!$outputmodule_options{$option_name}{selected}){
+                                               $outputmodule_selected = 0;
+                                       } else {
+                                               $outputmodule_selected = 1;
+                                       }
+
+                                       $main::kiriwrite_presmodule->addradiobox("outputmodule_" . $outputmodule_options{$option_name}{name}, { Description => $outputmodule_options{$option_name}{string}, Value => $outputmodule_options{$option_name}{value}, Selected => $outputmodule_selected });
+
+                               }
+
+                       }
+
+
                        $main::kiriwrite_presmodule->addlinebreak();
                        $main::kiriwrite_presmodule->addlinebreak();
                        $main::kiriwrite_presmodule->addsubmit($main::kiriwrite_lang{compile}{compileselecteddatabasesbutton});
@@ -1353,9 +1645,62 @@ sub kiriwrite_compile_all{
 #                                                                              #
 # Usage:                                                                       #
 #                                                                              #
-# kiriwrite_compile_all();                                                     #
+# kiriwrite_compile_all(outputmodule);                                         #
+#                                                                              #
+# outputmodule         Specifies the output module to use.                     #
 #################################################################################
 
+       # Get the parameters passed to this subroutine.
+
+       my $outputmodule = shift;
+
+       if (!$outputmodule){
+               $outputmodule = $main::kiriwrite_config{'system_outputmodule'};
+       }
+
+       # Check if the output module name is valid.
+
+       my $outputmodule_maxlength_check = kiriwrite_variablecheck($outputmodule, "maxlength", 64, 1);
+
+       if ($outputmodule_maxlength_check eq 1){
+
+               # The length of the output module name is too
+               # long so return an error.
+
+               kiriwrite_error("outputmodulenametoolong");
+
+       }
+
+       my $outputmodule_filename_check = kiriwrite_variablecheck($outputmodule, "filename", "", 1);
+
+       if ($outputmodule_maxlength_check eq 1){
+
+               # The length of the output module name is too
+               # long so return an error.
+
+               kiriwrite_error("outputmodulenameinvalid");
+
+       }
+
+       # Set up the output module.
+
+       ($outputmodule) = $outputmodule =~ m/^(.*)$/g;
+       my $outputmodulename = "Modules::Output::" . $outputmodule;
+       eval "use " . $outputmodulename;
+       my $kiriwrite_outputmodule = $outputmodulename->new();
+       my ($outputmodule_options, %outputmodule_options);
+       tie(%outputmodule_options, "Tie::IxHash");
+       $kiriwrite_outputmodule->initialise();
+       %outputmodule_options = $kiriwrite_outputmodule->getoptions();
+       my @outputmodule_comboboxnames;
+       my @outputmodule_comboboxvalues;
+       my $outputmodule_comboboxname;
+       my $outputmodule_comboboxvalue;
+       my $outputmodule_selected       = 0;
+       my $combobox_count              = 0;
+       my $outputmoduleslist_name;
+       my $option_name;
+
        # Connect to the database server.
 
        $main::kiriwrite_dbmodule->connect();
@@ -1371,6 +1716,8 @@ sub kiriwrite_compile_all{
 
        }
 
+       my @outputmoduleslist = kiriwrite_compile_getoutputmodules;
+
        # Get the list of available databases.
 
        my @database_list = $main::kiriwrite_dbmodule->getdblist();
@@ -1416,11 +1763,40 @@ sub kiriwrite_compile_all{
        $main::kiriwrite_presmodule->addlinebreak();
 
        $main::kiriwrite_presmodule->startform($main::kiriwrite_env{"script_filename"}, "POST");
-       $main::kiriwrite_presmodule->startbox();
+       $main::kiriwrite_presmodule->addhiddendata("mode", "compile");
+       $main::kiriwrite_presmodule->addhiddendata("action", "all");
+       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{selectoutputmodule});
+       $main::kiriwrite_presmodule->addselectbox("outputmodule");
+
+       # Process the output modules found.
+
+       foreach $outputmoduleslist_name (@outputmoduleslist){
+
+               # Print each option and check if the module name is the selected module.
+
+               if ($outputmodule eq $outputmoduleslist_name){
+
+                       $main::kiriwrite_presmodule->addoption($outputmoduleslist_name, { Value => $outputmoduleslist_name, Selected => 1 });
+
+               } else {
+
+                       $main::kiriwrite_presmodule->addoption($outputmoduleslist_name, { Value => $outputmoduleslist_name });
+
+               }
+
+       }
+
+       $main::kiriwrite_presmodule->endselectbox();
+       $main::kiriwrite_presmodule->addtext(" | ");
+       $main::kiriwrite_presmodule->addsubmit($main::kiriwrite_lang{compile}{selectbutton});
+       $main::kiriwrite_presmodule->endform();
+
+       $main::kiriwrite_presmodule->addlinebreak();
+
+       $main::kiriwrite_presmodule->startform($main::kiriwrite_env{"script_filename"}, "POST");
        $main::kiriwrite_presmodule->addhiddendata("mode", "compile");
        $main::kiriwrite_presmodule->addhiddendata("action", "compile");
        $main::kiriwrite_presmodule->addhiddendata("type", "multiple");
-
        $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{compilealldatabasesmessage});
        $main::kiriwrite_presmodule->addlinebreak();
        $main::kiriwrite_presmodule->addlinebreak();
@@ -1545,7 +1921,7 @@ sub kiriwrite_compile_all{
 
                # Add overwrite template data.
                $main::kiriwrite_presmodule->addcheckbox("enableoverride", { OptionDescription => $main::kiriwrite_lang{compile}{overridetemplate}, LineBreak => 1 });
-               $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{replacecurrenttemplate});
+               $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{replacecurrenttemplate} . " ");
                $main::kiriwrite_presmodule->addselectbox("overridetemplate");
 
                foreach $template_file (keys %template_dblist){
@@ -1564,14 +1940,87 @@ sub kiriwrite_compile_all{
        $main::kiriwrite_dbmodule->disconnecttemplate();
        $main::kiriwrite_dbmodule->disconnect();
 
+       # Print out the list of options for the output module.
+
        $main::kiriwrite_presmodule->addlinebreak();
        $main::kiriwrite_presmodule->addlinebreak();
+       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{compile}{outputmodulesettings}, { Style => "smallpageheader" });
+       $main::kiriwrite_presmodule->addlinebreak();
+
+       foreach $option_name (keys %outputmodule_options){
+
+               $main::kiriwrite_presmodule->addlinebreak();
+
+               # Check if the option is a checkbox option.
+
+               if ($outputmodule_options{$option_name}{type} eq "checkbox"){
+
+                       $main::kiriwrite_presmodule->addcheckbox("outputmodule_" . $option_name, { OptionDescription => $outputmodule_options{$option_name}{string} });
+
+               }
+
+               # Check if the option is a string option.
+
+               if ($outputmodule_options{$option_name}{type} eq "string"){
+
+                       if (!$outputmodule_options{$option_name}{password}){
+                               $outputmodule_options{$option_name}{password} = 0;
+                       }
+
+                       $main::kiriwrite_presmodule->addtext($outputmodule_options{$option_name}{string} . " ");
+                       $main::kiriwrite_presmodule->addinputbox("outputmodule_" . $option_name, { Size => $outputmodule_options{$option_name}{size}, MaxLength => $outputmodule_options->{$option_name}{maxlength}, Value => $outputmodule_options{$option_name}{value}, Password => $outputmodule_options{$option_name}{password} });
+
+               }
+
+               # Check if the option is a combobox option.
+
+               if ($outputmodule_options{$option_name}{type} eq "combobox"){
+
+                       $combobox_count         = 0;
+
+                       @outputmodule_comboboxnames = split(/\|/, $outputmodule_options{$option_name}{optionnames});
+                       @outputmodule_comboboxvalues = split(/\|/, $outputmodule_options{$option_name}{optionvalues});
+
+                       $main::kiriwrite_presmodule->addtext($outputmodule_options{$option_name}{string} . " ");
+                       $main::kiriwrite_presmodule->addselectbox("outputmodule_" . $option_name);
+
+                       foreach $outputmodule_comboboxname (@outputmodule_comboboxnames){
+
+                               $main::kiriwrite_presmodule->addoption($outputmodule_comboboxname, { Value => $outputmodule_comboboxvalues[$combobox_count] });
+                               $combobox_count++;
+
+                       }
+
+                       $main::kiriwrite_presmodule->endselectbox;
+
+               }
+
+               # Check if the option is a radio option.
+
+               if ($outputmodule_options{$option_name}{type} eq "radio"){
+
+                       # Check if the selected value is blank and if it is then
+                       # set it to 0.
+
+                       if (!$outputmodule_options{$option_name}{selected}){
+                               $outputmodule_selected = 0;
+                       } else {
+                               $outputmodule_selected = 1;
+                       }
+
+                       $main::kiriwrite_presmodule->addradiobox("outputmodule_" . $outputmodule_options{$option_name}{name}, { Description => $outputmodule_options{$option_name}{string}, Value => $outputmodule_options{$option_name}{value}, Selected => $outputmodule_selected });
+
+               }
+
+       }
+
+       $main::kiriwrite_presmodule->addlinebreak;
+       $main::kiriwrite_presmodule->addlinebreak;
 
        $main::kiriwrite_presmodule->addhiddendata("confirm", 1);
        $main::kiriwrite_presmodule->addsubmit($main::kiriwrite_lang{compile}{compilealldatabasesbutton});
        $main::kiriwrite_presmodule->addtext(" | ");
        $main::kiriwrite_presmodule->addlink($main::kiriwrite_env{"script_filename"} . "?mode=compile", { Text => $main::kiriwrite_lang{compile}{returncompilelist} });
-       $main::kiriwrite_presmodule->endbox();
        $main::kiriwrite_presmodule->endform();
 
        return $main::kiriwrite_presmodule->grab();
@@ -2115,4 +2564,23 @@ sub kiriwrite_compile_clean_helper{
 
        return $permissions;
 
-}
\ No newline at end of file
+}
+
+sub kiriwrite_compile_loadhash{
+#################################################################################
+# kiriwrite_compile_loadhash: Loads the hash used for the Output Module.       #
+#                                                                              #
+# Usage:                                                                       #
+#                                                                              #
+# kiriwrite_compile_loadhash(hash);                                            #
+#                                                                              #
+# hash         The hash to be passed on for the output moudle.                 #
+#################################################################################
+
+       my (%passedhash) = @_;
+
+       %formdata = %passedhash;
+
+}
+
+1;
\ No newline at end of file
index 7785526..aa77cc0 100644 (file)
@@ -31,6 +31,8 @@ sub kiriwrite_settings_view{
        my $settings_system_language            = $main::kiriwrite_config{"system_language"};
        my $settings_system_presentation        = $main::kiriwrite_config{"system_presmodule"};
        my $settings_system_database            = $main::kiriwrite_config{"system_dbmodule"};
+       my $settings_system_output              = $main::kiriwrite_config{"system_outputmodule"};
+
 
        $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{setting}{viewsettings}, { Style => "pageheader" });
        $main::kiriwrite_presmodule->addlinebreak();
@@ -184,6 +186,15 @@ sub kiriwrite_settings_view{
        $main::kiriwrite_presmodule->endcell();
        $main::kiriwrite_presmodule->endrow();
 
+       $main::kiriwrite_presmodule->startrow();
+       $main::kiriwrite_presmodule->addcell("tablecell1");
+       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{setting}{outputmodule});
+       $main::kiriwrite_presmodule->endcell();
+       $main::kiriwrite_presmodule->addcell("tablecell2");
+       $main::kiriwrite_presmodule->addtext($settings_system_output);
+       $main::kiriwrite_presmodule->endcell();
+       $main::kiriwrite_presmodule->endrow();
+
        $main::kiriwrite_presmodule->startrow();
        $main::kiriwrite_presmodule->addcell("tablecell1");
        $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{setting}{databasemodule});
@@ -220,6 +231,7 @@ sub kiriwrite_settings_edit{
 # PrsentationModule    Specifies the new presentation module to use for        #
 #                      Kiriwrite.                                              #
 # DatabaseModule       Specifies the new database module to use for Kiriwrite. #
+# OutputModule         Specifies the new output module to use for Kiriwrite.   #
 # TextAreaCols         Specifies the width of the text area.                   #
 # TextAreaRows         Specifies the height of the text area.                  #
 # PageCount            Specifies the amount of pages that should be viewed.    #
@@ -250,6 +262,7 @@ sub kiriwrite_settings_edit{
        my $settings_datetimeformat             = $passedoptions->{"DateTimeFormat"};
        my $settings_languagesystem             = $passedoptions->{"SystemLanguage"};
        my $settings_presmodule                 = $passedoptions->{"PresentationModule"};
+       my $settings_outputmodule               = $passedoptions->{"OutputModule"};
        my $settings_dbmodule                   = $passedoptions->{"DatabaseModule"};
        my $settings_textareacols               = $passedoptions->{"TextAreaCols"};
        my $settings_textarearows               = $passedoptions->{"TextAreaRows"};
@@ -300,6 +313,7 @@ sub kiriwrite_settings_edit{
 
                my $kiriwrite_presmodule_modulename_check       = kiriwrite_variablecheck($settings_presmodule, "module", 0, 1);
                my $kiriwrite_dbmodule_modulename_check         = kiriwrite_variablecheck($settings_dbmodule, "module", 0, 1);
+               my $kiriwrite_outputmodule_modulename_check     = kiriwrite_variablecheck($settings_outputmodule, "module", 0, 1);
 
                if ($kiriwrite_presmodule_modulename_check eq 1){
 
@@ -337,6 +351,24 @@ sub kiriwrite_settings_edit{
 
                }
 
+               if ($kiriwrite_outputmodule_modulename_check eq 1){
+
+                       # The output module name is blank, so return
+                       # an error.
+
+                       kiriwrite_error("outputmoduleblank");
+
+               }
+
+               if ($kiriwrite_outputmodule_modulename_check eq 2){
+
+                       # The output module name is invalid, so return
+                       # an error.
+
+                       kiriwrite_error("outputmoduleinvalid");
+
+               }
+
                # Check if the directory names only contain letters and numbers and
                # return a specific error if they don't.
 
@@ -687,7 +719,7 @@ sub kiriwrite_settings_edit{
 
                # Write the new settings to the configuration file.
 
-               kiriwrite_output_config({ DatabaseDirectory => $settings_dbdirectory, OutputDirectory => $settings_outputdirectory, ImagesURIPath => $settings_imagesuri, DateTimeFormat => $settings_datetimeformat, SystemLanguage => $settings_languagesystem, PresentationModule => $settings_presmodule, TextAreaCols => $settings_textareacols, TextAreaRows => $settings_textarearows, PageCount => $settings_pagecount, FilterCount => $settings_filtercount, TemplateCount => $settings_templatecount, DatabaseModule => $settings_dbmodule, DatabaseServer => $settings_database_server, DatabasePort => $settings_database_port, DatabaseProtocol => $settings_database_protocol, DatabaseSQLDatabase => $settings_database_sqldatabase, DatabaseUsername => $settings_database_username, DatabasePassword => $settings_database_password, DatabaseTablePrefix => $settings_database_tableprefix });
+               kiriwrite_output_config({ DatabaseDirectory => $settings_dbdirectory, OutputDirectory => $settings_outputdirectory, ImagesURIPath => $settings_imagesuri, DateTimeFormat => $settings_datetimeformat, SystemLanguage => $settings_languagesystem, PresentationModule => $settings_presmodule, OutputModule => $settings_outputmodule, TextAreaCols => $settings_textareacols, TextAreaRows => $settings_textarearows, PageCount => $settings_pagecount, FilterCount => $settings_filtercount, TemplateCount => $settings_templatecount, DatabaseModule => $settings_dbmodule, DatabaseServer => $settings_database_server, DatabasePort => $settings_database_port, DatabaseProtocol => $settings_database_protocol, DatabaseSQLDatabase => $settings_database_sqldatabase, DatabaseUsername => $settings_database_username, DatabasePassword => $settings_database_password, DatabaseTablePrefix => $settings_database_tableprefix });
 
                # Write a confirmation message.
 
@@ -839,90 +871,22 @@ sub kiriwrite_settings_edit{
        my @presmodule_directory;
        my $presmodule;
        my $presmodule_file             = "";
-       my $presmodule_char             = "";
-       my $presmodule_dot              = 0;
-       my $presmodule_firstdot         = 0;
-       my $presmodule_firstdotfound    = "";
-       my $presmodule_seek             = 0;
-       my $presmodule_length           = 0;
        my $presmodule_count            = 0;
-       my $presmodule_friendly         = "";
-       my $presmodule_selectlist       = "";
        my $presmodule_config           = $main::kiriwrite_config{"system_presmodule"};
 
-       # Open and get the list of presentation modules (perl modules) by filtering
-       # out the 
+       # Open and get the list of presentation modules (perl modules) by getting
+       # only files which end in .pm.
 
        opendir(OUTPUTSYSTEMDIR, "Modules/Presentation");
        @presmodule_directory = grep /m*\.pm$/, readdir(OUTPUTSYSTEMDIR);
        closedir(OUTPUTSYSTEMDIR);
 
-       # Process each presentation module and add them to the list of available
-       # presentation modules.
-
        foreach $presmodule_file (@presmodule_directory){
 
-               # Get the length of the presentation module (perl module) filename.
-
-               $presmodule_length = length($presmodule_file);
-
-               # Get the friendly name of the Perl module (by getting rid of the
-               # .pm part of the filename).
-
-               do {
+               # Remove the .pm suffix.
 
-                       $presmodule_char = substr($presmodule_file, $presmodule_seek, 1);
-
-                       # Check if the current character is a dot and if it is then
-                       # set the last dot found number to the current seek number.
-
-                       if ($presmodule_char eq "."){
-
-                               # Put the seek value as the last dot found number.
-
-                               $presmodule_dot = $presmodule_seek;
-
-                       }
-
-                       # Increment the seek counter.
-
-                       $presmodule_seek++;
-
-               } until ($presmodule_seek eq $presmodule_length);
-
-               # Reset the seek counter as it is going to be used again.
-
-               $presmodule_seek = 0;
-
-               # Get the friendly name of the Perl module by the processing the file
-               # name to the last dot the previous 'do' tried to find.
-
-               do {
-
-                       # Get the character the seek counter is currently set at.
-
-                       $presmodule_char = substr($presmodule_file, $presmodule_seek, 1);
-
-                       # Append the character to the friendly name of the presentation module.
-
-                       $presmodule_friendly = $presmodule_friendly . $presmodule_char;
-
-                       # Increment the seek counter.
-
-                       $presmodule_seek++;
-
-               } until ($presmodule_seek eq $presmodule_dot);
-
-               # Append the option to tbe list of available presentation modules.
-
-               $presmodule_list{$presmodule_count}{Filename} = $presmodule_friendly;
-
-               # Reset the following values.
-
-               $presmodule_seek        = 0;
-               $presmodule_length      = 0;
-               $presmodule_char        = "";
-               $presmodule_friendly    = "";
+               $presmodule_file =~ s/.pm$//;
+               $presmodule_list{$presmodule_count}{Filename} = $presmodule_file;
                $presmodule_count++;
 
        }
@@ -933,91 +897,47 @@ sub kiriwrite_settings_edit{
        my @dbmodule_directory;
        my $dbmodule;
        my $dbmodule_file               = "";
-       my $dbmodule_char               = "";
-       my $dbmodule_dot                = 0;
-       my $dbmodule_firstdot           = 0;
-       my $dbmodule_firstdotfound      = "";
-       my $dbmodule_seek               = 0;
-       my $dbmodule_length             = 0;
        my $dbmodule_count              = 0;
-       my $dbmodule_friendly           = "";
-       my $dbmodule_selectlist         = "";
        my $dbmodule_config             = $main::kiriwrite_config{"system_dbmodule"};
 
-       # Open and get the list of presentation modules (perl modules) by filtering
-       # out the 
+       # Open and get the list of database modules (perl modules) by getting
+       # only files which end in .pm.
 
        opendir(DATABASEDIR, "Modules/Database");
        @dbmodule_directory = grep /m*\.pm$/, readdir(DATABASEDIR);
        closedir(DATABASEDIR);
 
-       # Process each presentation module and add them to the list of available
-       # presentation modules.
-
        foreach $dbmodule_file (@dbmodule_directory){
 
-               # Get the length of the database module (perl module) filename.
+               # Remove the .pm suffix.
 
-               $dbmodule_length = length($dbmodule_file);
-
-               # Get the friendly name of the Perl module (by getting rid of the
-               # .pm part of the filename).
-
-               do {
-
-                       $dbmodule_char = substr($dbmodule_file, $dbmodule_seek, 1);
-
-                       # Check if the current character is a dot and if it is then
-                       # set the last dot found number to the current seek number.
-
-                       if ($dbmodule_char eq "."){
-
-                               # Put the seek value as the last dot found number.
-
-                               $dbmodule_dot = $dbmodule_seek;
-
-                       }
-
-                       # Increment the seek counter.
-
-                       $dbmodule_seek++;
-
-               } until ($dbmodule_seek eq $dbmodule_length);
-
-               # Reset the seek counter as it is going to be used again.
-
-               $dbmodule_seek = 0;
-
-               # Get the friendly name of the Perl module by the processing the file
-               # name to the last dot the previous 'do' tried to find.
-
-               do {
-
-                       # Get the character the seek counter is currently set at.
-
-                       $dbmodule_char = substr($dbmodule_file, $dbmodule_seek, 1);
-
-                       # Append the character to the friendly name of the presentation module.
-
-                       $dbmodule_friendly = $dbmodule_friendly . $dbmodule_char;
+               $dbmodule_file =~ s/.pm$//;
+               $dbmodule_list{$dbmodule_count}{Filename} = $dbmodule_file;
+               $dbmodule_count++;
 
-                       # Increment the seek counter.
+       }
 
-                       $dbmodule_seek++;
+       my %outputmodule_list;
+       my @outputmodule_directory;
+       my $outputmodule;
+       my $outputmodule_file           = "";
+       my $outputmodule_count          = 0;
+       my $outputmodule_config         = $main::kiriwrite_config{"system_outputmodule"};
 
-               } until ($dbmodule_seek eq $dbmodule_dot);
+       # Open and get the list of output modules (perl modules) by getting
+       # only files which end in .pm.
 
-               # Append the option to tbe list of available database modules.
+       opendir(DATABASEDIR, "Modules/Output");
+       @outputmodule_directory = grep /m*\.pm$/, readdir(DATABASEDIR);
+       closedir(DATABASEDIR);
 
-               $dbmodule_list{$dbmodule_count}{Filename} = $dbmodule_friendly;
+       foreach $outputmodule_file (@outputmodule_directory){
 
-               # Reset the following values.
+               # Remove the .pm suffix.
 
-               $dbmodule_seek  = 0;
-               $dbmodule_length        = 0;
-               $dbmodule_char          = "";
-               $dbmodule_friendly      = "";
-               $dbmodule_count++;
+               $outputmodule_file =~ s/.pm$//;
+               $outputmodule_list{$outputmodule_count}{Filename} = $outputmodule_file;
+               $outputmodule_count++;
 
        }
 
@@ -1275,6 +1195,39 @@ sub kiriwrite_settings_edit{
        $main::kiriwrite_presmodule->endcell();
        $main::kiriwrite_presmodule->endrow();
 
+       $main::kiriwrite_presmodule->startrow();
+       $main::kiriwrite_presmodule->addcell("tablecell1");
+       $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{setting}{outputmodule});
+       $main::kiriwrite_presmodule->endcell();
+       $main::kiriwrite_presmodule->addcell("tablecell2");
+
+       # Process the list of available output modules.
+
+       $main::kiriwrite_presmodule->addselectbox("outputmodule");
+
+       foreach $outputmodule (keys %outputmodule_list){
+
+               # Check if the output module fileanme matches the filename in the 
+               # configuration file.
+
+               if ($outputmodule_list{$outputmodule}{Filename} eq $outputmodule_config){
+
+                       $main::kiriwrite_presmodule->addoption($outputmodule_list{$outputmodule}{Filename}, { Value => $outputmodule_list{$outputmodule}{Filename} , Selected => 1 });
+
+               } else {
+
+                       $main::kiriwrite_presmodule->addoption($outputmodule_list{$outputmodule}{Filename}, { Value => $outputmodule_list{$outputmodule}{Filename} });
+
+               }
+
+
+       }
+
+       $main::kiriwrite_presmodule->endselectbox();
+
+       $main::kiriwrite_presmodule->endcell();
+       $main::kiriwrite_presmodule->endrow();
+
        $main::kiriwrite_presmodule->startrow();
        $main::kiriwrite_presmodule->addcell("tablecell1");
        $main::kiriwrite_presmodule->addtext($main::kiriwrite_lang{setting}{databasemodule});
@@ -1443,6 +1396,7 @@ sub kiriwrite_output_config{
 # SystemLanguage       Specifies the new language to use for Kiriwrite.        #
 # PrsentationModule    Specifies the new presentation module to use for        #
 #                      Kiriwrite.                                              #
+# OutputModule         Specifies the new output module to use for Kiriwrite.   #
 # TextAreaCols         Specifies the width of the text area.                   #
 # TextAreaRows         Specifies the height of the text area.                  #
 # PageCount            Specifies the amount of pages to view.                  #
@@ -1470,6 +1424,7 @@ sub kiriwrite_output_config{
        my $settings_datetime                   = $passedsettings->{"DateTimeFormat"};
        my $settings_systemlanguage             = $passedsettings->{"SystemLanguage"};
        my $settings_presmodule                 = $passedsettings->{"PresentationModule"};
+       my $settings_outputmodule               = $passedsettings->{"OutputModule"};
        my $settings_dbmodule                   = $passedsettings->{"DatabaseModule"};
 
        my $settings_textareacols               = $passedsettings->{"TextAreaCols"};
@@ -1528,6 +1483,7 @@ sub kiriwrite_output_config{
        $configdata = $configdata . "system_language = "  . $settings_systemlanguage . "\r\n";
        $configdata = $configdata . "system_presmodule = "  . $settings_presmodule . "\r\n";
        $configdata = $configdata . "system_dbmodule = "  . $settings_dbmodule . "\r\n";
+       $configdata = $configdata . "system_outputmodule = "  . $settings_outputmodule . "\r\n";
        $configdata = $configdata . "system_datetime = "  . $settings_datetime . "\r\n\r\n";
 
        $configdata = $configdata . "display_textareacols = "  . $settings_textareacols . "\r\n";
index d51ea26..b486141 100755 (executable)
@@ -4,7 +4,7 @@
 # Kiriwrite Installer Script (install.pl/install.cgi)                          #
 # Installation script for Kiriwrite                                            #
 #                                                                              #
-# Version: 0.4.0                                                               #
+# Version: 0.5.0                                                               #
 # mod_perl 2.x compatabile version                                             #
 #                                                                              #
 # Copyright (C) 2005-2008 Steve Brokenshire <sbrokenshire@xestia.co.uk>                #
@@ -26,13 +26,12 @@ use strict;                         # Throw errors if there's something wrong.
 use warnings;                          # Write warnings to the HTTP Server Log file.
 
 use utf8;
-use CGI::Lite;
 
 eval "use CGI::Lite";
 
 if ($@){
        print "Content-type: text/html;\r\n\r\n";
-       print "The CGI::Lite Perl Module is not installed. Please install CGI::Lite and then run this installation script again.";
+       print "The CGI::Lite Perl Module is not installed. Please install CGI::Lite and then run this installation script again. CGI::Lite can be installed through CPAN.";
        exit;
 }
 
@@ -69,6 +68,8 @@ my $default_imagesuri         = "/images/kiriwrite";
 my $default_textarearows       = "10";
 my $default_textareacols       = "50";
 
+my $default_outputmodule       = "Normal";
+
 my $default_server             = "localhost";
 my $default_port               = "3306";
 my $default_protocol           = "tcp";
@@ -119,11 +120,15 @@ $kiriwrite_lang{"en-GB"}{"languagename"}  = "English (British)";
 
        $kiriwrite_lang{"en-GB"}{"presmoduleblank"}             = "The presentation module name given is blank.";
        $kiriwrite_lang{"en-GB"}{"presmoduleinvalid"}           = "The presentation module name given is invalid.";
+
        $kiriwrite_lang{"en-GB"}{"dbmoduleblank"}               = "The database module name given is blank.";
        $kiriwrite_lang{"en-GB"}{"dbmoduleinvalid"}             = "The database module name given is invalid.";
  
+       $kiriwrite_lang{"en-GB"}{"outputmoduleblank"}           = "The output module name given is blank.";
+       $kiriwrite_lang{"en-GB"}{"outputmoduleinvalid"}         = "The output module name given is invalid.";
        $kiriwrite_lang{"en-GB"}{"presmodulemissing"}           = "The presentation module with the filename given is missing.";
+       $kiriwrite_lang{"en-GB"}{"outputmodulemissing"}         = "The output module with the filename given is missing.";
        $kiriwrite_lang{"en-GB"}{"dbmodulemissing"}             = "The database module with the filename given is missing.";
        $kiriwrite_lang{"en-GB"}{"languagefilenamemissing"}     = "The language file with the filename given is missing.";
  
@@ -196,6 +201,7 @@ $kiriwrite_lang{"en-GB"}{"languagename"}    = "English (British)";
        $kiriwrite_lang{"en-GB"}{"systemlanguage"}      = "System Language";
        $kiriwrite_lang{"en-GB"}{"modules"}             = "Modules";
        $kiriwrite_lang{"en-GB"}{"presentationmodule"}  = "Presentation Module";
+       $kiriwrite_lang{"en-GB"}{"outputmodule"}        = "Output Module";
        $kiriwrite_lang{"en-GB"}{"databasemodule"}      = "Database Module";
        $kiriwrite_lang{"en-GB"}{"databaseserver"}      = "Database Server";
        $kiriwrite_lang{"en-GB"}{"databaseport"}        = "Database Port";
@@ -1032,6 +1038,7 @@ directory_noncgi_images = $passedsettings->{ImagesURIPath}
 
 system_language = $passedsettings->{Language}
 system_presmodule = $passedsettings->{PresentationModule}
+system_outputmodule = $passedsettings->{OutputModule}
 system_dbmodule = $passedsettings->{DatabaseModule}
 system_datetime = $passedsettings->{DateFormat}
                
@@ -1160,6 +1167,7 @@ if ($http_query_confirm eq 1){
        my $http_query_language                 = $form_data->{'language'};
 
        my $http_query_presmodule               = $form_data->{'presmodule'};
+       my $http_query_outputmodule             = $form_data->{'outputmodule'};
        my $http_query_dbmodule                 = $form_data->{'dbmodule'};
 
        my $http_query_databaseserver           = $form_data->{'databaseserver'};
@@ -1427,6 +1435,7 @@ if ($http_query_confirm eq 1){
        # Check the module names to see if they're valid.
 
        my $kiriwrite_presmodule_modulename_check       = kiriwrite_variablecheck($http_query_presmodule, "module", 0, 1);
+       my $kiriwrite_outputmodule_modulename_check     = kiriwrite_variablecheck($http_query_outputmodule, "module", 0, 1);
        my $kiriwrite_dbmodule_modulename_check         = kiriwrite_variablecheck($http_query_dbmodule, "module", 0, 1);
 
        if ($kiriwrite_presmodule_modulename_check eq 1){
@@ -1447,6 +1456,24 @@ if ($http_query_confirm eq 1){
 
        }
 
+       if ($kiriwrite_outputmodule_modulename_check eq 1){
+
+               # The output module name is blank, so return
+               # an error.
+
+               kiriwrite_error("outputmoduleblank");
+
+       }
+
+       if ($kiriwrite_outputmodule_modulename_check eq 2){
+
+               # The output module name is invalid, so return
+               # an error.
+
+               kiriwrite_error("outputmoduleinvalid");
+
+       }
+
        if ($kiriwrite_dbmodule_modulename_check eq 1){
 
                # The database module name is blank, so return
@@ -1465,8 +1492,8 @@ if ($http_query_confirm eq 1){
 
        }
 
-       # Check if the database module, presentation module and
-       # language file exists.
+       # Check if the database module, presentation module,
+       # output module and language file exists.
 
        if (!-e "Modules/Presentation/" . $http_query_presmodule . ".pm"){
 
@@ -1477,6 +1504,15 @@ if ($http_query_confirm eq 1){
 
        }
 
+       if (!-e "Modules/Output/" . $http_query_outputmodule . ".pm"){
+
+               # The database module is missing so return an
+               # error.
+
+               kiriwrite_error("outputmodulemissing");
+
+       }
+
        if (!-e "Modules/Database/" . $http_query_dbmodule . ".pm"){
 
                # The database module is missing so return an
@@ -1692,7 +1728,7 @@ if ($http_query_confirm eq 1){
 
        # Write the new configuration file.
 
-       kiriwrite_writeconfig({ DatabaseDirectory => $http_query_dbdirectory, OutputDirectory => $http_query_outputdirectory, ImagesURIPath => $http_query_imagesuripath, TextAreaCols => $http_query_textareacols, TextAreaRows => $http_query_textarearows, DateFormat => $finaldateformat, Language => $http_query_language, PresentationModule => $http_query_presmodule, DatabaseModule => $http_query_dbmodule, DatabaseServer => $http_query_databaseserver, DatabasePort => $http_query_databaseport, DatabaseProtocol => $http_query_databaseprotocol, DatabaseName => $http_query_databasename, DatabaseUsername => $http_query_databaseusername, DatabasePassword => $http_query_databasepassword, DatabaseTablePrefix => $http_query_databasetableprefix });
+       kiriwrite_writeconfig({ DatabaseDirectory => $http_query_dbdirectory, OutputDirectory => $http_query_outputdirectory, ImagesURIPath => $http_query_imagesuripath, TextAreaCols => $http_query_textareacols, TextAreaRows => $http_query_textarearows, DateFormat => $finaldateformat, Language => $http_query_language, PresentationModule => $http_query_presmodule, OutputModule => $http_query_outputmodule, DatabaseModule => $http_query_dbmodule, DatabaseServer => $http_query_databaseserver, DatabasePort => $http_query_databaseport, DatabaseProtocol => $http_query_databaseprotocol, DatabaseName => $http_query_databasename, DatabaseUsername => $http_query_databaseusername, DatabasePassword => $http_query_databasepassword, DatabaseTablePrefix => $http_query_databasetableprefix });
 
        my $installscriptmessage        = "";
 
@@ -1784,10 +1820,6 @@ $test_list{CheckDBI}{Name}               = "DBI";
 $test_list{CheckDBI}{Type}             = "dependency";
 $test_list{CheckDBI}{Code}             = "DBI";
 
-$test_list{CheckTieHash}{Name}         = "Tie::IxHash";
-$test_list{CheckTieHash}{Type}                 = "dependency";
-$test_list{CheckTieHash}{Code}                 = "Tie::IxHash";
-
 $test_list{CheckCGILite}{Name}         = "CGI::Lite";
 $test_list{CheckCGILite}{Type}         = "dependency";
 $test_list{CheckCGILite}{Code}         = "CGI::Lite";
@@ -1796,6 +1828,14 @@ $test_list{Encode}{Name}         = "Encode";
 $test_list{Encode}{Type}               = "dependency";
 $test_list{Encode}{Code}               = "Encode";
 
+$test_list{HashSearch}{Name}           = "Hash::Search";
+$test_list{HashSearch}{Type}           = "dependency";
+$test_list{HashSearch}{Code}           = "Hash::Search";
+
+$test_list{CheckTieHash}{Name}         = "Tie::IxHash";
+$test_list{CheckTieHash}{Type}                 = "dependency";
+$test_list{CheckTieHash}{Code}                 = "Tie::IxHash";
+
 $test_list{DBDmysql}{Name}             = "DBD::mysql";
 $test_list{DBDmysql}{Type}             = "database";
 $test_list{DBDmysql}{Code}             = "DBD::mysql";
@@ -2037,7 +2077,7 @@ if ($file_error eq 1){
 
 print "<table>";
 
-kiriwrite_addtablerow("Filename", "tablecellheader", "Result", "tablecellheader");
+kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{filename}, "tablecellheader", "Result", "tablecellheader");
 
 foreach $test (keys %file_results) {
 
@@ -2080,6 +2120,7 @@ if ($file_error eq 1){
 my @language_short;
 my (%available_languages, $available_languages);
 my @presentation_modules;
+my @output_modules;
 my @database_modules;
 my $select_data = "";
 my (%language_data, $language_data);
@@ -2088,6 +2129,7 @@ my $kiriwrite_languagefilehandle;
 my $language_out = "";
 my ($presmodule_name, $presmodule_out) = "";
 my ($dbmodule_name, $dbmodule_out) = "";
+my ($outputmodule_name, $outputmodule_out) = "";
 
 # Get the list of available languages.
 
@@ -2132,6 +2174,21 @@ foreach my $presmodule_file (@presmodule_directory){
 
 }
 
+# Get the list of output modules.
+
+opendir(OUTPUTDIR, "Modules/Output");
+my @outputmodule_directory = grep /m*\.pm$/, readdir(OUTPUTDIR);
+closedir(OUTPUTDIR);
+
+foreach my $outputmodule_file (@outputmodule_directory){
+
+       # Get the friendly name for the database module.
+
+       $outputmodule_file =~ s/.pm$//g;
+       push(@output_modules, $outputmodule_file);
+
+}
+
 # Get the list of database modules.
 
 opendir(DATABASEDIR, "Modules/Database");
@@ -2181,16 +2238,28 @@ foreach my $language (keys %available_languages){
 }
 
 kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{systemlanguage}, "tablename", "<select name=\"language\">\r\n$language_out\r\n</select>", "tabledata");
+
 kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{modules}, "tablecellheader", "", "tablecellheader");
+
 foreach $presmodule_name (@presentation_modules){
        $presmodule_out = $presmodule_out . "<option value=\"$presmodule_name\">$presmodule_name</option>";
 }
 kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{presentationmodule}, "tablename", "<select name=\"presmodule\">$presmodule_out</select>", "tabledata");
+
 foreach $dbmodule_name (@database_modules){
        $dbmodule_out = $dbmodule_out . "<option value=\"$dbmodule_name\">$dbmodule_name</option>";
 }
-
 kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{databasemodule}, "tablename", "<select name=\"dbmodule\">$dbmodule_out</select>", "tabledata");
+
+foreach $outputmodule_name (@output_modules){
+       if ($default_outputmodule = $outputmodule_name){
+               $outputmodule_out = $outputmodule_out . "<option value=\"$outputmodule_name\" selected>$outputmodule_name</option>";            
+       } else {
+               $outputmodule_out = $outputmodule_out . "<option value=\"$outputmodule_name\">$outputmodule_name</option>";
+       }
+}
+kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{outputmodule}, "tablename", "<select name=\"outputmodule\">$outputmodule_out</select>", "tabledata");
+
 kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{databaseserver}, "tablename", "<input type=\"text\" name=\"databaseserver\" size=\"32\" maxlength=\"128\" value=\"$default_server\">\n", "tabledata");
 kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{databaseport}, "tablename", "<input type=\"text\" name=\"databaseport\" maxlength=\"5\" size=\"5\" value=\"$default_port\">\n", "tabledata");
 kiriwrite_addtablerow($kiriwrite_lang{$language_selected}{databaseprotocol}, "tablename", "<select name=\"databaseprotocol\">\n<option value=\"tcp\">tcp</option>\n<option value=\"udp\">udp</option>\n</select>\n", "tabledata");
index 43bed2d..36ec6ff 100755 (executable)
@@ -4,7 +4,7 @@
 # Kiriwrite (kiriwrite.pl/kiriwrite.cgi)                                       #
 # Main program script                                                          #
 #                                                                              #
-# Version: 0.4.0                                                               #
+# Version: 0.5.0                                                               #
 # mod_perl 2.x compatabile version                                             #
 #                                                                              #
 # Copyright (C) 2005-2008 Steve Brokenshire <sbrokenshire@xestia.co.uk>                #
@@ -37,13 +37,14 @@ binmode STDOUT, ':utf8';
 
 # Declare global variables for Kiriwrite settings and languages.
 
-our ($kiriwrite_config, %kiriwrite_config, %kiriwrite_lang, $kiriwrite_lang, $kiriwrite_version, %kiriwrite_version, $kiriwrite_env, %kiriwrite_env, $kiriwrite_presmodule, $kiriwrite_dbmodule, $form_data, $kiriwrite_script_name, $kiriwrite_env_path);
+our ($kiriwrite_config, %kiriwrite_config, %kiriwrite_lang, $kiriwrite_lang, $kiriwrite_version, %kiriwrite_version, $kiriwrite_env, %kiriwrite_env, $kiriwrite_presmodule, $kiriwrite_dbmodule, $kiriwrite_script_name, $kiriwrite_env_path);
+our ($form_data, %form_data);
 
 # If you are using mod_perl please change these settings to the correct
 # directory where this script is being run from.
 
-use lib '.';
-chdir('.');
+use lib '/home/kirinji/Websites/Xestia/cgi-bin/kiriwrite';
+chdir('/home/kirinji/Websites/Xestia/cgi-bin/kiriwrite');
 
 # Load the common functions module.
 
@@ -53,7 +54,7 @@ use Modules::System::Common;
 
 %kiriwrite_version = (
        "major"         => 0,
-       "minor"         => 4,
+       "minor"         => 5,
        "revision"      => 0
 );
 
@@ -65,7 +66,7 @@ my $query_lite = new CGI::Lite;
 # Check if a mode has been specified and if a mode has been specified, continue
 # and work out what mode has been specified.
 
-$form_data = $query_lite->parse_form_data;
+$form_data = $query_lite->parse_form_data();
 
 if ($form_data->{'mode'}){
        my $http_query_mode = $form_data->{'mode'};
@@ -343,7 +344,6 @@ if ($form_data->{'mode'}){
                                kiriwrite_output_header;        # Output the header to browser/console/stdout.
                                kiriwrite_output_page($kiriwrite_lang{pages}{editpagetitle}, $pagedata, "pages");       # Output the page to browser/console/stdout.
                                exit;                           # End the script.
-
                        
                        } elsif ($http_query_action eq "delete"){
                
@@ -880,10 +880,13 @@ if ($form_data->{'mode'}){
                
                                                my $http_query_override         = $form_data->{'enableoverride'};
                                                my $http_query_overridetemplate = $form_data->{'overridetemplate'};
-               
+                                               my $http_query_outputmodule     = $form_data->{'outputmodule'};
+
                                                my @selectedlist = kiriwrite_selectedlist($form_data);
-                                               my $pagedata = kiriwrite_compile_makepages($http_query_type, $http_query_confirm, $http_query_override, $http_query_overridetemplate, @selectedlist);
-               
+                                               my %form_data_hash = $query_lite->parse_form_data;
+                                               kiriwrite_compile_loadhash(%form_data_hash);
+                                               my $pagedata = kiriwrite_compile_makepages($http_query_type, $http_query_confirm, $http_query_override, $http_query_overridetemplate, $http_query_outputmodule, @selectedlist);
+
                                                kiriwrite_output_header;        # Output the header to browser/console/stdout.
                                                kiriwrite_output_page($kiriwrite_lang{compile}{compilepages}, $pagedata, "compile"); # Output the page to browser/console/stdout.
                                                exit;                           # End the script.
@@ -893,9 +896,11 @@ if ($form_data->{'mode'}){
                                                # The action to compile the pages has not been confirmed
                                                # so write a form asking the user to confirm the action
                                                # of compiling the pages.
-               
+
+                                               my $http_query_outputmodule     = $form_data->{'outputmodule'};
+
                                                my @selectedlist = kiriwrite_selectedlist($form_data);
-                                               my $pagedata = kiriwrite_compile_makepages($http_query_type, $http_query_confirm, "", "", @selectedlist);
+                                               my $pagedata = kiriwrite_compile_makepages($http_query_type, $http_query_confirm, "", "", $http_query_outputmodule, @selectedlist);
                
                                                kiriwrite_output_header;        # Output the header to browser/console/stdout.
                                                kiriwrite_output_page($kiriwrite_lang{compile}{compileselecteddatabases}, $pagedata, "compile"); # Output the page to browser/console/stdout.
@@ -905,10 +910,11 @@ if ($form_data->{'mode'}){
                
                                } elsif ($http_query_type eq "single"){
                
-                                       my $http_query_database = $form_data->{'database'};
+                                       my $http_query_database         = $form_data->{'database'};
+                                       my $http_query_outputmodule     = $form_data->{'outputmodule'};
                                        my @selectedlist;
                                        $selectedlist[0] = $http_query_database;
-                                       my $pagedata = kiriwrite_compile_makepages($http_query_type, $http_query_confirm, "", "", @selectedlist);
+                                       my $pagedata = kiriwrite_compile_makepages($http_query_type, $http_query_confirm, "", "", $http_query_outputmodule, @selectedlist);
                
                                        kiriwrite_output_header;        # Output the header to browser/console/stdout.
                                        kiriwrite_output_page($kiriwrite_lang{compile}{compiledatabase}, $pagedata, "compile");
@@ -926,7 +932,8 @@ if ($form_data->{'mode'}){
                                # in the database directory. Check if the action to
                                # compile all of the databases has been confirmed.
                
-                               my $http_query_confirm = $form_data->{'confirm'};
+                               my $http_query_confirm          = $form_data->{'confirm'};
+                               my $http_query_outputmodule     = $form_data->{'outputmodule'};
                
                                if (!$http_query_confirm){
                
@@ -937,13 +944,7 @@ if ($form_data->{'mode'}){
                
                                }
                
-                               if ($http_query_confirm eq 1){
-               
-                                       # The action to compile all the databases has been confirmed.
-               
-                               }
-               
-                               my $pagedata = kiriwrite_compile_all();
+                               my $pagedata = kiriwrite_compile_all($http_query_outputmodule);
                
                                kiriwrite_output_header;                        # Output the header to browser/console/stdout.
                                kiriwrite_output_page($kiriwrite_lang{compile}{compilealldatabases}, $pagedata, "compile");
@@ -1038,6 +1039,7 @@ if ($form_data->{'mode'}){
                                        my $http_query_systemlanguage   = $form_data->{'language'};
                                        my $http_query_presmodule       = $form_data->{'presmodule'};
                                        my $http_query_dbmodule         = $form_data->{'dbmodule'};
+                                       my $http_query_outputmodule     = $form_data->{'outputmodule'};
                                        my $http_query_textareacols     = $form_data->{'textareacols'};
                                        my $http_query_textarearows     = $form_data->{'textarearows'};
                                        my $http_query_pagecount        = $form_data->{'pagecount'};
@@ -1053,7 +1055,7 @@ if ($form_data->{'mode'}){
                                        my $http_query_database_password        = $form_data->{'database_password'};
                                        my $http_query_database_tableprefix     = $form_data->{'database_tableprefix'};
                
-                                       my $pagedata = kiriwrite_settings_edit({ DatabaseDirectory => $http_query_database, OutputDirectory => $http_query_output, ImagesURIPath => $http_query_imagesuri, DateTimeFormat => $http_query_datetimeformat, SystemLanguage => $http_query_systemlanguage, PresentationModule => $http_query_presmodule, TextAreaCols => $http_query_textareacols, TextAreaRows => $http_query_textarearows, PageCount => $http_query_pagecount, FilterCount => $http_query_filtercount, TemplateCount => $http_query_templatecount, DatabaseModule => $http_query_dbmodule, DatabaseServer => $http_query_database_server, DatabasePort => $http_query_database_port, DatabaseProtocol => $http_query_database_protocol, DatabaseSQLDatabase => $http_query_database_sqldatabase, DatabaseUsername => $http_query_database_username, DatabasePasswordKeep => $http_query_database_passwordkeep, DatabasePassword => $http_query_database_password, DatabaseTablePrefix => $http_query_database_tableprefix, Confirm => 1 });
+                                       my $pagedata = kiriwrite_settings_edit({ DatabaseDirectory => $http_query_database, OutputDirectory => $http_query_output, ImagesURIPath => $http_query_imagesuri, DateTimeFormat => $http_query_datetimeformat, SystemLanguage => $http_query_systemlanguage, PresentationModule => $http_query_presmodule, OutputModule => $http_query_outputmodule, TextAreaCols => $http_query_textareacols, TextAreaRows => $http_query_textarearows, PageCount => $http_query_pagecount, FilterCount => $http_query_filtercount, TemplateCount => $http_query_templatecount, DatabaseModule => $http_query_dbmodule, DatabaseServer => $http_query_database_server, DatabasePort => $http_query_database_port, DatabaseProtocol => $http_query_database_protocol, DatabaseSQLDatabase => $http_query_database_sqldatabase, DatabaseUsername => $http_query_database_username, DatabasePasswordKeep => $http_query_database_passwordkeep, DatabasePassword => $http_query_database_password, DatabaseTablePrefix => $http_query_database_tableprefix, Confirm => 1 });
                
                                        kiriwrite_output_header;        # Output the header to browser/console/stdout.
                                        kiriwrite_output_page($kiriwrite_lang{setting}{editsettings}, $pagedata, "settings");   # Output the page to browser/console/stdout.
index 7709f87..6185cfd 100644 (file)
@@ -272,6 +272,10 @@ compiledatabase = Compile Database
 compiledatabasemessage = Do you want to compile the '%s' database?
 compiledatabasebutton = Compile Database
 
+selectoutputmodule = Select Output Module:
+outputmodulesettings = Output Module Settings
+selectbutton = Select
+
 overridetemplate = Override the template being used.
 replacecurrenttemplate = Replace current template with:
 templatedbmissing = The template database does not exist so the template being used cannot be overridden.
@@ -304,6 +308,7 @@ invalidpagefilename = The page '%s' has an invalid filename. Page skipped.
 templatefilemissing = The template with the filename '%s' for '%s' (%s) does not exist.
 pageinvalidpermissions = The page with the filename '%s' has invalid permissions set. Page not written.
 pagenotwritten = An error occured while writing the page with the filename '%s': %s
+outputallerror = An error occured while outputting all of the pages: %s
 compiledpageblankname =  (%s) was compiled.
 compiledpage = '%s' (%s) was compiled.
 databasefinish = Finished compiling pages in the '%s' database...
@@ -338,6 +343,7 @@ language = Language
 systemlanguage = System Language
 modules = Modules
 presentationmodule = Presentation Module
+outputmodule = Output Module
 databasemodule = Database Module
 altersettings = To alter the current settings, select the Edit Settings option at the top of the page.
 
@@ -452,6 +458,10 @@ oldcopydatabasefileinvalidpermissions = The database that the selected pages are
 oldmovedatabasedatabaseerror = A database error has occurred in the database that the selected pages are being moved from.
 oldmovedatabasedoesnotexist = The database that the selected pages are moving from does not exist.
 oldmovedatabasefileinvalidpermissions = The database that the selected pages are moving from has invalid permissions set.
+outputmoduleblank = The output module name given is blank.
+outputmoduleinvalid = The output module name given is invalid.
+outputmodulenametoolong = The output module name given is too long.
+outputmodulenameinvalid = The output module name is invalid.
 outputdirectoryblank = The output directory name given was blank.
 outputdirectoryinvalid = The output directory name given was invalid.
 outputdirectorymissing = The output directory is missing
index 3a4de2e..348847b 100644 (file)
                                <kiriwrite:pagedata>
                        </div>
                        <div class="copyrightbar">
-                               &copy;2005-2008 Steve Brokenshire<br />
+                               &copy;2005-2009 Steve Brokenshire<br />
                        </div>
                </div>
        </body>
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy