~~#333333:__Status__: That is up to you.~~
Make sure have read and understood bitweaverArchitecture, TikiPackages, TemplatesPackage, and KernelPackage

!!!1. Move the files around
~~#006600:__Status__: Done.~~
Implement the new bitweaverArchitecture file structure. bitweaver starts with the ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and TikiWiki)) code base and reorganizes it. The idea is to start with the ReleaseAl code base, and to move what was ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and TikiWiki))'s lib/ directory, which is nicely organized, to the root. Then, move all the templates, modules, and php files related to that lib, into its lib directory. See bitweaverArchitecture for example of the new file structure.

!!!2. Create SQL file
~~#006600:__Status__: Done.~~
SQL file adds the only required database ALTER:
ALTER TABLE tiki_modules ADD COLUMN package VARCHAR(255);
This column is necessary to know which Package directory to go dig the module file from. Also, the "tikiIndex" preference must be deleted if it is "tiki-index.php" since that now longer exists. These SQL changes are in tikiroot/db/spidercore.sql

!!!3. Update include and require calls
~~#660000:__Status: In Progress__~~
Use the new naming convention and PathDefine's. This involves testing and running a lot of multi-file search and replace.
OLD WAY: include_once ('lib/notifications/notificationlib.php');
NEW WAY: include_once ( KERNEL_PKG_PATH.'notification_lib.php' );
I run lots and lot of find commands to do multi-file search and replace. For example:
find . -name "*php" -exec perl -i -wpe \
"s/_once[ ]*\(['\"]lib\/blogs\/bloglib.php['\"]\)/_once\( BLOGS_PKG_PATH.'blog_lib.php' \)/g" {} \;
which replaces all include and requires of bloglib.php with the define for the blog package location and new name convention.

!!!4.__Update template references__
~~#660000:__Status: In Progress__~~
Follow the new TemplatesPackage resource method.

__4a.__ In the __template files__, change as follows. Note addition of QUOTES and removal of tiki- prefix from file name:
OLD WAY: {include file=tiki-directory_bar.tpl}
NEW WAY:{include file="tikipackage:directory/directory_bar.tpl"}
__4b.__ or
OLD WAY: {popup_init src="lib/overlib.js"}
NEW WAY:{popup_init src="`$gTikiLoc.THEMES_PKG_URL`overlib.js"}

__4c.__ In __PHP files__, the smarty load and assigns should look like
OLD WAY: $smarty->assign('mid', 'tiki-my_tiki.tpl');
NEW WAY: $smarty->assign('mid', 'tikipackge:users/my_tiki.tpl');
__4d.__ or
OLD WAY: $smarty->fetch("debug/tiki-debug_console_tab.tpl");
NEW WAY: $smarty->fetch( "tikipackage:debug/debug_console_tab.tpl' );
An example find command I often run is:
find . -name "*tpl" -exec perl -i -wpe \
's/tiki-view_blog.php/\{\$tiki_url\.blogs_url\}view_blog.php/g' {} \;
which replaces template include files with the package location url prefix and new file name convetion.

__4e.__ or PHP __lib references__ should look like:
OLD WAY: include_once ('lib/charts/chartlib.php');
NEW WAY: require_once( CHARTS_PKG_PATH.'chart_lib.php' );

__4f.__ or other PHP references should look like:
OLD WAY: return "<img border='0' src='img/icn/else.gif' alt='icon' />";
NEW WAY: return '<img border="0" src="'.IMG_PKG_URL.'icn/else.gif" alt="icon" />';


(:arrow:) See the TransitionSignUp page!
Page History
Date/CommentUserIPVersion
26 Oct 2008 (10:36 UTC)
correct format
laetzer85.179.34.17440
Current • Source
SEWilco66.93.240.20439
View • Compare • Difference • Source