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.
-!! Other optional files
-!!! Package specific Styles and Javascript
+! Other optional files
+!! Package specific Styles and Javascript
If you need some CSS to make your package 'work', you can put these into your own css in your own package. You can put this anywhere you like, such as {code}sample/styles/sample.css{/code} and then call that file from your __sample/bit_setup_inc.php__ file using: {code}$gBitThemes->loadCss( SAMPLE_PKG_PATH.'styles/sample.css' );{/code}
The same applies to javascript files you wish to add that are not present in util/javascript/ {code title="Example bit_setup_inc.php file with additional CSS and Javascript loading"}<?php
global $gBitSystem;
@@ -159,7 +159,7 @@
Using this method is the least invasive and the most flexible since it allows other developers to {code}$gBitThemes->unloadCss( SAMPLE_PKG_PATH.'styles/sample.css' );{/code} if they do not want to load the CSS file.
-!!! Header and Footer templates
+!! Header and Footer templates
bitweaver allows you to insert code into the ~np~<head>~/np~ section without touching any files in the core. You can achieve this by adding a file called: {code}sample/templates/header_inc.tpl{/code} This file will be picked up and inserted automagically. You can test this with a simple script: {code title="Example header_inc.tpl"}{if $gBitSystem->isPackageActive( 'sample' )}
<script type="text/javascript">/* <![CDATA[ */
alert( "It's a small world, but I wouldn't want to have to paint it." );