From: alex <bin...@li...> - 2001-08-16 20:44:34
|
alex Thu Aug 16 13:44:29 2001 EDT Added files: /r2/binarycloud/user/htdocs static_mod_cache_test.php Modified files: /r2/binarycloud/user/htdocs mod_cache_test.php static_module.php Log: modifications and additions in htdocs to test caching. Index: r2/binarycloud/user/htdocs/mod_cache_test.php diff -u /dev/null r2/binarycloud/user/htdocs/mod_cache_test.php:1.5 --- /dev/null Thu Aug 16 13:44:29 2001 +++ r2/binarycloud/user/htdocs/mod_cache_test.php Thu Aug 16 13:44:29 2001 @@ -0,0 +1,122 @@ +<?php +// {{{ Header +/* + * -File $Id: mod_cache_test.php,v 1.5 2001/08/16 20:44:29 alex Exp $ + * -License LGPL (http://www.gnu.org/copyleft/lesser.html) + * -Copyright 2001, The Turing Studio, Inc. + * -Author alex black, en...@tu... + */ +// }}} + +include_once('./prepend.php'); + +import('binarycloud.init.Init'); + +// ripped from /path/to/binarycloud/user/htdocs/index.xml +$gPageDef = array( + 'title' => "binarycloud page title", + 'init' => array( + 'ini' => true, + 'auth' => false, + 'perm' => false, + 'sess' => true, + 'lang' => true, + 'cache' => true, + ), + 'templates' => array( + 'default' => array( + 'name' => "example", + 'package' => "html.masters", + 'type' => "html", + ), + 'other' => array( + 'name' => "other", + 'package' => "html.masters", + 'type' => "html", + ) + ), + 'modules' => array( + 'content' => array( + 'layout' => array( + 'name' => "example", + 'package' => "html.layouts", + ), + 'load' => array( + array( + 'id' => 'mooboo', + 'name' => "OtherWorld", + 'package' => "hello_world", + 'load_order' => "3", + 'cache' => array( + 'expires' => '30', + 'use_uri' => true, + ), + ), + array( + 'id' => 'some_other_unique_name', + 'name' => "SetLangExample", + 'package' => "set_lang_example", + 'load_order' => "6" + ), + array( + 'name' => "HelloWorld", + 'package' => "hello_world", + 'load_order' => "1", + 'params' => array ( + 'example' => "this is an option value", + 'another' => 1 + ), + ), + array( + 'name' => "HelloWorld", + 'package' => "hello_world", + 'load_order' => "5" + ), + array( + 'name' => "HelloWorld", + 'package' => "hello_world", + 'load_order' => "4" + ), + array( + 'name' => "HelloWorld", + 'package' => "hello_world", + 'load_order' => "2" + ), + + ), + ), + 'left' => array( + 'load' => array( + array( + 'name' => "HelloWorld", + 'package' => "hello_world", + 'load_order' => "2" + ), + array( + 'name' => "HelloWorld", + 'package' => "hello_world", + 'load_order' => "1" + ), + ), + ), + ), +); + +$Init = new Init(); +$Init->Startup(); +$Page->BuildPage(); +$Init->Shutdown(); + +// output debug +// $Debug->Output('script_time'); +//$Debug->Output('all_classes'); +//$Debug->Output('core_classes'); +$Debug->Output('messages'); +//$Debug->Output('system_constants'); +//$Debug->Output('user_constants'); +//$Debug->Output('vars'); +//$Debug->Output('server_env'); +//$Debug->Output('globals'); +//$Debug->Output('all'); + +?> Index: r2/binarycloud/user/htdocs/static_module.php diff -u r2/binarycloud/user/htdocs/static_module.php:1.1 r2/binarycloud/user/htdocs/static_module.php:1.2 --- r2/binarycloud/user/htdocs/static_module.php:1.1 Tue Aug 14 18:05:52 2001 +++ r2/binarycloud/user/htdocs/static_module.php Thu Aug 16 13:44:29 2001 @@ -1,7 +1,7 @@ <?php // {{{ Header /* - * -File $Id: static_module.php,v 1.1 2001/08/15 01:05:52 alex Exp $ + * -File $Id: static_module.php,v 1.2 2001/08/16 20:44:29 alex Exp $ * -License LGPL (http://www.gnu.org/copyleft/lesser.html) * -Copyright 2001, The Turing Studio, Inc. * -Author alex black, en...@tu... @@ -38,10 +38,10 @@ <p> This page is rendering these modules without benefit of a $gPageDef['modules'] array - each of these modules is instantiated and output in place. <p> -<? $Page->BuildModule(array('name' => 'HelloWorld','package' => 'hello_world','id' => 'first_one')); ?> +<? $Page->BuildStaticModule(array('name' => 'HelloWorld','package' => 'hello_world','id' => 'first_one')); ?> <p> -<? $Page->BuildModule(array('name' => 'HelloWorld','package' => 'hello_world','id' => 'second_one')); ?> -<? $Page->BuildModule(array('name' => 'OtherWorld','package' => 'hello_world','id' => 'third_one')); ?> +<? $Page->BuildStaticModule(array('name' => 'HelloWorld','package' => 'hello_world','id' => 'second_one')); ?> +<? $Page->BuildStaticModule(array('name' => 'OtherWorld','package' => 'hello_world','id' => 'third_one')); ?> <!-- end page html --> <? $Page->BuildPage(); ?> Index: r2/binarycloud/user/htdocs/static_mod_cache_test.php +++ r2/binarycloud/user/htdocs/static_mod_cache_test.php <?php // {{{ Header /* * -File $Id: static_mod_cache_test.php,v 1.1 2001/08/16 20:44:29 alex Exp $ * -License LGPL (http://www.gnu.org/copyleft/lesser.html) * -Copyright 2001, The Turing Studio, Inc. * -Author alex black, en...@tu... */ // }}} include_once('./prepend.php'); import('binarycloud.init.Init'); $Init = new Init(); $gPageDef = array( 'title' => "binarycloud page title", 'init' => array( 'ini' => true, 'auth' => false, 'perm' => false, 'sess' => true, 'lang' => true, 'cache' => true, ), 'templates' => array( 'default' => array( 'name' => "static_example", 'package' => "html.masters", 'type' => "html", ), ), ); $Init->Startup(); ?> <!-- begin page html --> <p> This page is rendering these modules without benefit of a $gPageDef['modules'] array - each of these modules is instantiated and output in place. <p> <? $Page->BuildStaticModule(array('name' => 'HelloWorld','package' => 'hello_world','id' => 'first_one','cache' => array('expires'=>'30'))); ?> <p> <? $Page->BuildStaticModule(array('name' => 'HelloWorld','package' => 'hello_world','id' => 'second_one')); ?> <? $Page->BuildStaticModule(array('name' => 'OtherWorld','package' => 'hello_world','id' => 'third_one')); ?> <!-- end page html --> <? $Page->BuildPage(); ?> <? $Init->Shutdown(); ?> <? $Debug->Output('messages'); ?> |