History of SamplePackageDissection
{maketoc}
! A Breakdown of the files included in the SamplePackage
This is an attempt to list and explain all of the files in the SamplePackage put together by spiderr. Any corrections you make or additions you have to this document are warmly appreciated. After all, that is what a wiki is for, right?
These files are being tackled in an order that seems a bit odd - Start where bitweaver starts - I.E. the install. After that - index.php and bit_setup_inc.php. Then a list of everything in a directory one at a time.
! sample/admin/schema_inc.php
sample/admin/schema_inc.php is the file responsible for integrating SamplePackage into the InstallPackage and thus into bitweaver. At the top of the file is the array of tables that the package will use to do its job. The format for the schema is not straight SQL but rather is ADOdb style DataDict style code as documented in the
[http://phplens.com/lens/adodb/docs-datadict.htm|ADOdb Data Dictionary Documentation]
The next bit of code tells bitweaver that this package can be used as
a homepage:
{code}$gBitInstaller->makePackageHomeable( SAMPLE_PKG_NAME );{/code} This should only be called if it is appropriate for your package, i.e. it is content and not some kind of plugin package.
The rest of the code registers the tables, indexes, sequences, preferences and permissions for the package. This is all relatively straight forward and is largely self explanatory.
! sample/mkpackage.sh
This script can be used to rename the sample package in order to make it easier to use it as a base for new packages. See ((SamplePackage)) for more information on using this to repackage the sample package as your own.
! A Breakdown of the files included in the SamplePackage
This is an attempt to list and explain all of the files in the SamplePackage put together by spiderr. Any corrections you make or additions you have to this document are warmly appreciated. After all, that is what a wiki is for, right?
These files are being tackled in an order that seems a bit odd - Start where bitweaver starts - I.E. the install. After that - index.php and bit_setup_inc.php. Then a list of everything in a directory one at a time.
! sample/admin/schema_inc.php
sample/admin/schema_inc.php is the file responsible for integrating SamplePackage into the InstallPackage and thus into bitweaver. At the top of the file is the array of tables that the package will use to do its job. The format for the schema is not straight SQL but rather is ADOdb style DataDict style code as documented in the
[http://phplens.com/lens/adodb/docs-datadict.htm|ADOdb Data Dictionary Documentation]
The next bit of code tells bitweaver that this package can be used as
a homepage:
{code}$gBitInstaller->makePackageHomeable( SAMPLE_PKG_NAME );{/code} This should only be called if it is appropriate for your package, i.e. it is content and not some kind of plugin package.
The rest of the code registers the tables, indexes, sequences, preferences and permissions for the package. This is all relatively straight forward and is largely self explanatory.
! sample/mkpackage.sh
This script can be used to rename the sample package in order to make it easier to use it as a base for new packages. See ((SamplePackage)) for more information on using this to repackage the sample package as your own.