From 4982d03bd00d01651f3b694e0a316900c8c7c475 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Tue, 16 Sep 2008 13:38:12 +0200 Subject: [PATCH] More documentation. --- README | 20 ++++++++++++++------ examples/g.cgi | 3 ++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README b/README index 5f92a3b..3b9e12d 100644 --- a/README +++ b/README @@ -36,14 +36,16 @@ Change `www-data' to whatever user your Apache runs as. 4. Create a directory where your application data will be stored. The Apache user needs to write there, so make him the owner. For organization purposes, it can be under the .../grutasample directory; just ensure -it's not accesible via web by means of an Apache authorization directive. +it's not accesible via web by means of an Apache authorization directive +(see below). -5. Copy the `g.cgi' file from ./examples. +5. Copy the `g.cgi' file from the `examples' subdirectory in the +distribution source. 6. Modify it to suit your needs. You'll have to change the $base variable, the source driver (choose between DBI or FS) and the `base_url'. If your data directory is not under $base, change the reference in the Source -object creation accordingly. You'll probably have also to change the +object creation accordingly. You'll probably also have to change the language of your application templates (look for available languages in /usr/share/gruta/templates/artemus) and the setlocale() call. @@ -64,9 +66,15 @@ This will probably be under a virtual host configuration. Use your Apache knowledge, this is not an Apache manual. 8. Point your browser to the URL. As it's the first time, an `admin' user -with a random password has been created. Click on administration, change -the password, and start configuring from there. Add your new sections, -users and entries. Enjoy. +with a random password has been created and the program flow redirected +to the administration page. Select the `admin' user from the 'Users' section +and set the password. + +9. Create some topics. New topics will appear in the top menu. Clicking on +them will allow you to create new stories. If you create a topic with the +topic id 'info', the stories with ids 'about' and 'legal' will be magically +added to the top header. For the rest of your stories, create another topic. +One with id 'main' will be OK. --- Angel Ortega diff --git a/examples/g.cgi b/examples/g.cgi index 0528962..bd4b701 100755 --- a/examples/g.cgi +++ b/examples/g.cgi @@ -10,6 +10,7 @@ use POSIX qw (locale_h); use Gruta; use Gruta::CGI; use Gruta::Source::DBI; +#use Gruta::Source::FS; use Gruta::Renderer::Grutatxt; use Gruta::Renderer::HTML; use Gruta::Template::Artemus; @@ -18,7 +19,7 @@ my $base = '/var/www/gruta'; my $g = Gruta->new( sources => [ - Gruta::Source::DBI->new( string => "dbi:SQLite:$base/gruta.db" ), + Gruta::Source::DBI->new( string => "dbi:SQLite:$base/var/gruta.db" ), # Gruta::Source::FS->new( path => "${base}/var" ), ], renderers => [ -- 2.11.4.GIT