make config kinda work

darcs-hash:20080517152958-84dde-1170f017a6cf42845d74f75057c923be91404c29.gz
This commit is contained in:
Evan Prodromou 2008-05-17 11:29:58 -04:00
parent 2d58199266
commit 516996fe9f
4 changed files with 39 additions and 37 deletions

View File

@ -1,26 +0,0 @@
<?php
if (!defined('MICROBLOG')) { exit(1) }
$dsn = array(
'phptype' => 'pgsql',
'username' => 'someuser',
'password' => 'apasswd',
'hostspec' => 'localhost',
'database' => 'thedb',
);
$options = array(
'debug' => 2,
'portability' => DB_PORTABILITY_ALL,
);
$db =& DB::connect($dsn, $options);
if (PEAR::isError($db)) {
die($db->getMessage());
}
$config['db'] =
array( 'username' => 'stoica',
'password' => 'replaceme',

19
config.php.sample Normal file
View File

@ -0,0 +1,19 @@
<?php
/* -*- mode: php -*- */
if (!defined('LACONICA')) { exit(1) }
# We get called by common.php, $config is a tree with lots of config
# options
# These are for configuring your URLs
$config['site']['name'] = 'Just another Laconica microblog';
$config['site']['server'] = 'localhost';
$config['site']['path'] = 'laconica';
# This is a PEAR DB DSN, see http://pear.php.net/manual/en/package.database.db.intro-dsn.php
# Set it to match your actual database
$config['db']['database'] = 'mysql://laconica:microblog@localhost/laconica';

View File

@ -40,6 +40,10 @@
- design from Open Source Web Designs - design from Open Source Web Designs
- TOS checkbox on register - TOS checkbox on register
- pretty URLs - pretty URLs
- XML sitemap generation
- site logo
- theme per site
- theme per profile
- release 0.2 - release 0.2
- content negotiation for interface language - content negotiation for interface language
- content negotiation for content type - content negotiation for content type
@ -60,6 +64,7 @@
- RDFa for stream pages - RDFa for stream pages
- RDFa for subscriber pages - RDFa for subscriber pages
- RDFa for subscribed pages - RDFa for subscribed pages
- plugins and hooks
- release 0.3 - release 0.3
- @ messages - @ messages
- # tags - # tags

View File

@ -29,28 +29,32 @@ define('MAX_AVATAR_SIZE', 256 * 1024);
# global configuration object # global configuration object
require_once('PEAR.php');
require_once('DB_DataObject.php');
// default configuration, overwritten in config.php // default configuration, overwritten in config.php
$config = $config =
array('site' => array('site' =>
array('name' => 'Just another µB', array('name' => 'Just another Laconica microblog',
'server' => 'localhost', 'server' => 'localhost',
'path' => '/'), 'path' => '/'),
'avatar' => 'avatar' =>
array('directory' => INSTALLDIR . 'files', array('directory' => INSTALLDIR . 'files',
'path' => '/files'), 'path' => '/files'),
'dsn' => 'db' => &PEAR::getStaticProperty('DB_DataObject','options'),
array('phptype' => 'mysql', );
'username' => 'stoica',
'password' => 'apasswd', $config['db'] =
'hostspec' => 'localhost', array('database' => 'YOU HAVE TO SET THIS IN config.php',
'database' => 'thedb') 'schema_location' => $INSTALLDIR . '/classes',
'dboptions' => 'class_location' => $INSTALLDIR . '/classes',
array('debug' => 2, 'require_prefix' => 'classes/',
'portability' => DB_PORTABILITY_ALL)); 'class_prefix' => '',
'db_driver' => 'MDB2',
'quote_identifiers' => false);
require_once(INSTALLDIR . '/config.php'); require_once(INSTALLDIR . '/config.php');
require_once('DB.php');
# Show a server error # Show a server error