O'Reilly logo

Running Weblogs with Slash by David Krieger, Brian Aker, Chromatic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix E. Slash Configuration Variables

The vars table holds all of the configuration variables for a Slash site. These can be divided into several logical groups. This appendix lists the most important variables by name and default value and offers brief descriptions. The program in Example E-1 can be used to generate a similar list for later versions and create a printable copy of current variables.

Example E-1. slashvarlist.pl

#!/usr/bin/perl -w

use strict;

use Slash;
use Slash::Utility;

my $virtual_user = shift || 'slash';
createEnvironment($virtual_user);
my $slashdb = getCurrentDB();

print <<HEADER;
Slash Configuration Variables

Name	=> Value (Description)
------------------------------
HEADER

my $sth = $slashdb->sqlSelectMany('name, value, description', 'vars');
while(my $row = $sth->fetchrow_hashref()) {
	print "$row->{name}	=> $row->{value} ($row->{description})\n";
}

print "Generated at " . scalar localtime . " by $0\n";

Variable Tables

The variables in Table E-1 are set by install-slashsite, when first creating a new site. These will all differ between systems, and many will differ between sites. Modifying these variables can render site features unusable.

Table E-1. Site configuration variables

Name

Default value

Description

absolutedir

http://firewheel

Absolute base URL of site; used for creating links external to site that need a complete URL

adminmail

root

The destination address for administrative reports

basedir

/usr/local/slash/site/firewheel/htdocs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required