view mconfig.inc.php.example @ 1092:95b74632cfe2

Rename votekeys table to userkeys, and all related variables and settings.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 26 Jan 2017 13:38:19 +0200
parents 00632d30bafe
children faa835271dfd
line wrap: on
line source

<?php
//
// Site configuration, important settings that MUST be
// reviewed and set correctly before deployment.
//
$siteSettings = array(

  // Admin interface password
//  "admPassword"     => "xxx",

  // SQL database PHP data source name, etc. Refer to
  // http://www.php.net/manual/en/pdo.construct.php
  // Has been tested with SQLite3 and PostgreSQL backends.
  "sqlDB"           => "sqlite:fap.sqlite3",
//  "sqlDB"           => "pgsql:dbname=fap2014",
//  "sqlUsername"     => "",  // Leave unset if not needed
//  "sqlPassword"     => "",  // --""--
//  "sqlOptions"      => array(), // See PDO documentation

  // Log debug information in error_log, also enables use of GET
  // requests for certain data that normally can only be used via
  // POST (for easier manual testing). WARNING! Do NOT enable
  // for production sites without a good reason.
  "debug"           => false,

  // Default page
  "defaultPage"     => "about", // Default page

  // User key/votekey settings
  "userKeyMode"     => -1, // See msite.inc.php for VOTE_*
  "userKeyLength"   => 6,       // Vote key length in characters
  //"userKeyCase"     => true,   // If false, keys are case-INsensitive
  //"userKeyChars"    => "abdefghjkmnpqrstwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789", // Characters to be used for key generation

  // Voting settings
  "voteMin"         => -1,
  "voteMax"         => 2,
  

  "userTimeout"     => 120, // In minutes
  "admTimeout"      => 15,


  // Entry file paths and URL prefixes
  "entryMaxSize" => 16 * 1024 * 1024, // max file size
  "entryPath" => "/home/ccr/files/", // should be absolute path
  "entryPathPerms" => 0755,
  "entryFilePerms" => 0644,
  
  "previewMaxSize" => 2 * 1024 * 1024, // max file size
  "previewPath" => "/home/ccr/fapdev/previews/", // should be absolute path
  "previewURL" => "http://localhost:8888/previews/", // can be relative (should point to same dir as previewPath)
  "thumbnailSubDir" => "tn/", // relative subdir to previewPath and previewURL
  "previewPathPerms" => 0711,
  "previewFilePerms" => 0644,

  // Generated sample files settings
  // Used for openmpt123 and avconv
  "sampleFreq" => 44100, // in Hz
  "sampleChannels" => 1, // 1 = mono, 2 = stereo
  "sampleDuration" => 30, // in seconds

  //"avconv_exe" => "ffmpeg", // avconv/ffmpeg binary executable
  //"gfxconv_exe" => "gfxconv", 
  //"openmpg123_exe" => "openmpt123",

  "openmpt123_args" => "", // Extra commandline arguments for openmpt123

  // Samples to be generated, and their avconv settings
  "sampleTypes" => array(
    "OggVorbis" => array("-f" => "ogg", "-c:a" => "libvorbis", "-q:a" => 5),
    "MP3"       => array("-f" => "mp3", "-c:a" => "libmp3lame", "-b:a" => "96k"),
  ),

  // Preview image files settings
  "previewNoImage" => "img/nopreview_tn.png",
  "previewImageType" => "PNG", // Generally PNG or JPEG
  "previewImageQuality" => 9, // compression (PNG) or quality (JPEG)
  "previewImageSize" => array(640, 480), // resolution W x H

  "previewThumbType" => "PNG",
  "previewThumbQuality" => 9, // compression (PNG) or quality (JPEG)
  "previewThumbSize" => array(64, 48),
);


date_default_timezone_set("Europe/Helsinki");

$securePages = array(
  "/fap2014/register" => true,
  "/fap2014/vote" => false,
);


$pageTitle = "Finnish Amiga Party 2014";
$pageCharset = "utf-8";
$pageCSS = array(
  "css/main.css" => FALSE,
  "css/desktop.css" => "only screen and (min-width: 801px)",
  "css/mobile.css" => "only screen and (max-width: 799px), only screen and (max-device-width: 799px)"
);

?>