AJAX WordPress Bloxpress Documentation 1
Since this AJAX WordPress Theme Projekt by Kjell Bublitz is very new he hadn´t had the time to document his project on his site. He still seems to struggle with the wiki, what i can really understand.
Therefore I´m trying to give a little introduction on how to handle the bloxpress template. Please bear with me if i´m missing something and feel free to comment.
The Directory Structure
The first look goes into the Directory Structure. Let´s go down from the top to see what is where:
-bloxpress
|-blox contains the php / html Output for all boxes
|-code contains 3 party Libraries and custom php intelligence for bloxpress Kjell called it "Heart of Bloxpress"
|-images systemwide used images for loading sequences
|-jscript javascript Heart
|-presets Definition of preset layouts your User can choose from the Presets Box
|-themes The different Themes+CSS and a file to set the default theme
Edit and Set a Theme
The Bloxpress beta v.04 contains 3 Templates. They are in the Themes folder and can be set by editing the file template/bp-theme.php. Just uncomment the desired Theme Name and you are done.
The templates are of course similar to a normal worpress template. But the header and footer are called over bp-functions and most output is wrapped by bp_check_clientjs() to precheck if the client has Jscript enabled. The sidebar.php include is not needed anymore andaAll sites (home / category / single / search / archive) are coming from the file default/posts.php . There you´ll see the if´s asking for where wordpress currently is.
The template folder contains a folder called Colums in which you can set you colum definition. For example if you want a 3 Colum Layout you have to set 3 Colums.
$columns = array();
$columns[] = "col1";
$columns[] = "col2";
$columns[] = "col3";
This is needed so that you can assign boxes to a colum. The layout is set in two css Files. The style.css contains basic and global definitions. Here you´ll find f.ex.your colums layout and body definitions.
The second css-> bloxpress.css contains special bloxpress definitions f. ex. the Box styles + Layout and the add/remove Content-Top.
You might wonder why the bloxpress root folder contains those commenly known worpress template files? From what i see those are there so WordPress can call the template. If you look into f.ex. footer.php you´ll notice that it only contains a call to the current bloxpress-internal template directory and catches the real footer from there.
So those files are just a kind of gateway into the bloxpress template world
The Bloxs
Thanks to Kjell who gave me an annotation concerning the bloxpres/blox/ – Folder Structure.
bloxpres/blox/
|plugins contains predefined blox for already available wordpress plugins. if you have one activated it makes sense to add these blox to your preset Layout, read about this a little further down below.
|required are what the name says: dont ever remove them or change them. these are blox who can be added to a users layout. for the layout-portability over the bookmarklet it is important that the user has these blox available on every bloxpress installation. if they would be removed, a user coming from another blog, trying to apply his layout-bookmarklet might get into serious trouble .. file not found..
|special are blox with custom headers and other modifications. they didn´t fit under the normal bp-header function.
|system those blox do common wordpress stuff, like archives, blogroll, pages etc.. normal wordpress template functions work here. system stands for wordpress-system, not bloxpress.
To define which blogs should be in the default layout you have to go into the presets folder. Open the presets/bp-default.php. Youll see something like this:
Default Text Which Column Blox-Name
|________________________|________________|
| |
$layout[$title][$columns[0]][] = $blox['search'];
$layout[$title][$columns[0]][] = $blox['categories'];
You can comment out unused boxes or add new ones here. For example i wanted to add a template switcher-box and thanks to Kjell he already implemented the plugin + box contents in blox/plugins/ (you do also need the plugin before in WP called -> wp_theme_switcher ).
So i only needed to add a line like this:
$layout[$title][$columns[0]][] = $blox['themes'];
Watch that i put this into colum 0 , which is my left sidebox. Now the Theme Switcher box is in my default Page Layout. To stick with this example, the box is now always closed. to change that go into blox/plugins/themes.php and change this
<?php bp_title(‘Themes’,FALSE,TRUE); ?>
to
<?php bp_title(‘Themes’,TRUE,TRUE); ?>
Now the themebox is expanded on load.
The bp_title argument takes 3 arguments (can be found in code/bp-global_functions.php) those are
bp_title(title of the block, expand on load true?, show the toolbar?)
All boxes are defined in blox/bp-blox_definitions.php so if you need new ones you first have to define them there:
$blox['CrazyBox'] = $pluginblox_folder."my-Crazy-Box.php";
and then add the my-Crazy-Box.php wherever you set the filepath definition to. Afterwards add the boxcall in presets/bp-default.php
——————
——————
…so far for now.
In my next Article i´m covering how to add a new Box with a new Plugin -> the Weather Plugin
Comments, Questions, Critics are welcome and needed.
AJAX WordPress Bloxpress Documentation 1
You can follow all the replies to this entry through the comments feed.
AJAX WordPress Bloxpress Documentation 1
- By on 03.12.2005 at 1:09


Hello! I am trying to use the bloxpress theme with WP 2.02. Following your instruction to add the “theme switcher” duplicates all posts and sidebar entries. Even when i remove the “theme switcher” from bloxpress, the duplicates are still there. As soon as i add this: $layout[$title][$columns[0]][] = $blox[’themes’]; in presets/bp-default.php it will duplicate all posts and sidebar entries. can anyone help?
by the way: the folder structure below ./blox/ has also some importance.
“plugins” are predefined blox for already available wordpress plugins. if you have one activated it makes sense to add these blox to your preset.
“required” are what the name says: dont ever remove them or change them. these are blox who can be added to a users layout. for the layout-portability over the bookmarklet it is important that the user has these blox available on every bloxpress installation. if they would be removed, a user coming from another blog, trying to apply his layout-bookmarklet might get into serious trouble .. file not found..
“special” are blox with custom headers and other modifications. they didnt fit under the normal bp-header function.
“system” blox are blox doing common wordpress stuff, like archives, blogroll, pages etc.. normal wordpress template functions work here. system as for wordpress-system, not bloxpress.
hope that helps
Danke für deine Hilfe und Mühe