Version 3

IntegrationTutorial

Information on integrating existing applications into bitweaver

Created by: xing, Last modification: 08 Apr 2006 (08:44 UTC) by xing
Integrating applications into bitweaver involves two key parts:
  1. Data integration such as single-sign on
  2. 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


Integration of non-smarty application such as PhpbbPackage or bitcommercePackage (an OSCommerce / Zencart fork) is achieved through the use of PHP's 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:


<?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)

ob_start();
// }}} BIT_MOD

foo code...
hackwhitlechopwhirbuzzz...

// {{{ BIT_MOD

// Get the contents of whatever was output but the app and assign to a smarty variable
$smarty->assign_by_ref'fooforumCenter'ob_get_contents() );
ob_end_clean();
$gBitSystem->display'bitpackage:fooforum/view_fooforum.tpl' );

// }}} BIT_MOD
?>


The display template needs to live in fooforum/templates/view_fooforum.tpl and is a *very* simple template:


<div class="display fooforum">

{$fooforumCenter}

</div>


You can get much more advanced and capturing modules and other interface elements from the integrated app. The best example is the bitcommercePackage and here is some source code that does module capturing.
Page History
Date/CommentUserIPVersion
25 Apr 2006 (15:16 UTC)
add phpinfo example
test194.152.164.456
Current • Source
test194.152.164.455
View • Compare • Difference • Source
xing194.152.164.453
View • Compare • Difference • Source
spiderr66.93.240.2041
View • Compare • Difference • Source