Version 39

ArchitectureTransition

Created by: SEWilco, Last modification: 23 Feb 2005 (04:57 UTC) by SEWilco
Status: That is up to you.
Make sure have read and understood bitweaverArchitecture, TikiPackages, TemplatesPackage, and KernelPackage

1. Move the files around

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

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

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

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:

Please enter a valid 'page_name', 'page_id' or 'content_id' to include in this page.


NEW WAY:

Please enter a valid 'page_name', 'page_id' or 'content_id' to include in this page.


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 "icon";
NEW WAY: return '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