Changeset 484
- Timestamp:
- 02/28/08 19:36:03 (10 months ago)
- Location:
- trunk
- Files:
-
- 8 modified
-
modules/base/templates/css.tpl (modified) (1 diff)
-
modules/base/templates/wrapper_default.tpl (modified) (2 diffs)
-
modules/base/templates/wrapper_gallery2.tpl (modified) (1 diff)
-
modules/base/templates/wrapper_mediawiki.tpl (modified) (2 diffs)
-
modules/base/templates/wrapper_public.tpl (modified) (2 diffs)
-
modules/base/templates/wrapper_wordpress.tpl (modified) (1 diff)
-
owa_env.php (modified) (1 diff)
-
owa_template.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/base/templates/css.tpl
r418 r484 206 206 #keywords{width:400px;} 207 207 #login_box {width:390px;} 208 # header {background-color: #B0C4DE; padding:4px; font-weight:bold; clear: both;}208 #owa_header {background-color:#FFFFFF; padding:4px; font-weight:bold; clear: both;} 209 209 #report_top_level_nav {margin: 5px 0 0 0;} 210 210 #side_bar {width:auto; color: ; border-right: 0px solid #000000; padding: 5px; background-color: ; font-size: 12px;} -
trunk/modules/base/templates/wrapper_default.tpl
r250 r484 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 3 4 … … 5 6 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 6 7 <title>Open Web Analytics - <?=$page_title;?></title> 7 <? include('css.tpl');?>8 <?php $this->includeTemplate('css.tpl');?> 8 9 </head> 9 10 10 11 <body> 11 12 12 < DIV id="header"><?include ('header.tpl');?></DIV>13 <?php $this->includeTemplate('header.tpl');?> 13 14 14 <? include('msgs.tpl');?>15 <?php $this->includeTemplate('msgs.tpl');?> 15 16 16 17 <?=$body;?> 17 18 18 19 </body> 20 19 21 </html> -
trunk/modules/base/templates/wrapper_gallery2.tpl
r438 r484 1 <? include('css.tpl');?>1 <?php $this->includeTemplate('css.tpl');?> 2 2 3 < DIV id="header"><?include ('header.tpl');?></DIV>3 <?php $this->includeTemplate('header.tpl');?> 4 4 5 <? include('msgs.tpl');?>5 <?php $this->includeTemplate('msgs.tpl');?> 6 6 7 7 <?=$body;?> -
trunk/modules/base/templates/wrapper_mediawiki.tpl
r418 r484 5 5 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 6 6 <title>Open Web Analytics - <?=$page_title;?></title> 7 <? include('css.tpl');?>7 <?php $this->includeTemplate('css.tpl');?> 8 8 </head> 9 9 … … 11 11 <div class="host_app_nav"><img src="<?=$this->makeImageLink('mediawiki_icon_50h.jpg');?>" align="absmiddle"> <a href="/index.php?title=Special:SpecialPages">Return to your MediaWiki >></a></div> 12 12 <div id="header"><?include ('header.tpl');?></div> 13 <? include('msgs.tpl');?>13 <?php $this->includeTemplate('msgs.tpl');?> 14 14 <?=$body;?> 15 15 <div class="host_app_nav"><img src="<?=$this->makeImageLink('mediawiki_icon_50h.jpg');?>" align="absmiddle"> <a href="/index.php?title=Special:SpecialPages">Return to your MediaWiki >></a></div> -
trunk/modules/base/templates/wrapper_public.tpl
r293 r484 9 9 <body> 10 10 11 <? include('css.tpl');?>11 <?php $this->includeTemplate('css.tpl');?> 12 12 13 13 <DIV id="header"> 14 14 <table width="100%"> 15 15 <TR> 16 <TD class="owa_logo"><img src="<?=$this->makeImageLink('owa_logo_150w.jpg'); ?>" alt="Open Web Analytics"></TD> 16 17 <TD> 17 <span class="inline_h1"> Open Web Analytics -<?=OWA_VERSION;?></span>18 <span class="inline_h1">Version: <?=OWA_VERSION;?></span> 18 19 </TD> 19 20 … … 30 31 31 32 32 <? include('msgs.tpl');?>33 <?php $this->includeTemplate('msgs.tpl');?> 33 34 <BR> 34 35 <?=$content;?> -
trunk/modules/base/templates/wrapper_wordpress.tpl
r250 r484 1 <? include('css.tpl');?>1 <?php $this->includeTemplate('css.tpl');?> 2 2 3 < DIV id="header"><?include ('header.tpl');?></DIV>3 <?php $this->includeTemplate('header.tpl');?> 4 4 5 <? include('msgs.tpl');?>5 <?php $this->includeTemplate('msgs.tpl');?> 6 6 7 7 <?=$body;?> -
trunk/owa_env.php
r454 r484 29 29 */ 30 30 31 define('OWA_BASE_DIR', dirname(__FILE__)); 32 define('OWA_BASE_CLASSES_DIR', dirname(__FILE__). DIRECTORY_SEPARATOR); 33 define('OWA_BASE_CLASS_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'base'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR); 34 define('OWA_BASE_MODULE_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'base'.DIRECTORY_SEPARATOR); 35 define('OWA_INCLUDE_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR); 36 define('OWA_PEARLOG_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'Log-1.9.13'); 37 define('OWA_PHPMAILER_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'phpmailer-1.73'.DIRECTORY_SEPARATOR); 38 define('OWA_JPGRAPH_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'jpgraph-1.20.3'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR); 39 define('OWA_PLUGINS_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'plugins'); 40 define('OWA_METRICS_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'metrics'.DIRECTORY_SEPARATOR); 41 define('OWA_GRAPHS_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'graphs'.DIRECTORY_SEPARATOR); 42 define('OWA_CONF_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR); 43 define('OWA_DATA_DIR', OWA_BASE_DIR.DIRECTORY_SEPARATOR.'owa-data'.DIRECTORY_SEPARATOR); 31 define('OWA_DIR', dirname(__FILE__). DIRECTORY_SEPARATOR); 32 define('OWA_BASE_DIR', dirname(__FILE__)); // depricated 33 define('OWA_BASE_CLASSES_DIR', dirname(__FILE__). DIRECTORY_SEPARATOR); //depricated 34 define('OWA_BASE_MODULE_DIR', OWA_DIR.'modules'.DIRECTORY_SEPARATOR.'base'.DIRECTORY_SEPARATOR); 35 define('OWA_BASE_CLASS_DIR', OWA_BASE_MODULE_DIR.'classes'.DIRECTORY_SEPARATOR); 36 define('OWA_INCLUDE_DIR', OWA_DIR.'includes'.DIRECTORY_SEPARATOR); 37 define('OWA_PEARLOG_DIR', OWA_INCLUDE_DIR.'Log-1.9.13'); 38 define('OWA_PHPMAILER_DIR', OWA_INCLUDE_DIR.'phpmailer-1.73'.DIRECTORY_SEPARATOR); 39 define('OWA_JPGRAPH_DIR', OWA_INCLUDE_DIR.'jpgraph-1.20.3'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR); 40 define('OWA_PLUGINS_DIR', OWA_DIR.'plugins'); //depricated 41 define('OWA_METRICS_DIR', OWA_DIR.'plugins'.DIRECTORY_SEPARATOR.'metrics'.DIRECTORY_SEPARATOR); //depricated 42 define('OWA_GRAPHS_DIR', OWA_DIR.'plugins'.DIRECTORY_SEPARATOR.'graphs'.DIRECTORY_SEPARATOR); //depricated 43 define('OWA_PLUGIN_DIR', OWA_DIR.'plugins'.DIRECTORY_SEPARATOR); 44 define('OWA_CONF_DIR', OWA_DIR.'conf'.DIRECTORY_SEPARATOR); 45 define('OWA_DATA_DIR', OWA_DIR.'owa-data'.DIRECTORY_SEPARATOR); 44 46 define('OWA_CACHE_DIR', OWA_DATA_DIR.'caches'.DIRECTORY_SEPARATOR); 45 define('OWA_VERSION', '$Keyword:owa_version$'); 47 define('OWA_THEMES_DIR', OWA_DIR.'themes'.DIRECTORY_SEPARATOR); 48 define('OWA_VERSION', 'SVN-TRUNK'); 46 49 ?> -
trunk/owa_template.php
r393 r484 17 17 // 18 18 19 require_once(OWA_INCLUDE_DIR.' /template_class.php');19 require_once(OWA_INCLUDE_DIR.'template_class.php'); 20 20 require_once(OWA_BASE_DIR.'/owa_lib.php'); 21 require_once(OWA_BASE_CLASS_DIR.'settings.php');22 21 require_once(OWA_BASE_DIR.'/owa_auth.php'); 23 22 … … 43 42 var $config; 44 43 44 var $theme_template_dir; 45 46 var $module_local_template_dir; 47 48 var $module_template_dir; 49 50 var $e; 51 45 52 /** 46 53 * Params passed by calling caller … … 56 63 $c = &owa_coreAPI::configSingleton(); 57 64 $this->config = $c->fetch('base'); 58 // set template dir 59 65 66 $this->e = &owa_coreAPI::errorSingleton(); 67 68 // set template dirs 60 69 if(!empty($caller_params['module'])): 61 70 $this->_setTemplateDir($module); … … 70 79 71 80 function _setTemplateDir($module) { 72 73 $this->template_dir = OWA_BASE_DIR . '/modules/' . $module . '/templates/'; 81 82 // set module template dir 83 $this->module_template_dir = OWA_DIR.'modules'.DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR.'templates'.DIRECTORY_SEPARATOR; 84 85 // set module local template override dir 86 $this->module_local_template_dir = $this->module_template_dir.'local'.DIRECTORY_SEPARATOR; 87 88 // set theme template dir 89 $this->theme_template_dir = OWA_THEMES_DIR.$this->config['theme'].DIRECTORY_SEPARATOR; 74 90 75 91 return; 76 92 } 93 94 /** 95 * Set the template file 96 * 97 * @param string $file 98 */ 99 function set_template($file = null) { 100 101 if ($file == null): 102 $this->e->error('No template file was specified.'); 103 return false; 104 else: 105 // check module's local modification template Directory 106 if (file_exists($this->module_local_template_dir.$file)): 107 $this->file = $this->module_local_template_dir.$file; 108 109 // check theme's template Directory 110 elseif(file_exists($this->theme_template_dir.$file)): 111 $this->file = $this->theme_template_dir.$file; 112 113 // check module's template directory 114 elseif(file_exists($this->module_template_dir.$file)): 115 $this->file = $this->module_template_dir.$file; 116 117 // throw error 118 else: 119 $this->e->error(sprintf('%s was not found in any template directory.', $file)); 120 return false; 121 endif; 122 123 return true; 124 endif; 125 } 77 126 78 127 /** … … 417 466 } 418 467 468 function includeTemplate($file) { 469 470 $this->set_template($file); 471 include($this->file); 472 return; 473 474 } 419 475 420 476
