Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

config.tikiwiki.php

00001 <?php
00002 
00007 // Common prefix used for all database table names, e.g. galaxia_
00008 if (!defined('GALAXIA_TABLE_PREFIX')) {
00009     define('GALAXIA_TABLE_PREFIX', 'galaxia_');
00010 }
00011 
00012 // Directory containing the Galaxia library, e.g. lib/Galaxia
00013 if (!defined('GALAXIA_LIBRARY')) {
00014     define('GALAXIA_LIBRARY', dirname(__FILE__));
00015 }
00016 
00017 // Directory where the Galaxia processes will be stored, e.g. lib/Galaxia/processes
00018 if (!defined('GALAXIA_PROCESSES')) {
00019     // Note: this directory must be writeable by the webserver !
00020     define('GALAXIA_PROCESSES', GALAXIA_LIBRARY . '/processes');
00021 }
00022 
00023 // Directory where a *copy* of the Galaxia activity templates will be stored, e.g. templates
00024 // Define as '' if you don't want to copy templates elsewhere
00025 if (!defined('GALAXIA_TEMPLATES')) {
00026     // Note: this directory must be writeable by the webserver !
00027     define('GALAXIA_TEMPLATES', 'templates');
00028     //define('GALAXIA_TEMPLATES', '');
00029 }
00030 
00031 // Default header to be added to new activity templates
00032 if (!defined('GALAXIA_TEMPLATE_HEADER')) {
00033     define('GALAXIA_TEMPLATE_HEADER', '{*Smarty template*}');
00034     //define('GALAXIA_TEMPLATE_HEADER', '');
00035 }
00036 
00037 // File where the ProcessManager logs for Galaxia will be saved, e.g. lib/Galaxia/log/pm.log
00038 // Define as '' if you don't want to use logging
00039 if (!defined('GALAXIA_LOGFILE')) {
00040     // Note: this file must be writeable by the webserver !
00041     //define('GALAXIA_LOGFILE', GALAXIA_LIBRARY . '/log/pm.log');
00042     define('GALAXIA_LOGFILE', '');
00043 }
00044 
00045 // Directory containing the GraphViz 'dot' and 'neato' programs, in case
00046 // your webserver can't find them via its PATH environment variable
00047 if (!defined('GRAPHVIZ_BIN_DIR')) {
00048     define('GRAPHVIZ_BIN_DIR', '');
00049     //define('GRAPHVIZ_BIN_DIR', 'd:/wintools/ATT/GraphViz/bin');
00050 }
00051 
00056 // Database handler
00057 if (!isset($dbGalaxia)) {
00058     $dbGalaxia =& $dbTiki;
00059 }
00060 
00061 // Specify how error messages should be shown
00062 if (!function_exists('galaxia_show_error')) {
00063     function galaxia_show_error($msg)
00064     {
00065         global $smarty, $style_base;
00066         $smarty->assign('msg',tra($msg));
00067         $smarty->display("error.tpl");
00068     }
00069 }
00070 
00071 // Specify how to execute a non-interactive activity (for use in src/API/Instance.php)
00072 if (!function_exists('galaxia_execute_activity')) {
00073     function galaxia_execute_activity($activityId = 0, $iid = 0, $auto = 1)
00074     {
00075       // Now execute the code for the activity but we are in a method!
00076       // so just use an fopen with http mode
00077       $parsed = parse_url($_SERVER["REQUEST_URI"]);
00078       $URI = httpPrefix().$parsed["path"];
00079       $parts = explode('/',$URI);
00080       $parts[count($parts)-1] = "tiki-g-run_activity.php?activityId=$activityId&amp;iid=$iid&amp;auto=$auto";
00081       $URI = implode('/',$parts);
00082       $fp = fopen($URI,"r");
00083       $data = '';
00084       if (!$fp) {
00085         trigger_error(tra("Fatal error: cannot execute automatic activity $activityId"),E_USER_WARNING);
00086         die;
00087       }
00088       while (!feof($fp)) {
00089         $data.=fread($fp,8192);
00090       }
00091           
00092       /*
00093       if(!empty($data)) {
00094         trigger_error(tra("Fatal error: automatic activity produced some output:$data"),E_USER_WARNING);      
00095       }
00096       */
00097       fclose($fp);
00098 
00099     }
00100 }
00101 
00102 ?>

Generated on Mon Jun 7 16:37:37 2004 for Galaxia by doxygen 1.3.4