WCV - Web Content Viewer

Info | HTML | PDF | Text
Changelog
  • Revision 283 by kore at Tue, 11 Sep 2007 23:19:38 +0200

    - Fixed sytax and link

  • Revision 282 by kore at Tue, 11 Sep 2007 23:16:35 +0200

    - Added initial draft for install document

WCV - Installation

Installation

Currently there are no real releases available for WCV. So you should start by checking out WCV from svn.

svn co svn://kore-nordmann.de/wcv

There are two folders.

doc/
Contains the design description and install documents. It also is the default content repository and will be used to serve some content in the default installation.
trunk/
This contains the actual source code. Some of its directories will be described in further detail in this document...

To set WCV up there a only three things you need to ensure.

  1. Link the folder trunk/htdocs/ to the folder which is used by your webserver to serve content from, or set it directly as the document root for your webserver.

  2. There are some folders which are required to be writable by the webserver user.

    1. The folder trunk/var/ will contain some caches, temporary files and logs. The folder and all of its subfolders should be writable.

    2. The folder trunk/htdocs/ is required to be writable, because WCV will try to create its static caches there.

    3. All folders, which contain blog posts need to be writable, because the blog handler will want to create sqlite databases for the comments there.

  3. Set up the webserver to either use the index.php as a 404 error handler, or rewrite every request to it, which does not match an existing file. The example configuration for lighttpd is shown below.

$HTTP["host"] =~ "^wcv$" { var.localroot = vhostbase + "/wcv" server.document-root = localroot + "/trunk/htdocs/" url.redirect = ( # Basic "^/$" => "/description.html" ) server.error-handler-404 = "/index.php" include "includes/fastcgi.conf" include "includes/locallog.conf" }

Customization

There are many ways to customize WCV, especially when it comes to custom handlers for contents, indexers and meta data. Those won't be described here, but the very basic stuff to make WCV fit your personal website using the existing facilities.

Configuration

In the directory trunk/config/ you will find several ini files which contain most settings viable for WCV. The file metadata.ini defines stuff like author, default content language and license (which may be overwritten by the content), the websites description and so on.

There is also the very basic configuration file trunk/classes/config.php which sets up the environment for WCV, where you may disable caching, or enable the debug mode.

The site.ini defines the host of the website, mail destinations, the location of the basic content directory and the default handler.

The configuration file handlers.ini defines a list of available handlers for each user extendable mechanism. You may disable the pdf display decorator here, for example.

Custom templates

The site ini also enables you to define an override directory for templates, which will be checked first, when a template is used somewhere, so that you may provide custom templates using multiple override directories to easily use your own website style.

Usage

In the day to day usage WCV is usually updated on the command line on your webserver. There are several scripts which make this task easier for you. Nearly every script has the following options:

-h
Display some description and the available options.
-v
Makes output more verbose.
-q
Silence script.

Scripts

The scripts in some more detail.

Clear cache

This script will remove everything from the cache including the tree cache. The caches will be regenerated on the next request, which may take some time for bigger content repositories. Common use:

./scripts/clearCache.php
Update cache

More useful when you updated some contents on the website is the script to update all caches in teh background. It will first enforces a regeneration of the tree cache and then regenerate all contents without any user noticeable delay, beacuse the contents won't be replaced or removed until regenerated. Common usage:

./scripts/updateCache.php
Index content

The default search uses glimpse as a backend. This scripts updates its index, so that you will find your newest stuff in the search results. Common usage:

./scripts/indexContent.php
Check comment spam

If you are using the blog indexer you may notice an increasing amount of spam. There is a simple script, which displays all blocked comments and let you decide to either delete the comment, or readd it to your blog, because akismet may have false positives from time to time... Common usage:

./scripts/checkCommentSpam.php

Feedback & Bugs

If you have feedback and / or bugs you may subscribe to the WCV mailing list, and post your bugs there: wcv-subscribe@kore-nordmann.de