From 9fc2b3c39b30fc105e3d5e6911de26e9a26ec8a8 Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Fri, 1 Oct 2010 16:18:37 -0400 Subject: [PATCH] CC-1024 Update installation/build for webapp-only More tweaks for UI for new dir structure. --- conf.php | 19 ++-- conf.php.template | 163 ----------------------------- htmlUI/templates/debug.tpl | 64 +++++++++++ htmlUI/templates/header.tpl | 22 ++-- htmlUI/templates/popup/header.tpl | 2 +- htmlUI/{lib => }/twitter.class.php | 0 htmlUI/ui_base.inc.php | 2 +- ui_handler.php | 12 +-- 8 files changed, 93 insertions(+), 191 deletions(-) delete mode 100644 conf.php.template create mode 100644 htmlUI/templates/debug.tpl rename htmlUI/{lib => }/twitter.class.php (100%) diff --git a/conf.php b/conf.php index ee4a0cc7f..ab51797a6 100644 --- a/conf.php +++ b/conf.php @@ -41,7 +41,7 @@ $CC_CONFIG = array( 'password' => 'test', 'hostspec' => 'localhost', 'phptype' => 'pgsql', - 'database' => 'Campcaster-paul', + 'database' => 'campcaster', ), 'tblNamePrefix' => 'cc_', /* ================================================ storage configuration */ @@ -76,11 +76,11 @@ $CC_CONFIG = array( 'archiveAccountPass' => 'q', /* ============================================== scheduler configuration */ - 'schedulerUrlPath' => '', - 'schedulerXMLRPC' => 'RC2', - 'schedulerUrlHost' => 'localhost', - 'schedulerUrlPort' => 3344, - 'schedulerPass' => 'change_me', +// 'schedulerUrlPath' => '', +// 'schedulerXMLRPC' => 'RC2', +// 'schedulerUrlHost' => 'localhost', +// 'schedulerUrlPort' => 3344, +// 'schedulerPass' => 'change_me', /* ==================================== aplication-specific configuration */ 'objtypes' => array( @@ -168,7 +168,7 @@ if (!is_null($this_file)) { } // workaround for missing folders -foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) { +foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'cronDir') as $d) { $test = file_exists($CC_CONFIG[$d]); if ( $test === FALSE ) { @mkdir($CC_CONFIG[$d], 02775); @@ -176,7 +176,8 @@ foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', ' $rp = realpath($CC_CONFIG[$d]); //echo " * Directory $rp created\n"; } else { - echo " * Failed creating {$CC_CONFIG[$d]}\n"; + echo " * Error: directory {$CC_CONFIG[$d]} was missing.\n"; + echo " * I tried to create it, but couldn't, sorry!.\n"; exit(1); } } else { @@ -185,4 +186,4 @@ foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', ' $CC_CONFIG[$d] = $rp; } -?> +?> \ No newline at end of file diff --git a/conf.php.template b/conf.php.template deleted file mode 100644 index 7f94c7fb1..000000000 --- a/conf.php.template +++ /dev/null @@ -1,163 +0,0 @@ - - *
dsn
datasource setting - *
tblNamePrefix
prefix for table names in the database - *
authCookieName
secret token cookie name - *
AdminsGr
name of admin group - *
StationPrefsGr
name of station preferences group - *
AllGr
name of 'all users' group - *
TrashName
name of trash folder (subfolder of the storageRoot) - *
storageDir
main directory for storing binary media files - *
bufferDir
directory for temporary files - *
transDir
directory for incomplete transferred files - *
accessDir
directory for symlinks to accessed files - *
isArchive
local/central flag - *
validate
enable/disable validator - *
useTrash
enable/disable safe delete (move to trash) - *
storageUrlPath
path-URL-part of storageServer base dir - *
storageXMLRPC
XMLRPC server script address relative to storageUrlPath - *
storageUrlHost, storageUrlPort
host and port of storageServer - *
archiveUrlPath
path-URL-part of archiveServer base dir - *
archiveXMLRPC
XMLRPC server script address relative to archiveUrlPath - *
archiveUrlHost, archiveUrlPort
host and port of archiveServer - *
archiveAccountLogin, archiveAccountPass
account info - * for login to archive - *
sysSubjs
system users/groups - cannot be deleted - *
schedulerPass
scheduler's password for storageServer access - * - */ - -include("campcaster_version.php"); - -// these are the default values for the config - -$CC_CONFIG = array( - /* ================================================== basic configuration */ - 'dsn' => array( - 'username' => 'ls_dbuser', - 'password' => 'ls_dbpassword', - 'hostspec' => 'ls_dbserver', - 'phptype' => 'pgsql', - 'database' => 'ls_database', - ), - 'tblNamePrefix' => 'ls_', - - /* ================================================ storage configuration */ - 'authCookieName'=> 'campcaster_session_id', - 'AdminsGr' => 'Admins', - 'StationPrefsGr'=> 'StationPrefs', - 'AllGr' => 'All', - 'TrashName' => 'trash_', - 'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor', - 'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer', - 'transDir' => dirname(__FILE__).'/../../storageServer/var/trans', - 'accessDir' => dirname(__FILE__).'/../../storageServer/var/access', - 'pearPath' => 'ls_lib_dir/pear', - 'cronDir' => dirname(__FILE__).'/../../storageServer/var/cron', - 'isArchive' => FALSE, - 'validate' => TRUE, - 'useTrash' => TRUE, - - /* ==================================================== URL configuration */ - 'storageUrlPath' => 'ls_storageUrlPath', - 'storageXMLRPC' => 'xmlrpc/xrLocStor.php', - 'storageUrlHost' => 'ls_php_host', - 'storageUrlPort' => ls_php_port, - - /* ================================================ archive configuration */ - 'archiveUrlPath' => 'ls_storageUrlPath', - 'archiveXMLRPC' => 'xmlrpc/xrLocStor.php', - 'archiveUrlHost' => 'ls_php_host', - 'archiveUrlPort' => ls_php_port, - 'archiveAccountLogin' => 'root', - 'archiveAccountPass' => 'q', - - /* ============================================== scheduler configuration */ - 'schedulerUrlPath' => 'ls_scheduler_urlPrefix', - 'schedulerXMLRPC' => 'ls_scheduler_xmlRpcPrefix', - 'schedulerUrlHost' => 'ls_scheduler_host', - 'schedulerUrlPort' => ls_scheduler_port, - 'schedulerPass' => 'ls_scheduler_storage_pass', - - /* ==================================== aplication-specific configuration */ - 'objtypes' => array( - 'RootNode' => array('Folder'), - 'Storage' => array('Folder', 'File', 'Replica'), - 'Folder' => array('Folder', 'File', 'Replica'), - 'File' => array(), - 'audioclip' => array(), - 'playlist' => array(), - 'Replica' => array(), - ), - 'allowedActions'=> array( - 'RootNode' => array('classes', 'subjects'), - 'Folder' => array('editPrivs', 'write', 'read'), - 'File' => array('editPrivs', 'write', 'read'), - 'audioclip' => array('editPrivs', 'write', 'read'), - 'playlist' => array('editPrivs', 'write', 'read'), - 'Replica' => array('editPrivs', 'write', 'read'), - '_class' => array('editPrivs', 'write', 'read'), - ), - 'allActions' => array( - 'editPrivs', 'write', 'read', 'classes', 'subjects' - ), - - /* ============================================== auxiliary configuration */ - 'RootNode' => 'RootNode', - 'tmpRootPass' => 'q', - - /* =================================================== cron configuration */ - 'cronUserName' => 'ls_apache_group', - 'lockfile' => dirname(__FILE__).'/cron/cron.lock', - 'cronfile' => dirname(__FILE__).'/cron/croncall.php', - 'paramdir' => dirname(__FILE__).'/cron/params', -); - -// Add database table names -$CC_CONFIG['filesTable'] = $CC_CONFIG['tblNamePrefix'].'files'; -$CC_CONFIG['mdataTable'] = $CC_CONFIG['tblNamePrefix'].'mdata'; -$CC_CONFIG['accessTable'] = $CC_CONFIG['tblNamePrefix'].'access'; -$CC_CONFIG['permTable'] = $CC_CONFIG['tblNamePrefix'].'perms'; -$CC_CONFIG['sessTable'] = $CC_CONFIG['tblNamePrefix'].'sess'; -$CC_CONFIG['subjTable'] = $CC_CONFIG['tblNamePrefix'].'subjs'; -$CC_CONFIG['smembTable'] = $CC_CONFIG['tblNamePrefix'].'smemb'; -$CC_CONFIG['classTable'] = $CC_CONFIG['tblNamePrefix'].'classes'; -$CC_CONFIG['cmembTable'] = $CC_CONFIG['tblNamePrefix'].'cmemb'; -$CC_CONFIG['treeTable'] = $CC_CONFIG['tblNamePrefix'].'tree'; -$CC_CONFIG['structTable'] = $CC_CONFIG['tblNamePrefix'].'struct'; -$CC_CONFIG['transTable'] = $CC_CONFIG['tblNamePrefix'].'trans'; -$CC_CONFIG['prefTable'] = $CC_CONFIG['tblNamePrefix'].'pref'; -$CC_CONFIG['playlogTable'] = 'playlog'; -$CC_CONFIG['scheduleTable'] = 'schedule'; -$CC_CONFIG['backupTable'] = 'backup'; - -$CC_CONFIG['sysSubjs'] = array( - 'root', $CC_CONFIG['AdminsGr'], $CC_CONFIG['AllGr'], $CC_CONFIG['StationPrefsGr'] -); -$old_ip = get_include_path(); -set_include_path('.'.PATH_SEPARATOR.$CC_CONFIG['pearPath'].PATH_SEPARATOR.$old_ip); - -// workaround for missing folders -foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) { - $test = file_exists($CC_CONFIG[$d]); - if ( $test === FALSE ) { - @mkdir($CC_CONFIG[$d], 02775); - if (file_exists($CC_CONFIG[$d])) { - $rp = realpath($CC_CONFIG[$d]); - //echo " * Directory $rp created\n"; - } else { - echo " * Failed creating {$CC_CONFIG[$d]}\n"; - exit(1); - } - } else { - $rp = realpath($CC_CONFIG[$d]); - } - $CC_CONFIG[$d] = $rp; -} - -?> diff --git a/htmlUI/templates/debug.tpl b/htmlUI/templates/debug.tpl new file mode 100644 index 000000000..7f1c9d425 --- /dev/null +++ b/htmlUI/templates/debug.tpl @@ -0,0 +1,64 @@ +{* Smarty *} + +{* debug.tpl, last updated version 2.0.1 *} + +{assign_debug_info} + +{if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"} + + + + {section name=templates loop=$_debug_tpls} + + {sectionelse} + + {/section} + + {section name=vars loop=$_debug_keys} + + {sectionelse} + + {/section} + + {section name=config_vars loop=$_debug_config_keys} + + {sectionelse} + + {/section} +
Smarty Debug Console
included templates & config files (load time in seconds):
{section name=indent loop=$_debug_tpls[templates].depth}   {/section}{$_debug_tpls[templates].filename|escape:html}{if isset($_debug_tpls[templates].exec_time)} ({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}{/if}
no templates included
assigned template variables:
{ldelim}${$_debug_keys[vars]}{rdelim}{$_debug_vals[vars]|@debug_print_var}
no template variables assigned
assigned config file variables (outer template scope):
{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}{$_debug_config_vals[config_vars]|@debug_print_var}
no config vars assigned
+ +{else} + +{/if} diff --git a/htmlUI/templates/header.tpl b/htmlUI/templates/header.tpl index e7ec30a32..095fde6e7 100644 --- a/htmlUI/templates/header.tpl +++ b/htmlUI/templates/header.tpl @@ -6,23 +6,23 @@ Campcaster - - - - - - - - - + + + + + + + + + {include file="script/basics.js.tpl"} {include file="script/contextmenu.js.tpl"} {include file="script/collector.js.tpl"} {include file="script/alttext.js.tpl"} - + - + diff --git a/htmlUI/templates/popup/header.tpl b/htmlUI/templates/popup/header.tpl index 64dd5f472..50b85cdc1 100644 --- a/htmlUI/templates/popup/header.tpl +++ b/htmlUI/templates/popup/header.tpl @@ -5,7 +5,7 @@ Campcaster - +