Latest Post - Category: Top Level Category
Chisimba vuvuzelas and learning in Polokwane
Derek Keats has made an interesting blog post
8 days ago
I bet this is the only software framework where programmers get a free Vuvuzela!
This post has not been tagged
| Trackback URL No trackbacks were found for this post | Comments 4 |
Previous Posts
Le Vuvuzela de #Chisimba
Derek Keats has made an interesting blog post
16 days ago
The guys at UWC created a Chisimba vuvuzela to take to OSCON. If this doesn't get attention, nothing willl!
This post has not been tagged
| Trackback URL No trackbacks were found for this post | Comments 0 |
Digital business card in #Chisimba
Derek Keats has made an interesting blog post
22 days ago
The digital business card module is incomplete, but works and provides a vcard compatible business card for Chisimba. This is for someone who is experimenting with it.
Currently, the fields are stored in user paramters (MENU: user | user configuration). The plan is to move this to triplestore as soon as triplestore has a user interface (no planned timeline, no list response to query). The following fields will generate the business card:
ABOUT ME:
tagline
SOCIAL NETWORKING:
africatorurl
deliciousurl
diggurl
facebookurl
flickrurl
friendfeedurl
googleurl
identicaurl
linkedinurl
mutiurl
operaurl
picasaurl
qikurl
slideshareurl
technoratiurl
twitterurl
youtubeurl
ADDRESSES:
addr_home
ddr_city_home
addr_city_work
addr_postalcode_home
addr_postalcode_work
MAP:
latitude
longitude
PHONE:
phone_home
phone_work
phone_cell
TAGS:
tags
separated by a dash -
e.g. geek-elearning-chisimba-php
WEBSITES:
homepage
Happy experimenting!
chisimba
| Trackback URL No trackbacks were found for this post | Comments 10 |
mLearning with #Chisimba
Derek Keats has made an interesting blog post
22 days ago
Paul Scott shows the login screen for Chisimba's mLearning skin. The mLearning skin was developed for use of UWC's eLearning site on mobile phones.
This post has not been tagged
| Trackback URL No trackbacks were found for this post | Comments 3 |
My blockview: personal templates in #Chisimba
Derek Keats has made an interesting blog post
25 days ago
There is a new module in Chisimba that I wrote at the airport on my way to Madrid. It is very simple, and it only exists to demonstrate the power of dynamic templates. However, it could be expanded to provide for a system of user created templates that allow users to create their own look and feel. The module is myblockview (My block view).
To use it, a user may create a templates directory on a Chisimba server using file manager. In that directory, then create a new directory, one for each template, and load into it a file called template.txt file containing a typical dynamic template of the same kind you would use in a module powered by dynamic templates.
Let's say you create a directory called templates, and then in it you create a directory called default. Then you would create a template contianing the three column divs that you would expect in Chisimba as follows.
<div id="Canvas_Content_Body_Region1">
Put some content here for the left column
</div>
<div id="Canvas_Content_Body_Region3">
Put some content here for the right column
</div>
<div id="Canvas_Content_Body_Region2">
Put some content here for the wider, middle column.
</div>
</div>
Of course, this is not very powerful in itself, but if you combine this form of dynamic canvas with the dynamic blocks specified using JSON, then you can have your own design for a Chisimba interface very quickly.
This module is just a proof of concept to show the power of the dynamic canvas approach to templates. Took me <30 minutes to make it, sitting in the airport. Hopefully, this can stimulate some other ideas. To use it, install the myblockview module and play around with creating your own templates as described above. At the time of writing, there is little or no error trapping or checking, so if you use it, be warned, it is developer grade code, not yet ready for unleashing on users.
chisimba blocks externalblocks
| Trackback URL No trackbacks were found for this post | Comments 3 |
External blocks with dynamic templates in #Chisimba
Derek Keats has made an interesting blog post
26 days ago
Chisimba can display blocks on another Chisimba server, using the dynamic blocks module with the blocks specified in ajax format in a content or personal template. To display blocks in response to an external request, the host server must have the externalblocks module installed (in modules, not in core). In addition, the ALLOW_EXTERNAL_BLOCKS property of the Blocks module must be set to 1 on the host server. If this is not set to 1, then the host will not supply external blocks even with the externalblocks module installed.
To be valid for display externally, blocks must have a property expose set to true. This is done by the developer at thet ime of development of the block, and would normally be done in the init() method of the block as follows:
public function init()
{
$this->title = "Demonstration block";
$this->expose = TRUE;
}
External blocks are rendered by the dynamiccanvas module, so only module that use the dynamiccanvas for displaying content can display dynamic blocks, although a filter is in development to provide external blocks within content. The minimal JSON content to display an external block is as follows:
All the other parameters of the dynamic blocks JSON are available to external blocks. For example,
{
"display" : "externalblock",
"server" : "http://localhost/ch/",
"module" : "dynamiccanvas",
"block" : "thirdtest",
}
will display the thirdtest block from the dynamiccanvas module on http://localhost/ch. The following will display the same block without a title.
The only difference between the JSON to display regular blocks and that to display external blocks is in the two lines
"display" : "externalblock",
"server" : "http://localhost/ch/",
instead of just
"display" : "block",
for an internal block.
chisimba blocks externalblocks
| Trackback URL No trackbacks were found for this post | Comments 0 |
Block-based dynamic canvas for #Chisimba
Derek Keats has made an interesting blog post
29 days ago
Since I code for relaxation, for the past few days of my holiday I have been doing some work on Chisimba to improve the way in which it renders its look and feel, as well as the way in which it parses templates to render content. Everything I do is backward compatible.
Following on from the idea of dynamic canvases, I have made it possible for Chisimba to render an entire template based on functionality of Chisimba that we call blocks. There are two types of blocks in Chisimba, narrow blocks and wide blocks. Narrow blocks work on the side columns of 2 and 3 column layout, and wide blocks work on the middle area of 1, 2 and 3 column layout.
To use blocks to make a template, it may be necessary to use output buffering. To do this, add the following to the top of the template:
<?php
ob_start();
?>
Then add the following to the bottom of the template:
<?php
// Get the contents for the layout template
$pageContent = ob_get_contents();
ob_end_clean();
$this->setVar('pageContent', $pageContent);
?>
You then need a layout template in your module that contains:
<?php
$objBlocks = $this->getObject('blockfilter', 'dynamiccanvas');
$pageContent = $this->getVar('pageContent');
$pageContent = $objBlocks->parse($pageContent);
echo $pageContent;
?>
In your controller, for methods that will render the block-based dynamic canvas, you need to ensure that you enable the layout template using:
$this->setLayoutTemplate('demo_layout.php');
For this to work, you need a version 3.0+ skin, and you need to use the Chisimba Canvas layout, which is as follows:
<div id="Canvas_Content_Body_Region1"></div>
<div id="Canvas_Content_Body_Region3"></div>
<div id="Canvas_Content_Body_Region2"></div>
Note that Canvas_Content_Body_Region2 is the middle, but needs to be presented last in order for the columns to float and align correctly.
For 2-column layouts this would be:
<div id="Canvas_Content_Body_Region1"></div>
<div id="Canvas_Content_Body_Region2"></div>
Blocks are inserted using JSON syntax as follows:
{
"display" : "block",
"module" : "modulename",
"block" : "blockname",
"blocktype" : "blocktype",
"titleLength" : "titlelength",
"wrapStr" : 0|1,
"showToggle" : 0|1,
"hidden" : "value,
"showTitle" : 0|1,
"cssClass" : "cssClass",
"cssId " : "cssId"
}
Thus, adding the above block to the left column in such a template would consist of including it in the Canvas_Content_Body_Region1 div as follows:
<div id="Canvas_Content_Body_Region1">
{
"display" : "block",
"module" : "modulename",
"block" : "blockname",
"blocktype" : "blocktype",
"titleLength" : "titlelength",
"wrapStr" : 0|1,
"showToggle" : 0|1,
"hidden" : "value,
"showTitle" : 0|1,
"cssClass" : "cssClass",
"cssId " : "cssId"
}
</div>
Everything except display, module and block are optional. A template made up in this way might look like:
<?php
ob_start();
$objFix = $this->getObject('cssfixlength', 'htmlelements');
$objFix->fixThree();
?>
<div id="threecolumn">
<div id="Canvas_Content_Body_Region1">
</div>
<div id="Canvas_Content_Body_Region3">
| Type: table |
|---|
| This is an example of a block rendered using type table. It places the title in a normal header cell, and the block output in a table cell. |
</div>
<div id="Canvas_Content_Body_Region2">
{
"display" : "block",
"module" : "dynamiccanvas",
"block" : "nonexistentblock"
}
</div>
</div>
<?php
// Get the contents for the layout template
$pageContent = ob_get_contents();
ob_end_clean();
$this->setVar('pageContent', $pageContent);
?>
Note that the lines
$objFix = $this->getObject('cssfixlength', 'htmlelements');
$objFix->fixThree();
are there to equalize the columns. This need will shortly be removed.
For a working example of this, see the dynamiccanvas module.
chisimba canvas blocks dynamiccanvas
| Trackback URL No trackbacks were found for this post | Comments 5 |





