developer system settings and tools

This commit is contained in:
following
2012-08-09 17:06:01 +02:00
parent 1c931d10ee
commit d12dbdcf25
3 changed files with 429 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/php
<?php
/*
* update of static data and triggers in developer system
*
* Tables must be updated manually, see htdocs/doc/sql/db-changes.txt
*/
require('htdocs/util/mysql_root/settings.inc.php');
echo "importing data.sql ...\n";
chdir ('htdocs/doc/sql');
system('cat static-data/data.sql | mysql -uroot --password=' . $db_root_password . ' opencaching');
echo "importing triggers ...\n";
chdir('stored-proc');
system('php maintain.php');
echo "resettings webcache ...\n";
chdir('../../../../bin');
system('php clear-webcache.php');
?>
+157
View File
@@ -0,0 +1,157 @@
<?php
/***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ
*
* Default settings for developer system. See also
* - config2/settings-dist.inc.php for global default settings
* - config2/settings.inc.php for local settings
* - lib/settings* for version-1-code settings
***************************************************************************/
/* PHP settings
*
* PHP_DEBUG_SKIP
*
* dont use ini_set()
*
* PHP_DEBUG_OFF
*
* use the following php.ini-settings
* display_errors = On
* error_reporting = E_ALL & ~E_NOTICE
* mysql.trace_mode = Off
*
* strongly recommended settings
* register_globals = Off
*
* PHP_DEBUG_ON
*
* use the following php.ini-settings
* display_errors = On
* error_reporting = E_ALL
* mysql.trace_mode = On
*/
$opt['php']['debug'] = PHP_DEBUG_ON;
/* settings for the template engine
*
*/
$opt['db']['servername'] = ':/var/lib/mysql/mysql.sock';
$opt['db']['username'] = 'oc';
$opt['db']['password'] = 'developer';
$opt['db']['pconnect'] = true;
// ... how long a query can take without warning (0 <= disabled)
$opt['db']['warn']['time'] = 0;
$opt['db']['warn']['mail'] = 'root';
$opt['db']['warn']['subject'] = 'sql_warn';
// display mysql error messages on the website - not recommended for productive use!
$opt['db']['error']['display'] = true;
$opt['db']['error']['mail'] = 'root';
$opt['db']['error']['subject'] = 'sql_error';
// database placeholder
$opt['db']['placeholder']['db'] = 'opencaching';
$opt['db']['placeholder']['tmpdb'] = 'octmp';
$opt['db']['placeholder']['hist'] = 'ochist';
/* cookie or session
*
* SAVE_COOKIE = only use cookies
* SAVE_SESSION = use php sessions
*
* to use SESSIONS set php.ini to session default values:
*
* session.auto_start = 0
* session.use_cookies = 1
* session.use_only_cookies = 0
* session.cookie_lifetime = 0
* session.cookie_path = "/"
* session.cookie_domain = ""
* session.cookie_secure = off
* session.use_trans_sid = 0
*
* other parameters may be customized
*/
$opt['session']['mode'] = SAVE_COOKIE;
$opt['session']['cookiename'] = 'oc_devel'; // only with SAVE_COOKIE
$opt['session']['path'] = '/';
$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain']
/* If the Referer was sent by the client and the substring was not found,
* the embedded session id will be marked as invalid.
* Only used with session.mode = SAVE_SESSION
*/
$opt['session']['check_referer'] = true;
/* Debug level (combine with OR | )
* DEBUG_NO = productive use
* DEBUG_DEVELOPER = developer system
* DEBUG_TEMPLATES = no template caching
* DEBUG_OUTOFSERVICE = only admin login (includes DEBUG_TEMPLATES)
* DEBUG_TESTING = display warning (includes DEBUG_TEMPLATES)
* DEBUG_SQLDEBUGGER = sql debugger (use &sqldebug=1 when calling the site)
* DEBUG_TRANSLATE = read translate messages (use &trans=1 when calling the site)
* DEBUG_FORCE_TRANSLATE = force read of translate messages
* DEBUG_CLI = print debug messages of cli scripts
*/
$opt['debug'] = DEBUG_DEVELOPER|DEBUG_TEMPLATES|DEBUG_SQLDEBUGGER|DEBUG_TRANSLATE|DEBUG_FORCE_TRANSLATE;
//$opt['debug'] = DEBUG_DEVELOPER|DEBUG_TEMPLATES|DEBUG_SQLDEBUGGER;
//$opt['debug'] = DEBUG_DEVELOPER|DEBUG_SQLDEBUGGER;
/* other template options
*
*/
$opt['page']['absolute_url'] = 'http://local.opencaching.de/oc-server/server-3.0/htdocs';
$opt['mail']['from'] = '<admin email>';
/* location of uploaded images
*/
$opt['logic']['pictures']['dir'] = '/var/www/html/oc-server/server-3.0/htdocs/images/uploads';
$opt['logic']['pictures']['url'] = 'http://local.opencaching.de/oc-server/server-3.0/htdocs/images/uploads';
$opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'] . '/thumbs';
/* cachemaps
*/
$opt['logic']['cachemaps']['wmsurl'] = 'http://www.opencaching.de/cachemaps.php?wp={wp_oc}';
/* E-Mail for notification about news (newstopic.php)
*/
$opt['news']['mail'] = '<admin email>';
$opt['mail']['subject'] = '[<domain>] ';
/* 3rd party library options
* see https://my.garmin.com/api/communicator/key-generator.jsp
*/
$opt['lib']['garmin']['key'] = '00112233445566778899AABBCCDDEEFF00';
$opt['lib']['garmin']['url'] = 'http://www.site.org/';
$opt['template']['default']['style'] = 'ocstyle';
// Google maps key
$opt['lib']['google']['mapkey']['local.opencaching.de'] = 'ABQIAAAAwY6rAeeTA2cLnBDnf5FWGhQ9ZMVXtHZ4yn114tr66PefbkFZhBQXKkJK_k96Ci1JimzyaUwfhFhGrQ';
$opt['bin']['cs2cs'] = '/var/www/bin/cs2cs';
// Flag paths
$opt['template']['locales']['DE']['flag'] = 'images/flag/DE.gif';
$opt['template']['locales']['FR']['flag'] = 'images/flag/FR.gif';
$opt['template']['locales']['NL']['flag'] = 'images/flag/NL.gif';
$opt['template']['locales']['EN']['flag'] = 'images/flag/EN.gif';
$opt['template']['locales']['PL']['flag'] = 'images/flag/PL.gif';
$opt['template']['locales']['IT']['flag'] = 'images/flag/IT.gif';
$opt['template']['locales']['RU']['flag'] = 'images/flag/RU.gif';
$opt['template']['locales']['ES']['flag'] = 'images/flag/ES.png';
$opt['template']['locales']['JA']['flag'] = 'images/flag/JP.gif';
$opt['template']['locales']['SV']['show'] = false;
$opt['template']['locales']['NO']['show'] = false;
$opt['template']['locales']['DA']['show'] = false;
$opt['template']['locales']['PT']['show'] = false;
$opt['template']['locales']['JA']['show'] = false;
?>
+249
View File
@@ -0,0 +1,249 @@
<?php
/***************************************************************************
./lib/settings.inc.php
-------------------
begin : Mon June 14 2004
copyright : (C) 2004 The OpenCaching Group
forum contact at : http://www.opencaching.com/phpBB2
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
/****************************************************************************
*
* Unicode Reminder メモ
*
* Default settings for developer system. See also
* - settings-dist.inc.php for global default settings
* - settings.inc.php for local settings
* - config2/settings* for version-2-code settings
****************************************************************************/
//relative path to the root directory
if (!isset($rootpath)) $rootpath = './';
//default used language
if (!isset($lang)) $lang = 'de';
//default used style
if (!isset($style)) $style = 'ocstyle';
//pagetitle
if (!isset($pagetitle)) $pagetitle = 'www.opencaching.de';
//id of the node
$oc_nodeid = 4;
//name of the cookie
$opt['cookie']['name'] = 'oc_devel';
$opt['cookie']['path'] = '/';
$opt['cookie']['domain'] = '';
//Debug?
if (!isset($debug_page)) $debug_page = true;
$develwarning = '<div id="debugoc"><font size="5" face="arial" color="red"><center>Entwicklersystem - nur Testdaten</center></font></div>';
//site in service? Set to false when doing bigger work on the database to prevent error's
if (!isset($site_in_service)) $site_in_service = true;
//if you are running this site on a other domain than staging.opencaching.de, you can set
//this in private_db.inc.php, but don't forget the ending /
$absolute_server_URI = 'http://local.opencaching.de/oc-server/server-3.0/htdocs/';
// EMail address of the sender
if (!isset($emailaddr)) $emailaddr = 'contact@mail.opencaching.de';
// location of cache images
if (!isset($picdir)) $picdir = $rootpath . 'images/uploads';
if (!isset($picurl)) $picurl = 'http://local.opencaching.de/oc-server/server-3.0/htdocs/images/uploads';
// Thumbsize
$thumb_max_width = 175;
$thumb_max_height = 175;
// maximal size of images
if (!isset($maxpicsize)) $maxpicsize = 153600;
// allowed extensions of images
if (!isset($picextensions)) $picextensions = ';jpg;jpeg;gif;png;bmp;';
// news settings
$use_news_approving = true;
$news_approver_email = 'news-approver@devel.opencaching.de';
$opt['page']['showdonations'] = false;
//local database settings
$dbusername = 'ocold';
$dbname = 'opencaching';
$dbserver = ':/var/lib/mysql/mysql.sock';
$dbpasswd = 'developer';
$dbpconnect = false;
$tmpdbname = 'test'; // empty db with CREATE and DROP priviledges
// date format
$opt['db']['dateformat'] = 'Y-m-d H:i:s';
// warnlevel for sql-execution
$sql_errormail = 'root';
$dberrormail = $sql_errormail;
$sql_warntime = 100000;
$sql_allow_debug = 0;
// minimum of 24 chars
$sql_debug_cryptkey = 'this is my very, very secret \'secret key\'';
// replacements for sql()
$sql_replacements['db'] = $dbname;
$sql_replacements['tmpdb'] = $tmpdbname;
// safemode_zip-binary
$safemode_zip = '/var/www/bin/phpzip.php';
$zip_basedir = '/var/www/html/oc-server/server-3.0/htdocs/download/zip/';
$zip_wwwdir = 'oc-server/server-3.0/htdocs/download/zip/';
$googlemap_key = "<key>";
$googlemap_type = "G_MAP_TYPE"; // alternativ: _HYBRID_TYPE
// cache_maps-settings
//$cachemap_wms_url = 'http://www.top-sectret.oc/{min_lat},{min_lon},{max_lat},{max_lon}';
$cachemap_wms_url = 'http://www.opencaching.de/cachemaps.php?wp={wp_oc}';
$cachemap_size_lat = 0.2;
$cachemap_size_lon = 0.2;
$cachemap_pixel_x = 200;
$cachemap_pixel_y = 200;
$cachemap_url = 'images/cachemaps/';
$cachemap_dir = $rootpath . $cachemap_url;
$opt['translate']['debug'] = false;
// see config2/settings-dist.inc.php
$opt['template']['default']['locale'] = 'DE'; // may be overwritten by $opt['domain'][...]['locale']
$opt['template']['locales']['DE']['show'] = true;
$opt['template']['locales']['DE']['flag'] = 'images/flag/DE.gif';
$opt['template']['locales']['DE']['name'] = 'Deutsch';
$opt['template']['locales']['FR']['show'] = true;
$opt['template']['locales']['FR']['flag'] = 'images/flag/FR.gif';
$opt['template']['locales']['FR']['name'] = 'Françs';
$opt['template']['locales']['NL']['show'] = true;
$opt['template']['locales']['NL']['flag'] = 'images/flag/NL.gif';
$opt['template']['locales']['NL']['name'] = 'Nederlands';
$opt['template']['locales']['EN']['show'] = true;
$opt['template']['locales']['EN']['flag'] = 'images/flag/EN.gif';
$opt['template']['locales']['EN']['name'] = 'English';
$opt['template']['locales']['PL']['show'] = true;
$opt['template']['locales']['PL']['flag'] = 'images/flag/PL.gif';
$opt['template']['locales']['PL']['name'] = 'Polski';
$opt['template']['locales']['IT']['show'] = true;
$opt['template']['locales']['IT']['flag'] = 'images/flag/IT.gif';
$opt['template']['locales']['IT']['name'] = 'Italiano';
$opt['template']['locales']['RU']['show'] = true;
$opt['template']['locales']['RU']['flag'] = 'images/flag/RU.gif';
$opt['template']['locales']['RU']['name'] = '.......';
$opt['template']['locales']['ES']['show'] = true;
$opt['template']['locales']['ES']['flag'] = 'images/flag/ES.png';
$opt['template']['locales']['ES']['name'] = 'Espa&ntilde;ol';
$opt['locale']['EN']['locales'] = array('en_US.utf8', 'en_US', 'en');
$opt['locale']['EN']['format']['date'] = '%x';
$opt['locale']['EN']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['EN']['format']['datetime'] = '%x %I:%M %p';
$opt['locale']['EN']['format']['datetimesec'] = '%x %X';
$opt['locale']['EN']['format']['time'] = '%I:%M %p';
$opt['locale']['EN']['format']['timesec'] = '%X';
$opt['locale']['DE']['locales'] = array('de_DE.utf8', 'de_DE@euro', 'de_DE', 'de', 'ge');
$opt['locale']['DE']['format']['date'] = '%x';
$opt['locale']['DE']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['DE']['format']['datetime'] = '%x %H:%M';
$opt['locale']['DE']['format']['datetimesec'] = '%x %X';
$opt['locale']['DE']['format']['time'] = '%H:%M';
$opt['locale']['DE']['format']['timesec'] = '%X';
$opt['locale']['PL']['locales'] = array('pl_PL.utf8', 'pl_PL', 'pl');
$opt['locale']['PL']['format']['date'] = '%x';
$opt['locale']['PL']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['PL']['format']['datetime'] = '%x %H:%M';
$opt['locale']['PL']['format']['datetimesec'] = '%x %X';
$opt['locale']['PL']['format']['time'] = '%H:%M';
$opt['locale']['PL']['format']['timesec'] = '%X';
$opt['locale']['NL']['locales'] = array('nl_NL.utf8', 'nl_NL', 'nl');
$opt['locale']['NL']['format']['date'] = '%x';
$opt['locale']['NL']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['NL']['format']['datetime'] = '%x %H:%M';
$opt['locale']['NL']['format']['datetimesec'] = '%x %X';
$opt['locale']['NL']['format']['time'] = '%H:%M';
$opt['locale']['NL']['format']['timesec'] = '%X';
$opt['locale']['IT']['locales'] = array('it_IT.utf8', 'it_IT', 'it');
$opt['locale']['IT']['format']['date'] = '%x';
$opt['locale']['IT']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['IT']['format']['datetime'] = '%x %H:%M';
$opt['locale']['IT']['format']['datetimesec'] = '%x %X';
$opt['locale']['IT']['format']['time'] = '%H:%M';
$opt['locale']['IT']['format']['timesec'] = '%X';
$opt['locale']['FR']['locales'] = array('fr_FR.utf8', 'fr_FR@euro', 'fr_FR', 'french', 'fr');
$opt['locale']['FR']['format']['date'] = '%x';
$opt['locale']['FR']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['FR']['format']['datetime'] = '%x %H:%M';
$opt['locale']['FR']['format']['datetimesec'] = '%x %X';
$opt['locale']['FR']['format']['time'] = '%H:%M';
$opt['locale']['FR']['format']['timesec'] = '%X';
$opt['locale']['RU']['format']['date'] = '%x';
$opt['locale']['RU']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['RU']['format']['datetime'] = '%x %H:%M';
$opt['locale']['RU']['format']['datetimesec'] = '%x %X';
$opt['locale']['RU']['format']['time'] = '%H:%M';
$opt['locale']['RU']['format']['timesec'] = '%X';
$opt['locale']['RU']['country'] = 'RU';
$opt['locale']['ES']['locales'] = array('es_ES.utf8', 'es_ES', 'es');
$opt['locale']['ES']['format']['date'] = '%x';
$opt['locale']['ES']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['ES']['format']['datetime'] = '%x %H:%M';
$opt['locale']['ES']['format']['datetimesec'] = '%x %X';
$opt['locale']['ES']['format']['time'] = '%H:%M';
$opt['locale']['ES']['format']['timesec'] = '%X';
$opt['locale']['ES']['country'] = 'ES';
/* Sponsoring advertisements
* (plain HTML)
*/
//$opt['page']['sponsor']['topright'] = '<div class="site-slogan" style="background-image: url(resource2/ocstyle/images/darkbluetransparent.png);"><div style="width: 100%; text-align: left;"><p class="search"><a href="http://www.wanderjugend.de" target="_blank"><img border="0" align="right" style="margin-left: 10px;" src="resource2/ocstyle/images/dwj.gif" width="40px" height="20px" alt="... die outdoororientierte Jugendorganisation des Deutschen Wanderverbandes" /></a> Unterst&uuml;tzt und gef&ouml;rdert durch<br />die Deutsche Wanderjugend</p> </div></div>';
//$opt['page']['sponsor']['bottom'] = 'Hosting by <a target="_blank" href="http://www.schwarzwald.de">www.schwarzwald.de</a>';
$opt['page']['sponsor']['topright'] = '';
$opt['page']['sponsor']['bottom'] = '';
/* replicated slave databases
* use same config as in config2/settings.inc.php (!)
*/
$opt['db']['slaves'] = array();
$opt['db']['slave']['max_behind'] = 180;
// use this slave when a specific slave must be connected
// (e.g. xml-interface and mapserver-results)
// you can use -1 to use the master (not recommended, because replicated to slaves)
$opt['db']['slave']['primary'] = -1;
$opt['logic']['node']['id'] = 4;
$opt['page']['subtitle1'] = 'Geocaching with Opencaching';
$opt['page']['subtitle2'] = '';
$opt['page']['title'] = 'OPENCACHING';
$oc_waypoint_prefix = 'OC';
?>