#Data integration such as single-sign on
|
#Visual integration
|
|
+This tutorial is focused on "loosely coupled" integrations where minimal modifications of the integrated application source are desired. |
+ |
!Data Integration
|
|
(Further information forthingcoming. Feel free to add it...)
|
|
! Visual Integration
|
+ |
+!! phpinfo() |
+ |
+this example will insert phpinfo() into the center column of bitweaver using the output buffereing method |
+ |
+file: test/index.php |
+{code source=PHP} |
+<?php |
+require_once( '../bit_setup_inc.php' ); |
+ |
+// start output buffering |
+ob_start(); |
+phpinfo(); |
+ |
+// assign the captured content to the template |
+$gBitSmarty->assign( 'info', ob_get_contents() ); |
+ |
+// end output buffering |
+ob_end_clean(); |
+ |
+// display the template |
+$gBitSystem->display( 'bitpackage:test/info.tpl' ); |
+?> |
+{/code} |
+ |
+file: test/templates/info.tpl |
+{code source=Smarty} |
+{$info} |
+{/code} |
+ |
+ |
+!! phpBB |
|
Integration of non-smarty application such as ((PhpbbPackage|phpBB)) or bitcommercePackage (an OSCommerce / Zencart fork) is achieved through the use of PHP's [http://us2.php.net/manual/en/ref.outcontrol.php|output buffering] capabilities.
|
|
This "cheap and dirty" trick enables the integrated package to stay virtually untouched, while displaying properly in the bitweaverArchitecture. The technique in psuedo-code looks like:
|
|
-{code in="php"}
|
+{code source="php"} |
<?php
|
// Accessed source file for existing application such as fooforum/index.php
|
-
|
// {{{ BIT_MOD
|
+ |
require_once( '../bit_setup_inc.php' );
|
|
// use php function to initiate output control after bit_setup in case http headers (cookies where sent)
|