History of SamplePackage

Sample is a fully functional bitweaver package that demonstrates capabilities and best practices for building your own package that extends the bitweaver and Liberty CMS core. This package makes a great starting place to building your own package. Bear in mind, you are not *required* to follow this coding technique. A bare bones package only needs a directory and a bit_setup_inc.php file. However, many package developers will want to integrate nicely with other bitweaver packages, and utilize other packages' services like the LibertyPackage CMS core.

Sample is entirely community driven. It is suggested that you begin here as this is a good starting point for anyone wanting to cut their teeth on getting to know the bitweaver architecture.

! To Download:
* R1
** [http://www.bitweaver.org/builds/packages/R1/bitweaver_bit_sample_package.tar.gz] or
** cvs -d:pserver:anonymous@bitweaver.cvs.sf.net:/cvsroot/bitweaver co -r R1 sample
** [http://www.bitweaver.org/builds/packages/HEAD/bitweaver_bit_sample_package.zip] or
** 2009-03-29: The above .zip is broke and won't let you edit items. Grab this module from CVS until we get a new .zip built.
** cvs -d:pserver:anonymous@bitweaver.cvs.sf.net:/cvsroot/bitweaver co sample

! To get this to work on your system:

First, extract and copy the sample folder to your bitweaver root directory.

This package requires you to run the installer because it creates its own database. If you are interesed, there is more information about the installer on the InstallPackage page.

Go to Administration -> Kernel -> Packages

Across the top, you should see an "''Install Packages''" tab. Click that. At the bottom of the list there is a link to the installer - ===Not=== the "''Activate bitweaver Packages''" button! Look where it says "''To install more packages, please run the __installer__ to choose your desired packages''". Click the word "''installer''".

Now you are at the Package Installation page. You should see the "''sample''" package all checked off and ready to go. Click on the "''Install Packages''" link at the bottom. The table "samples" will now be created in your database. When that is complete, click "''continue with install''", and BitWeaver will check for conflicts with other existing packages. If there are no conflicts, click on "''Continue Install Process''", and you will be at the "''Installation is complete''" page.

Click "''Enter your bitweaver site''" at the bottom, and the new Sample application should be active in the menu system. WaHoo!

For an exploration of these files, and how they work - visit the ((SamplePackageDissection)) page.

!! Use the Sample package as a place to start your own package
Here are some simple instructions you can use to quickly convert the sample package into a package you can use as a starting point for your own custom package. They are only for unix users.
A bash script based on these instructions to make packages is available in the sample package (included in the above download locations: sample/mkpackage.sh)

# Get a copy of the sample code and place it in your bitweaver root directory alongside all other package directories.

!!! You can then either do the following:
# Rename the sample to a package for your choice, in our example "music" and change into your new directory: {code}mv sample music; cd music{/code}
# Case sensitive Search and Replace all occureneces of 'sample' with your package name: {code}find . -name "*" -exec perl -i -wpe "s/sample/music/g" {} \;
find . -name "*" -exec perl -i -wpe "s/SAMPLE/MUSIC/g" {} \;
find . -name "*" -exec perl -i -wpe "s/Sample/Music/g" {} \;{/code}
# Rename all the files containing 'sample' with your package name (not Ubuntu): {code}find . -name "*sample*" -exec rename sample music {} \;
find . -name "*Sample*" -exec rename Sample Music {} \;{/code}
# Rename all the files containing 'sample' with your package name (on Ubuntu): {code}find . -name "*sample*" -exec rename s/sample/music/ {} \;
find . -name "*Sample*" -exec rename s/Sample/Music/ {} \;{/code}

!!! Or else you can:
# Run the mkpackage.sh script within the sample directory from your bitweaver root directory: {code}./sample/mkpackage.sh music{/code} which will do all of the above for you. If using Ubuntu, you must first edit it to use the s/old/new/ syntax shown above.

!! Finally no matter which route you took you need to:
# Run the package installer to install your new package and you are up and running!
Page History
30 Mar 2009 (00:13 UTC)
Derek Simkowiak71.231.59.10529
Current • Source
Derek Simkowiak71.231.59.10528
View • Compare • Difference • Source
Daniel Sutcliffe71.161.102.627
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
Sean Lee71.241.129.1748
View • Compare • Difference • Source
Chaim Krause69.23.127.717
View • Compare • Difference • Source
View • Compare • Difference • Source
Kevin Olbrich152.16.227.1624
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source